/* ============================================
   WebFront - Premium Styles
   Font: Tajawal (AR) + Inter (EN)
   Brand: Gold #FED324 / Blue #2E5BBA / Dark #1A1A2E
   ============================================ */

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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Global "never cut off on any phone" safety net ── */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video, iframe { max-width: 100%; height: auto; }
button, .btn, input, select, textarea { max-width: 100%; }
.container, .section, .hero-content, .features-grid, .why-grid { max-width: 100%; }
* { min-width: 0; }

:root {
    --gold: #FED324; --gold-dark: #E5BE1F; --gold-light: #FEE866;
    --blue: #2E5BBA; --blue-dark: #1E4494; --blue-light: #4A7BD9;
    --dark: #1A1A2E; --dark-light: #2D2D44;
    --gray: #6B7280; --gray-light: #F8F9FA; --white: #FFFFFF;
    --success: #10B981; --danger: #EF4444; --warning: #F59E0B;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
    --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --radius-xl: 24px;
    --transition: all .3s cubic-bezier(.4,0,.2,1);
    --font-ar: 'Tajawal', sans-serif;
    --font-en: 'Inter', sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-ar);
    background: var(--white); color: var(--dark);
    line-height: 1.7; overflow-x: hidden; direction: rtl;
}
body[dir="ltr"], html[lang="en"] body { font-family: var(--font-en); direction: ltr; }

h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.3; font-family: var(--font-ar); }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3,
html[lang="en"] h4, html[lang="en"] h5, html[lang="en"] h6 { font-family: var(--font-en); }

/* ─── Buttons ─── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .5rem; padding: 1rem 2rem; font-size: 1rem; font-weight: 600;
    border-radius: var(--radius); cursor: pointer; transition: var(--transition);
    border: 2px solid transparent; text-decoration: none; white-space: nowrap;
    font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg,var(--gold-dark),var(--gold)); color: var(--dark); border-color: var(--gold); box-shadow: 0 4px 15px rgba(254,211,36,.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(254,211,36,.5); }
.btn-primary:active { transform: scale(0.98); }
.btn-outline { background: transparent; color: var(--dark); border-color: var(--dark); }
.btn-outline:hover { background: var(--dark); color: var(--white); transform: translateY(-2px); }
.btn-blue { background: linear-gradient(135deg,var(--blue),var(--blue-light)); color: var(--white); border-color: var(--blue); box-shadow: 0 4px 15px rgba(46,91,186,.3); }
.btn-blue:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(46,91,186,.4); }
.btn-danger { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn-core-outline { background: transparent; color: var(--dark); border: 2px solid var(--gold-dark); }
.btn-core-outline:hover { background: rgba(254,211,36,.08); transform: translateY(-2px); border-color: var(--gold-dark); }
.btn-core-outline:active { transform: scale(0.98); }
.btn-sm { padding: .5rem 1rem; font-size: .875rem; }
.btn-lg { padding: 1.25rem 2.5rem; font-size: 1.125rem; }
.w-full { width: 100%; }

/* ─── Badges ─── */
.badge {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .375rem .875rem; font-size: .75rem; font-weight: 700;
    border-radius: 9999px; text-transform: uppercase; letter-spacing: .05em;
}
.badge-gold { background: var(--gold); color: var(--dark); }
.badge-neutral { background: #F3F4F6; color: #4B5563; }
.badge-green { background: #D1FAE5; color: #065F46; }
.badge-blue { background: #DBEAFE; color: var(--blue); }
.badge-red { background: #FEE2E2; color: #991B1B; }

/* ─── Cards ─── */
.card {
    background: var(--white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); transition: var(--transition); overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

/* ─── Sections ─── */
.section { padding: 5rem 1rem; }
.section-gray { background: var(--gray-light); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
@media(min-width:768px){ .section { padding: 6rem 2rem; } .container { padding: 0 2rem; } }

/* ─── Header ─── */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,.95); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,.05); transition: var(--transition);
}
.header.scrolled { box-shadow: var(--shadow); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: .75rem 1rem; display: flex; align-items: center; justify-content: space-between; position: relative; }
.header-logo { display: flex; align-items: center; gap: .5rem; font-size: 1.5rem; font-weight: 800; color: var(--dark); text-decoration: none; }
.header-nav { display: flex; align-items: center; gap: 2rem; }
.header-nav a { color: var(--gray); text-decoration: none; font-weight: 500; font-size: .9rem; transition: var(--transition); }
.header-nav a:hover { color: var(--gold-dark); }
.lang-toggle { display: flex; align-items: center; gap: .5rem; padding: .375rem 1rem; background: var(--gray-light); border-radius: var(--radius); cursor: pointer; border: 1px solid transparent; transition: var(--transition); }
.lang-toggle:hover { border-color: var(--gold); }
.lang-toggle span { font-size: .8rem; font-weight: 600; }

/* Lang toggle + burger container — lang toggle always visible; burger only on mobile */
.header-right { display: flex; align-items: center; gap: .75rem; order: 3; }
.burger-btn { display: none; background: none; border: none; cursor: pointer; padding: .25rem; }

/* ─── STACKED CARD SCROLL (Landing) ─── */
.stack-scene {
    position: relative;
    /* height set by JS per card count */
}
.stack-card {
    position: sticky;
    top: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    will-change: transform, opacity;
    transform-origin: center top;
}
/* Each card needs a background so cards cover each other */
.stack-card-inner {
    width: 100%;
    border-radius: 0;
    background: inherit;
}

/* ─── Hero ─── */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    background: linear-gradient(135deg, #FAFAFA 0%, #FFFFFF 50%, #FFF9E6 100%);
    position: relative; overflow: hidden; padding-top: 80px;
}
.hero::before {
    content: ''; position: absolute; top: -50%; right: -20%; width: 80%; height: 200%;
    background: radial-gradient(ellipse, rgba(254,211,36,.15) 0%, transparent 70%);
    pointer-events: none;
}
.hero-content {
    max-width: 1280px; margin: 0 auto; padding: 4rem 2rem;
    display: grid; grid-template-columns: 1fr; gap: 3rem;
    align-items: center; position: relative; z-index: 1;
}
@media(min-width:768px){ .hero-content { grid-template-columns: 1fr 1fr; gap: 48px; } }

.hero-kicker { font-size: 1.15rem; font-weight: 800; color: var(--dark); margin-bottom: 1rem; }

.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: #FFF3CD; padding: .5rem 1rem; border-radius: 24px;
    font-size: .75rem; font-weight: 600; color: var(--blue);
    border: 1px solid #FFE082; margin-bottom: 1.5rem; width: fit-content;
}
.hero h1 {
    font-size: clamp(2rem, 4vw, 3.5rem); margin-bottom: 1.5rem; line-height: 1.2;
    letter-spacing: -0.5px; color: var(--dark); font-weight: 900;
    background: linear-gradient(135deg, #E5BE1F 0%, var(--dark) 35%, var(--dark) 65%, #E5BE1F 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html[lang="ar"] .hero h1 { font-weight: 900; }

/* ─── Hero entrance: text and phone slide in from opposite sides ─── */
.hero-anim-text { opacity: 0; transform: translateX(60px); animation: heroSlideText .9s cubic-bezier(.34,1.56,.64,1) .15s forwards; }
.hero-anim-visual { opacity: 0; transform: translateX(-60px); animation: heroSlideVisual .9s cubic-bezier(.34,1.56,.64,1) .35s forwards; }
html[dir="ltr"] .hero-anim-text { transform: translateX(-60px); }
html[dir="ltr"] .hero-anim-visual { transform: translateX(60px); }
@keyframes heroSlideText { to { opacity: 1; transform: translateX(0); } }
@keyframes heroSlideVisual { to { opacity: 1; transform: translateX(0); } }

/* ─── Scroll reveal for sections ─── */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s ease, transform .7s cubic-bezier(.34,1.56,.64,1); }
.reveal.reveal-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .hero-anim-text, .hero-anim-visual, .reveal { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}
.hero-subtitle { font-size: clamp(1rem,2vw,1.125rem); color: var(--gray); margin-bottom: 2rem; max-width: 500px; line-height: 1.6; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
@media(max-width:767px){ .hero-buttons { flex-direction: column; } .btn { width: 100%; justify-content: center; } }

/* ─── Phone Mockup (unchanged — mobile preview) ─── */
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }
.hero-phone-mockup { width: 280px; height: 560px; background: var(--dark); border-radius: 40px; padding: 12px; box-shadow: var(--shadow-xl); position: relative; }
.hero-phone-screen { width: 100%; height: 100%; background: linear-gradient(180deg,var(--gray-light) 0%,var(--white) 100%); border-radius: 32px; overflow: hidden; position: relative; }
.phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 28px; background: var(--dark); border-radius: 0 0 20px 20px; z-index: 10; }
.chat-mockup { padding: 3rem 1rem 1rem; }

/* Chat bubbles — animated in from JS (unchanged) */
.chat-bubble { border-radius: 16px; padding: .75rem 1rem; margin-bottom: .75rem; box-shadow: var(--shadow-sm); font-size: .8rem; max-width: 85%; opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease; }
.chat-bubble.visible { opacity: 1; transform: translateY(0); }
.chat-bubble.ai { background: linear-gradient(135deg,var(--gold-light),var(--gold)); margin-right: auto; margin-left: 0; }
.chat-bubble.user { background: var(--blue); color: var(--white); margin-left: auto; margin-right: 0; }

/* ─── Why Choose Us (new features grid) ─── */
.section-why { background: #F9FAFB; }
.section-why h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); text-align: center; margin-bottom: 2rem; color: var(--dark); }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media(max-width:1023px){ .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width:640px){ .why-grid { grid-template-columns: 1fr; } }
.why-card { background: var(--white); border-radius: var(--radius); padding: 2rem; box-shadow: 0 1px 3px rgba(0,0,0,.1); transition: var(--transition); text-align: center; }
.why-card:hover { box-shadow: 0 10px 25px rgba(0,0,0,.1); transform: translateY(-4px); }
.why-icon { display: inline-flex; margin-bottom: 1rem; }
.why-card h4 { font-size: 1.125rem; font-weight: 600; color: var(--dark); margin-bottom: .75rem; }
.why-card p { font-size: .875rem; color: var(--gray); line-height: 1.6; }

/* ─── Comparison Table ─── */
.comparison-table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--white); }
.comparison-table { width: 100%; border-collapse: collapse; min-width: 700px; }
.comparison-table th { background: linear-gradient(135deg,var(--dark) 0%,var(--dark-light) 100%); color: var(--white); padding: 1.25rem 1.5rem; text-align: center; font-weight: 700; font-size: 1.1rem; }
.comparison-table th:first-child { text-align: right; background: linear-gradient(135deg,#111122 0%,var(--dark) 100%); }
.comparison-table td { padding: 1rem 1.5rem; border-bottom: 1px solid #E5E7EB; text-align: center; }
.comparison-table td:first-child { text-align: right; font-weight: 600; color: var(--dark); }
.comparison-table tr:nth-child(even) { background: var(--gray-light); }
.comparison-table tr:hover { background: #FEF9C3; }
.check-icon { color: var(--success); font-size: 1.25rem; }
.x-icon { color: var(--danger); font-size: 1.25rem; }

/* ─── Feature Cards (pricing) ─── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 2rem; }
.feature-card {
    background: var(--white); border: 1px solid #ECECEC; border-radius: var(--radius-lg);
    padding: 2.5rem 2rem; box-shadow: 0 2px 8px rgba(20,20,40,.06), 0 1px 2px rgba(20,20,40,.04);
    transition: var(--transition); position: relative; overflow: hidden;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(20,20,40,.10); border-color: #D1D5DB; }

.feature-card.ai-card {
    border: none; overflow: visible; margin-top: 20px; position: relative;
    background: linear-gradient(180deg, #FFFFFF 0%, #FFFBEA 100%);
    box-shadow: 0 8px 16px rgba(229,190,31,.10), 0 24px 48px rgba(229,190,31,.20);
}
.feature-card.ai-card::after {
    content: ''; position: absolute; inset: 0; border-radius: var(--radius-lg);
    padding: 2px; background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.feature-card.ai-card:hover { transform: translateY(-6px); box-shadow: 0 12px 24px rgba(229,190,31,.16), 0 30px 55px rgba(229,190,31,.28); }
@media(min-width: 1024px){
    .feature-card.ai-card { transform: scale(1.04); }
    .feature-card.ai-card:hover { transform: scale(1.04) translateY(-6px); }
}

.most-popular-badge {
    position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold) 60%, var(--gold-light));
    color: var(--dark); font-size: .8rem; font-weight: 800;
    padding: 8px 20px; border-radius: 999px;
    box-shadow: 0 6px 16px rgba(229,190,31,.45), 0 2px 4px rgba(0,0,0,.1);
    white-space: nowrap; letter-spacing: .02em; z-index: 2;
}
.feature-card h3 { font-size: 1.5rem; font-weight: 900; margin-bottom: .5rem; display: flex; align-items: center; gap: .75rem; color: var(--dark); }
.feature-price { font-size: 2.5rem; font-weight: 800; color: var(--gold-dark); margin: 1rem 0; }
.feature-price.ai-price { color: var(--gold-dark); font-size: 2.75rem; text-shadow: 0 2px 12px rgba(229,190,31,.2); }
.ai-card h3 { color: var(--dark); }
.feature-list { list-style: none; margin: 1.5rem 0; }
.feature-list li { padding: .5rem 0; display: flex; align-items: flex-start; gap: .75rem; font-size: .95rem; color: #374151; }
.feature-list li::before { content: '\2713'; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ─── Guarantee Banner ─── */
.guarantee-banner { background: linear-gradient(135deg,#F0FDF4 0%,#ECFDF5 100%); border: 2px solid #86EFAC; border-radius: var(--radius-lg); padding: 3rem; text-align: center; position: relative; overflow: hidden; }
.guarantee-banner h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); color: #15803D; margin-bottom: 1rem; font-weight: 900; }
.guarantee-banner p { color: #166534; max-width: 700px; margin: 0 auto; font-size: 1.05rem; line-height: 1.6; }

/* ─── Demo Store (unchanged — mobile preview) ─── */
.demo-store { direction: rtl; font-family: var(--font-ar); }
.demo-store[dir="ltr"] { direction: ltr; font-family: var(--font-en); }

.demo-header {
    background: var(--white); border-bottom: 1px solid #E5E7EB;
    padding: 1rem 2rem; display: flex; align-items: center;
    justify-content: space-between; position: sticky; top: 0; z-index: 100;
}

/* ─── HERO BANNER SLIDER ─── */
.banner-slider {
    position: relative; width: 100%; overflow: hidden;
    background: var(--dark); aspect-ratio: 16/5; min-height: 200px; max-height: 420px;
}
.banner-track {
    display: flex; height: 100%;
    transition: transform .5s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}
.banner-slide {
    flex: 0 0 100%; height: 100%; position: relative; overflow: hidden;
}
.banner-slide img {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
}
.banner-slide .slide-logo {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
    z-index: 2; pointer-events: none;
}
.banner-slide .slide-logo img {
    max-height: 100px; max-width: 220px; width: auto; height: auto;
    object-fit: contain; filter: drop-shadow(0 2px 12px rgba(0,0,0,.35));
}
.banner-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.15) 0%, rgba(0,0,0,.3) 100%);
    z-index: 1;
}
/* Dots */
.banner-dots {
    position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 3;
}
.banner-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,.5); border: none; cursor: pointer;
    transition: all .3s; padding: 0;
}
.banner-dot.active { background: var(--white); transform: scale(1.3); }
/* Arrows */
.banner-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,.2); backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.3); color: white;
    font-size: 1.1rem; cursor: pointer; z-index: 3;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s; line-height: 1;
}
.banner-arrow:hover { background: rgba(255,255,255,.35); }
.banner-arrow.prev { right: 16px; }
.banner-arrow.next { left: 16px; }
html[dir="ltr"] .banner-arrow.prev { right: auto; left: 16px; }
html[dir="ltr"] .banner-arrow.next { left: auto; right: 16px; }

/* ─── Product Grid ─── */
.demo-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem; padding: 2rem;
    max-width: 1200px; margin: 0 auto;
}

/* Product Card with image carousel */
.demo-product-card {
    background: var(--white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); transition: var(--transition); overflow: hidden;
}
.demo-product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.product-img-carousel {
    position: relative; overflow: hidden; height: 260px; background: #f3f4f6;
}
.product-img-track {
    display: flex; height: 100%;
    transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.product-img-track img {
    flex: 0 0 100%; height: 100%; object-fit: cover; display: block;
}
.product-img-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,.8); backdrop-filter: blur(4px);
    border: none; cursor: pointer; z-index: 2; opacity: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem; transition: opacity .2s;
}
.demo-product-card:hover .product-img-arrow { opacity: 1; }
.product-img-arrow.prev { right: 8px; }
.product-img-arrow.next { left: 8px; }
html[dir="ltr"] .product-img-arrow.prev { right: auto; left: 8px; }
html[dir="ltr"] .product-img-arrow.next { left: auto; right: 8px; }
.product-img-dots {
    position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 4px; z-index: 2;
}
.product-img-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,.6); border: none; padding: 0; cursor: pointer;
    transition: all .2s;
}
.product-img-dot.active { background: white; }
.product-badge-limited {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    background: var(--danger); color: white; font-size: .7rem; font-weight: 700;
    padding: .2rem .6rem; border-radius: 999px;
}

/* ─── Layout Swapper ─── */
.layout-swapper {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--white); border-top: 2px solid var(--gold);
    box-shadow: 0 -4px 20px rgba(0,0,0,.1); z-index: 200;
    transition: transform .3s ease;
}
.layout-swapper.collapsed { transform: translateY(calc(100% - 48px)); }
.swapper-toggle {
    display: flex; align-items: center; justify-content: center;
    padding: .75rem; cursor: pointer;
    background: linear-gradient(90deg,var(--gold),var(--gold-light));
    color: var(--dark); font-weight: 700; gap: .5rem;
}
.swapper-options { display: flex; overflow-x: auto; gap: .5rem; padding: 1rem; justify-content: center; flex-wrap: wrap; }
.swapper-option { padding: .625rem 1.25rem; background: var(--gray-light); border: 2px solid transparent; border-radius: var(--radius); cursor: pointer; font-weight: 600; font-size: .85rem; transition: var(--transition); white-space: nowrap; }
.swapper-option:hover, .swapper-option.active { border-color: var(--gold); background: #FEF9C3; }

/* ─── Modals ─── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(5px); z-index: 9999; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.active { display: flex; animation: fadeIn .3s ease; }
.modal-content { background: var(--white); border-radius: var(--radius-xl); max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-xl); animation: slideUp .3s ease; }
.modal-header { background: linear-gradient(135deg,var(--dark) 0%,var(--dark-light) 100%); color: var(--white); padding: 1.5rem 2rem; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
.modal-body { padding: 2rem; }

/* ─── Admin Portal ─── */
.admin-login-overlay { position: fixed; inset: 0; background: linear-gradient(135deg,var(--dark) 0%,var(--dark-light) 100%); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.admin-login-box { background: var(--white); border-radius: var(--radius-xl); padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: var(--shadow-xl); }
.admin-dashboard { display: none; padding: 2rem; max-width: 1200px; margin: 0 auto; }

/* ─── Form Elements ─── */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .5rem; color: var(--dark); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: .875rem 1rem; border: 2px solid #E5E7EB;
    border-radius: var(--radius); font-size: 1rem; font-family: inherit;
    transition: var(--transition); background: var(--white);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(254,211,36,.2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media(max-width:640px){ .form-row { grid-template-columns: 1fr; } }

/* ─── Focus states (accessibility) ─── */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--blue); outline-offset: 2px;
}

/* ─── Animations ─── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wf-shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ─── Utilities ─── */
.text-center { text-align: center; }
.mb-1{margin-bottom:.5rem} .mb-2{margin-bottom:1rem} .mb-3{margin-bottom:1.5rem} .mb-4{margin-bottom:2rem}
.mt-1{margin-top:.5rem} .mt-2{margin-top:1rem} .mt-3{margin-top:1.5rem} .mt-4{margin-top:2rem}
.hidden { display: none !important; }

/* ─── Input field alias ─── */
.input-field {
    width: 100%; padding: .875rem 1rem; border: 2px solid #E5E7EB;
    border-radius: var(--radius); font-size: 1rem; font-family: inherit;
    transition: var(--transition); background: var(--white);
}
.input-field:focus { outline: none; border-color: var(--gold); }
.input-label { display: block; font-weight: 600; margin-bottom: .5rem; color: var(--dark); font-size: .875rem; }

/* ============================================
   MOBILE-ONLY OVERRIDES (requested changes)
   ============================================ */
@media (max-width: 767px) {

    /* --- Global 75% scale-down (Fix #5) ---
       Rather than the browser's "zoom" property (which the user explicitly
       does NOT want, and which most mobile browsers ignore/handle oddly),
       we shrink the rem baseline itself. Nearly everything in this file is
       sized in rem, so dropping the root font-size from 16px to 12px makes
       every rem-based font-size/padding/margin/gap scale to exactly 75% of
       its desktop value, consistently, across every page that loads this
       stylesheet — with no clipping, since it's real CSS sizing, not a
       post-render visual zoom. */
    html { font-size: 12px; }

    /* --- Burger menu --- */
    .burger-btn { display: flex; align-items: center; justify-content: center; }
    .header-nav {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--white); box-shadow: var(--shadow-lg);
        border-radius: 0 0 var(--radius) var(--radius);
        padding: .5rem 0;
    }
    .header-nav.mobile-open { display: flex; }
    .header-nav a { padding: .9rem 1.5rem; border-bottom: 1px solid #F3F4F6; }

    /* --- Hero: kicker + smaller phone mockup under buttons, less scroll --- */
    .hero { padding-top: 70px; }
    .hero-content { display: flex; flex-direction: column; padding: 2rem 1.25rem; gap: 1.5rem; }
    .hero-anim-text { order: 1; }
    .hero-anim-visual { order: 2; }
    .hero-kicker { font-size: 1rem; }

    .hero-phone-mockup { width: 170px; height: 340px; padding: 8px; margin: 0 auto; }
    .phone-notch { width: 70px; height: 16px; }
    .hero-phone-screen { border-radius: 24px; }
    .chat-mockup { padding: 1.75rem .6rem .6rem; }
    .chat-bubble { font-size: .62rem; padding: .4rem .6rem; margin-bottom: .5rem; }
    .chat-bubble strong { font-size: .65rem; }

    /* --- Why choose: keep 2 columns / 2 rows (not 4 stacked) --- */
    .why-grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* --- AI plan card first in Compare Plans --- */
    #features { display: flex; flex-direction: column; }
    #features .ai-card { order: -1; margin-top: 28px; }

    /* --- Fix "Activate My AI" button text overflow (AR) --- */
    #btn-ai { font-size: .85rem; white-space: normal; line-height: 1.3; padding: 1rem 1rem; }

    /* --- AI tier cards: 2 + 1 layout, smaller --- */
    #ai-tiers .features-grid { grid-template-columns: 1fr 1fr !important; gap: 12px; }
    #ai-tiers .features-grid .card:last-child { grid-column: 1 / -1; }
    #ai-tiers .card { padding: 1rem !important; }
    #ai-tiers .card div[style*="font-size: 2rem"] { font-size: 1.3rem !important; margin: .5rem 0 !important; }

    /* --- DEMO STORE: category bar — smaller, single row, horizontally scrollable --- */
    .cat-bar {
        flex-wrap: nowrap !important; overflow-x: auto; justify-content: flex-start !important;
        padding: .6rem .75rem !important; gap: .4rem !important;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }
    .cat-bar::-webkit-scrollbar { display: none; }
    .cat-btn { flex: 0 0 auto; padding: .32rem .8rem !important; font-size: .75rem !important; white-space: nowrap; }

    /* --- DEMO STORE: reduce gap between banner/categories/first product row --- */
    .banner-slider { margin-bottom: 0; }
    .demo-product-grid { padding-top: .75rem !important; }
    [data-layout] #productsGrid { padding-top: .75rem !important; }
    .discovery-section:first-child { padding-top: .75rem !important; }

    /* --- DEMO STORE: shrink product cards so at least 2 fit per row (all layouts) --- */
    .demo-product-grid,
    [data-layout="minimalist"] #productsGrid,
    [data-layout="editorial"] #productsGrid,
    [data-layout="heritage"] #productsGrid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: .75rem !important; padding: .75rem !important;
    }
    [data-layout] .product-img-carousel,
    [data-layout] .product-swiper,
    .product-swiper { height: 140px !important; }
    [data-layout] .product-info { padding: .65rem !important; }
    [data-layout] .product-name { font-size: .82rem !important; }
    [data-layout] .product-desc { font-size: .7rem !important; -webkit-line-clamp: 1 !important; margin-bottom: .4rem !important; }
    [data-layout] .product-price { font-size: 1rem !important; }
    [data-layout] .product-compare { font-size: .7rem !important; }
    [data-layout] .product-actions { flex-direction: column; gap: .3rem !important; }
    [data-layout] .btn-add, [data-layout] .btn-detail { font-size: .72rem !important; padding: .4rem !important; }

    /* --- DEMO STORE: discovery layout — smaller cards, at least 2 visible at once --- */
    .discovery-section { padding: 1rem .75rem !important; }
    .discovery-card { flex: 0 0 44% !important; }
    .discovery-card img { height: 110px !important; }
    .discovery-card-name { font-size: .72rem !important; }
    .discovery-card-price { font-size: .78rem !important; }
    .discovery-card-btn { font-size: .68rem !important; padding: .3rem !important; }
    .discovery-section-title { font-size: .82rem !important; }
    .try-badge { font-size: .62rem !important; padding: .15rem .5rem !important; }

    /* ============================================
       NEW FIXES (this round) — demo.html mobile only
       ============================================ */

    /* Fix 1: nudge the center store logo slightly left */
    #headerStoreLogo { left: 46% !important; }

    /* Fix 2 (corrected): the BANNER was fine as-is — leave it on object-fit:cover.
       It's the PRODUCT images that were cropped/zoomed. Show them uncropped. */
    .demo-product-card img,
    .discovery-card img,
    .product-swiper img,
    .product-img-carousel img {
        object-fit: contain !important;
        background: var(--demo-surface, #f3f4f6);
    }

    /* Fix 4: guarantee the product-detail modal always has an internal
       scrollbar so the rest of the page/content stays reachable even
       when the viewport is pinch-zoomed in. */
    #productModal .modal-content {
        max-height: 88vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    #productModal .detail-grid { max-height: none; }
    #productModal .detail-info { max-height: none; overflow: visible; }

    /* Fix 6: "See All" pill in discovery rows now acts as a real button */
    .try-badge { cursor: pointer; }
}