/* BOBN Shop — dark navy / red / gold, matching the BOBN app's shop screens.
   Shared by merch.html and the homepage shop section (public-website/shop.js). */
:root {
    --bs-navy: #1a1a2e;
    --bs-navy-deep: #16213e;
    --bs-surface: #252542;
    --bs-surface-high: #2f2f52;
    --bs-input: #2a2a48;
    --bs-outline: #3e3e5a;
    --bs-red: #c8102e;
    --bs-red-hover: #ff4757;
    --bs-gold: #ffc107;
    --bs-text: #ffffff;
    --bs-muted: #b8b8c8;
    --bs-success: #059669;
}

.bs-shop-section { background: linear-gradient(180deg, var(--bs-navy) 0%, var(--bs-navy-deep) 100%); color: var(--bs-text); }
.bs-shop-section h2, .bs-shop-section > .container > p { color: var(--bs-text); }
.bs-shop-section > .container > p { color: var(--bs-muted); }

.bs-shop { width: 100%; color: var(--bs-text); font-family: inherit; }
.bs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}
.bs-card {
    display: flex; flex-direction: column; text-align: left;
    background: var(--bs-surface); border: 1px solid var(--bs-outline); border-radius: 14px;
    overflow: hidden; padding: 0; cursor: pointer; color: var(--bs-text); font: inherit;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.bs-card:hover, .bs-card:focus-visible { transform: translateY(-3px); border-color: var(--bs-red); box-shadow: 0 10px 28px rgba(0,0,0,.35); outline: none; }
.bs-card-img { position: relative; background: #fff; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; }
.bs-card-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bs-ph { display: none; font-size: 3rem; color: rgba(0,0,0,.18); }
.bs-noimg .bs-ph { display: block; }
.bs-photo-count {
    position: absolute; right: 8px; bottom: 8px; background: rgba(26,26,46,.85); color: #fff;
    font-size: .75rem; padding: 3px 8px; border-radius: 999px;
}
.bs-card-body { padding: .85rem .95rem 1rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.bs-card-cat { color: var(--bs-muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.bs-card-name { margin: 0; font-size: 1rem; line-height: 1.3; font-weight: 600; color: var(--bs-text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bs-card-price { color: var(--bs-gold); font-weight: 700; font-size: 1.05rem; margin-top: auto; }

.bs-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.bs-filter { margin: 0 0 1.25rem; justify-content: center; }
.bs-chip {
    background: var(--bs-surface); color: var(--bs-text); border: 1px solid var(--bs-outline);
    border-radius: 999px; padding: .45rem 1rem; font: inherit; font-size: .9rem; cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.bs-chip:hover { border-color: var(--bs-red); }
.bs-chip-on { background: var(--bs-red); border-color: var(--bs-red); font-weight: 600; }

.bs-state { text-align: center; padding: 2.5rem 1rem; color: var(--bs-muted); }
.bs-state i { font-size: 2rem; color: var(--bs-gold); margin-bottom: .75rem; display: block; }
.bs-more { text-align: center; margin-top: 1.75rem; }

.bs-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    background: var(--bs-red); color: #fff; border: 1px solid var(--bs-red); border-radius: 10px;
    padding: .85rem 1.4rem; font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none;
    transition: background .15s ease, transform .1s ease;
}
.bs-btn:hover { background: var(--bs-red-hover); border-color: var(--bs-red-hover); color: #fff; }
.bs-btn:active { transform: scale(.99); }
.bs-btn[disabled] { opacity: .6; cursor: default; }
.bs-btn-outline { background: transparent; border-color: var(--bs-outline); color: var(--bs-text); }
.bs-btn-outline:hover { background: var(--bs-surface-high); border-color: var(--bs-muted); }
.bs-btn-block { width: 100%; }
.bs-link { background: none; border: 0; color: var(--bs-muted); cursor: pointer; font: inherit; font-size: .8rem; padding: 0; }
.bs-link:hover { color: var(--bs-red-hover); }

/* Overlays */
body.bs-no-scroll { overflow: hidden; }
.bs-overlay {
    position: fixed; inset: 0; z-index: 13050; background: rgba(8, 8, 20, .72);
    display: flex; align-items: center; justify-content: center; padding: 1.5rem;
    animation: bsFade .15s ease;
}
.bs-overlay-right { justify-content: flex-end; padding: 0; align-items: stretch; }
@keyframes bsFade { from { opacity: 0; } to { opacity: 1; } }
.bs-sheet {
    background: var(--bs-navy); color: var(--bs-text); border: 1px solid var(--bs-outline); border-radius: 16px;
    width: 100%; max-width: 640px; max-height: calc(100vh - 3rem); overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.bs-sheet-wide { max-width: 1040px; }
.bs-sheet-small { max-width: 440px; padding: 2rem; }
.bs-sheet-head {
    position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: .75rem;
    background: var(--bs-navy-deep); border-bottom: 1px solid var(--bs-outline); padding: .75rem 1rem;
}
.bs-sheet-title { flex: 1; font-weight: 700; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-icon-btn { background: none; border: 0; color: var(--bs-text); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; position: relative; }
.bs-icon-btn:hover { background: var(--bs-surface-high); }

/* Product detail */
.bs-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; padding: 1.5rem; }
.bs-gallery { min-width: 0; }
.bs-main-img { position: relative; background: #fff; border-radius: 12px; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.bs-main-img img { width: 100%; height: 100%; object-fit: contain; }
.bs-main-img .bs-ph { font-size: 4.5rem; }
.bs-nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%;
    border: 0; background: rgba(26,26,46,.8); color: #fff; cursor: pointer; font-size: 1rem;
}
.bs-nav:hover { background: var(--bs-red); }
.bs-prev { left: 10px; } .bs-next { right: 10px; }
.bs-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.bs-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--bs-outline); }
.bs-dots span.on { background: var(--bs-red); }
.bs-thumbs { display: flex; gap: .5rem; margin-top: .75rem; overflow-x: auto; padding-bottom: 4px; }
.bs-thumb { flex: 0 0 68px; height: 68px; border-radius: 8px; border: 2px solid transparent; background: #fff; padding: 0; cursor: pointer; overflow: hidden; }
.bs-thumb img { width: 100%; height: 100%; object-fit: contain; }
.bs-thumb.on { border-color: var(--bs-red); }
.bs-info { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.bs-title { margin: 0; font-size: 1.6rem; line-height: 1.25; color: var(--bs-text); }
.bs-seller { color: var(--bs-muted); font-size: .9rem; }
.bs-price { color: var(--bs-gold); font-size: 1.6rem; font-weight: 800; margin: .25rem 0 .5rem; }
.bs-opt { margin-top: .6rem; }
.bs-opt-label { font-weight: 600; font-size: .9rem; margin-bottom: .45rem; color: var(--bs-text); }
.bs-opt-label span { color: var(--bs-muted); font-weight: 400; }
.bs-qty-row { display: flex; align-items: center; justify-content: space-between; }
.bs-qty-row .bs-opt-label { margin: 0; }
.bs-qty { display: inline-flex; align-items: center; gap: .9rem; }
.bs-qty span { min-width: 1.5rem; text-align: center; font-weight: 700; font-size: 1.05rem; }
.bs-qty button {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--bs-outline); background: var(--bs-surface);
    color: var(--bs-text); cursor: pointer;
}
.bs-qty button:hover:not([disabled]) { border-color: var(--bs-red); }
.bs-qty button[disabled] { opacity: .4; cursor: default; }
.bs-qty-sm { gap: .6rem; margin-top: .4rem; }
.bs-qty-sm button { width: 28px; height: 28px; font-size: .75rem; }
.bs-add { margin-top: 1rem; }
.bs-desc { color: var(--bs-muted); line-height: 1.6; margin: 1rem 0 0; font-size: .95rem; }
.bs-clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.bs-more-desc { align-self: flex-start; margin-top: .35rem; color: var(--bs-gold); }
.bs-note { color: var(--bs-muted); font-size: .82rem; margin: .75rem 0 0; }
.bs-note i { color: var(--bs-gold); margin-right: .35rem; }
.bs-center { text-align: center; }
.bs-muted { color: var(--bs-muted); }

/* Cart drawer */
.bs-drawer {
    background: var(--bs-navy); color: var(--bs-text); width: 100%; max-width: 440px; height: 100%;
    display: flex; flex-direction: column; border-left: 1px solid var(--bs-outline); animation: bsSlide .2s ease;
}
@keyframes bsSlide { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.bs-cart-body { flex: 1; overflow-y: auto; padding: .5rem 1rem; }
.bs-cart-foot { border-top: 1px solid var(--bs-outline); padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: var(--bs-navy-deep); }
.bs-cart-foot:empty { display: none; }
.bs-line { display: flex; gap: .85rem; padding: .9rem 0; border-bottom: 1px solid var(--bs-outline); }
.bs-line-img { flex: 0 0 72px; height: 72px; background: #fff; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #999; }
.bs-line-img img { width: 100%; height: 100%; object-fit: contain; }
.bs-line-info { flex: 1; min-width: 0; }
.bs-line-name { font-weight: 600; font-size: .95rem; }
.bs-line-opts, .bs-line-price { color: var(--bs-muted); font-size: .8rem; margin-top: 2px; }
.bs-line-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.bs-line-total { color: var(--bs-gold); font-weight: 700; }
.bs-sum { display: flex; justify-content: space-between; align-items: center; }
.bs-sum strong { color: var(--bs-gold); font-size: 1.15rem; }
.bs-sum-muted { color: var(--bs-muted); font-size: .88rem; }

/* Checkout */
.bs-checkout-body { padding: 1.25rem 1.5rem 1.5rem; }
.bs-checkout-body h3 { font-size: 1rem; margin: 1.25rem 0 .6rem; color: var(--bs-gold); letter-spacing: .02em; }
.bs-summary { background: var(--bs-surface); border: 1px solid var(--bs-outline); border-radius: 12px; padding: .75rem 1rem; display: flex; flex-direction: column; gap: .55rem; }
.bs-sum-line { display: flex; align-items: center; gap: .75rem; }
.bs-sum-line img { width: 46px; height: 46px; object-fit: contain; background: #fff; border-radius: 6px; }
.bs-sum-line > div { flex: 1; min-width: 0; font-size: .9rem; }
.bs-sum-line small { color: var(--bs-muted); }
.bs-sum-line strong { color: var(--bs-text); font-size: .95rem; }
.bs-sum-total { border-top: 1px solid var(--bs-outline); padding-top: .55rem; font-weight: 700; }
.bs-field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .75rem; font-size: .85rem; color: var(--bs-muted); flex: 1; min-width: 0; }
.bs-field input, .bs-card-el {
    background: var(--bs-input); border: 1px solid var(--bs-outline); border-radius: 10px; color: var(--bs-text);
    padding: .8rem .9rem; font: inherit; font-size: 1rem; width: 100%; box-sizing: border-box;
}
.bs-field input:focus { outline: none; border-color: var(--bs-gold); }
.bs-card-el { min-height: 48px; }
.bs-row { display: flex; gap: .75rem; }
.bs-row-3 .bs-field:first-child { flex: 2; }
.bs-error { color: var(--bs-red-hover); min-height: 1.2rem; margin: .6rem 0; font-size: .9rem; }
.bs-success-icon { font-size: 3.5rem; color: var(--bs-success); margin-bottom: .5rem; }
.bs-sheet-small h2 { color: var(--bs-text); margin: 0 0 .5rem; }

/* Toast + floating cart */
.bs-toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 13100;
    background: var(--bs-surface-high); color: #fff; border-left: 4px solid var(--bs-success);
    padding: .8rem 1.2rem; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: opacity .3s ease;
}
.bs-toast-error { border-left-color: var(--bs-red-hover); }
.bs-toast-out { opacity: 0; }
.bs-cart-fab {
    position: fixed; right: 20px; bottom: 20px; z-index: 10000; width: 58px; height: 58px; border-radius: 50%;
    background: var(--bs-red); color: #fff; border: 0; font-size: 1.3rem; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.bs-cart-fab .cart-badge { top: -4px; right: -4px; background: var(--bs-gold); color: var(--bs-navy); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.bs-hidden { display: none !important; }

/* Merch page frame */
body[data-bobn-shop="full"] #shop { background: linear-gradient(180deg, var(--bs-navy) 0%, var(--bs-navy-deep) 100%) !important; }
body[data-bobn-shop="full"] #shop h2 { color: #fff !important; }

@media (max-width: 860px) {
    .bs-detail { grid-template-columns: 1fr; gap: 1.25rem; padding: 1rem; }
    .bs-title { font-size: 1.3rem; }
}
@media (max-width: 640px) {
    .bs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
    .bs-card-body { padding: .6rem .7rem .75rem; }
    .bs-card-name { font-size: .9rem; }
    .bs-overlay { padding: 0; align-items: stretch; }
    .bs-sheet, .bs-sheet-wide { max-width: none; max-height: none; height: 100%; border-radius: 0; border: 0; }
    .bs-sheet-small { height: auto; margin: auto 1rem; border-radius: 16px; }
    .bs-drawer { max-width: none; }
    .bs-row { flex-direction: column; gap: 0; }
    .bs-checkout-body { padding: 1rem; }
    .bs-add { position: sticky; bottom: 12px; z-index: 3; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
    .bs-filter { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .bs-chip { white-space: nowrap; }
}
