@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

:root {
    --safari-orange: #FF4500;
    --safari-green: #008000;
    --cocoa-card: #2C1B18;
    --gradient-light: linear-gradient(135deg, #E0F2FE 0%, #FEE2E2 50%, #FEF3C7 100%);
    --gradient-dark: linear-gradient(135deg, #1C100E 0%, #2C1B18 50%, #452b26 100%);
    --header-footer-light-gradient: linear-gradient(135deg, #4c1d95 0%, #b45309 100%);
    --header-footer-dark-bg: #2C1B18;
    --hero-bg-inner: #FFFbeb;
}

.dark-mode { --hero-bg-inner: #2C1B18; }

body {
    background-color: #111827;
    font-family: 'Inter', sans-serif;
    margin: 0; padding: 0;
    overflow-x: hidden;
}

.app-container { 
    max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; padding-bottom: 95px;
    padding-top: 26px !important;
    background: var(--gradient-light) !important;
    transition: background 0.3s ease, color 0.3s ease;
    color: #0f172a;
}
.dark-mode .app-container { 
    background: var(--gradient-dark) !important; 
    color: #fef3c7;
}

/* EDGE-SAFE REPEATABLE SCROLL ANIMATION FOR STORE & PRODUCT CARDS */
/* Uses settled transition (no infinite jitter/bounce) and GPU transform/opacity */
.scroll-reveal-card {
    opacity: 0.25;
    transform: translate3d(0, 14px, 0) scale(0.985);
    transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1), transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.scroll-reveal-card.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

/* Top Infinity Ticker */
.ticker-ribbon-top, .cat-slider-outer { 
    width: 100%; max-width: 480px; margin: 0 auto; overflow-x: auto; overflow-y: hidden;
    display: flex; align-items: center; background: #ffffff; 
    border-bottom: 1px solid rgba(217, 119, 6, 0.2); z-index: 100;
    -webkit-overflow-scrolling: touch;
}
.ticker-ribbon-top { position: fixed; top: 0; left: 0; right: 0; height: 26px; }
.cat-slider-outer { position: sticky !important; top: 72px !important; z-index: 80 !important; height: 44px; }

.dark-mode .ticker-ribbon-top, .dark-mode .cat-slider-outer { background: #2C1B18; border-bottom: 1px solid rgba(254, 243, 199, 0.15); }
.ticker-ribbon-top::-webkit-scrollbar, .cat-slider-outer::-webkit-scrollbar { display: none; }

.ticker-swipe-track, .cat-swipe-track { 
    display: flex;
    animation: cssTickerLoop 28s linear infinite !important; 
    will-change: transform;
}
@keyframes cssTickerLoop {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

.ticker-item, .category-item { padding: 0 1.2rem; font-weight: 900; font-size: 0.72rem; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ticker-item { color: #065f46; }
.dark-mode .ticker-item { color: #fef3c7; }
.ticker-item i { color: var(--safari-orange); }

.category-item { padding: 5px 14px; margin: 0 4px; background: #ffffff; border: 1.5px solid var(--safari-orange); color: #0f172a; border-radius: 9999px; font-weight: 800; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.08); }
.dark-mode .category-item { background: #452b26; border: 1.5px solid var(--safari-orange); color: #fef3c7; }

/* STICKY HEADER */
.main-header { 
    position: sticky; top: 26px; height: 46px !important; width: 100% !important;
    z-index: 90; background: var(--header-footer-light-gradient) !important; 
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.15); 
    display: flex; justify-content: space-between; align-items: center; 
    border-radius: 0 0 16px 16px; box-sizing: border-box;
}
.dark-mode .main-header { background: var(--header-footer-dark-bg) !important; border-bottom: 1.5px solid rgba(254, 243, 199, 0.15); }

/* 3D SHINING BRAND & STORE TITLES */
.logo-premium-3d-shine {
    font-family: 'Inter', sans-serif !important;
    font-weight: 900 !important;
    font-size: 1.15rem !important;
    letter-spacing: -0.02em !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    background: linear-gradient(110deg, #FF9933 15%, #FFFFFF 32%, #FDE047 45%, #FFFFFF 58%, #22C55E 80%);
    background-size: 250% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: brandShimmerSweep 3.2s linear infinite;
    filter: drop-shadow(0px 2px 0px rgba(0, 0, 0, 0.75)) drop-shadow(0px 3px 6px rgba(0, 0, 0, 0.5));
}

.store-name-3d-shine {
    font-weight: 900 !important;
    background: linear-gradient(110deg, #ea580c 15%, #b45309 35%, #fbbf24 50%, #15803d 75%, #ea580c 95%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: brandShimmerSweep 3.8s linear infinite;
    filter: drop-shadow(0px 1px 0px rgba(0, 0, 0, 0.2));
}

.dark-mode .store-name-3d-shine {
    background: linear-gradient(110deg, #fb923c 15%, #ffffff 42%, #fde047 55%, #4ade80 80%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0px 2px 3px rgba(0, 0, 0, 0.85));
}

@keyframes brandShimmerSweep {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.btn-3d-header {
    height: 30px; padding: 0 8px; border-radius: 10px;
    background: linear-gradient(145deg, rgba(255,255,255,0.28), rgba(255,255,255,0.08));
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: 0 3px 0 rgba(0,0,0,0.4), 0 4px 6px rgba(0,0,0,0.25);
    color: #ffffff; font-weight: 900; font-size: 0.68rem;
    display: flex; align-items: center; justify-content: center; gap: 4px;
    cursor: pointer; transition: transform 0.1s ease, box-shadow 0.1s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.btn-3d-header:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,0.4); }

.fresh-deal-badge {
    font-size: 8px; font-weight: 900; letter-spacing: 0.05em;
    color: #fde047; background: rgba(255, 69, 0, 0.28);
    border: 1px solid rgba(253, 224, 71, 0.5);
    padding: 2px 5px; border-radius: 6px;
    text-transform: uppercase;
    animation: freshDealBlink 1.1s infinite alternate;
    white-space: nowrap;
}
@keyframes freshDealBlink {
    0% { opacity: 0.45; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.03); text-shadow: 0 0 8px rgba(253, 224, 71, 0.9); }
}

/* HERO SECTION BADGE ANIMATIONS */
.hero-badge-shimmer {
    position: relative;
    overflow: hidden;
    animation: badgeSoftPulse 2.2s ease-in-out infinite alternate;
}
.hero-badge-shimmer::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent);
    animation: badgeLightSweep 2.6s infinite;
}
@keyframes badgeSoftPulse {
    0% { opacity: 0.82; box-shadow: 0 0 0 rgba(250, 204, 21, 0); }
    100% { opacity: 1; box-shadow: 0 0 10px rgba(250, 204, 21, 0.65); }
}
@keyframes badgeLightSweep {
    0% { left: -100%; }
    60%, 100% { left: 160%; }
}

/* FLOATING 3D ACTION BUTTONS */
.floating-3d-orb {
    position: fixed; width: 42px; height: 42px; border-radius: 50%;
    z-index: 160; display: flex; align-items: center; justify-content: center;
    cursor: grab; touch-action: none; user-select: none;
    transition: transform 0.15s ease;
}
.floating-3d-orb:active { cursor: grabbing; transform: scale(1.1); }

.orb-search-3d {
    right: 14px; bottom: 88px;
    background: linear-gradient(135deg, #FF4500 0%, #d97706 100%);
    border: 1.5px solid #fef3c7;
    box-shadow: 0 4px 0 #7c2d12, 0 8px 14px rgba(0,0,0,0.45), inset 0 2px 4px rgba(255,255,255,0.6);
    color: #ffffff; font-size: 0.95rem;
}

.orb-install-3d {
    right: 14px; bottom: 140px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border: 1.5px solid #ecfdf5;
    box-shadow: 0 4px 0 #064e3b, 0 8px 14px rgba(0,0,0,0.45), inset 0 2px 4px rgba(255,255,255,0.6);
    color: #ffffff; font-size: 0.95rem;
    animation: pulseInstallGlow 2.5s infinite;
}
@keyframes pulseInstallGlow {
    0%, 100% { box-shadow: 0 4px 0 #064e3b, 0 6px 12px rgba(16,185,129,0.4), inset 0 2px 4px rgba(255,255,255,0.6); }
    50% { box-shadow: 0 4px 0 #064e3b, 0 10px 20px rgba(16,185,129,0.9), inset 0 2px 4px rgba(255,255,255,0.8); }
}

/* HIGH-CONTRAST GLASS CARDS */
.glass-card {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: 18px !important;
    border: 1.5px solid rgba(217, 119, 6, 0.45) !important;
    box-shadow: 0 8px 20px -5px rgba(15, 23, 42, 0.14), inset 0 2px 4px rgba(255, 255, 255, 0.9) !important;
    color: #0f172a !important;
}

body.dark-mode .glass-card {
    background: rgba(44, 27, 24, 0.96) !important;
    border: 1.5px solid rgba(254, 243, 199, 0.35) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.12) !important;
    color: #fef3c7 !important;
}

body.dark-mode .glass-card span,
body.dark-mode .glass-card p,
body.dark-mode .glass-card label,
body.dark-mode .glass-card div { color: #fef3c7; }
body.dark-mode button.glass-card { color: #fef3c7 !important; }

/* PAYMENT & DELIVERY OPTION PILLS */
.choice-pill-box {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 2px solid #d97706 !important;
}
.choice-pill-box span { color: #0f172a !important; }
body.dark-mode .choice-pill-box {
    background: #3b231f !important;
    color: #fef3c7 !important;
    border: 1.5px solid rgba(253, 224, 71, 0.45) !important;
}
body.dark-mode .choice-pill-box span { color: #fef3c7 !important; }

/* MIN ORDER NOTICE BOX */
.min-order-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    color: #78350f !important;
    border: 1.5px solid #f59e0b !important;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.18);
}
body.dark-mode .min-order-banner {
    background: linear-gradient(135deg, #451a03 0%, #2C1B18 100%) !important;
    color: #fde047 !important;
    border: 1.5px solid rgba(253, 224, 71, 0.45) !important;
}

/* ENLARGED THICK 3D HERO LOGO */
.hero-photo-3d-wrapper { perspective: 700px; display: inline-block; }
.profile-photo-3d-frame {
    width: 82px; height: 82px; border-radius: 50%; padding: 4px;
    background: conic-gradient(from 0deg, var(--safari-orange) 0%, #ffffff 25%, var(--safari-green) 50%, var(--safari-orange) 100%) !important;
    transform-style: preserve-3d; position: relative;
    animation: thickCoin3DFlip 4.5s ease-in-out infinite;
}
@keyframes thickCoin3DFlip {
    0%, 100% {
        transform: rotateY(0deg);
        box-shadow: 0 4px 0 #7c2d12, 0 8px 14px rgba(0, 0, 0, 0.45);
    }
    25% {
        transform: rotateY(-38deg);
        box-shadow: 3px 0 0 #ea580c, 6px 0 0 #9a3412, 9px 0 0 #431407, 14px 8px 18px rgba(0, 0, 0, 0.6);
    }
    50% {
        transform: rotateY(0deg);
        box-shadow: 0 4px 0 #14532d, 0 8px 14px rgba(0, 0, 0, 0.45);
    }
    75% {
        transform: rotateY(38deg);
        box-shadow: -3px 0 0 #16a34a, -6px 0 0 #166534, -9px 0 0 #052e16, -14px 8px 18px rgba(0, 0, 0, 0.6);
    }
}

.tiranga-animated-border {
    position: relative; background: transparent; padding: 2.5px; overflow: hidden; border-radius: 24px; z-index: 1;
}
.tiranga-animated-border::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(from 0deg, var(--safari-orange) 0%, #FFFFFF 25%, var(--safari-green) 50%, var(--safari-orange) 100%);
    animation: rotateTirangaLoop 4s linear infinite; z-index: -2;
}
.tiranga-animated-border::after {
    content: ''; position: absolute; top: 2.5px; left: 2.5px; right: 2.5px; bottom: 2.5px;
    background: var(--hero-bg-inner) !important; border-radius: 21px; z-index: -1;
}
@keyframes rotateTirangaLoop { 100% { transform: rotate(360deg); } }

/* 2-COLUMN COMPACT STORE CARD IMAGE */
.store-grid-photo-box {
    width: 100%;
    height: 78px;
    border-radius: 11px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(251, 191, 36, 0.5);
}
.dark-mode .store-grid-photo-box {
    background: linear-gradient(135deg, #291815, #1c100e);
}

/* 3-COLUMN COMPACT PRODUCT CARD IMAGE & VARIANT SELECTOR */
.prod-3col-photo-box {
    width: 100%;
    height: 70px;
    border-radius: 11px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(217, 119, 6, 0.35);
}
.dark-mode .prod-3col-photo-box {
    background: linear-gradient(135deg, #2c1b18, #1c100e);
}

.gallery-count-pill {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background: rgba(15, 23, 42, 0.85);
    color: #fde047;
    font-size: 8px;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 5px;
    border: 1px solid rgba(253, 224, 71, 0.45);
}

.prod-variant-select {
    width: 100%;
    font-size: 9.5px;
    font-weight: 800;
    padding: 3px 4px;
    border-radius: 7px;
    background: #fef3c7;
    color: #0f172a;
    border: 1px solid #d97706;
    outline: none;
}
.dark-mode .prod-variant-select {
    background: #1e1311;
    color: #fde047;
    border: 1px solid rgba(253, 224, 71, 0.45);
}

.main-footer { position: fixed !important; bottom: 0 !important; left: 50% !important; transform: translateX(-50%) !important; width: 100% !important; max-width: 480px !important; background: var(--header-footer-light-gradient) !important; border-radius: 16px 16px 0 0 !important; box-shadow: 0 -4px 20px rgba(0,0,0,0.2) !important; border-top: 1px solid rgba(255, 255, 255, 0.2) !important; z-index: 50 !important; padding: 6px 0 !important; display: flex !important; justify-content: center !important; align-items: center !important; gap: 40px !important; }
.dark-mode .main-footer { background: rgba(28, 16, 14, 0.98) !important; border-top: 1px solid rgba(254, 243, 199, 0.15) !important; }
.nav-btn-3d { width: 36px !important; height: 36px !important; font-size: 0.95rem !important; background: rgba(255, 255, 255, 0.15) !important; color: #f3f4f6 !important; box-shadow: 0 3px 0 rgba(0,0,0,0.2), 0 3px 5px rgba(0,0,0,0.1); transition: all 0.1s ease; border-radius: 9999px; display: flex; align-items: center; justify-content: center; }
.dark-mode .nav-btn-3d { background: #452b26 !important; color: #fef3c7 !important; box-shadow: 0 3px 0 #1c100e, 0 3px 5px rgba(0,0,0,0.4); }
.nav-active { background: #ffffff !important; color: #4c1d95 !important; box-shadow: 0 3px 0 #b45309, 0 4px 8px rgba(255,255,255,0.2) !important; }
.dark-mode .nav-active { background: linear-gradient(135deg, #fef3c7 0%, #cbd5e1 100%) !important; color: #2C1B18 !important; box-shadow: 0 3px 0 #94a3b8, 0 4px 8px rgba(254, 243, 199, 0.3) !important; }

/* SECTION HEADING GRADIENTS */
.gradient-text {
    background: linear-gradient(135deg, #c2410c 15%, #15803d 85%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.dark-mode .gradient-text {
    background: linear-gradient(135deg, #fbbf24 15%, #34d399 85%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-btn { background: linear-gradient(135deg, var(--safari-orange) 0%, var(--safari-green) 100%); box-shadow: 0 3px 0 #0b5e05, 0 5px 10px rgba(19, 136, 8, 0.2); color: white !important; }

/* MASTER CONTROL BOARD TITLE */
.admin-title-gradient {
    font-weight: 900 !important;
    font-size: 1.25rem !important;
    background: linear-gradient(135deg, #4c1d95 0%, #b45309 55%, #065f46 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: inline-block !important;
}
.dark-mode .admin-title-gradient {
    background: linear-gradient(135deg, #fde047 0%, #fb923c 55%, #4ade80 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8)) !important;
}

/* 3D CLAYMORPHIC DASHBOARD SHELL */
.clay-dashboard-shell {
    display: flex;
    gap: 8px;
    background: linear-gradient(145deg, #cbd5e1 0%, #94a3b8 100%);
    padding: 8px;
    border-radius: 24px;
    box-shadow: 0 14px 30px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,255,255,0.85);
    border: 1.5px solid rgba(255,255,255,0.7);
}
.dark-mode .clay-dashboard-shell {
    background: linear-gradient(145deg, #273444 0%, #18222f 100%);
    box-shadow: 0 14px 30px rgba(0,0,0,0.65), inset 0 1px 2px rgba(255,255,255,0.15);
    border: 1.5px solid rgba(148, 163, 184, 0.25);
}

.clay-sidebar {
    width: 76px;
    min-width: 76px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-radius: 18px;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 4px 6px 14px rgba(0,0,0,0.35), inset 0 1px 2px rgba(255,255,255,0.2);
    color: #f8fafc;
}

.clay-nav-pill {
    width: 100%;
    padding: 8px 3px;
    border-radius: 12px;
    font-size: 9.5px;
    font-weight: 800;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #cbd5e1;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}
.clay-nav-pill.active {
    background: linear-gradient(145deg, #f8fafc 0%, #cbd5e1 100%);
    color: #0f172a;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35), inset 0 2px 3px #ffffff;
}

.clay-main-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.clay-stat-teal { background: linear-gradient(145deg, #99f6e4 0%, #5eead4 100%); color: #0f172a; border-radius: 16px; padding: 9px; box-shadow: 0 5px 10px rgba(0,0,0,0.15), inset 0 2px 4px rgba(255,255,255,0.85); }
.clay-stat-mint { background: linear-gradient(145deg, #bbf7d0 0%, #86efac 100%); color: #0f172a; border-radius: 16px; padding: 9px; box-shadow: 0 5px 10px rgba(0,0,0,0.15), inset 0 2px 4px rgba(255,255,255,0.85); }
.clay-stat-ice  { background: linear-gradient(145deg, #e0f2fe 0%, #bae6fd 100%); color: #0f172a; border-radius: 16px; padding: 9px; box-shadow: 0 5px 10px rgba(0,0,0,0.15), inset 0 2px 4px rgba(255,255,255,0.85); }
.clay-stat-lav  { background: linear-gradient(145deg, #ddd6fe 0%, #c4b5fd 100%); color: #0f172a; border-radius: 16px; padding: 9px; box-shadow: 0 5px 10px rgba(0,0,0,0.15), inset 0 2px 4px rgba(255,255,255,0.85); }

.admin-card { background: #1e293b !important; border: 1.5px solid rgba(148, 163, 184, 0.35) !important; border-radius: 18px; box-shadow: 0 8px 20px rgba(0,0,0,0.35), inset 0 1px 2px rgba(255,255,255,0.12); color: #ffffff !important; }
.admin-card h3 { color: #fde047 !important; font-weight: 900 !important; }
.admin-card label { color: #e2e8f0 !important; font-weight: 800; font-size: 0.7rem; }
.admin-input { background: #0f172a !important; border: 1.5px solid rgba(148, 163, 184, 0.45) !important; color: #ffffff !important; font-weight: 700 !important; border-radius: 11px; padding: 9px 10px; width: 100%; font-size: 0.8rem; box-sizing: border-box; }
.admin-input::placeholder { color: #94a3b8 !important; }
.stat-node-box { background: rgba(15, 23, 42, 0.85); border: 1px solid rgba(254, 243, 199, 0.25); border-radius: 14px; padding: 10px; text-align: center; }
