/* ==========================================================================
   XB247 Theme Override — Custom CSS
   Everything Tailwind CDN does not cover.
   ========================================================================== */

/* ── CSS Custom Properties (Design Tokens) ──────────────────────────────── */
:root {
    --brand-500:    #14b8a6;
    --brand-600:    #0d9488;
    --brand-950:    #020617;
    --radius-card:  1.5rem;
    --nav-height:   72px;
    --nav-h-mobile: 64px;
    --transition-base: 300ms cubic-bezier(0.16, 1, 0.3, 1);
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* ── Light mode palette (default) ── */
    --bg-primary:    #fafafa;
    --bg-surface:    #ffffff;
    --bg-elevated:   #ffffff;
    --bg-inset:      #f1f5f9;
    --text-primary:  #111827;
    --text-secondary:#6b7280;
    --text-tertiary: #9ca3af;
    --border-default:#e5e7eb;
    --border-subtle: #f3f4f6;
    --shadow-card:   0 4px 24px rgba(0,0,0,0.06);
    --shadow-float:  0 20px 50px -12px rgba(0,0,0,0.08);
    --glass-bg:      rgba(255,255,255,0.72);
    --glass-border:  rgba(255,255,255,0.5);
    --neu-flat:      linear-gradient(145deg, #ffffff, #e6e9ef);
    --neu-shadow:    6px 6px 14px rgba(0,0,0,0.06), -6px -6px 14px rgba(255,255,255,0.9);
    --neu-shadow-sm: 3px 3px 8px rgba(0,0,0,0.05), -3px -3px 8px rgba(255,255,255,0.8);
    --neu-pressed:   inset 3px 3px 6px rgba(0,0,0,0.06), inset -3px -3px 6px rgba(255,255,255,0.9);
}

/* ── Dark mode palette ── */
html.dark {
    --bg-primary:    #0b0f1a;
    --bg-surface:    #111827;
    --bg-elevated:   #1e293b;
    --bg-inset:      #0f172a;
    --text-primary:  #f1f5f9;
    --text-secondary:#94a3b8;
    --text-tertiary: #64748b;
    --border-default:#1e293b;
    --border-subtle: #1e293b;
    --shadow-card:   0 4px 24px rgba(0,0,0,0.3);
    --shadow-float:  0 20px 50px -12px rgba(0,0,0,0.4);
    --glass-bg:      rgba(15,23,42,0.72);
    --glass-border:  rgba(255,255,255,0.06);
    --neu-flat:      linear-gradient(145deg, #1e293b, #0f172a);
    --neu-shadow:    6px 6px 14px rgba(0,0,0,0.3), -6px -6px 14px rgba(255,255,255,0.02);
    --neu-shadow-sm: 3px 3px 8px rgba(0,0,0,0.25), -3px -3px 8px rgba(255,255,255,0.02);
    --neu-pressed:   inset 3px 3px 6px rgba(0,0,0,0.25), inset -3px -3px 6px rgba(255,255,255,0.02);
}

/* ── Global reset & base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html.scroll-smooth { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Admin bar compensation */
body.admin-bar { padding-top: 32px; }
body.admin-bar .xb247-nav { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar { padding-top: 46px; }
    body.admin-bar .xb247-nav { top: 46px; }
}

/* ── Glass Morphism Components ──────────────────────────────────────────── */
.glass-nav {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.glass-nav.on-dark {
    background: rgba(2, 6, 23, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-nav.on-dark.scrolled {
    background: rgba(2, 6, 23, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* Start as white for non-hero pages */
.glass-nav.on-light { background: rgba(255, 255, 255, 0.95); }

.dark-glass {
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.bento-glass {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.0) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-left: 1px solid rgba(255, 255, 255, 0.4);
}

/* ── Gradient Text ───────────────────────────────────────────────────────── */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(135deg, #14b8a6, #3b82f6);
}

.text-gradient-gold {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(135deg, #fbbf24, #f59e0b);
}

/* ── Gift Card Brand Gradients ─────────────────────────────────────────── */
.gc-apple   { background: linear-gradient(135deg, #111 0%, #222 100%); }
.gc-steam   { background: linear-gradient(135deg, #171a21 0%, #1b2838 100%); }
.gc-amazon  { background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%); }
.gc-psn     { background: linear-gradient(135deg, #00439c 0%, #00224f 100%); }
.gc-xbox    { background: linear-gradient(135deg, #107C10 0%, #084208 100%); }
.gc-roblox  { background: linear-gradient(135deg, #e62e2e 0%, #a81a1a 100%); }
.gc-netflix { background: linear-gradient(135deg, #e50914 0%, #8b0000 100%); }
.gc-spotify { background: linear-gradient(135deg, #1DB954 0%, #147A37 100%); }
.gc-itunes  { background: linear-gradient(135deg, #fb5c74 0%, #d63384 100%); }
.gc-google  { background: linear-gradient(135deg, #4285F4 0%, #1a73e8 100%); }
.gc-sephora {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    border-bottom: 4px solid #e11d48;
}
.gc-nike    { background: linear-gradient(135deg, #111827 0%, #1f2937 100%); }
.gc-target  { background: linear-gradient(135deg, #cc0000 0%, #990000 100%); }
.gc-walmart { background: linear-gradient(135deg, #0071ce 0%, #004f8f 100%); }
.gc-generic { background: linear-gradient(135deg, #475569 0%, #1e293b 100%); }

/* ── Scroll Reveal ──────────────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left  { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-left.active, .reveal-right.active { transform: translateX(0); }

/* ── Keyframe Animations ────────────────────────────────────────────────── */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-16px); }
}
@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(-3deg); }
    50%       { transform: translateY(-12px) rotate(-3deg); }
}
@keyframes marquee {
    0%   { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(20, 184, 166, 0.3); }
    50%       { box-shadow: 0 0 45px rgba(20, 184, 166, 0.6); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes scale-in {
    0%   { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1);    opacity: 1; }
}

.animate-float          { animation: float 6s ease-in-out infinite; }
.animate-float-delayed  { animation: float-delayed 6s ease-in-out 3s infinite; }
.animate-marquee        { animation: marquee 45s linear infinite; }
.animate-pulse-glow     { animation: pulse-glow 2.5s ease-in-out infinite; }
.animate-scale-in       { animation: scale-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }

@media (prefers-reduced-motion: reduce) {
    html.scroll-smooth { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ── Scrollbar hiding ───────────────────────────────────────────────────── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Premium Shadow Utilities ───────────────────────────────────────────── */
.shadow-premium        { box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.05); }
.shadow-premium-hover  { box-shadow: 0 30px 60px -15px rgba(20, 184, 166, 0.15); }
.shadow-glow           { box-shadow: 0 0 30px rgba(20, 184, 166, 0.4); }
.shadow-inner-light    { box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1); }

/* ── Card Components ────────────────────────────────────────────────────── */
.xb247-card {
    background: #fff;
    border-radius: var(--radius-card);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.xb247-card:hover {
    box-shadow: 0 24px 48px -12px rgba(20, 184, 166, 0.14);
    transform: translateY(-3px);
}

/* Gift card item in the product grid */
.xb247-gc-item {
    background: #fff;
    border-radius: 1.5rem;
    border: 1px solid #f3f4f6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}
.xb247-gc-item:hover {
    box-shadow: 0 28px 56px -14px rgba(20, 184, 166, 0.15);
    transform: translateY(-4px);
}
.xb247-gc-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
    pointer-events: none;
    z-index: 1;
}
.xb247-gc-item:hover::before {
    border-color: rgba(20, 184, 166, 0.2);
}

/* ── Category filter pills ──────────────────────────────────────────────── */
.filter-pill {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1.5px solid transparent;
    white-space: nowrap;
}
.filter-pill.active {
    background: #111827;
    color: #fff;
    border-color: transparent;
}
.filter-pill:not(.active) {
    background: #fff;
    color: #6b7280;
    border-color: #e5e7eb;
}
.filter-pill:not(.active):hover {
    border-color: #14b8a6;
    color: #14b8a6;
}

/* ── Legacy layout resets ────────────────────────────────────────────────── */
.xb247-page-wrapper .xb247-notices-wrapper { display: block; }

/* Override legacy page defaults */
.xb247-page-wrapper .xb247-commerce,
.xb247-page-wrapper .xb247-commerce-page {
    max-width: 100%;
}

/* ── Section Separator ──────────────────────────────────────────────────── */
.section-divider {
    width: 48px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #14b8a6, #3b82f6);
    margin: 1rem auto;
}

/* ── Homepage Visuals ─────────────────────────────────────────────────── */
.xb247-pattern-grid {
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
        radial-gradient(circle at 20% 20%, rgba(20,184,166,0.12), transparent 26%),
        radial-gradient(circle at 80% 80%, rgba(59,130,246,0.1), transparent 24%);
    background-size: 28px 28px, 28px 28px, 100% 100%, 100% 100%;
}

.xb247-hero-shipment::before {
    content: '';
    position: absolute;
    inset: 18px auto auto 16px;
    width: 96px;
    height: 96px;
    border-radius: 28px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), transparent 35%), linear-gradient(135deg, rgba(20,184,166,0.8), rgba(59,130,246,0.55));
    transform: rotate(-8deg);
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.35);
}

.xb247-showcase-panel { isolation: isolate; }
.xb247-showcase-panel__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,0.16), transparent 24%),
        radial-gradient(circle at bottom left, rgba(20,184,166,0.22), transparent 28%),
        linear-gradient(145deg, #0f172a 0%, #111827 48%, #1f2937 100%);
}
.xb247-showcase-panel--electronics .xb247-showcase-panel__bg {
    background:
        radial-gradient(circle at 78% 24%, rgba(96,165,250,0.35), transparent 20%),
        radial-gradient(circle at 28% 85%, rgba(20,184,166,0.24), transparent 26%),
        linear-gradient(135deg, #020617 0%, #0f172a 42%, #111827 100%);
}
.xb247-showcase-panel--sneakers .xb247-showcase-panel__bg {
    background:
        radial-gradient(circle at 85% 20%, rgba(251,191,36,0.18), transparent 22%),
        linear-gradient(135deg, #111827 0%, #1f2937 52%, #0f172a 100%);
}
.xb247-showcase-panel--beauty .xb247-showcase-panel__bg {
    background:
        radial-gradient(circle at 70% 22%, rgba(244,114,182,0.32), transparent 20%),
        linear-gradient(145deg, #111827 0%, #3f1d2e 100%);
}

.xb247-showcase-visual {
    width: min(42%, 290px);
    aspect-ratio: 1.1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.xb247-showcase-laptop {
    width: 100%;
    max-width: 250px;
    filter: drop-shadow(0 26px 34px rgba(2, 6, 23, 0.42));
}
.xb247-showcase-screen {
    height: 150px;
    border-radius: 18px 18px 10px 10px;
    border: 1px solid rgba(255,255,255,0.14);
    background:
        linear-gradient(135deg, rgba(20,184,166,0.75), rgba(37,99,235,0.55)),
        radial-gradient(circle at 25% 20%, rgba(255,255,255,0.18), transparent 20%),
        #0f172a;
    position: relative;
    overflow: hidden;
}
.xb247-showcase-screen::before,
.xb247-showcase-screen::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
}
.xb247-showcase-screen::before {
    top: 20px;
    left: 20px;
    width: 90px;
    height: 10px;
}
.xb247-showcase-screen::after {
    bottom: 24px;
    left: 20px;
    width: 120px;
    height: 46px;
    border-radius: 14px;
}
.xb247-showcase-base {
    width: 112%;
    height: 12px;
    margin-left: -6%;
    border-radius: 0 0 18px 18px;
    background: linear-gradient(180deg, #cbd5e1, #64748b);
}

.xb247-showcase-sneaker {
    width: 180px;
    height: 90px;
    border-radius: 60px 24px 36px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
    transform: rotate(-18deg);
    box-shadow: 0 28px 40px rgba(2, 6, 23, 0.35);
}
.xb247-showcase-sneaker::before,
.xb247-showcase-sneaker::after {
    content: '';
    position: absolute;
}
.xb247-showcase-sneaker::before {
    inset: 18px 24px 24px 18px;
    border-radius: 44px 16px 26px 16px;
    background: linear-gradient(135deg, #111827 0%, #334155 100%);
}
.xb247-showcase-sneaker::after {
    left: 24px;
    right: 18px;
    bottom: 12px;
    height: 16px;
    border-radius: 999px;
    background: #fff;
}

.xb247-showcase-chip:hover { transform: translateY(-4px); }

.xb247-showcase-beauty {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.xb247-showcase-beauty span {
    display: block;
    width: 18px;
    border-radius: 999px 999px 10px 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(244,114,182,0.45));
    box-shadow: 0 14px 24px rgba(0,0,0,0.18);
}
.xb247-showcase-beauty span:nth-child(1) { height: 48px; }
.xb247-showcase-beauty span:nth-child(2) { height: 68px; }
.xb247-showcase-beauty span:nth-child(3) { height: 40px; }

/* ── Page transition overlay ────────────────────────────────────────────── */
#xb247-page-transition {
    position: fixed;
    inset: 0;
    background: #020617;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
#xb247-page-transition.fade-in  { opacity: 1; }
#xb247-page-transition.fade-out { opacity: 0; }

/* ── App Toast notification ─────────────────────────────────────────────── */
.xb247-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 1.25rem;
    padding: 0.75rem 1.25rem 0.75rem 0.75rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.5s ease;
    max-width: 260px;
    pointer-events: none;
}
.xb247-toast.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.xb247-toast-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #2dd4bf, #0d9488);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
@media (max-width: 640px) {
    .xb247-toast { display: none !important; }
}

/* ── Nav mobile menu ────────────────────────────────────────────────────── */
#xb247-mobile-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease;
    opacity: 0;
    background: rgba(2, 6, 23, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
#xb247-mobile-nav.open {
    max-height: 500px;
    opacity: 1;
}

/* ── Procurement & inner page wrappers ──────────────────────────────────── */
.xb247-inner-page {
    min-height: 100vh;
    background: #fafafa;
}
@media (max-width: 640px) {
    .xb247-inner-page { padding-top: 0; }
}

/* ── Product detail page ────────────────────────────────────────────────── */
.xb247-product-gallery img {
    border-radius: 1.25rem;
    width: 100%;
    object-fit: cover;
}

/* ── Quantity selector ──────────────────────────────────────────────────── */
.xb247-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 0.25rem;
}
.xb247-qty button {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
}
.xb247-qty button:hover { background: #111827; color: #fff; }
.xb247-qty input {
    width: 2.5rem;
    text-align: center;
    background: transparent;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    outline: none;
}

/* ── Skeleton loader for async content ──────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 0.5rem;
}

/* ── Procurement / shop-for-me form styles ──────────────────────────────── */
.xb247-form-field {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.875rem;
    padding: 0.875rem 1rem;
    width: 100%;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: #111827;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.xb247-form-field:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
}
.xb247-form-field::placeholder { color: #9ca3af; font-weight: 400; }

/* ── Auth pages ─────────────────────────────────────────────────────────── */
.xb247-auth-panel {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 768px) {
    .xb247-auth-panel { grid-template-columns: 1fr; }
    .xb247-auth-brand { display: none; }
}

/* ── Stat counter ───────────────────────────────────────────────────────── */
.xb247-stat-number {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* ── Ensure smooth images ────────────────────────────────────────────────── */
img { max-width: 100%; height: auto; }
img[loading="lazy"] { transition: opacity 0.3s ease; }

/* ── Selection colour ───────────────────────────────────────────────────── */
::selection      { background: #14b8a6; color: #fff; }
::-moz-selection { background: #14b8a6; color: #fff; }

/* ── Focus rings ────────────────────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 3px;
}

/* ══════════════════════════════════════════════════════════════════════════
   HEADER FIX — Proper fixed positioning for ALL pages
   ══════════════════════════════════════════════════════════════════════════ */

/* Nav spacer — ensures content doesn't hide under fixed nav */
.xb247-nav-spacer { height: var(--nav-height); }
@media (max-width: 1024px) { .xb247-nav-spacer { height: var(--nav-h-mobile); } }

/* Admin bar offset */
body.admin-bar .xb247-nav { top: 32px !important; }
body.admin-bar .xb247-nav-spacer { height: calc(var(--nav-height) + 32px); }
@media screen and (max-width: 782px) {
    body.admin-bar .xb247-nav { top: 46px !important; }
    body.admin-bar .xb247-nav-spacer { height: calc(var(--nav-h-mobile) + 46px); }
}


/* ══════════════════════════════════════════════════════════════════════════
   PROFILE DROPDOWN
   ══════════════════════════════════════════════════════════════════════════ */
#xb247-profile-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#xb247-profile-chevron.is-open {
    transform: rotate(180deg);
}

/* ══════════════════════════════════════════════════════════════════════════
   CART DRAWER — Premium Slide-Out
   ══════════════════════════════════════════════════════════════════════════ */
#xb247-cart-overlay.is-open { opacity: 1; visibility: visible; }
#xb247-cart-drawer.is-open { transform: translateX(0); }

/* Lock body scroll when cart/drawer is open */
body.xb247-drawer-open { overflow: hidden; }

/* Cart item card */
.xb247-cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
    animation: xb247-fade-up 0.3s ease both;
}
.xb247-cart-item:last-child { border-bottom: none; }
.xb247-cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: 1rem;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
}
.xb247-cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.xb247-cart-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.xb247-cart-item-name { font-weight: 700; font-size: 0.875rem; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xb247-cart-item-variant { font-size: 0.75rem; color: #9ca3af; }
.xb247-cart-item-price { font-weight: 800; font-size: 0.875rem; color: #111827; }
.xb247-cart-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #d1d5db;
    padding: 4px;
    border-radius: 8px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.xb247-cart-item-remove:hover { color: #ef4444; background: rgba(239,68,68,0.06); }

/* Qty control in cart */
.xb247-cart-qty {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}
.xb247-cart-qty button {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
    transition: all 0.15s;
}
.xb247-cart-qty button:hover { background: #f1f5f9; color: #111827; }
.xb247-cart-qty span { width: 28px; text-align: center; font-size: 13px; font-weight: 700; color: #111827; }

@keyframes xb247-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════════════════
   MODERN MICRO-INTERACTIONS & POLISH
   ══════════════════════════════════════════════════════════════════════════ */

/* Smooth page transitions */
.xb247-app-body { transition: opacity 0.2s ease; }

/* Button press effect */
.xb247-btn-press:active { transform: scale(0.97); }

/* Subtle hover lift for all interactive cards */
.xb247-lift { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.xb247-lift:hover { transform: translateY(-2px); }

/* Badge bounce when cart count changes */
@keyframes xb247-badge-bounce {
    0%   { transform: scale(0.5); }
    60%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.xb247-cart-count.bounce { animation: xb247-badge-bounce 0.4s ease; }

/* Hamburger → X animation */
.xb247-ham-top, .xb247-ham-mid, .xb247-ham-bot { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
[aria-expanded="true"] .xb247-ham-top  { transform: translateY(6px) rotate(45deg); }
[aria-expanded="true"] .xb247-ham-mid  { opacity: 0; }
[aria-expanded="true"] .xb247-ham-bot  { transform: translateY(-6px) rotate(-45deg); }

/* ── Print ──────────────────────────────────────────────────────────────── */
@media print {
    .xb247-nav, .xb247-footer, .xb247-toast, #xb247-cart-drawer, #xb247-cart-overlay { display: none !important; }
}


/* Product Card Enhancements */
.xb247-store-card { display: flex; flex-direction: column; height: 100%; position: relative; }
.xb247-store-card__media { position: relative; width: 100%; padding-top: 56.25%; flex-shrink: 0; }
.xb247-store-card__media > div, .xb247-store-card__media > .xb247-product-media, .xb247-store-card__media .xb247-product-media__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xb247-store-card__body { display: flex; flex-direction: column; flex-grow: 1; padding: 1rem; }
.xb247-store-card__title { flex-grow: 1; margin-bottom: 0.75rem; }
.xb247-store-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-bottom: 0; }


.xb247-store-card__media {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}
.xb247-store-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    border-radius: 12px;
}
.xb247-store-card__body {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem;
}
.xb247-store-card__title {
    font-size: 1.125rem;
    line-height: 1.4;
}
.xb247-store-card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.xb247-store-card__actions { flex-shrink: 0; margin-left: auto; }

.trust-strip { display: block; }

html.dark .xb247-product-hero-visual {
    background: radial-gradient(circle at center, var(--bg-elevated) 0%, transparent 70%);
}

/* ═══════════════════════════════════════════════════════════
   PRODUCT PAGE — PREMIUM REDESIGN
   ═══════════════════════════════════════════════════════════ */
.xb247-product-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: start;
}
@media (min-width: 1024px) {
    .xb247-product-layout {
        grid-template-columns: 1fr 1.1fr;
        gap: 5rem;
    }
}

.xb247-product-hero-visual {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 2rem;
    padding: 3rem;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.8), 0 20px 40px -10px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 7rem;
}

/* Denomination Pills Premium */
.denom-pill {
    padding: 0.875rem 1.25rem;
    border-radius: 1rem;
    background: #f8fafc;
    border: 2px solid transparent;
    color: #475569;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    cursor: pointer;
    flex: 1 1 calc(33.333% - 0.5rem);
    text-align: center;
}
.denom-pill:hover {
    background: #fff;
    border-color: #cbd5e1;
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}
.denom-pill.active,
.denom-pill.selected {
    background: var(--brand-500);
    color: #fff;
    border-color: var(--brand-500);
    box-shadow: 0 10px 20px -5px rgba(20, 184, 166, 0.4);
    transform: translateY(-2px);
}

/* Quantity Stepper Premium */
.xb247-qty-premium {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 0.35rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
.xb247-qty-premium button {
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    color: #64748b;
    font-weight: 600;
    transition: all 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
}
.xb247-qty-premium button:hover {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.xb247-qty-premium input {
    width: 3.5rem;
    text-align: center;
    background: transparent;
    border: none;
    font-weight: 800;
    font-size: 1.1rem;
    color: #0f172a;
}
.xb247-qty-premium input:focus { outline: none; }

/* Buy CTA Area Premium */
.xb247-product-cta-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
}
@media (min-width: 640px) {
    .xb247-product-cta-area {
        grid-template-columns: 1fr 1fr;
    }
}

.btn-premium-primary {
    background: linear-gradient(135deg, var(--brand-400) 0%, var(--brand-600) 100%);
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    padding: 1.25rem 2rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(20, 184, 166, 0.4), inset 0 2px 0 rgba(255,255,255,0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-premium-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 30px -5px rgba(20, 184, 166, 0.5), inset 0 2px 0 rgba(255,255,255,0.2);
    filter: brightness(1.05);
}

.btn-premium-secondary {
    background: #0f172a;
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    padding: 1.25rem 2rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-premium-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 30px -5px rgba(15, 23, 42, 0.5);
    background: #1e293b;
}

/* Trust features strip */
.trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #f1f5f9;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.trust-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 0.75rem;
    color: var(--brand-500);
    font-size: 1.1rem;
}
.trust-text {
    display: flex;
    flex-direction: column;
}
.trust-title {
    font-weight: 800;
    font-size: 0.85rem;
    color: #0f172a;
    line-height: 1.2;
}
.trust-sub {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* Dark mode overwrites */
html.dark .xb247-product-hero-visual {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.05), 0 20px 40px -10px rgba(0,0,0,0.5);
    border-color: #334155;
}
html.dark .denom-pill {
    background: #1e293b;
    color: #cbd5e1;
}
html.dark .denom-pill:hover {
    background: #334155;
    border-color: #475569;
    color: #fff;
}
html.dark .xb247-qty-premium {
    background: #1e293b;
    border-color: #334155;
}
html.dark .xb247-qty-premium button {
    color: #94a3b8;
}
html.dark .xb247-qty-premium button:hover {
    background: #334155;
    color: #fff;
}
html.dark .xb247-qty-premium input {
    color: #fff;
}
html.dark .trust-strip {
    border-color: #334155;
}
html.dark .trust-icon {
    background: #1e293b;
}
html.dark .trust-title {
    color: #f1f5f9;
}
html.dark .trust-sub {
    color: #94a3b8;
}
html.dark .btn-premium-secondary {
    background: #334155;
}
html.dark .btn-premium-secondary:hover {
    background: #475569;
}
