/* ==========================================================================
   Pyxion Labs - shop-theme.css
   Storefront layout for shop.html. Loads last, after the page's own styles.
   ========================================================================== */

/* ---------- page layout ---------- */
.shop-page-wrap {
    max-width: 1180px;
    padding: 36px 28px 90px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}
.shop-page-wrap > .shop-hero,
.shop-page-wrap > .shop-card--library,
.shop-page-wrap > .shop-card--store { grid-column: 1 / -1; }
.shop-card--wallet { order: 1; }
.shop-card--voucher { order: 2; }
.shop-card--library { order: 3; }
.shop-card--store { order: 4; }
.shop-hero { order: 0; }

/* ---------- hero banner ---------- */
.shop-hero {
    position: relative;
    overflow: hidden;
    text-align: left;
    padding: 54px 48px 46px;
    border-radius: 28px;
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.11));
    border-top-color: rgba(255, 255, 255, 0.28);
    background:
        radial-gradient(60% 90% at 100% 0%, rgba(236, 72, 153, 0.32), transparent 60%),
        radial-gradient(55% 90% at 0% 100%, rgba(124, 58, 237, 0.38), transparent 62%),
        radial-gradient(40% 60% at 70% 110%, rgba(34, 211, 238, 0.2), transparent 65%),
        rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -30px 60px rgba(124, 58, 237, 0.1);
}
.shop-hero::after {
    content: "\f290";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%) rotate(-12deg);
    font-size: 11rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.07);
    text-shadow: 0 0 60px rgba(244, 114, 182, 0.25);
    pointer-events: none;
}
.shop-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    margin-bottom: 18px;
}
.shop-hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 20%, #d8b4fe 60%, #f9a8d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
body.light-mode .shop-hero h1 { background: linear-gradient(135deg, #1b1638 10%, #7c3aed 60%, #db2777 100%); -webkit-background-clip: text; background-clip: text; }
.shop-hero p { margin: 0; max-width: 520px; font-size: 1.02rem; line-height: 1.65; }
.shop-hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.shop-hero-chips span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.35), inset -1px -1px 4px rgba(255, 255, 255, 0.05);
}
.shop-hero-chips i { color: var(--accent); }

/* ---------- panels ---------- */
.shop-card {
    margin: 0;
    padding: 26px 28px;
    border-radius: 24px;
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.11));
    border-top-color: rgba(255, 255, 255, 0.22);
    background:
        radial-gradient(120% 70% at 0% 0%, rgba(255, 255, 255, 0.08), transparent 55%),
        rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 22px 50px -22px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.shop-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}
.shop-card-title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 0.82rem;
    color: #fff;
    background: var(--btn-grad, linear-gradient(135deg, #8b5cf6, #f472b6));
    box-shadow: 0 6px 16px rgba(168, 85, 247, 0.4);
}

/* wallet */
.shop-card--wallet {
    background:
        radial-gradient(90% 120% at 100% 100%, rgba(236, 72, 153, 0.22), transparent 60%),
        radial-gradient(120% 70% at 0% 0%, rgba(255, 255, 255, 0.1), transparent 55%),
        rgba(255, 255, 255, 0.05);
}
.shop-tokens-row { margin-top: 4px; }
.shop-tokens-count { display: flex; align-items: baseline; gap: 12px; }
.shop-tokens-count .num {
    font-size: 3.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    background: linear-gradient(135deg, #fde68a, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.shop-tokens-count .label { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); }

/* voucher */
.shop-voucher-row { display: flex; gap: 12px; }
.shop-voucher-input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    border-radius: 14px;
    letter-spacing: 0.04em;
}
.shop-voucher-btn { padding: 14px 24px; border-radius: 14px; white-space: nowrap; }
.shop-voucher-msg { margin-top: 12px; font-size: 0.86rem; }

/* ---------- store toolbar ---------- */
.shop-card--store .shop-card-title { margin-bottom: 16px; }
.shop-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding: 0 16px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.26);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: inset 3px 3px 8px rgba(0, 0, 0, 0.5), inset -2px -2px 6px rgba(255, 255, 255, 0.04);
}
.shop-search-row > i { color: var(--muted); position: static; transform: none; }
.shop-search-input {
    flex: 1;
    padding: 14px 4px;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.shop-search-input:focus { box-shadow: none; }
body.light-mode .shop-search-row { background: rgba(255, 255, 255, 0.75); box-shadow: inset 2px 2px 5px rgba(120, 100, 190, 0.14), inset -2px -2px 5px rgba(255, 255, 255, 0.9); }

/* ---------- product grid ---------- */
.shop-items-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }

.shop-item-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 14px 14px 18px;
    text-align: left;
    border-radius: 22px;
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.11));
    border-top-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.shop-item-card:hover {
    transform: translateY(-6px);
    border-color: rgba(167, 139, 250, 0.5);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 26px 50px -16px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(167, 139, 250, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.shop-item-icon-stack {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    align-content: center;
    gap: 12px 16px;
    min-height: 130px;
    margin-bottom: 16px;
    padding: 18px;
    border-radius: 16px;
    font-size: 1.5rem;
    color: #fff;
    background:
        radial-gradient(80% 90% at 20% 0%, rgba(255, 255, 255, 0.2), transparent 60%),
        linear-gradient(135deg, rgba(139, 92, 246, 0.55), rgba(217, 70, 239, 0.42) 55%, rgba(244, 114, 182, 0.4));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -16px 30px rgba(0, 0, 0, 0.2);
}
.shop-item-icon-stack i { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35)); }
.shop-item-name { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 4px; padding: 0 4px; }
.shop-item-sub { font-size: 0.8rem; margin-bottom: 16px; padding: 0 4px; flex: 1; }
.shop-item-price {
    align-self: flex-start;
    margin: 0 4px 14px;
    padding: 6px 14px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.28);
}
.shop-item-cart-btn {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.86rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.35), -3px -3px 9px rgba(255, 255, 255, 0.035);
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.shop-item-cart-btn:hover {
    background: var(--btn-grad, linear-gradient(135deg, #8b5cf6, #f472b6));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 24px rgba(217, 70, 239, 0.4);
    transform: translateY(-1px);
}
.shop-item-cart-btn.in-cart {
    background: rgba(110, 231, 183, 0.12);
    border-color: rgba(110, 231, 183, 0.4);
    color: var(--mint);
    box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.3);
}
.shop-item-card.owned { opacity: 0.9; }
.shop-items-empty { border-radius: 18px; border-color: rgba(255, 255, 255, 0.14); }

/* ---------- library (purchased) ---------- */
.shop-owned-card {
    border-radius: 20px;
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.11));
    background: rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ---------- product and purchase windows ---------- */
.shop-modal-overlay,
.cart-drawer-overlay {
    background: rgba(4, 3, 14, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    perspective: 1400px;
}
.shop-modal {
    border-radius: 26px;
    background:
        radial-gradient(130% 70% at 0% 0%, rgba(255, 255, 255, 0.17), transparent 52%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025) 45%, rgba(255, 255, 255, 0.06)),
        rgba(15, 11, 38, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-top-color: rgba(255, 255, 255, 0.38);
    border-left-color: rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(30px) saturate(165%);
    -webkit-backdrop-filter: blur(30px) saturate(165%);
    box-shadow:
        0 50px 100px -20px rgba(0, 0, 0, 0.7),
        0 18px 36px -12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 1px 0 0 rgba(255, 255, 255, 0.14),
        inset 0 -24px 48px rgba(124, 58, 237, 0.14);
    animation: glassRise 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
.shop-modal-close,
.cart-drawer-close {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text);
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.35), -2px -2px 8px rgba(255, 255, 255, 0.03);
}
.shop-modal-icon-stack {
    padding: 12px 14px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.55), rgba(244, 114, 182, 0.4));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.shop-modal-title { letter-spacing: -0.01em; }
.shop-modal-section {
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.07);
}
.shop-modal-price { color: #fde68a; }

/* cart drawer: a tall glass panel sliding in from the right */
.cart-drawer {
    top: 14px;
    right: 14px;
    bottom: 14px;
    max-width: 440px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-top-color: rgba(255, 255, 255, 0.38);
    background:
        radial-gradient(130% 50% at 0% 0%, rgba(255, 255, 255, 0.15), transparent 52%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025) 45%, rgba(255, 255, 255, 0.05)),
        rgba(15, 11, 38, 0.82);
    backdrop-filter: blur(30px) saturate(165%);
    -webkit-backdrop-filter: blur(30px) saturate(165%);
    box-shadow: -30px 30px 90px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    overflow: hidden;
}
.cart-drawer-head { border-bottom-color: rgba(255, 255, 255, 0.1); }
.cart-drawer-foot { border-top-color: rgba(255, 255, 255, 0.1); background: rgba(0, 0, 0, 0.18); }
.cart-item-row {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.cart-item-row:hover { background: rgba(255, 255, 255, 0.09); }
.cart-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.6), rgba(244, 114, 182, 0.45));
}
.cart-item-price { color: #fde68a; }
.cart-count-badge { background: var(--btn-grad, linear-gradient(135deg, #8b5cf6, #f472b6)); color: #fff; }

/* ---------- light mode ---------- */
body.light-mode .shop-card,
body.light-mode .shop-item-card,
body.light-mode .shop-owned-card { background: rgba(255, 255, 255, 0.62); border-color: rgba(255, 255, 255, 0.9); box-shadow: 0 18px 40px -20px rgba(80, 60, 160, 0.35), inset 0 1px 0 #fff; }
body.light-mode .shop-hero { background: radial-gradient(60% 90% at 100% 0%, rgba(244, 114, 182, 0.35), transparent 60%), radial-gradient(55% 90% at 0% 100%, rgba(167, 139, 250, 0.4), transparent 62%), rgba(255, 255, 255, 0.6); }
body.light-mode .shop-hero::after { color: rgba(124, 58, 237, 0.1); }
body.light-mode .shop-hero-chips span { background: rgba(255, 255, 255, 0.7); border-color: rgba(90, 70, 160, 0.14); box-shadow: none; }
body.light-mode .shop-tokens-count .num { background: linear-gradient(135deg, #d97706, #ea580c); -webkit-background-clip: text; background-clip: text; }
body.light-mode .shop-item-price,
body.light-mode .cart-item-price,
body.light-mode .shop-modal-price { color: #b45309; }
body.light-mode .shop-modal,
body.light-mode .cart-drawer { background: radial-gradient(130% 70% at 0% 0%, rgba(255, 255, 255, 0.9), transparent 55%), rgba(255, 255, 255, 0.82); border-color: rgba(255, 255, 255, 0.9); }
body.light-mode .shop-item-cart-btn { background: rgba(255, 255, 255, 0.8); box-shadow: 4px 4px 10px rgba(120, 100, 190, 0.18), -3px -3px 8px #fff; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
    .shop-page-wrap { grid-template-columns: 1fr; padding: 22px 16px 70px; gap: 16px; }
    .shop-card--wallet, .shop-card--voucher { grid-column: 1 / -1; }
    .shop-hero { padding: 34px 24px 30px; border-radius: 22px; }
    .shop-hero::after { font-size: 7rem; right: 10px; opacity: 0.8; }
    .shop-card { padding: 20px 18px; border-radius: 20px; }
    .shop-tokens-count .num { font-size: 2.8rem; }
    .shop-voucher-row { flex-direction: column; }
    .shop-items-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
    .cart-drawer { top: 0; right: 0; bottom: 0; border-radius: 22px 0 0 22px; }
}

/* buttons that share the page's primary style */
.shop-voucher-btn {
    background: var(--btn-grad, linear-gradient(135deg, #8b5cf6, #d946ef 55%, #f472b6));
    color: #fff;
    border: 0;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(168, 85, 247, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.shop-voucher-btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.shop-hero { padding-top: 42px; padding-bottom: 38px; }
.shop-card--wallet, .shop-card--voucher { min-height: 150px; }
.shop-modal-section { padding: 16px 18px; margin-bottom: 16px; }
.shop-modal-section-title { margin-bottom: 8px; }


/* ---------- search bar: icon on the left, field fills the row ---------- */
.shop-search-row {
    position: relative;
    display: block;
    margin-bottom: 24px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
}
.shop-search-row i.fa-magnifying-glass {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
}
.shop-search-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 46px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.26);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: inset 3px 3px 8px rgba(0, 0, 0, 0.5), inset -2px -2px 6px rgba(255, 255, 255, 0.04);
}
.shop-search-input:focus { border-color: rgba(167, 139, 250, 0.6); box-shadow: inset 3px 3px 8px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(167, 139, 250, 0.18); }
body.light-mode .shop-search-input { background: rgba(255, 255, 255, 0.75); box-shadow: inset 2px 2px 5px rgba(120, 100, 190, 0.14), inset -2px -2px 5px rgba(255, 255, 255, 0.9); }
.shop-search-clear { right: 14px; }
