/* BWO Merch Popup — bwo-merch-popup.css */

/* Overlay */
.bwo-merch-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.bwo-merch-overlay.open {
    display: flex;
}

/* Modal box */
.bwo-merch-modal {
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.bwo-merch-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 18px 20px;
    border-bottom: 1px solid #1e1e1e;
    flex-shrink: 0;
}
.bwo-merch-head h4 {
    font-size: 16px;
    font-weight: 700;
    color: #e8e8e8;
    margin: 0 0 4px;
}
.bwo-merch-head p {
    font-size: 12px;
    color: #bcbcbc;
    margin: 0;
}
.bwo-merch-x {
    background: none;
    border: none;
    color: #555;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
    margin-left: 12px;
    flex-shrink: 0;
    transition: color 0.15s;
}
.bwo-merch-x:hover { color: #e8e8e8; }

/* Body — scrollable */
.bwo-merch-body {
    overflow-y: auto;
    padding: 16px 20px;
    flex: 1;
}

/* Loading */
.bwo-merch-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #bcbcbc;
    font-size: 13px;
    padding: 30px 0;
    justify-content: center;
}
.bwo-merch-loading span {
    width: 16px;
    height: 16px;
    border: 2px solid #333;
    border-top-color: #d4a843;
    border-radius: 50%;
    animation: bwo-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes bwo-spin { to { transform: rotate(360deg); } }

/* Empty state */
.bwo-merch-empty {
    text-align: center;
    color: #bcbcbc;
    font-size: 13px;
    padding: 30px 0;
    line-height: 1.6;
}

/* Product list */
.bwo-merch-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Individual expandable card */
.bwo-merch-item {
    border: 1.5px solid #222;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.bwo-merch-item:hover { border-color: #444; }
.bwo-merch-item.active { border-color: #d4a843; }

/* Card top row */
.bwo-merch-item-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #111;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.bwo-merch-item-top:hover { background: #161616; }
.bwo-merch-item.active .bwo-merch-item-top { background: #131000; }

/* Product image */
.bwo-merch-item-img {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    background: #1a1a1a;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}
.bwo-merch-item.active .bwo-merch-item-img {
    outline: 2px solid rgba(212,168,67,0.4);
    outline-offset: 1px;
}

/* Product info */
.bwo-merch-item-info { flex: 1; min-width: 0; }
.bwo-merch-item-info strong {
    display: block;
    font-size: 13px;
    color: #e8e8e8;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bwo-merch-item-info small { font-size: 11px; color: #bcbcbc; }

/* Checkmark circle */
.bwo-merch-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    color: transparent;
    flex-shrink: 0;
    transition: all 0.15s;
}
.bwo-merch-item.active .bwo-merch-check {
    background: #d4a843;
    border-color: #d4a843;
    color: #0d0d0d;
}

/* Expandable sizes area */
.bwo-merch-sizes {
    display: none;
    padding: 12px 14px;
    background: #0a0a0a;
    border-top: 1px solid #1a1a1a;
}
.bwo-merch-item.active .bwo-merch-sizes { display: block; }

.bwo-merch-sizes-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #444;
    margin-bottom: 8px;
}
.bwo-merch-sizes-row {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

/* Size buttons — yellow highlight on selected */
.bwo-sz {
    padding: 7px 14px;
    border-radius: 5px;
    border: 1px solid #252525;
    background: #111;
    color: #bcbcbc;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.bwo-sz:hover:not(.bwo-sz-out) {
    border-color: #888;
    color: #e8e8e8;
}
.bwo-sz.bwo-sz-chosen {
    border-color: #d4a843;
    color: #d4a843;
    background: rgba(212,168,67,0.12);
    font-weight: 800;
}
.bwo-sz.bwo-sz-out {
    opacity: 0.3;
    cursor: not-allowed;
    text-decoration: line-through;
}
.bwo-one-size {
    font-size: 12px;
    color: #bcbcbc;
    padding: 2px 0;
}

/* Footer */
.bwo-merch-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid #1e1e1e;
    flex-shrink: 0;
}
.bwo-merch-foot-info {
    font-size: 12px;
    color: #bcbcbc;
    flex: 1;
}
.bwo-merch-foot-info b { color: #d4a843; }
.bwo-merch-confirm {
    background: #d4a843;
    color: #0d0d0d;
    border: none;
    border-radius: 7px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 11px 22px;
    transition: opacity 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.bwo-merch-confirm:disabled {
    background: #cccccc;
    color: #333;
    cursor: not-allowed;
}
.bwo-merch-confirm:not(:disabled):hover { opacity: 0.88; }

/* Merch summary tag on Gold card */
.bwo-merch-summary {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 9px 12px;
    background: rgba(212,168,67,0.08);
    border: 1px solid rgba(212,168,67,0.25);
    border-radius: 6px;
}
.bwo-merch-summary.show { display: flex; }
.bwo-merch-summary-img {
    width: 34px;
    height: 34px;
    border-radius: 5px;
    object-fit: cover;
    background: #1a1a1a;
    flex-shrink: 0;
}
.bwo-merch-summary-text {
    flex: 1;
    font-size: 12px;
    color: #d4a843;
    font-weight: 600;
}
.bwo-merch-summary-change {
    font-size: 11px;
    color: #bcbcbc;
    cursor: pointer;
    text-decoration: underline;
    white-space: nowrap;
    background: none;
    border: none;
    padding: 0;
}
.bwo-merch-summary-change:hover { color: #d4a843; }

@media (max-width: 500px) {
    .bwo-merch-modal { max-height: 95vh; }
    .bwo-merch-confirm { padding: 11px 14px; font-size: 12px; }
}

/* ---- Color + Size attribute sections ---- */
.bwo-merch-attrs {
    display: none;
    padding: 14px 14px 12px;
    background: #0a0a0a;
    border-top: 1px solid #1a1a1a;
}
.bwo-merch-item.active .bwo-merch-attrs { display: block; }

.bwo-attr-section { margin-bottom: 12px; }
.bwo-attr-section:last-child { margin-bottom: 0; }

.bwo-attr-label {
    font-size: 12px;
    font-weight: 600;
    color: #bcbcbc;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}

/* Color swatches */
.bwo-color-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.bwo-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50% !important;
    border: 2.5px solid transparent !important;
    cursor: pointer;
    position: relative;
    transition: border-color 0.15s, transform 0.15s !important;
    outline: none;
    flex-shrink: 0;
}
.bwo-color-swatch:hover {
    border-color: #888;
    transform: scale(1.1);
}
.bwo-color-swatch.bwo-chosen {
    border-color: #d4a843;
    transform: scale(1.1);
}
.bwo-swatch-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 3px rgba(0,0,0,0.8);
}

/* Size pills */
.bwo-size-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.bwo-sz-pill {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid #2a2a2a;
    background: #111;
    color: #777;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.03em;
}
.bwo-sz-pill:hover:not(.bwo-out) {
    border-color: #888;
    color: #e8e8e8;
}
.bwo-sz-pill.bwo-chosen {
    border-color: #d4a843;
    color: #d4a843;
    background: rgba(212,168,67,0.1);
    font-weight: 800;
}
.bwo-sz-pill.bwo-out {
    opacity: 0.3;
    cursor: not-allowed;
    text-decoration: line-through;
}
.bwo-one-size {
    font-size: 12px;
    color: #555;
    padding: 4px 0;
}

/* Remove old size styles no longer used */
.bwo-merch-sizes { display: none !important; }
