/* =========================================================================
   PhoneStore Pro — AliWeb Studio demo
   Professional Modern Dark Mode (with light theme + RTL/LTR support)
   ========================================================================= */

/* ----------------------------- Design tokens ----------------------------- */
:root {
  --bg:        #0b0f1a;
  --bg-2:      #0e1322;
  --surface:   #141b2d;
  --surface-2: #1a2238;
  --elevated:  #1f2a44;
  --border:    #26314a;
  --border-2:  #313e5c;

  --text:      #e9edf6;
  --text-soft: #c3ccde;
  --muted:     #94a1ba;

  --primary:   #7c6cff;
  --primary-2: #9d7bff;
  --primary-ink:#ffffff;
  --accent:    #2dd4bf;
  --wa:        #25d366;
  --wa-2:      #1ebe5a;
  --danger:    #ff6b6b;

  --ring: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent);
  --shadow-sm: 0 4px 14px -6px rgba(0,0,0,.5);
  --shadow-md: 0 18px 40px -14px rgba(0,0,0,.55);
  --shadow-lg: 0 30px 70px -20px rgba(0,0,0,.6);

  --radius:    18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --container: 1200px;
  --nav-h: 74px;

  --ease: cubic-bezier(.22,1,.36,1);
  --font-ar: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-lt: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

[data-theme="light"] {
  --bg:        #f4f6fb;
  --bg-2:      #eef1f8;
  --surface:   #ffffff;
  --surface-2: #f5f7fc;
  --elevated:  #ffffff;
  --border:    #e4e8f1;
  --border-2:  #d5dbe8;

  --text:      #131a2b;
  --text-soft: #33405a;
  --muted:     #5f6c85;

  --primary:   #6a5bff;
  --primary-2: #8a6bff;
  --accent:    #0fb8a3;

  --shadow-sm: 0 4px 14px -6px rgba(24,34,66,.14);
  --shadow-md: 0 18px 40px -14px rgba(24,34,66,.16);
  --shadow-lg: 0 30px 70px -20px rgba(24,34,66,.20);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background .35s var(--ease), color .35s var(--ease);
}

html[dir="ltr"] body { font-family: var(--font-lt); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input { font: inherit; }
ul { list-style: none; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

/* ----------------------------- Buttons ----------------------------- */
.btn {
  --btn-bg: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .2px;
  background: var(--btn-bg);
  color: var(--text);
  border: 1px solid var(--border-2);
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), filter .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--primary-ink);
  border-color: transparent;
  box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--primary) 60%, transparent);
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 18px 40px -12px color-mix(in srgb, var(--primary) 65%, transparent); }

.btn-wa {
  background: linear-gradient(135deg, var(--wa), var(--wa-2));
  color: #04310f;
  border-color: transparent;
  box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--wa) 55%, transparent);
}
.btn-wa::before {
  content: "";
  width: 18px; height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.04 2C6.58 2 2.13 6.45 2.13 11.91c0 2.1.55 4.06 1.6 5.83L2 22l4.38-1.15a9.9 9.9 0 0 0 5.66 1.76h.01c5.46 0 9.91-4.45 9.91-9.91 0-2.65-1.03-5.14-2.9-7.01A9.82 9.82 0 0 0 12.04 2Zm5.8 14.18c-.24.68-1.42 1.32-1.95 1.36-.5.05-.97.24-3.28-.68-2.77-1.09-4.53-3.92-4.67-4.1-.14-.19-1.12-1.49-1.12-2.84s.71-2.02.96-2.29c.24-.27.53-.34.71-.34.18 0 .36 0 .51.01.16.01.39-.06.6.46.24.56.79 1.94.86 2.08.07.14.12.3.02.49-.09.19-.14.3-.28.46-.14.16-.3.36-.42.48-.14.14-.29.29-.12.57.16.27.72 1.19 1.55 1.93 1.06.95 1.96 1.24 2.24 1.38.27.14.43.12.6-.07.16-.19.69-.8.87-1.08.18-.27.36-.23.6-.14.24.09 1.55.73 1.81.87.27.14.44.2.51.31.07.12.07.68-.17 1.36Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.04 2C6.58 2 2.13 6.45 2.13 11.91c0 2.1.55 4.06 1.6 5.83L2 22l4.38-1.15a9.9 9.9 0 0 0 5.66 1.76h.01c5.46 0 9.91-4.45 9.91-9.91 0-2.65-1.03-5.14-2.9-7.01A9.82 9.82 0 0 0 12.04 2Zm5.8 14.18c-.24.68-1.42 1.32-1.95 1.36-.5.05-.97.24-3.28-.68-2.77-1.09-4.53-3.92-4.67-4.1-.14-.19-1.12-1.49-1.12-2.84s.71-2.02.96-2.29c.24-.27.53-.34.71-.34.18 0 .36 0 .51.01.16.01.39-.06.6.46.24.56.79 1.94.86 2.08.07.14.12.3.02.49-.09.19-.14.3-.28.46-.14.16-.3.36-.42.48-.14.14-.29.29-.12.57.16.27.72 1.19 1.55 1.93 1.06.95 1.96 1.24 2.24 1.38.27.14.43.12.6-.07.16-.19.69-.8.87-1.08.18-.27.36-.23.6-.14.24.09 1.55.73 1.81.87.27.14.44.2.51.31.07.12.07.68-.17 1.36Z'/%3E%3C/svg%3E") center / contain no-repeat;
  flex: none;
}
.btn-wa:hover { filter: brightness(1.05); }

.btn-ghost {
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border-color: var(--border-2);
}
.btn-ghost:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }

.btn-lg  { padding: 15px 28px; font-size: 1rem; }
.btn-xl  { padding: 18px 36px; font-size: 1.08rem; }
.btn-block { width: 100%; }

/* ----------------------------- Navbar ----------------------------- */
.navbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-block-end: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.navbar.scrolled {
  border-block-end-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 11px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow-sm);
}
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: .3px; font-family: var(--font-lt); }
.brand-accent { color: var(--primary-2); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-inline-end: auto;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: .95rem;
  color: var(--muted);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
.nav-links a.active { color: var(--text); background: color-mix(in srgb, var(--primary) 16%, transparent); }

.nav-controls { display: flex; align-items: center; gap: 10px; flex: none; }

.icon-btn {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--text-soft);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform .18s var(--ease), color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-2); transform: translateY(-1px); }

.icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: block; }

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 700;
  font-size: .85rem;
  color: var(--muted);
  font-family: var(--font-lt);
}
.lang-opt { transition: color .2s var(--ease); }
.lang-opt.active { color: var(--primary-2); }
.lang-sep { opacity: .4; }

.cart-btn { position: relative; }
.cart-badge {
  position: absolute;
  inset-block-start: -6px;
  inset-inline-end: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  font-family: var(--font-lt);
  border: 2px solid var(--bg);
  animation: pop .3s var(--ease);
}
.cart-badge[hidden] { display: none; }
@keyframes pop { from { transform: scale(.2); } to { transform: scale(1); } }

.nav-cta { padding: 11px 20px; font-size: .9rem; }
.nav-burger { display: none; }

/* ----------------------------- Hero ----------------------------- */
.hero {
  position: relative;
  padding-block: calc(var(--nav-h) + 70px) 90px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  inset-block-start: -30%;
  inset-inline-end: -10%;
  width: 780px;
  height: 780px;
  background: radial-gradient(circle at center,
      color-mix(in srgb, var(--primary) 40%, transparent),
      transparent 62%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  color: var(--primary-2);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .4px;
  margin-block-end: 20px;
}

.hero-title {
  font-size: clamp(1.9rem, 4.4vw, 3.2rem);
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: -.2px;
  margin-block-end: 20px;
  background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 62%, var(--primary)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-desc {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-soft);
  max-width: 46ch;
  margin-block-end: 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-block-end: 34px; }

.hero-trust {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}
.hero-trust li {
  display: flex;
  flex-direction: column;
  font-size: .88rem;
  color: var(--muted);
}
.hero-trust strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-lt);
}

/* Hero visual — CSS phone mock */
.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
}
.phone-hero {
  width: 260px;
  height: 520px;
  border-radius: 44px;
  background: linear-gradient(160deg, var(--elevated), var(--surface));
  border: 1px solid var(--border-2);
  padding: 16px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.06);
  transform: rotate(-6deg);
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: rotate(-6deg) translateY(0); } 50% { transform: rotate(-6deg) translateY(-16px); } }
.phone-hero-screen {
  position: relative;
  height: 100%;
  border-radius: 32px;
  background: linear-gradient(180deg, #10182b, #0c1322);
  border: 1px solid var(--border);
  padding: 22px 18px;
  overflow: hidden;
}
.ph-topbar { display: flex; gap: 6px; margin-block-end: 20px; }
.ph-topbar span { width: 34px; height: 6px; border-radius: 4px; background: color-mix(in srgb, var(--primary) 40%, transparent); }
.ph-topbar span:nth-child(2) { width: 18px; background: color-mix(in srgb, var(--accent) 45%, transparent); }
.ph-topbar span:nth-child(3) { width: 10px; }
.ph-card { border-radius: 16px; margin-block-end: 14px; border: 1px solid var(--border); }
.ph-card-a { height: 120px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 55%, transparent), color-mix(in srgb, var(--accent) 30%, transparent)); }
.ph-card-b { height: 64px; background: color-mix(in srgb, var(--surface-2) 90%, transparent); }
.ph-card-c { height: 64px; width: 70%; background: color-mix(in srgb, var(--surface-2) 90%, transparent); }
.ph-pill {
  position: absolute;
  inset-block-end: 22px;
  inset-inline: 18px;
  height: 46px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.hero-float {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-md);
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
  animation: floaty2 5s ease-in-out infinite;
}
.hero-float-1 { inset-block-start: 8%;  inset-inline-start: -4%; }
.hero-float-2 { inset-block-start: 46%; inset-inline-end: -6%; animation-delay: -1.6s; }
.hero-float-3 { inset-block-end: 6%;    inset-inline-start: 4%; animation-delay: -3.2s; }
@keyframes floaty2 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ----------------------------- Sections ----------------------------- */
.section { padding-block: 92px; }
.section-alt { background: var(--bg-2); }

.section-head { text-align: center; max-width: 640px; margin-inline: auto; margin-block-end: 54px; }
.section-head h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 900;
  line-height: 1.35;
  margin-block-end: 12px;
  letter-spacing: -.2px;
}
.section-head p { color: var(--muted); font-size: 1.02rem; }

/* ----------------------------- Products grid ----------------------------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: var(--shadow-md);
}
.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--primary) 20%, transparent), transparent 60%),
    var(--surface-2);
  border-block-end: 1px solid var(--border);
}
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .4s var(--ease);
}
.product-card:hover .product-img { transform: scale(1.045); }
.product-media-fallback { display: none; place-items: center; width: 100%; height: 100%; }
.product-media-fallback svg { width: 62%; height: 82%; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); }
.product-media.img-failed .product-img { display: none; }
.product-media.img-failed .product-media-fallback { display: grid; }
.product-tag {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: .72rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--accent) 22%, var(--surface));
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.product-body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-name { font-size: 1.08rem; font-weight: 800; }
.product-specs { font-size: .85rem; color: var(--muted); min-height: 2.4em; }
.product-foot {
  margin-block-start: auto;
  padding-block-start: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.product-price { font-size: 1.15rem; font-weight: 900; font-family: var(--font-lt); }
.product-price small { font-size: .72rem; color: var(--muted); font-weight: 600; }
.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: .85rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  transition: transform .18s var(--ease), filter .2s var(--ease);
}
.add-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.add-btn .plus {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: rgba(255,255,255,.22);
  font-size: 1rem;
  line-height: 1;
}

/* ----------------------------- Feature cards ----------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-2);
  box-shadow: var(--shadow-md);
}
.feature-ico {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 14px;
  font-size: 1.6rem;
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  margin-block-end: 16px;
}
.feature-card.accent .feature-ico { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.feature-card h3 { font-size: 1.1rem; font-weight: 800; margin-block-end: 8px; }
.feature-card p { font-size: .9rem; color: var(--muted); }

/* ----------------------------- Final CTA ----------------------------- */
.cta-final {
  position: relative;
  padding-block: 100px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
}
.cta-glow {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  width: 720px;
  height: 420px;
  background: radial-gradient(circle at center, color-mix(in srgb, var(--primary) 34%, transparent), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}
.cta-final-inner {
  position: relative;
  text-align: center;
  max-width: 720px;
}
.cta-final-inner h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  font-weight: 900;
  line-height: 1.4;
  margin-block-end: 16px;
}
.cta-final-inner p { color: var(--text-soft); margin-block-end: 30px; font-size: 1.05rem; }

/* ----------------------------- Footer ----------------------------- */
.footer {
  background: var(--bg-2);
  border-block-start: 1px solid var(--border);
  padding-block: 34px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand .brand-logo { width: 34px; height: 34px; border-radius: 10px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: .9rem; font-weight: 600; transition: color .2s var(--ease); }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--muted); font-size: .85rem; font-family: var(--font-lt); }

/* ----------------------------- Slide-over cart ----------------------------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(3,6,14,.6);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.drawer-overlay.show { opacity: 1; }

.cart-drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  z-index: 210;
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-inline-start: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform .38s var(--ease);
}
html[dir="rtl"] .cart-drawer { transform: translateX(-100%); }
.cart-drawer.open,
html[dir="rtl"] .cart-drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-block-end: 1px solid var(--border);
}
.drawer-head h3 { font-size: 1.15rem; font-weight: 800; }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cart-empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
  padding: 40px 10px;
}
.cart-empty span { font-size: 2.6rem; display: block; margin-block-end: 10px; }

.cart-item {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.cart-item-media {
  position: relative;
  width: 58px; height: 58px;
  border-radius: 10px;
  overflow: hidden;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  flex: none;
}
.cart-item-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cart-item-media-fallback { display: none; place-items: center; width: 100%; height: 100%; }
.cart-item-media-fallback svg { width: 60%; height: 74%; }
.cart-item-media.img-failed .cart-item-img { display: none; }
.cart-item-media.img-failed .cart-item-media-fallback { display: grid; }
.cart-item-info { min-width: 0; }
.cart-item-name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { color: var(--muted); font-size: .82rem; font-family: var(--font-lt); }
.cart-item-actions { display: flex; align-items: center; gap: 8px; }
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.qty button {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  font-weight: 800;
  color: var(--text-soft);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.qty button:hover { background: color-mix(in srgb, var(--primary) 20%, transparent); color: var(--text); }
.qty span { min-width: 26px; text-align: center; font-weight: 800; font-size: .85rem; font-family: var(--font-lt); }
.remove-item {
  color: var(--muted);
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 8px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.remove-item:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }

.drawer-foot {
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
  border-block-start: 1px solid var(--border);
  display: grid;
  gap: 14px;
}
.drawer-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: .95rem;
  color: var(--muted);
}
.drawer-total strong { font-size: 1.5rem; color: var(--text); font-family: var(--font-lt); }
.drawer-foot[hidden] { display: none; }

/* ----------------------------- Checkout modal ----------------------------- */
.checkout {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
.checkout.open { visibility: visible; opacity: 1; }
.checkout-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3,6,14,.72);
  backdrop-filter: blur(4px);
}
.checkout-panel {
  position: relative;
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 34px;
  transform: translateY(16px) scale(.98);
  transition: transform .35s var(--ease);
  font-family: var(--font-lt);
}
.checkout.open .checkout-panel { transform: translateY(0) scale(1); }
.checkout-x { position: absolute; inset-block-start: 16px; inset-inline-end: 16px; }
.checkout-title { font-size: 1.5rem; font-weight: 800; }
.checkout-sub { color: var(--muted); font-size: .9rem; margin-block-end: 26px; }

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 26px;
}
.checkout-col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}
.col-title {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-block-end: 16px;
}
.recap-items { display: flex; flex-direction: column; gap: 10px; margin-block-end: 16px; }
.recap-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: .9rem;
}
.recap-item span:first-child { color: var(--text-soft); }
.recap-item .ri-qty {
  color: var(--muted);
  font-size: .78rem;
}
.recap-row {
  display: flex;
  justify-content: space-between;
  padding-block: 8px;
  font-size: .92rem;
  color: var(--text-soft);
  border-block-start: 1px dashed var(--border-2);
}
.recap-total {
  margin-block-start: 6px;
  padding-block-start: 12px;
  border-block-start: 1px solid var(--border-2);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.field { display: block; margin-block-end: 16px; }
.field-label {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--muted);
  margin-block-end: 7px;
}
.field-label b { color: var(--danger); }
.field input {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  color: var(--text);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.field input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.field input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 28%, transparent); }

.reassure {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--muted);
  background: color-mix(in srgb, var(--wa) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--wa) 30%, transparent);
  border-radius: 12px;
  padding: 10px 12px;
  margin-block: 6px 18px;
}
.reassure svg { color: var(--wa); flex: none; }
.btn-confirm { font-size: 1rem; letter-spacing: .6px; padding-block: 16px; }

/* ----------------------------- Toast ----------------------------- */
.toast {
  position: fixed;
  inset-block-end: 26px;
  inset-inline: 0;
  margin-inline: auto;
  width: max-content;
  max-width: calc(100% - 40px);
  z-index: 400;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  background: var(--elevated);
  color: var(--text);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-md);
  font-weight: 700;
  font-size: .9rem;
  transform: translateY(140%);
  opacity: 0;
  transition: transform .4s var(--ease), opacity .4s var(--ease);
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ----------------------------- Responsive ----------------------------- */
@media (max-width: 1080px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 940px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: grid; }
  .nav-links.mobile-open {
    display: flex;
    position: absolute;
    inset-block-start: var(--nav-h);
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px;
    background: var(--surface);
    border-block-end: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav-links.mobile-open a { padding: 12px 16px; }

  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; min-height: 340px; }
  .phone-hero { width: 210px; height: 420px; }
  .hero-float { display: none; }

  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-panel { padding: 26px 20px; }
}

@media (max-width: 560px) {
  .products-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .section { padding-block: 64px; }
  .hero-trust { gap: 20px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .nav-controls { gap: 7px; }
  .icon-btn, .lang-btn { width: 40px; height: 40px; }
  .lang-btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
