/* ==========================================================================
   Steadfast Health Pharmacy: styles
   - Logical properties throughout so RTL (Arabic) mirrors correctly.
   - All motion respects prefers-reduced-motion.
   - Font: Sen everywhere (Cairo only as an Arabic-glyph fallback).
   ========================================================================== */

:root {
    --font: "Sen", "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --ink: #0f172a;
    --muted: #475569;
    --soft: #64748b;
    --line: #e2e8f0;
    --bg: #f5f9f9;
    --card: #ffffff;

    --p50: #f0fdfa;
    --p100: #ccfbf1;
    --p200: #99f6e4;
    --p400: #2dd4bf;
    --p500: #14b8a6;
    --p600: #0d9488;
    --p700: #0f766e;
    --p800: #115e59;
    --p900: #134e4a;
    --deep: #06292a;

    --wa: #25d366;
    --wa-d: #1da851;
    --warn-bg: #fffbeb;
    --warn-line: #fde68a;
    --warn-ink: #78350f;
    --danger-bg: #fef2f2;
    --danger-line: #fecaca;
    --danger-ink: #7f1d1d;
    --danger: #b91c1c;

    --r: 18px;
    --r-sm: 12px;
    --shadow-1: 0 1px 2px rgba(15, 23, 42, .05), 0 2px 8px rgba(15, 23, 42, .06);
    --shadow-2: 0 18px 40px -16px rgba(15, 23, 42, .28);
    --ease: cubic-bezier(.22, 1, .36, 1);
    --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body:has(dialog[open]) { overflow: hidden; }
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
*, button, input, select, textarea, option, legend, dialog { font-family: var(--font); }
button, input, select, textarea { font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 3px solid var(--p500); outline-offset: 2px; border-radius: 6px; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(900px, 100% - 32px); }
.hide-sm { display: none; }
@media (min-width: 720px) { .hide-sm { display: inline; } }

.skip {
    position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 100;
    background: var(--p800); color: #fff; padding: 10px 16px; border-radius: 10px;
    transform: translateY(-200%); transition: transform .2s var(--ease);
}
.skip:focus { transform: none; }

/* Icons */
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-lg { width: 30px; height: 30px; }
.i-xl { width: 56px; height: 56px; stroke-width: 1.6; }
[dir="rtl"] .flip { transform: scaleX(-1); }

/* Scroll progress */
.progress {
    position: fixed; inset-block-start: 0; inset-inline: 0; height: 3px; z-index: 60;
    background: linear-gradient(90deg, var(--p400), var(--p700));
    transform-origin: left; transform: scaleX(var(--p, 0));
}
[dir="rtl"] .progress { transform-origin: right; }

/* Top bar */
.topbar { background: var(--deep); color: #d5f5ef; font-size: 12.5px; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 8px; }
.topbar p { display: flex; align-items: center; gap: 8px; }
.topbar-r { display: flex; align-items: center; gap: 18px; }
.topbar-wa { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #fff; transition: color .2s; }
.topbar-wa:hover { color: var(--p200); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--p400); position: relative; flex: none; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--p400); animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.2); opacity: 0; } }

/* Header */
.header {
    position: sticky; inset-block-start: 0; z-index: 40;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid transparent;
    transition: box-shadow .3s var(--ease), border-color .3s;
}
.header.scrolled { border-color: var(--line); box-shadow: 0 6px 24px -14px rgba(15, 23, 42, .3); }
.header-in { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 12px; transition: height .3s var(--ease); }
.header.scrolled .header-in { height: 64px; }

.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo-mark {
    width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, var(--p600), var(--p800));
    box-shadow: 0 8px 18px -8px rgba(15, 118, 110, .7);
    transition: transform .4s var(--ease);
}
.logo-mark .i { width: 22px; height: 22px; }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.logo-text { display: grid; line-height: 1.15; }
.logo-text strong { font-weight: 800; font-size: 18px; letter-spacing: .02em; }
.logo-text small { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--p600); }
.logo-light .logo-text strong { color: #fff; }
.logo-light .logo-text small { color: var(--p400); }

.nav { display: none; align-items: center; gap: 4px; }
.nav a, .mnav a {
    position: relative; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted);
    transition: color .2s, background .2s;
}
.nav a:hover { color: var(--p700); background: var(--p50); }
.nav a::after {
    content: ""; position: absolute; inset-inline: 12px; inset-block-end: 3px; height: 2px; border-radius: 2px;
    background: var(--p600); transform: scaleX(0); transition: transform .3s var(--ease);
}
.nav a[aria-current="page"] { color: var(--p700); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }
@media (min-width: 1040px) { .nav { display: flex; } .chip-menu { display: none !important; } }

.actions { display: flex; align-items: center; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 12px;
    background: #f1f5f9; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink);
    transition: background .2s, transform .2s var(--ease), border-color .2s;
}
.chip:hover { background: #e8eef4; }
.chip:active { transform: scale(.96); }
.chip .i { color: var(--p700); }
.chip-select select { background: transparent; border: 0; font-weight: 700; cursor: pointer; padding-inline-end: 2px; }
.chip-select select:focus-visible { outline: none; }
.chip-select:focus-within { outline: 3px solid var(--p500); outline-offset: 2px; }
.chip-cart { background: var(--p50); border-color: var(--p200); color: var(--p800); }
.chip-cart:hover { background: var(--p100); }
.badge {
    min-width: 20px; height: 20px; padding-inline: 5px; border-radius: 999px; display: inline-grid; place-items: center;
    background: var(--p700); color: #fff; font-size: 11px; font-weight: 800;
}
.badge.bump { animation: bump .45s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }

.mnav { display: grid; gap: 4px; padding: 10px 16px 16px; border-top: 1px solid var(--line); background: #fff; animation: dropIn .3s var(--ease); }
.mnav a { padding: 12px 14px; font-size: 15px; }
.mnav a[aria-current="page"] { background: var(--p50); color: var(--p700); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (min-width: 1040px) { .mnav { display: none !important; } }

/* Page transitions + reveal */
.page.enter { animation: pageIn .5s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* Buttons */
.btn {
    position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 13px 22px; border-radius: 14px; border: 1px solid transparent; font-weight: 700; font-size: 14.5px;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn-sm { padding: 10px 16px; font-size: 13px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--p600), var(--p700)); color: #fff; box-shadow: 0 10px 22px -10px rgba(15, 118, 110, .8); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -12px rgba(15, 118, 110, .9); }
.btn-primary::after, .btn-wa::after {
    content: ""; position: absolute; inset-block: 0; inset-inline-start: -60%; width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-20deg); transition: inset-inline-start .7s var(--ease);
}
.btn-primary:hover::after, .btn-wa:hover::after { inset-inline-start: 130%; }
.btn-wa { background: var(--wa); color: #05301a; box-shadow: 0 10px 22px -10px rgba(37, 211, 102, .8); }
.btn-wa:hover { background: #2be072; transform: translateY(-2px); }
.btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .28); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .2); transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--p800); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -14px rgba(0, 0, 0, .5); }
.btn-text { background: transparent; color: var(--muted); }
.btn-text:hover { background: #f1f5f9; color: var(--ink); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 0; background: transparent; display: grid; place-items: center; color: var(--muted); transition: background .2s, transform .3s var(--ease); }
.icon-btn:hover { background: #f1f5f9; transform: rotate(90deg); }

/* Hero */
.hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(160deg, #04191a 0%, var(--p900) 55%, #052f2f 100%); padding-block: 72px 84px; }
.grid-bg {
    position: absolute; inset: 0; opacity: .5;
    background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: float 14s ease-in-out infinite; }
.b1 { width: 420px; height: 420px; background: #0d9488; inset-block-start: -120px; inset-inline-start: -80px; }
.b2 { width: 360px; height: 360px; background: #0e7490; inset-block-end: -140px; inset-inline-end: 8%; animation-delay: -6s; }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(34px, -28px) scale(1.12); } }
.hero-in { position: relative; z-index: 1; display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-in { grid-template-columns: 1.25fr .75fr; gap: 56px; } }
.hero-copy { display: grid; gap: 20px; justify-items: start; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: var(--p200); font-size: 12.5px; font-weight: 700; backdrop-filter: blur(6px); }
.hero h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; outline: none; background: linear-gradient(180deg, #fff 30%, #b9f3ea); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(15px, 1.6vw, 18px); color: #c3dcd8; max-width: 60ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 6px; }

.hero-card { background: #fff; color: var(--ink); border-radius: 24px; padding: 22px; box-shadow: var(--shadow-2); max-width: 420px; width: 100%; justify-self: center; animation: bob 6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero-visual { height: 170px; border-radius: 16px; display: grid; place-items: center; color: var(--p700); margin-block-end: 16px; background: radial-gradient(circle at 30% 30%, var(--p100), var(--p50) 60%, #fff); position: relative; overflow: hidden; }
.hero-visual::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; border: 1px dashed var(--p400); animation: spin 22s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-card-head { display: flex; justify-content: space-between; gap: 12px; padding-block-end: 14px; border-bottom: 1px solid var(--line); margin-block-end: 14px; }
.hero-card-head h2 { font-size: 17px; font-weight: 800; }
.hero-card-head p { font-size: 12.5px; font-weight: 600; color: var(--p700); margin-block-start: 2px; }
.hero-card-foot { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.price-lbl { display: block; font-size: 12px; font-weight: 600; color: var(--soft); }
.price-big { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.tag { align-self: start; padding: 4px 10px; border-radius: 999px; background: var(--p100); color: var(--p800); font-size: 11px; font-weight: 800; white-space: nowrap; }

/* Trust strip */
.trust { background: #fff; border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding-block: 22px; }
@media (min-width: 860px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust-item { text-align: center; padding: 12px; border-radius: 16px; transition: background .3s, transform .3s var(--ease); }
.trust-item:hover { background: var(--p50); transform: translateY(-3px); }
.trust-item .i { margin: 0 auto 8px; color: var(--p600); }
.trust-item h3 { font-size: 15px; font-weight: 800; }
.trust-item p { font-size: 13px; color: var(--soft); }

/* Sections */
.section { padding-block: 56px; }
.section.alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-block-end: 28px; }
.section-head.center { justify-content: center; text-align: center; }
.eyebrow { display: block; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--p600); margin-block-end: 4px; }
.section-head h2, .page-head h1 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.page-head { display: grid; gap: 8px; margin-block-end: 32px; }
.page-head.center { text-align: center; justify-items: center; }
.page-head p { color: var(--muted); max-width: 62ch; }
.page-head h1 { outline: none; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--p700); }
.link-arrow .i { transition: transform .3s var(--ease); }
.link-arrow:hover .i { transform: translateX(4px); }
[dir="rtl"] .link-arrow:hover .i { transform: scaleX(-1) translateX(4px); }

.grid-3 { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-2.tight { gap: 14px; margin-block-start: 8px; }

/* Product cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); display: flex; flex-direction: column; overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s, opacity .7s var(--ease); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); border-color: var(--p200); }
.card.reveal:not(.in):hover { transform: translateY(22px); }
.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--p50); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.card-media .tag { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; background: #fff; box-shadow: var(--shadow-1); }
.img-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--p600); background: radial-gradient(circle at 30% 25%, var(--p100), var(--p50) 70%); }
.img-ph .i { width: 54px; height: 54px; stroke-width: 1.5; opacity: .85; }
.card-body { padding: 18px 18px 8px; display: grid; gap: 6px; flex: 1; align-content: start; }
.card-body h3 { font-size: 17px; font-weight: 800; line-height: 1.3; }
.card-sub { font-size: 13px; font-weight: 600; color: var(--p700); }
.card-desc { font-size: 13.5px; color: var(--muted); }
.card-foot { padding: 14px 18px 18px; display: grid; gap: 14px; }
.price { display: flex; justify-content: space-between; align-items: baseline; padding-block-start: 14px; border-top: 1px solid var(--line); }
.price strong { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-row .btn { padding-inline: 10px; font-size: 13px; background-clip: padding-box; }
.btn-soft { background: #f1f5f9; color: var(--ink); }
.btn-soft:hover { background: var(--p100); color: var(--p800); transform: translateY(-2px); }

/* Steps */
.steps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); counter-reset: s; }
.step { position: relative; padding: 28px 24px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); }
.step-n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--p500), var(--p700)); margin-block-end: 14px; box-shadow: 0 10px 20px -10px rgba(15, 118, 110, .8); }
.step h3 { font-size: 18px; font-weight: 800; margin-block-end: 6px; }
.step p { color: var(--muted); font-size: 14.5px; }

/* Safety band */
.safety-band { display: grid; gap: 18px; align-items: center; padding: 30px; border-radius: 24px; color: #fff; background: linear-gradient(135deg, var(--p800), var(--deep)); position: relative; overflow: hidden; }
.safety-band::before { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: rgba(45, 212, 191, .16); inset-block-start: -140px; inset-inline-end: -80px; filter: blur(10px); }
.safety-band > * { position: relative; }
.safety-band .i-xl { color: var(--p400); }
.safety-band h2 { font-size: 24px; font-weight: 800; }
.safety-band p { color: #bfe5df; max-width: 60ch; }
@media (min-width: 820px) { .safety-band { grid-template-columns: auto 1fr auto; padding: 36px 40px; gap: 28px; } }

/* Toolbar */
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-block-end: 26px; box-shadow: var(--shadow-1); }
.cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cat { border: 0; padding: 9px 16px; border-radius: 12px; font-size: 13px; font-weight: 700; background: #f1f5f9; color: var(--muted); transition: background .2s, color .2s, transform .2s var(--ease); }
.cat:hover { background: var(--p100); color: var(--p800); }
.cat:active { transform: scale(.96); }
.cat.is-active { background: var(--p700); color: #fff; }
.search { position: relative; flex: 1 1 240px; max-width: 340px; }
.search .i { position: absolute; inset-inline-start: 13px; inset-block-start: 50%; transform: translateY(-50%); color: var(--soft); pointer-events: none; }
.search input { width: 100%; padding: 11px 14px; padding-inline-start: 38px; border-radius: 12px; border: 1px solid var(--line); background: #f8fafc; transition: border-color .2s, box-shadow .2s, background .2s; }
.search input:focus { outline: none; border-color: var(--p500); background: #fff; box-shadow: 0 0 0 4px rgba(20, 184, 166, .15); }
.empty { text-align: center; color: var(--soft); padding: 48px 0; font-weight: 600; }

/* Panels / guide */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 26px; box-shadow: var(--shadow-1); display: grid; gap: 12px; align-content: start; margin-block-end: 0; }
.narrow > .panel, .narrow > .grid-2 { margin-block-end: 20px; }
.panel h3 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.panel p { color: var(--muted); font-size: 14.5px; }
.panel-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--p100); color: var(--p700); }
.panel-warn { background: var(--warn-bg); border-color: var(--warn-line); }
.panel-warn h3 { color: var(--warn-ink); }
.panel-danger { background: var(--danger-bg); border-color: var(--danger-line); }
.panel-danger h3 { color: var(--danger-ink); }
.checks { display: grid; gap: 9px; }
.checks li { position: relative; padding-inline-start: 24px; font-size: 14.5px; font-weight: 500; }
.panel-warn .checks li { color: var(--warn-ink); }
.panel-danger .checks li { color: var(--danger-ink); }
.checks li::before { content: ""; position: absolute; inset-inline-start: 2px; inset-block-start: .6em; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .55; }
.checks.ok li::before { background: var(--p600); opacity: 1; }
.prose { gap: 14px; }
.prose p { font-size: 15px; }
.license { font-weight: 700; color: var(--p800) !important; }
.mini { padding: 16px; background: var(--bg); border-radius: var(--r-sm); border: 1px solid var(--line); }
.mini h4 { font-size: 15px; font-weight: 800; margin-block-end: 3px; }
.mini p { font-size: 13.5px; }

/* Calculator */
.calc { max-width: 520px; margin-inline: auto; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow-2); display: grid; gap: 16px; }
.calc label, .field label { font-size: 13px; font-weight: 700; color: var(--ink); }
.calc input[type="date"] { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: #f8fafc; font-weight: 600; }
.calc input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--p500); box-shadow: 0 0 0 4px rgba(20, 184, 166, .15); background: #fff; }
.calc-result { display: grid; gap: 12px; padding: 18px; border-radius: 16px; background: var(--p50); border: 1px solid var(--p200); animation: pageIn .5s var(--ease); }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.res { background: #fff; border-radius: 12px; border: 1px solid var(--line); padding: 14px 10px; text-align: center; }
.res small { display: block; font-size: 12px; color: var(--soft); font-weight: 600; }
.res strong { display: block; margin-block-start: 3px; font-size: 18px; font-weight: 800; color: var(--p700); }
.res:last-child strong { font-size: 15px; color: var(--ink); }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); font-size: 13.5px; font-weight: 600; }
.muted-note { font-size: 12.5px; color: var(--soft); }

/* Forms */
.field { display: grid; gap: 6px; }
.field em { font-style: normal; font-weight: 500; color: var(--soft); }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #cbd5e1; background: #f8fafc; transition: border-color .2s, box-shadow .2s, background .2s; }
.field textarea { resize: vertical; min-height: 96px; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); background: #fff8f8; }
.err { color: var(--danger); font-size: 12.5px; font-weight: 600; animation: shake .35s var(--ease); }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.two { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 440px) { .two { grid-template-columns: 1fr; } }

.contact-row { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: #f8fafc; transition: transform .3s var(--ease), background .2s, border-color .2s; }
.contact-row:hover { transform: translateX(4px); background: var(--p50); border-color: var(--p200); }
[dir="rtl"] .contact-row:hover { transform: translateX(-4px); }
.contact-row.wa { background: #effdf4; border-color: #bbf0cf; }
.c-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--p700); color: #fff; flex: none; }
.contact-row.wa .c-ico { background: var(--wa); color: #05301a; }
.contact-row strong { display: block; font-size: 14px; }
.contact-row small { color: var(--muted); font-size: 13px; }

/* Dialogs (cart drawer + checkout modal) */
dialog { padding: 0; border: 0; color: var(--ink); background: #fff; }
dialog::backdrop { background: rgba(3, 20, 20, .55); backdrop-filter: blur(5px); animation: fade .25s ease both; }
dialog.closing::backdrop { animation: fadeOut .2s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }

.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(440px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .4); }
[dir="rtl"] .drawer { inset: 0 auto 0 0; box-shadow: 20px 0 50px -20px rgba(0, 0, 0, .4); }
.drawer[open] { animation: slideIn .4s var(--ease) both; }
.drawer.closing { animation: slideOut .22s ease-in both; }
[dir="rtl"] .drawer[open] { animation-name: slideInRtl; }
[dir="rtl"] .drawer.closing { animation-name: slideOutRtl; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: none; } }
@keyframes slideOut { to { transform: translateX(100%); } }
@keyframes slideInRtl { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes slideOutRtl { to { transform: translateX(-100%); } }
.drawer-in { height: 100%; display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; }
.drawer-head h2 .i { color: var(--p600); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px; display: grid; gap: 12px; align-content: start; overscroll-behavior: contain; }
.drawer-foot { padding: 16px 18px 18px; border-top: 1px solid var(--line); background: #f8fafc; display: grid; gap: 10px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.total-row strong { font-size: 22px; font-weight: 800; color: var(--p700); }
.cart-empty { text-align: center; color: var(--soft); padding: 48px 12px; display: grid; gap: 10px; justify-items: center; }
.cart-empty .i { width: 40px; height: 40px; opacity: .4; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 14px; border-radius: 14px; background: #f8fafc; border: 1px solid var(--line); animation: pageIn .35s var(--ease); }
.cart-item h3 { font-size: 14px; font-weight: 800; }
.cart-item small { color: var(--soft); font-size: 12.5px; font-weight: 600; }
.qty { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.qty button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; display: grid; place-items: center; transition: background .2s; }
.qty button:hover { background: var(--p100); }
.qty button .i { width: 14px; height: 14px; }
.qty span { min-width: 22px; text-align: center; font-weight: 800; font-size: 13px; }
.cart-item .rm { justify-self: end; align-self: center; border: 0; background: transparent; color: var(--soft); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; transition: color .2s, background .2s; }
.cart-item .rm:hover { color: var(--danger); background: #fee2e2; }
.cart-item .rm .i { width: 16px; height: 16px; }
.cart-item .line-total { grid-column: 1 / -1; justify-self: end; font-weight: 800; font-size: 14px; }

.modal { margin: auto; width: min(560px, calc(100% - 24px)); max-height: min(92dvh, 820px); border-radius: 24px; box-shadow: var(--shadow-2); overflow-y: auto; }
.modal[open] { animation: pop .4s var(--ease) both; }
.modal.closing { animation: popOut .2s ease-in both; }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes popOut { to { opacity: 0; transform: translateY(10px) scale(.97); } }
.modal-in > form, .modal-in > [data-stage] { padding: 20px 22px 24px; display: grid; gap: 16px; animation: pageIn .4s var(--ease); }
.screen { border: 1px solid var(--p200); background: var(--p50); border-radius: 16px; padding: 14px 16px 16px; display: grid; gap: 10px; margin: 0; }
.screen legend { padding-inline: 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--p800); }
.ck { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.ck input { width: 18px; height: 18px; margin-block-start: 2px; accent-color: var(--p700); }
.stage-t { font-size: 18px; font-weight: 800; }
.review-list { display: grid; gap: 8px; }
.review-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.review-meta { font-size: 13.5px; color: var(--muted); padding: 12px 14px; background: var(--p50); border-radius: 12px; }
.btn-split { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.done { text-align: center; justify-items: center; }
.done p { color: var(--muted); font-size: 14.5px; }
.done .ref { font-size: 15px; color: var(--ink); }
.done .ref strong { letter-spacing: .06em; color: var(--p700); }
.done-ico { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--p500), var(--p700)); animation: popIcon .6s var(--ease); box-shadow: 0 16px 30px -14px rgba(15, 118, 110, .8); }
.done-ico .i { width: 40px; height: 40px; stroke-width: 2.6; }
@keyframes popIcon { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }

/* Toasts */
.toasts { position: fixed; inset-block-end: 20px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--deep); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-2); display: inline-flex; align-items: center; gap: 8px; animation: toastIn .4s var(--ease) both; }
.toast .i { color: var(--p400); }
.toast.out { animation: toastOut .3s ease-in both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

.to-top { position: fixed; inset-block-end: 22px; inset-inline-end: 22px; z-index: 45; width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: var(--p700); box-shadow: var(--shadow-2); animation: pop .4s var(--ease); transition: transform .25s var(--ease), background .2s; }
.to-top:hover { transform: translateY(-4px); background: var(--p800); }

/* Footer */
.footer { position: relative; margin-block-start: 90px; background: var(--deep); color: #b7d3cf; padding-block-start: 0; font-size: 14.5px; }
.footer::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 85% 0%, rgba(20, 184, 166, .16), transparent 70%), radial-gradient(40% 40% at 0% 100%, rgba(13, 148, 136, .14), transparent 70%); pointer-events: none; }
.footer > * { position: relative; z-index: 1; }
.f-cta { display: grid; gap: 18px; align-items: center; margin-block-start: -50px; padding: 28px; border-radius: 24px; color: #fff; background: linear-gradient(120deg, var(--p700), var(--p900)); box-shadow: 0 30px 50px -28px rgba(0, 0, 0, .6); border: 1px solid rgba(255, 255, 255, .14); }
@media (min-width: 820px) { .f-cta { grid-template-columns: auto 1fr auto; gap: 24px; padding: 30px 36px; } }
.f-cta-ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: var(--p200); }
.f-cta-ico .i { width: 26px; height: 26px; }
.f-cta h3 { font-size: 21px; font-weight: 800; line-height: 1.25; }
.f-cta p { color: #c9ece6; font-size: 14px; max-width: 58ch; margin-block-start: 4px; }
.footer-grid { display: grid; gap: 38px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); padding-block: 52px 36px; }
@media (min-width: 960px) { .footer-grid { grid-template-columns: 1.5fr .9fr 1.2fr 1.4fr; gap: 48px; } }
.footer h4 { position: relative; display: inline-block; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-block-end: 18px; padding-block-end: 10px; }
.footer h4::after { content: ""; position: absolute; inset-inline-start: 0; inset-block-end: 0; width: 28px; height: 3px; border-radius: 3px; background: var(--p400); }
.f-brand { display: grid; gap: 16px; align-content: start; }
.f-brand p { max-width: 38ch; line-height: 1.75; }
.f-regions { display: flex; flex-wrap: wrap; gap: 8px; }
.f-regions li { padding: 6px 13px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); font-size: 12px; font-weight: 700; color: #d9f4ef; transition: background .25s, border-color .25s, transform .25s var(--ease); }
.f-regions li:hover { background: rgba(45, 212, 191, .16); border-color: var(--p400); transform: translateY(-2px); }
.f-list { display: grid; gap: 12px; }
.f-list a { display: inline-flex; align-items: center; gap: 10px; color: #b7d3cf; transition: color .2s, transform .25s var(--ease); }
.f-list a:hover { color: #fff; transform: translateX(4px); }
[dir="rtl"] .f-list a:hover { transform: translateX(-4px); }
.f-list:not(.f-contact) a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--p500); opacity: .7; transition: transform .25s var(--ease), opacity .2s; }
.f-list:not(.f-contact) a:hover::before { transform: scale(1.5); opacity: 1; }
.f-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .07); color: var(--p400); flex: none; transition: background .25s, color .25s; }
.f-contact a:hover .f-ico { background: var(--p500); color: #04292a; }
.f-contact a { overflow-wrap: anywhere; }
.f-small { font-size: 13px; line-height: 1.8; color: #98bbb6; }
.f-disc { padding: 18px 20px; border-radius: 18px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .09); align-self: start; }
.license-f { margin-block-start: 12px; color: var(--p200); font-weight: 700; }
.f-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; padding-block: 22px; border-top: 1px solid rgba(255, 255, 255, .09); }
.f-badges li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #d9f4ef; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); }
.f-badges .i { color: var(--p400); width: 16px; height: 16px; }
.footer-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-block: 20px; border-top: 1px solid rgba(255, 255, 255, .09); font-size: 12.5px; color: #86aaa5; }
.to-top-inline { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid rgba(255, 255, 255, .18); color: #d9f4ef; padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; transition: background .2s, transform .25s var(--ease); }
.to-top-inline:hover { background: rgba(255, 255, 255, .1); transform: translateY(-2px); }

@media (max-width: 560px) {
    .topbar-in { justify-content: center; }
    .topbar-r { display: none; }
    .hero { padding-block: 48px 56px; }
    .section { padding-block: 40px; }
    .modal { border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
    .reveal { opacity: 1; transform: none; }
}

/* Reviews (shown only when real reviews are configured) */
.review { margin: 0; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); display: grid; gap: 12px; align-content: start; transition: transform .4s var(--ease), box-shadow .4s var(--ease), opacity .7s var(--ease); }
.review:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); }
.review.reveal:not(.in):hover { transform: translateY(22px); }
.stars { color: #f59e0b; letter-spacing: 3px; font-size: 16px; }
.review blockquote { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.review figcaption { font-weight: 800; font-size: 14px; color: var(--p800); }
.center-note { text-align: center; margin-block-start: 18px; }
.review { position: relative; }
.sample-tag { position: absolute; inset-block-start: 14px; inset-inline-end: 14px; padding: 3px 10px; border-radius: 999px; border: 1px dashed #d97706; background: #fffbeb; color: #92400e; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
#reviewGrid { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
#reviewGrid .review { flex: 1 1 300px; max-width: 384px; }

/* Centered product grids: any number of cards stays balanced */
.grid-3 { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; }
.grid-3 > .card { flex: 0 1 390px; min-width: min(100%, 290px); }

/* Phone header: keep logo, language, currency, cart and menu all visible */
@media (max-width: 560px) {
    .header-in { gap: 8px; }
    .logo { gap: 8px; min-width: 0; }
    .logo-mark { width: 38px; height: 38px; }
    .logo-text strong { font-size: 15px; }
    .logo-text small { display: none; }
    .actions { gap: 6px; }
    .chip { padding: 8px 9px; gap: 5px; }
    #langLabel { display: none; }
    .chip-select select { font-size: 12.5px; }
}
@media (max-width: 430px) { .logo-text { display: none; } }
.logo-mark { flex: none; }

/* Hero card photo */
.hero-visual { height: auto; aspect-ratio: 4 / 3; background: #fff; border: 1px solid var(--line); }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.hero-card:hover .hero-visual img { transform: scale(1.05); }
.hero-visual:has(img)::after { display: none; }
