
/* ── Shared helpers (matches index.php) ──────────────── */
.wrap    { width: var(--wrap); margin-inline: auto; }
.section { padding-block: clamp(3.5rem,7vw,6rem); }
.eyebrow {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .3rem .9rem; border-radius: var(--r-full);
    font-size: var(--tx-xs); font-weight: 800; letter-spacing: .07em;
    text-transform: uppercase; color: var(--primary);
    background: var(--primary-tint); border: 1px solid rgba(1,105,111,.16);
    margin-bottom: var(--sp-4);
}
.eyebrow svg { flex-shrink: 0; }
.sec-head h2 {
    font-size: clamp(1.75rem,3vw,2.5rem);
    font-weight: 900; letter-spacing: -.03em;
    line-height: 1.12; color: var(--text); margin-bottom: var(--sp-3);
}
.sec-head p { font-size: var(--tx-base); color: var(--text-muted); max-width: 52ch; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in-view { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }

/* ══════════════════════════════════════════════════════
   TESTS HERO
══════════════════════════════════════════════════════ */
.tests-hero {
    position: relative; overflow: hidden;
    padding-block: clamp(3rem,6vw,5rem);
    background:
        radial-gradient(ellipse 65% 55% at 85% 45%, rgba(79,56,178,.10), transparent),
        radial-gradient(ellipse 40% 55% at -5% 75%, rgba(1,105,111,.08), transparent),
        var(--bg);

    /* ── Center everything inside ── */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.tests-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(circle at 1px 1px, rgba(79,56,178,.055) 1px, transparent 0);
    background-size: 30px 30px;
    mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, black 30%, transparent 75%);
}

/* ── Wrap all hero content so z-index sits above ::before ── */
.tests-hero .wrap {
    position: relative; z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .45rem 1rem; border-radius: var(--r-full);
    font-size: var(--tx-xs); font-weight: 700;
    background: var(--primary-tint); border: 1px solid rgba(1,105,111,.18);
    color: var(--primary); margin-bottom: var(--sp-5);

    /* ── Center the badge itself ── */
    align-self: center;
}
.hero-badge .dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--green);
    box-shadow: 0 0 0 3px rgba(67,122,34,.2);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { box-shadow: 0 0 0 3px rgba(67,122,34,.2); }
    50%      { box-shadow: 0 0 0 6px rgba(67,122,34,.05); }
}

.tests-hero-title {
    font-size: clamp(2rem,4vw,3.25rem);
    font-weight: 900; letter-spacing: -.04em; line-height: 1.08;
    color: var(--text); margin-bottom: var(--sp-4);

    /* ── Center title ── */
    text-align: center;
    width: 100%;
}
.tests-hero-title span {
    background: linear-gradient(120deg,var(--primary),#4f38b2);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tests-hero-sub {
    font-size: var(--tx-base); color: var(--text-muted);
    line-height: 1.7; margin-bottom: var(--sp-6);

    /* ── Center subtitle, limit width for readability ── */
    text-align: center;
    max-width: 58ch;
    margin-inline: auto;
}

/* ── Search bar centered ── */
.hero-search-bar {
    margin-inline: auto;
}

/* ── Stats row centered ── */
.hero-stats {
    justify-content: center;
}
/* HERO SEARCH */
.hero-search-bar {
    display: flex; max-width: 580px;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: var(--r-full);
    overflow: hidden;
    box-shadow: var(--sh-sm);
    margin-bottom: var(--sp-8);
    transition: border-color var(--ease), box-shadow var(--ease);
}
.hero-search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.hero-search-bar input {
    flex: 1; border: none; outline: none; padding: .875rem 1.25rem;
    font-size: var(--tx-sm); font-family: var(--font);
    color: var(--text); background: transparent;
}
.hero-search-bar input::placeholder { color: var(--text-faint); }
.hero-search-bar button {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .875rem 1.4rem;
    background: linear-gradient(135deg,var(--primary),var(--primary-h));
    color: #fff; border: none; font-size: var(--tx-sm); font-weight: 800;
    cursor: pointer; white-space: nowrap;
    transition: filter var(--ease);
}
.hero-search-bar button:hover { filter: brightness(1.07); }

/* HERO STATS */
.hero-stats { display: flex; flex-wrap: wrap; gap: var(--sp-6); }
.stat-item  { display: flex; flex-direction: column; gap: .15rem; }
.stat-num {
    font-size: clamp(1.5rem,2.5vw,2rem); font-weight: 900;
    letter-spacing: -.04em; color: var(--text); line-height: 1;
}
.stat-num span { color: var(--primary); }
.stat-lbl { font-size: var(--tx-xs); color: var(--text-faint); font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase; }

/* ══════════════════════════════════════════════════════
   EXAM PILLS STRIP (reuse same style as index.php)
══════════════════════════════════════════════════════ */
.exam-pills-wrap {
    padding-block: clamp(1rem,2vw,1.5rem);
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.exam-pills-inner {
    display: flex; flex-wrap: wrap; gap: .45rem;
    align-items: center;
}
.ep {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .38rem .95rem; border-radius: var(--r-full);
    font-size: var(--tx-xs); font-weight: 800; letter-spacing: .04em;
    border: 1.5px solid transparent; cursor: pointer; white-space: nowrap;
    text-decoration: none;
    transition: transform var(--ease), box-shadow var(--ease), background var(--ease);
}
.ep:hover, .ep.active { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.10); }
.ep.active { outline: 2px solid currentColor; outline-offset: 2px; }
.ep-all   { background: var(--primary-tint); color: var(--primary); border-color: rgba(1,105,111,.22); }
.ep-lsat  { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.ep-lnat  { background: #faf5ff; color: #6d28d9; border-color: #ddd6fe; }
.ep-gre   { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.ep-gmat  { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.ep-ielts { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.ep-toefl { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.ep-cat   { background: #fefce8; color: #854d0e; border-color: #fde68a; }
.ep-act   { background: #fdf2f8; color: #9d174d; border-color: #fbcfe8; }
.ep-mcat  { background: #f0f9ff; color: #075985; border-color: #bae6fd; }
.ep-sat   { background: #f5f3ff; color: #4338ca; border-color: #c4b5fd; }
.ep-pte   { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }
.ep-other { background: #f8fafc; color: #475569; border-color: #cbd5e1; }

/* ══════════════════════════════════════════════════════
   FEATURED STRIP
══════════════════════════════════════════════════════ */
.featured-strip-section {
    padding-block: var(--sp-8);
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.strip-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: var(--sp-5); flex-wrap: wrap; gap: var(--sp-3);
}
.strip-head h3 {
    font-size: var(--tx-base); font-weight: 900; color: var(--text);
    display: flex; align-items: center; gap: .5rem;
}
.strip-head a {
    font-size: var(--tx-xs); font-weight: 800; color: var(--primary);
    text-decoration: none; display: inline-flex; align-items: center; gap: .3rem;
}
.strip-head a svg { transition: transform var(--ease); }
.strip-head a:hover svg { transform: translateX(3px); }

.featured-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(260px,100%), 1fr));
    gap: var(--sp-4);
}
.ft-card {
    display: flex; gap: var(--sp-3); align-items: center;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--r-xl); padding: var(--sp-4);
    text-decoration: none; color: inherit;
    box-shadow: var(--sh-xs);
    transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.ft-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: rgba(1,105,111,.25); }
.ft-thumb {
    width: 56px; height: 56px; border-radius: var(--r-lg); flex-shrink: 0;
    background: linear-gradient(135deg,var(--primary),#4f38b2);
    display: grid; place-items: center; color: rgba(255,255,255,.75);
    overflow: hidden;
}
.ft-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ft-info { flex: 1; min-width: 0; }
.ft-name { font-size: var(--tx-sm); font-weight: 800; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: .2rem; }
.ft-price { font-size: var(--tx-base); font-weight: 900; color: var(--primary); }
.ft-price s { font-size: var(--tx-xs); color: var(--text-faint); font-weight: 400; margin-left: .3rem; }
.ft-free { color: #166534; }
.ft-meta { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .3rem; }
.ft-pill {
    font-size: 10px; font-weight: 800; padding: 2px 8px;
    border-radius: var(--r-full); background: var(--primary-tint);
    color: var(--primary); border: 1px solid rgba(1,105,111,.15);
}

/* ══════════════════════════════════════════════════════
   STORE LAYOUT  (sidebar + grid)
══════════════════════════════════════════════════════ */
.store-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: var(--sp-6);
    align-items: flex-start;
    padding-block: var(--sp-8);
}

/* ── FILTER SIDEBAR ───────────────────────────────── */
.filter-sidebar { position: sticky; top: calc(var(--h-nav, 64px) + var(--sp-4)); }
.fs-card {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--r-xl); padding: var(--sp-5); margin-bottom: var(--sp-4);
    box-shadow: var(--sh-xs);
}
.fs-label {
    font-size: var(--tx-xs); font-weight: 900; letter-spacing: .08em;
    text-transform: uppercase; color: var(--text-faint);
    margin-bottom: var(--sp-3); padding-bottom: var(--sp-3);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: .4rem;
}
.fs-label svg { color: var(--primary); }
.f-opt {
    display: flex; align-items: center; gap: .55rem;
    padding: .45rem .6rem; border-radius: var(--r-md);
    font-size: var(--tx-sm); color: var(--text-muted);
    text-decoration: none; transition: background var(--ease), color var(--ease);
    cursor: pointer;
}
.f-opt:hover  { background: var(--primary-tint); color: var(--primary); }
.f-opt.active { background: var(--primary-tint); color: var(--primary); font-weight: 700; }
.f-opt .f-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); flex-shrink: 0; transition: background var(--ease); }
.f-opt.active .f-dot { background: var(--primary); }
.f-cnt { margin-left: auto; font-size: var(--tx-xs); color: var(--text-faint); font-weight: 700; }

/* ── STORE MAIN ───────────────────────────────────── */
.store-topbar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-5);
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--r-xl); padding: .875rem var(--sp-5);
    box-shadow: var(--sh-xs);
}
.st-info { font-size: var(--tx-sm); color: var(--text-muted); }
.st-info b { color: var(--text); font-weight: 800; }
.st-right { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }

.filter-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .8rem; border-radius: var(--r-full);
    font-size: var(--tx-xs); font-weight: 700;
    background: var(--primary-tint); color: var(--primary);
    border: 1px solid rgba(1,105,111,.2); text-decoration: none;
    transition: background var(--ease);
}
.filter-chip:hover { background: rgba(229,83,75,.1); color: #c0392b; border-color: rgba(229,83,75,.2); }
.filter-chip svg { opacity: .7; }

.sort-sel {
    border: 1.5px solid var(--border); border-radius: var(--r-md);
    padding: .5rem .9rem; font-size: var(--tx-sm); font-family: var(--font);
    color: var(--text); background: var(--surface-2); outline: none; cursor: pointer;
    transition: border-color var(--ease);
}
.sort-sel:focus { border-color: var(--primary); }

/* ══════════════════════════════════════════════════════
   BUNDLE CARDS GRID
══════════════════════════════════════════════════════ */
.bundles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(290px,100%), 1fr));
    gap: var(--sp-5);
}

/* CARD */
.bcard {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--r-xl); overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: var(--sh-xs);
    transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
    position: relative;
}
.bcard:hover { transform: translateY(-5px); box-shadow: var(--sh-md); border-color: rgba(1,105,111,.22); }

/* BADGES */
.bcard-badges { position: absolute; top: var(--sp-3); left: var(--sp-3); display: flex; flex-direction: column; gap: .3rem; z-index: 4; }
.bc-badge {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: 10px; font-weight: 900; padding: 3px 9px;
    border-radius: var(--r-full); letter-spacing: .03em; white-space: nowrap;
}
.bc-featured { background: #f57c00; color: #fff; }
.bc-free     { background: #1565c0; color: #fff; }
.bc-sale     { background: #e5534b; color: #fff; }
.bc-popular  { background: #6d28d9; color: #fff; }
.bc-owned    { background: var(--green, #437a22); color: #fff; }

/* WISHLIST HEART */
.wish-btn {
    position: absolute; top: var(--sp-3); right: var(--sp-3); z-index: 4;
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,.9); border: 1px solid var(--border);
    display: grid; place-items: center; cursor: pointer; font-size: 15px;
    color: var(--text-faint); box-shadow: var(--sh-xs);
    transition: color var(--ease), border-color var(--ease), transform var(--ease);
}
.wish-btn:hover, .wish-btn.active { color: #e5534b; border-color: #e5534b; transform: scale(1.1); }
.wish-btn.active { background: #fff5f5; }

/* THUMBNAIL */
.bcard-thumb {
    position: relative; height: 152px; overflow: hidden;
    background: linear-gradient(135deg,var(--primary) 0%,#4f38b2 100%);
    flex-shrink: 0;
}
.bcard-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.bcard:hover .bcard-thumb img { transform: scale(1.06); }
.bcard-thumb-placeholder {
    width: 100%; height: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: rgba(255,255,255,.65); gap: var(--sp-2);
}
.bcard-thumb-placeholder svg { opacity: .7; }
.bcard-thumb-placeholder span { font-size: var(--tx-xs); font-weight: 700; opacity: .8; }
.exam-type-pill {
    position: absolute; bottom: var(--sp-2); left: var(--sp-3);
    background: rgba(0,0,0,.52); backdrop-filter: blur(6px);
    color: #fff; font-size: 10px; font-weight: 800;
    padding: 2px 10px; border-radius: var(--r-full); letter-spacing: .04em;
}

/* CARD BODY */
.bcard-body { padding: var(--sp-5); flex: 1; display: flex; flex-direction: column; gap: var(--sp-2); }
.bcard-title {
    font-size: var(--tx-base); font-weight: 800; color: var(--text); line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bcard-title a { color: inherit; text-decoration: none; transition: color var(--ease); }
.bcard-title a:hover { color: var(--primary); }
.bcard-desc {
    font-size: var(--tx-xs); color: var(--text-muted); line-height: 1.6; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* META ROW */
.bcard-meta { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-block: var(--sp-1); }
.bm-item {
    display: flex; align-items: center; gap: .35rem;
    font-size: var(--tx-xs); color: var(--text-faint);
}
.bm-item svg { color: var(--primary); flex-shrink: 0; }
.bm-item b { color: var(--text-muted); font-weight: 700; }

/* RATING */
.bcard-rating { display: flex; align-items: center; gap: .45rem; }
.stars { display: flex; gap: 2px; color: #d19900; }
.rating-num { font-size: var(--tx-xs); font-weight: 800; color: var(--text-muted); }
.rating-cnt { font-size: var(--tx-xs); color: var(--text-faint); }

/* PRICE */
.bcard-price { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.price-final { font-size: 1.3rem; font-weight: 900; color: var(--primary); line-height: 1; }
.price-final.is-free { color: #166534; }
.price-orig { font-size: var(--tx-sm); color: var(--text-faint); text-decoration: line-through; }
.price-badge {
    font-size: 10px; font-weight: 900; padding: 2px 8px;
    border-radius: var(--r-full); background: #fefce8;
    color: #854d0e; border: 1px solid #fde68a;
}

/* VALIDITY */
.bcard-validity {
    font-size: var(--tx-xs); color: var(--text-faint);
    display: flex; align-items: center; gap: .35rem;
}
.bcard-validity svg { color: var(--primary); }

/* DETAIL LINK */
.details-link {
    font-size: var(--tx-xs); font-weight: 800; color: var(--primary);
    text-decoration: none; display: inline-flex; align-items: center; gap: .3rem;
    margin-top: var(--sp-1);
    transition: gap var(--ease);
}
.details-link:hover { gap: .55rem; }
.details-link svg { transition: transform var(--ease); }
.details-link:hover svg { transform: translateX(2px); }

/* CARD FOOTER / ACTION BUTTONS */
.bcard-foot {
    padding: .875rem var(--sp-5);
    border-top: 1px solid var(--border);
    background: var(--bg);
    display: flex; gap: var(--sp-2); flex-wrap: wrap;
}

.btn-prim {
    display: inline-flex; align-items: center; gap: .5rem;
    height: 2.75rem; padding-inline: 1.2rem;
    border-radius: var(--r-full); font-size: var(--tx-sm); font-weight: 800;
    color: #fff; background: linear-gradient(135deg,var(--primary),var(--primary-h));
    border: none; box-shadow: 0 6px 18px var(--primary-glow);
    cursor: pointer; transition: transform var(--ease), box-shadow var(--ease), filter var(--ease);
    flex: 1; justify-content: center;
}
.btn-prim:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 10px 24px var(--primary-glow); }
.btn-prim:disabled { background: var(--border); color: var(--text-faint); box-shadow: none; cursor: not-allowed; transform: none; }

.btn-ghost {
    display: inline-flex; align-items: center; gap: .4rem;
    height: 2.75rem; padding-inline: 1rem;
    border-radius: var(--r-full); font-size: var(--tx-sm); font-weight: 700;
    color: var(--primary); background: var(--primary-tint);
    border: 1.5px solid rgba(1,105,111,.2);
    cursor: pointer; transition: background var(--ease), transform var(--ease), border-color var(--ease);
    white-space: nowrap;
}
.btn-ghost:hover { background: rgba(1,105,111,.12); border-color: var(--primary); transform: translateY(-1px); }
.btn-ghost.in-cart { background: rgba(67,122,34,.1); color: var(--green, #437a22); border-color: rgba(67,122,34,.25); }
.btn-ghost:disabled { opacity: .5; cursor: not-allowed; }

.btn-owned-link {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    height: 2.75rem; padding-inline: 1.2rem; border-radius: var(--r-full);
    font-size: var(--tx-sm); font-weight: 800;
    color: #fff; background: linear-gradient(135deg, var(--green, #437a22), #5fa832);
    text-decoration: none; box-shadow: 0 6px 18px rgba(67,122,34,.3);
    transition: transform var(--ease), filter var(--ease);
}
.btn-owned-link:hover { transform: translateY(-2px); filter: brightness(1.06); }

.btn-free-enroll {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    height: 2.75rem; padding-inline: 1.2rem; border-radius: var(--r-full);
    font-size: var(--tx-sm); font-weight: 800;
    color: #fff; background: linear-gradient(135deg,#1565c0,#1e88e5);
    border: none; cursor: pointer;
    box-shadow: 0 6px 18px rgba(21,101,192,.3);
    transition: transform var(--ease), filter var(--ease);
}
.btn-free-enroll:hover { transform: translateY(-2px); filter: brightness(1.06); }

/* ══════════════════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════════════════ */
.pagination {
    display: flex; justify-content: center;
    gap: var(--sp-2); margin-top: var(--sp-8); flex-wrap: wrap;
}
.pg-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.5rem; height: 2.5rem; padding-inline: .75rem;
    border-radius: var(--r-md); font-size: var(--tx-sm); font-weight: 700;
    border: 1.5px solid var(--border); background: var(--surface-2);
    color: var(--text); text-decoration: none;
    transition: border-color var(--ease), color var(--ease), background var(--ease);
}
.pg-btn:hover  { border-color: var(--primary); color: var(--primary); }
.pg-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pg-btn.disabled { opacity: .4; pointer-events: none; }

/* ══════════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════════ */
.empty-state {
    grid-column: 1 / -1; text-align: center; padding: var(--sp-16, 5rem) var(--sp-4);
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--r-xl);
}
.empty-state svg { opacity: .18; margin-bottom: var(--sp-4); }
.empty-state h3 { font-size: var(--tx-lg); font-weight: 800; color: var(--text-muted); margin-bottom: var(--sp-2); }
.empty-state p  { font-size: var(--tx-sm); color: var(--text-faint); margin-bottom: var(--sp-5); }

/* ══════════════════════════════════════════════════════
   CART DRAWER
══════════════════════════════════════════════════════ */
.drawer-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 8000; backdrop-filter: blur(2px);
}
.drawer-overlay.open { display: block; }
.cart-drawer {
    position: fixed; top: 0; right: -420px;
    width: 400px; max-width: 95vw; height: 100vh;
    background: var(--surface-2); z-index: 8001;
    box-shadow: -8px 0 40px rgba(0,0,0,.15);
    transition: right .3s cubic-bezier(.16,1,.3,1);
    display: flex; flex-direction: column;
}
.cart-drawer.open { right: 0; }
.cd-head {
    background: linear-gradient(135deg,var(--primary),var(--primary-h));
    color: #fff; padding: var(--sp-5) var(--sp-5);
    display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.cd-head h3 { font-size: var(--tx-base); font-weight: 800; display: flex; align-items: center; gap: .5rem; }
.cd-close {
    background: rgba(255,255,255,.15); border: none; color: #fff;
    width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center; cursor: pointer; font-size: 18px;
    transition: background var(--ease);
}
.cd-close:hover { background: rgba(255,255,255,.28); }
.cd-body { flex: 1; overflow-y: auto; padding: var(--sp-4); }
.cd-body::-webkit-scrollbar { width: 4px; }
.cd-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.cd-item {
    display: flex; gap: var(--sp-3); padding-block: var(--sp-3);
    border-bottom: 1px solid var(--border);
}
.cd-img {
    width: 58px; height: 58px; border-radius: var(--r-md); flex-shrink: 0;
    object-fit: cover; background: linear-gradient(135deg,var(--primary),#4f38b2);
    display: grid; place-items: center; color: rgba(255,255,255,.6);
}
.cd-info { flex: 1; min-width: 0; }
.cd-name  { font-size: var(--tx-sm); font-weight: 700; color: var(--text); margin-bottom: .2rem; }
.cd-price { font-size: var(--tx-base); font-weight: 900; color: var(--primary); }
.cd-rm {
    background: none; border: none; color: var(--text-faint);
    cursor: pointer; padding: var(--sp-1); font-size: 14px; align-self: flex-start; margin-top: 4px;
    border-radius: var(--r-md); transition: color var(--ease), background var(--ease);
}
.cd-rm:hover { color: #e5534b; background: rgba(229,83,75,.1); }
.cd-empty { text-align: center; padding: var(--sp-10) var(--sp-4); color: var(--text-faint); }
.cd-empty svg { opacity: .18; margin-bottom: var(--sp-3); }
.cd-foot {
    border-top: 1px solid var(--border); padding: var(--sp-4); background: var(--bg); flex-shrink: 0;
}
.cd-total {
    display: flex; justify-content: space-between; align-items: center;
    font-size: var(--tx-sm); font-weight: 700; color: var(--text); margin-bottom: var(--sp-3);
}
.cd-total span { font-size: var(--tx-lg); font-weight: 900; color: var(--primary); }
.cd-checkout {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    width: 100%; height: 3rem; border-radius: var(--r-full);
    background: linear-gradient(135deg,var(--primary),var(--primary-h));
    color: #fff; font-weight: 800; font-size: var(--tx-sm);
    text-decoration: none; border: none; cursor: pointer;
    box-shadow: 0 8px 20px var(--primary-glow);
    transition: transform var(--ease), filter var(--ease);
}
.cd-checkout:hover { transform: translateY(-2px); filter: brightness(1.07); }

/* ══════════════════════════════════════════════════════
   LOGIN MODAL
══════════════════════════════════════════════════════ */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.6); z-index: 9000;
    align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.login-modal {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--r-xl); width: 400px; max-width: 95vw;
    box-shadow: var(--sh-md); overflow: hidden;
    animation: popIn .3s cubic-bezier(.16,1,.3,1);
}
@keyframes popIn { from { opacity: 0; transform: scale(.9) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.lm-head {
    background: linear-gradient(135deg,var(--primary),#4f38b2);
    color: #fff; padding: var(--sp-7) var(--sp-6); text-align: center;
}
.lm-head svg { opacity: .85; margin-bottom: var(--sp-3); }
.lm-head h3 { font-size: var(--tx-lg); font-weight: 900; margin-bottom: var(--sp-2); }
.lm-head p  { font-size: var(--tx-sm); opacity: .8; }
.lm-body { padding: var(--sp-6); }
.lm-body p  { font-size: var(--tx-sm); color: var(--text-muted); text-align: center; line-height: 1.6; margin-bottom: var(--sp-5); }
.lm-btns { display: flex; flex-direction: column; gap: var(--sp-3); }
.lm-login-btn {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    height: 3rem; border-radius: var(--r-full);
    background: linear-gradient(135deg,var(--primary),var(--primary-h));
    color: #fff; text-decoration: none; font-size: var(--tx-sm); font-weight: 800;
    box-shadow: 0 8px 20px var(--primary-glow);
    transition: filter var(--ease), transform var(--ease);
}
.lm-login-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.lm-reg-btn {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    height: 3rem; border-radius: var(--r-full);
    background: var(--bg); color: var(--text); text-decoration: none;
    font-size: var(--tx-sm); font-weight: 700;
    border: 1.5px solid var(--border);
    transition: border-color var(--ease), color var(--ease);
}
.lm-reg-btn:hover { border-color: var(--primary); color: var(--primary); }
.lm-cancel {
    text-align: center; margin-top: var(--sp-4);
    font-size: var(--tx-xs); color: var(--text-faint); cursor: pointer;
    transition: color var(--ease);
}
.lm-cancel:hover { color: #e5534b; }

/* ══════════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════════ */
.toast-stack {
    position: fixed; bottom: var(--sp-6); right: var(--sp-6);
    z-index: 9999; display: flex; flex-direction: column;
    gap: var(--sp-2); pointer-events: none;
}
.toast {
    display: flex; align-items: center; gap: .75rem;
    padding: .875rem 1.1rem; border-radius: var(--r-xl);
    font-size: var(--tx-sm); font-weight: 700;
    min-width: 240px; max-width: 320px;
    box-shadow: var(--sh-md); pointer-events: all;
    animation: toastIn .35s cubic-bezier(.16,1,.3,1);
}
.toast.t-ok   { background: var(--green, #437a22); color: #fff; }
.toast.t-fail { background: #e5534b; color: #fff; }
.toast.t-info { background: #1565c0; color: #fff; }
.toast.t-warn { background: #f57c00; color: #fff; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media(max-width: 900px) {
    .store-layout { grid-template-columns: 1fr; }
    .filter-sidebar { display: none; }
}
@media(max-width: 640px) {
    .tests-hero { padding-block: clamp(2rem,5vw,3.5rem); }
    .tests-hero-title { font-size: 1.8rem; }
    .hero-search-bar { border-radius: var(--r-lg); }
    .bcard-foot { flex-wrap: wrap; }
}


/* ══ THUMBNAIL CONTAINER ══════════════════════════════════════ */
.bcard-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--surface-2);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    flex-shrink: 0;
}

/* Real image */
.bcard-thumb-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s cubic-bezier(.25,.8,.25,1);
}
.bcard:hover .bcard-thumb-img {
    transform: scale(1.05);
}

/* Gradient placeholder when no image uploaded */
.bcard-thumb-placeholder {
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    position: relative;
}
.bcard-thumb-placeholder span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    opacity: .75;
}

/* Hover overlay — "Quick View" CTA */
.bcard-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.42);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s ease;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.bcard:hover .bcard-thumb-overlay {
    opacity: 1;
}
.thumb-overlay-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #fff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: .45rem 1.1rem;
    border-radius: var(--r-full);
    text-decoration: none;
    transform: translateY(6px);
    transition: transform .3s ease;
    pointer-events: none;
}
.bcard:hover .thumb-overlay-btn {
    transform: translateY(0);
    pointer-events: auto;
}
