@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@500;600;700;800&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

/* ═══════════════ Tokens ═══════════════ */
:root {
  --bg: #f5f3ef;
  --surface: #ffffff;
  --ink: #121115;
  --ink-2: #3b3940;
  --muted: #86818c;
  --line: #e6e1d9;
  --line-2: #d8d1c6;
  --accent: #ff4d2e;
  --accent-2: #ff7a59;
  --accent-soft: #ffe9e3;
  --lilac: #ece8ff;
  --lilac-ink: #4b3fb0;
  --mint: #dcf4e7;
  --mint-ink: #146c43;
  --sand: #f1e7d6;
  --dark: #17161b;
  --wa: #1fb45a;
  --danger: #d93a2b;
  --r-xl: 32px;
  --r-lg: 24px;
  --r: 16px;
  --r-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(18, 17, 21, .05), 0 2px 8px rgba(18, 17, 21, .04);
  --shadow: 0 10px 30px -10px rgba(18, 17, 21, .18);
  --shadow-lg: 0 30px 80px -20px rgba(18, 17, 21, .35);
  --font: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-head: 'Alexandria', 'IBM Plex Sans Arabic', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 400 16px/1.75 var(--font); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }
.container { width: min(1200px, 92%); margin-inline: auto; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }
.i { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.i-lg { width: 28px; height: 28px; }
.i-xl { width: 40px; height: 40px; }

/* ═══════════════ Buttons ═══════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .78em 1.35em; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .98rem var(--font); cursor: pointer; transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap; line-height: 1.2;
}
.btn:active { transform: scale(.97); }
.btn-sm { padding: .55em 1em; font-size: .88rem; }
.btn-lg { padding: 1em 1.7em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -8px rgba(255, 77, 46, .6); }
.btn-primary:hover { background: #ec3a1b; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.2); }
.btn-light:hover { background: rgba(255,255,255,.2); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #179a4b; }
.btn-danger { background: var(--danger); color: #fff; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-circle {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--surface);
  border: 1px solid var(--line); cursor: pointer; color: var(--ink);
}

/* ═══════════════ Header ═══════════════ */
.site-header {
  position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-color: var(--line); }
.nav { display: flex; align-items: center; gap: 1.6rem; height: 74px; }
.brand { display: flex; align-items: center; gap: .65rem; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--ink); color: #fff;
  position: relative; overflow: hidden;
}
.brand-mark::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--accent);
  bottom: -5px; left: -5px;
}
.brand-mark .i { width: 20px; height: 20px; position: relative; z-index: 1; }
.brand strong { display: block; font: 800 1.3rem var(--font-head); line-height: 1.05; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: .74rem; }
.nav-links { display: flex; gap: .3rem; margin-inline-start: auto; }
.nav-links a { padding: .45em .9em; border-radius: 999px; font-weight: 500; font-size: .95rem; transition: background .2s; }
.nav-links a:hover { background: var(--surface); }
.nav .btn { margin-inline-start: .4rem; }
@media (max-width: 820px) { .nav-links { display: none; } .nav .btn { margin-inline-start: auto; } }

/* ═══════════════ Hero ═══════════════ */
.hero { padding: 3.5rem 0 3rem; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.kicker {
  display: inline-flex; align-items: center; gap: .5em; background: var(--surface); border: 1px solid var(--line);
  padding: .35em .9em .35em .5em; border-radius: 999px; font-size: .88rem; font-weight: 600; margin-bottom: 1.3rem;
}
.kicker .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
.kicker .dot .i { width: 13px; height: 13px; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 4.1rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; }
.hero h1 .hl { position: relative; white-space: nowrap; color: var(--accent); }
.hero .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 32em; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.8rem; }
.word-cloud { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.6rem; }
.word-cloud span {
  display: inline-flex; align-items: center; gap: .35em; font-size: .85rem; padding: .3em .75em;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
}

/* Hero visual: before/after studio */
.studio { position: relative; aspect-ratio: 4/4.6; }
.studio-card {
  position: absolute; inset: 0 8% 6% 0; border-radius: var(--r-xl); overflow: hidden; background: var(--dark);
  box-shadow: var(--shadow-lg);
}
.studio-card svg.scene { width: 100%; height: 100%; display: block; }
.studio-card .scan {
  position: absolute; inset-inline: 0; height: 3px; top: 0; background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 24px 6px rgba(255, 77, 46, .45); animation: scan 3.6s var(--ease) infinite;
}
@keyframes scan { 0% { top: 6%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 94%; opacity: 0; } }
.studio-card .tag-pill {
  position: absolute; top: 1rem; inset-inline-start: 1rem; background: rgba(255,255,255,.12); color: #fff;
  backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.2); padding: .3em .8em; border-radius: 999px; font-size: .8rem;
}
.float {
  position: absolute; background: var(--surface); border-radius: 18px; padding: .75rem .95rem; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: .6rem; font-size: .9rem; border: 1px solid var(--line);
}
.float b { display: block; font: 700 1.05rem var(--font-head); }
.float small { color: var(--muted); }
.float .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; }
.float.f1 { bottom: 0; inset-inline-end: 0; }
.float.f1 .ic { background: var(--mint); color: var(--mint-ink); }
.float.f2 { top: 14%; inset-inline-end: -2%; }
.float.f2 .ic { background: var(--accent-soft); color: var(--accent); }
.float.f3 { top: 52%; inset-inline-start: -6%; }
.float.f3 .ic { background: var(--lilac); color: var(--lilac-ink); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .studio { max-width: 420px; margin: 1rem auto 0; width: 100%; }
  .float.f3 { inset-inline-start: 0; }
}

/* ═══════════════ Sections ═══════════════ */
section.block { padding: 4.5rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0; }
.section-head p { margin: .3rem 0 0; color: var(--muted); }
.eyebrow { font-size: .82rem; font-weight: 700; color: var(--accent); letter-spacing: .02em; display: block; margin-bottom: .3rem; }

/* Category bento */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .9rem; }
.cat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.15rem;
  display: flex; flex-direction: column; gap: .9rem; min-height: 150px; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
  position: relative;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.cat-card .ic {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--bg); transition: .3s;
}
.cat-card .ic .i { width: 28px; height: 28px; }
.cat-card:hover .ic { background: var(--accent); color: #fff; }
.cat-card strong { display: block; font: 700 1rem var(--font-head); }
.cat-card small { color: var(--muted); font-size: .8rem; line-height: 1.5; display: block; }
.cat-card .count { position: absolute; top: 1rem; inset-inline-end: 1rem; font-size: .75rem; color: var(--muted); }
.cat-card.feature { background: var(--dark); color: #fff; border-color: var(--dark); }
.cat-card.feature small { color: #a9a4b1; }
.cat-card.feature .ic { background: rgba(255,255,255,.1); }
@media (max-width: 1000px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.step { background: var(--surface); border-radius: var(--r-lg); padding: 1.6rem; border: 1px solid var(--line); position: relative; overflow: hidden; }
.step .num { font: 800 3.4rem var(--font-head); color: var(--bg); position: absolute; top: .2rem; inset-inline-end: 1rem; line-height: 1; }
.step .ic { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 1rem; }
.step h3 { font-size: 1.15rem; }
.step p { color: var(--muted); margin: 0; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* Dark CTA */
.cta-band {
  background: var(--dark); color: #fff; border-radius: var(--r-xl); padding: clamp(2rem, 5vw, 3.5rem);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: var(--accent);
  filter: blur(120px); opacity: .35; top: -200px; inset-inline-end: -120px;
}
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.cta-band p { color: #c3bec9; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.check-list li { display: flex; gap: .6rem; align-items: start; }
.check-list li .i { color: var(--accent-2); margin-top: .25em; }
@media (max-width: 800px) { .cta-band { grid-template-columns: 1fr; } }

/* ═══════════════ Shop cards ═══════════════ */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.shop-card { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s; }
.shop-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.shop-card .cover { height: 120px; background: linear-gradient(120deg, var(--sand), var(--accent-soft)); background-size: cover; background-position: center; }
.shop-card .body { padding: 0 1.2rem 1.2rem; }
.avatar {
  width: 64px; height: 64px; border-radius: 20px; border: 4px solid var(--surface); background: var(--ink); color: #fff;
  margin-top: -32px; object-fit: cover; display: grid; place-items: center; font: 700 1.5rem var(--font-head); box-shadow: var(--shadow-sm);
}
.shop-card h3 { margin: .55rem 0 .1rem; font-size: 1.12rem; }
.meta-line { color: var(--muted); font-size: .86rem; display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.meta-line .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }
.tags { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .75rem; }
.tag { display: inline-flex; align-items: center; gap: .3em; background: var(--bg); border-radius: 999px; padding: .2em .7em; font-size: .8rem; }
.tag .i { width: 14px; height: 14px; }

/* Filters */
.filters { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: 1.6rem; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: .4em; padding: .5em 1em; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 500; font-size: .9rem; transition: .2s;
}
.pill .i { width: 16px; height: 16px; }
.pill:hover { border-color: var(--ink); }
.pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.search {
  display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding-inline-start: .9rem; margin-inline-start: auto;
}
.search .i { color: var(--muted); }
.search input { border: 0; padding: .6em .8em; font: inherit; outline: none; min-width: 190px; background: transparent; }
.search button { border: 0; background: var(--ink); color: #fff; padding: .55em 1.1em; border-radius: 999px; cursor: pointer; margin: 3px; }

/* Shop page */
.shop-cover { height: 260px; background: linear-gradient(120deg, var(--sand), var(--accent-soft)); background-size: cover; background-position: center; border-radius: 0 0 var(--r-xl) var(--r-xl); }
.shop-head { display: flex; gap: 1.2rem; align-items: end; margin-top: -54px; flex-wrap: wrap; }
.shop-head .avatar { width: 112px; height: 112px; border-radius: 30px; margin: 0; font-size: 2.6rem; border-width: 6px; }
.shop-head .info { flex: 1; min-width: 240px; padding-bottom: .3rem; }
.shop-head h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.socials { display: flex; gap: .45rem; flex-wrap: wrap; }

/* ═══════════════ Product cards ═══════════════ */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.product-card { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s; display: flex; flex-direction: column; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.product-card .img { aspect-ratio: 4/5; background: var(--bg); position: relative; overflow: hidden; margin: 8px; border-radius: 18px; }
.product-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.product-card:hover .img img { transform: scale(1.05); }
.ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(150deg, var(--sand), #fff 70%); color: var(--ink-2); }
.ph .i { width: 56px; height: 56px; opacity: .55; }
.badge-try {
  position: absolute; bottom: .6rem; inset-inline-start: .6rem; background: rgba(18,17,21,.82); color: #fff; backdrop-filter: blur(6px);
  border-radius: 999px; padding: .3em .8em; font-size: .78rem; font-weight: 600; display: inline-flex; align-items: center; gap: .35em;
}
.badge-try .i { width: 14px; height: 14px; }
.product-card .body { padding: .3rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.product-card h3 { font: 600 1rem var(--font); margin: 0; }
.price { font: 700 1.1rem var(--font-head); color: var(--ink); }
.swatches { display: flex; gap: .3rem; margin-top: .35rem; }
.sw { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); }

/* ═══════════════ Product page ═══════════════ */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding: 2.5rem 0; align-items: start; }
.product-media { position: sticky; top: 94px; border-radius: var(--r-xl); overflow: hidden; background: var(--surface); aspect-ratio: 4/5; border: 1px solid var(--line); }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media .ph .i { width: 96px; height: 96px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: .8rem; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); }
.product-info h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: .3rem; }
.product-info .price { font-size: 1.7rem; }
.opt-group { margin: 1.4rem 0; }
.opt-group > label { font-weight: 600; display: block; margin-bottom: .55rem; font-size: .95rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: .5em 1em; cursor: pointer;
  font: 500 .93rem var(--font); display: inline-flex; align-items: center; gap: .45em; transition: .15s; color: var(--ink);
}
.chip:hover { border-color: var(--ink); }
.chip.selected { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip.out { opacity: .4; text-decoration: line-through; pointer-events: none; }
.chip .sw { width: 18px; height: 18px; }
.chip.recommended { border-color: var(--mint-ink); }
.chip.recommended::after { content: "مقترح"; font-size: .68rem; background: var(--mint); color: var(--mint-ink); border-radius: 6px; padding: 0 .45em; font-weight: 700; }
.chip.recommended.selected::after { background: var(--mint-ink); color: #fff; }
@media (max-width: 900px) {
  .product-layout { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1rem; }
  .product-media { position: relative; top: 0; }
}

/* ═══════════════ Panels ═══════════════ */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 1.5rem; margin-top: 1.2rem; }
.panel-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.2rem; }
.panel-head .ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
.panel-head .ic.dark { background: var(--ink); }
.panel-head h3 { margin: 0; font-size: 1.2rem; }
.panel-head p { margin: 0; color: var(--muted); font-size: .9rem; }

/* Photo guide (good / bad examples) */
.guide { background: var(--bg); border-radius: var(--r-lg); padding: 1rem; margin-bottom: 1rem; }
.guide-title { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .92rem; margin-bottom: .8rem; }
.guide-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem; }
.guide-item { margin: 0; }
.guide-item .frame { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 3/4; background: #fff; border: 2px solid transparent; }
.guide-item.good .frame { border-color: var(--mint-ink); }
.guide-item.bad .frame { border-color: #f2b8ae; }
.guide-item .frame svg, .guide-item .frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.guide-item .mark {
  position: absolute; top: 6px; inset-inline-start: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff;
}
.guide-item.good .mark { background: var(--mint-ink); }
.guide-item.bad .mark { background: var(--danger); }
.guide-item .mark .i { width: 14px; height: 14px; }
.guide-item figcaption { font-size: .78rem; text-align: center; margin-top: .35rem; line-height: 1.4; color: var(--ink-2); }
@media (max-width: 520px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }

.kind-switch { display: flex; gap: .4rem; margin-bottom: .8rem; flex-wrap: wrap; }

.upload-zone {
  border: 2px dashed var(--line-2); border-radius: var(--r-lg); padding: 1.6rem 1rem; text-align: center; background: var(--surface);
  transition: .2s; position: relative;
}
.upload-zone.has { border-style: solid; padding: .6rem; }
.upload-zone.good { border-color: var(--mint-ink); }
.upload-zone.bad { border-color: var(--danger); }
.upload-zone .btns { display: flex; gap: .55rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.upload-zone img.preview { max-height: 360px; margin: 0 auto; border-radius: 14px; }
.upload-zone .big-ic { width: 64px; height: 64px; border-radius: 20px; background: var(--bg); display: grid; place-items: center; margin: 0 auto .6rem; }
.upload-zone .big-ic .i { width: 30px; height: 30px; }

.check-box { border-radius: var(--r); padding: .9rem 1rem; margin-top: .8rem; font-size: .93rem; }
.check-box.ok { background: var(--mint); color: var(--mint-ink); }
.check-box.bad { background: #ffe8e4; color: #8f2617; }
.check-box.warn { background: #fff3dc; color: #7a5410; }
.check-box.wait { background: var(--bg); color: var(--ink-2); }
.check-box .ttl { display: flex; align-items: center; gap: .45rem; font-weight: 700; }
.check-box ul { margin: .4rem 0 0; padding-inline-start: 1.3rem; }
.check-box .acts { display: flex; gap: .45rem; margin-top: .7rem; flex-wrap: wrap; }

.consent { display: flex; gap: .6rem; align-items: start; font-size: .9rem; margin: 1rem 0; color: var(--ink-2); cursor: pointer; }
.consent input { margin-top: .3em; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }

.result { margin-top: 1.2rem; }
.result-compare { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.result-compare figure { margin: 0; background: var(--bg); border-radius: var(--r); overflow: hidden; position: relative; }
.result-compare figcaption { position: absolute; top: .55rem; inset-inline-start: .55rem; background: rgba(18,17,21,.7); color: #fff; font-size: .75rem; padding: .15em .65em; border-radius: 999px; }
.result-compare img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.result-compare .ph { aspect-ratio: 3/4; }
.notice { border-radius: var(--r); padding: .9rem 1.1rem; font-size: .93rem; margin-top: .8rem; display: flex; gap: .6rem; align-items: start; }
.notice .i { margin-top: .2em; }
.notice.info { background: var(--lilac); color: var(--lilac-ink); }
.notice.warn { background: #fff3dc; color: #7a5410; }
.notice.ok { background: var(--mint); color: var(--mint-ink); }

.loader { display: none; align-items: center; gap: .7rem; justify-content: center; padding: 1rem; color: var(--muted); font-size: .92rem; }
.loader.on { display: flex; }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; }
.field small { color: var(--muted); font-size: .8rem; }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: .7em .9em; font: inherit; font-size: .95rem;
  background: var(--surface); color: var(--ink); outline: none; transition: .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(18,17,21,.06); }
.how {
  border: 0; background: var(--bg); color: var(--ink-2); width: 22px; height: 22px; border-radius: 50%; display: inline-grid;
  place-items: center; cursor: pointer; padding: 0; margin-inline-start: auto;
}
.how:hover { background: var(--ink); color: #fff; }
.how .i { width: 14px; height: 14px; }
details.more { margin-top: .8rem; }
details.more summary { cursor: pointer; font-weight: 600; font-size: .92rem; list-style: none; display: inline-flex; align-items: center; gap: .4rem; color: var(--ink); }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { margin-bottom: .8rem; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }

/* Measure illustration cards */
.measure-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1rem; }
.measure-card { background: var(--bg); border-radius: var(--r); padding: .8rem; display: grid; grid-template-columns: 84px 1fr; gap: .7rem; align-items: center; }
.measure-card svg { width: 84px; height: 120px; }
.measure-card b { display: block; font-size: .92rem; }
.measure-card p { margin: 0; font-size: .8rem; color: var(--muted); line-height: 1.5; }
@media (max-width: 520px) { .measure-cards { grid-template-columns: 1fr; } }

.tone-picker { display: flex; gap: .4rem; flex-wrap: wrap; }
.tone-picker button { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; transition: .15s; }
.tone-picker button.selected { box-shadow: 0 0 0 3px var(--ink); transform: scale(1.08); }

.size-result { margin-top: 1rem; border-radius: var(--r-lg); background: var(--dark); color: #fff; padding: 1.3rem; position: relative; overflow: hidden; }
.size-result::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: var(--accent); filter: blur(80px); opacity: .35; top: -110px; inset-inline-end: -60px; }
.size-result > * { position: relative; }
.size-result .lbl { color: #b7b2bd; font-size: .9rem; }
.size-result .big { font: 800 2.8rem var(--font-head); line-height: 1.1; }
.size-result .big small { font-size: 1rem; color: #b7b2bd; font-weight: 500; }
.meter { height: 6px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; margin: .8rem 0 .3rem; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ffb39f); border-radius: 99px; }
.size-result ul { margin: .7rem 0 0; padding-inline-start: 1.2rem; font-size: .9rem; color: #dcd8e0; }
.feedback { margin-top: 1rem; font-size: .9rem; }
.feedback .chips { margin-top: .5rem; }

.order-bar { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ═══════════════ Smart camera ═══════════════ */
.cam { position: fixed; inset: 0; z-index: 900; background: #000; display: flex; flex-direction: column; color: #fff; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam video.mirror { transform: scaleX(-1); }
.cam .overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cam .overlay .shape { fill: none; stroke: rgba(255,255,255,.85); stroke-width: 3; stroke-dasharray: 10 8; transition: stroke .3s; }
.cam.good .overlay .shape { stroke: #3ddc84; stroke-dasharray: none; }
.cam .top, .cam .bottom { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 1rem; gap: .6rem; }
.cam .top { background: linear-gradient(rgba(0,0,0,.6), transparent); }
.cam .bottom { margin-top: auto; background: linear-gradient(transparent, rgba(0,0,0,.7)); padding-bottom: max(1.2rem, env(safe-area-inset-bottom)); }
.cam .hint {
  position: relative; z-index: 2; margin: 0 auto; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); border-radius: 999px;
  padding: .55em 1.1em; font-weight: 600; display: inline-flex; gap: .5em; align-items: center; transition: background .3s; text-align: center;
}
.cam.good .hint { background: rgba(31, 180, 90, .85); }
.cam .shutter { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: rgba(255,255,255,.25); cursor: pointer; transition: .2s; }
.cam .shutter:active { transform: scale(.92); }
.cam.good .shutter { background: #fff; }
.cam .round { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; cursor: pointer; font-weight: 700; }
.cam .round.on { background: var(--accent); }
.cam .countdown { position: absolute; inset: 0; display: grid; place-items: center; font: 800 7rem var(--font-head); z-index: 3; pointer-events: none; text-shadow: 0 4px 30px rgba(0,0,0,.5); }
.cam .mid { position: relative; z-index: 2; text-align: center; margin-top: .4rem; }

/* ═══════════════ For shops page ═══════════════ */
.fs-hero { padding: 4rem 0 2rem; text-align: center; }
.fs-hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; max-width: 16em; margin-inline: auto; }
.fs-hero .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 38em; margin: 0 auto 1.6rem; }
.fs-hero .hero-actions { justify-content: center; }
.who { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.benefit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; }
.benefit .ic { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 1rem; }
.benefit:nth-child(3n+1) .ic { background: var(--accent-soft); color: var(--accent); }
.benefit:nth-child(3n+2) .ic { background: var(--lilac); color: var(--lilac-ink); }
.benefit:nth-child(3n) .ic { background: var(--mint); color: var(--mint-ink); }
.benefit h3 { font-size: 1.1rem; }
.benefit p { color: var(--muted); margin: 0; font-size: .95rem; }
@media (max-width: 900px) { .benefits { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .benefits { grid-template-columns: 1fr; } }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.compare > div { border-radius: var(--r-lg); padding: 1.6rem; }
.compare .before { background: var(--surface); border: 1px solid var(--line); }
.compare .after { background: var(--dark); color: #fff; }
.compare h3 { display: flex; align-items: center; gap: .5rem; }
.compare ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .6rem; }
.compare li { display: flex; gap: .55rem; }
.compare .before li .i { color: var(--danger); margin-top: .25em; }
.compare .after li .i { color: #3ddc84; margin-top: .25em; }
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 1.7rem; display: flex; flex-direction: column; gap: .8rem; position: relative; }
.plan.featured { background: var(--dark); color: #fff; border-color: var(--dark); transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.plan .badge-top { position: absolute; top: -12px; inset-inline-start: 1.5rem; background: var(--accent); color: #fff; font-size: .78rem; font-weight: 700; padding: .25em .8em; border-radius: 999px; }
.plan h3 { margin: 0; font-size: 1.25rem; }
.plan .p { font: 800 1.8rem var(--font-head); }
.plan .tries { font-size: .9rem; color: var(--muted); }
.plan.featured .tries { color: #b7b2bd; }
.plan ul { list-style: none; margin: 0 0 auto; padding: 0; display: grid; gap: .5rem; font-size: .95rem; }
.plan li { display: flex; gap: .5rem; }
.plan li .i { color: var(--accent); margin-top: .25em; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } .plan.featured { transform: none; } }

.faq { display: grid; gap: .6rem; max-width: 820px; margin-inline: auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.2rem; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: .7rem 0 0; color: var(--ink-2); }

.join { display: grid; grid-template-columns: .9fr 1.1fr; gap: 2rem; align-items: start; }
.join .card-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 1.8rem; }
.cat-checks { display: flex; flex-wrap: wrap; gap: .4rem; }
.cat-checks label { cursor: pointer; }
.cat-checks input { position: absolute; opacity: 0; pointer-events: none; }
.cat-checks span { display: inline-flex; align-items: center; gap: .35em; padding: .45em .9em; border-radius: 999px; border: 1.5px solid var(--line); font-size: .88rem; transition: .15s; }
.cat-checks span .i { width: 15px; height: 15px; }
.cat-checks input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-checks input:focus-visible + span { outline: 2px solid var(--accent); }
.val { color: var(--danger); font-size: .82rem; }
.validation-summary-errors { background: #ffe8e4; color: #8f2617; border-radius: var(--r-sm); padding: .7rem 1rem; margin-bottom: 1rem; font-size: .92rem; }
.validation-summary-errors ul { margin: 0; padding-inline-start: 1.2rem; }
@media (max-width: 860px) { .join { grid-template-columns: 1fr; } }

/* ═══════════════ Footer ═══════════════ */
.site-footer { margin-top: 3rem; background: var(--dark); color: #b7b2bd; padding: 3.5rem 0 1.6rem; border-radius: var(--r-xl) var(--r-xl) 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
.site-footer .brand strong { color: #fff; }
.site-footer .brand-mark { background: #fff; color: var(--ink); }
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .95rem; }
.site-footer ul a { display: inline-flex; align-items: center; gap: .45em; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.4rem; padding-top: 1.3rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; font-size: .88rem; }
.footer-bottom a { color: #fff; font-weight: 700; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

.empty { text-align: center; padding: 3.5rem 1rem; color: var(--muted); }
.empty .ic { width: 72px; height: 72px; border-radius: 22px; background: var(--surface); display: grid; place-items: center; margin: 0 auto 1rem; border: 1px solid var(--line); }
.empty .ic .i { width: 34px; height: 34px; }

/* ═══════════════ Custom dialogs (بدل alert/confirm تبع المتصفح) ═══════════════ */
.dlg-backdrop {
  position: fixed; inset: 0; background: rgba(18, 17, 21, .5); backdrop-filter: blur(4px);
  display: grid; place-items: center; z-index: 1000; padding: 1rem; animation: fade .15s ease;
}
.dlg {
  background: var(--surface); border-radius: var(--r-xl); width: min(440px, 100%); padding: 1.8rem; box-shadow: var(--shadow-lg);
  text-align: center; animation: pop .25s var(--ease); max-height: 92vh; overflow: auto;
}
.dlg.wide { width: min(620px, 100%); text-align: start; }
.dlg .dlg-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto .8rem; background: var(--bg); }
.dlg .dlg-ic .i { width: 28px; height: 28px; }
.dlg .dlg-ic.danger { background: #ffe8e4; color: var(--danger); }
.dlg .dlg-ic.info { background: var(--lilac); color: var(--lilac-ink); }
.dlg h3 { margin: 0 0 .4rem; font-size: 1.25rem; }
.dlg p { margin: 0 0 1.2rem; color: var(--ink-2); }
.dlg .dlg-body { margin-bottom: 1.2rem; }
.dlg .dlg-actions { display: flex; gap: .6rem; justify-content: center; }
.toast-wrap { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 1100; display: grid; gap: .5rem; }
.toast { background: var(--ink); color: #fff; padding: .75rem 1.25rem; border-radius: 999px; box-shadow: var(--shadow-lg); animation: pop .25s var(--ease); font-weight: 500; font-size: .93rem; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.95) translateY(8px); } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .studio-card .scan { animation: none; display: none; }
  * { scroll-behavior: auto !important; }
}

/* ═══════════════ Hair studio ═══════════════ */
.hs-hero { padding: 3rem 0 1.5rem; }
.hs-hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; letter-spacing: -.03em; max-width: 15em; }
.hs-hero h1 .hl { color: var(--accent); }
.hs-hero .lead { font-size: 1.1rem; color: var(--ink-2); max-width: 36em; }
.hs { display: grid; grid-template-columns: 420px 1fr; gap: 2rem; align-items: start; padding-bottom: 3rem; }
.hs-stage { position: sticky; top: 92px; }
.stage-card { position: relative; aspect-ratio: 3/4; border-radius: var(--r-xl); overflow: hidden; background: var(--dark); color: #fff; box-shadow: var(--shadow-lg); }
.stage-card > img { width: 100%; height: 100%; object-fit: cover; }
.stage-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: .4rem; padding: 1.5rem;
  background: radial-gradient(90% 70% at 70% 0%, rgba(255,77,46,.35), transparent 60%), var(--dark); }
.stage-empty .big-ic { width: 72px; height: 72px; border-radius: 24px; background: rgba(255,255,255,.08); display: grid; place-items: center; margin: 0 auto .5rem; }
.stage-empty .big-ic .i { width: 34px; height: 34px; }
.stage-empty small { color: #a9a4b1 !important; }
.stage-empty .btns { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.stage-empty .btn-dark { background: #fff; color: var(--ink); }
.stage-empty .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.stage-busy { position: absolute; inset: 0; display: none; place-content: center; justify-items: center; gap: .8rem; background: rgba(18,17,21,.55); backdrop-filter: blur(6px); font-weight: 600; }
.stage-busy.on { display: grid; }
.stage-busy .spinner { width: 40px; height: 40px; border-width: 4px; border-color: rgba(255,255,255,.25); border-top-color: #fff; }
.stage-actions { display: flex; gap: .5rem; justify-content: center; margin-top: .8rem; }

.compare { position: absolute; inset: 0; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .after-wrap { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; direction: ltr; z-index: 3; }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: #fff; transform: translateX(-50%); box-shadow: 0 0 12px rgba(0,0,0,.4); z-index: 2; pointer-events: none; }
.cmp-handle::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: var(--ink); display: grid; place-items: center; font-weight: 800; box-shadow: var(--shadow); }
.cmp-label { position: absolute; top: .8rem; z-index: 2; background: rgba(18,17,21,.6); padding: .15em .7em; border-radius: 999px; font-size: .8rem; pointer-events: none; }
.cmp-label.before { left: .8rem; }
.cmp-label.after { right: .8rem; background: var(--accent); }

.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .65rem; max-height: 620px; overflow: auto; padding: 2px; }
.style-card { border: 2px solid transparent; background: var(--bg); border-radius: 18px; padding: 0 0 .55rem; cursor: pointer; text-align: center; position: relative; transition: .15s; font: inherit; color: inherit; }
.style-card:hover { border-color: var(--line-2); }
.style-card.selected { border-color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); }
.style-card .thumb { display: grid; place-items: center; aspect-ratio: 3/4; border-radius: 16px 16px 12px 12px; overflow: hidden; margin-bottom: .45rem; background: var(--surface); }
.style-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.style-card .thumb.gen { color: #fff; position: relative; align-content: center; gap: .3rem; }
.style-card .thumb.gen .i { width: 30px; height: 30px; opacity: .9; }
.style-card .thumb.gen em { font-style: normal; font-size: .72rem; opacity: .75; }
.style-card.none .thumb { color: var(--muted); border: 1.5px dashed var(--line-2); }
.style-card .nm { font-size: .84rem; font-weight: 600; display: block; padding-inline: .3rem; line-height: 1.35; }
.style-card .tg { position: absolute; top: .45rem; inset-inline-start: .45rem; background: var(--accent); color: #fff; font-size: .66rem; font-weight: 700; padding: .05em .55em; border-radius: 999px; }

.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: .5rem; }
.color-chip { display: flex; align-items: center; gap: .5rem; padding: .45rem .55rem; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; font: 500 .84rem var(--font); color: var(--ink); text-align: start; }
.color-chip:hover { border-color: var(--line-2); }
.color-chip.selected { border-color: var(--ink); }
.dotc { width: 28px; height: 28px; border-radius: 50%; flex: none; box-shadow: inset 0 -6px 10px rgba(0,0,0,.25), inset 0 4px 6px rgba(255,255,255,.25); }
.dotc.natural { background: conic-gradient(#1b1714, #5a3c28, #a7834f, #1b1714); }
.try-bar .choice { font-weight: 600; display: flex; align-items: center; gap: .4rem; }
@media (max-width: 980px) {
  .hs { grid-template-columns: 1fr; }
  .hs-stage { position: relative; top: 0; max-width: 440px; width: 100%; margin: 0 auto; }
}

.cat-img { width: 100%; aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; background: var(--bg); }
.cat-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.cat-card:hover .cat-img img { transform: scale(1.06); }
.hair-band { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2rem; align-items: center; background: var(--dark); color: #fff; border-radius: var(--r-xl); padding: clamp(1.6rem, 4vw, 2.6rem); overflow: hidden; position: relative; }
.hair-band::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: #b8a2d9; filter: blur(120px); opacity: .3; bottom: -180px; inset-inline-start: -80px; }
.hair-band > * { position: relative; }
.hair-band h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.hair-band p { color: #c3bec9; }
.hair-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.hair-strip img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 16px; }
.hair-strip .chip-style { display: flex; align-items: center; justify-content: center; gap: .4rem; aspect-ratio: 3/4; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); font-weight: 600; font-size: .9rem; text-align: center; padding: .5rem; flex-direction: column; }
.hair-strip .chip-style .i { width: 26px; height: 26px; color: var(--accent-2); }
@media (max-width: 800px) { .hair-band { grid-template-columns: 1fr; } }

/* لوغو جرّبيها (البنت بالبرنيطة) مكان مربّع الأيقونة */
.brand-mark.brand-logo { background: none; padding: 0; overflow: hidden; box-shadow: 0 6px 16px -8px rgba(42,23,53,.45); }
.brand-mark.brand-logo::after { display: none; }
.brand-mark.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* رابط موقع ميمي (بالتعاون مع) */
.partner-link { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 2px; }
.partner-link:hover { color: var(--accent); }
.brand > span > a { color: inherit; }
