/* ============================================================
   Kara — stylesheet
   Calm, easy on the eyes, bilingual (Arabic RTL / English).
   Light & dark themes via CSS variables on :root / [data-theme="dark"].
   Brand: deep olive green, soft grey ground, Readex Pro + IBM Plex Sans Arabic.
   ============================================================ */

/* ---------- Theme tokens ---------- */
:root {
  --bg: #f5f6f4;
  --surface: #ffffff;
  --surface-2: #eef0ec;
  --text: #1e2320;
  --muted: #5c635e;
  --border: #e3e6e2;
  --accent: #2f4a3d;
  --accent-hover: #233a2f;
  --accent-soft: #dce6df;
  --on-accent: #ffffff;
  --sale: #a3472e;
  --danger: #a3472e;
  --success: #2e7d4f;
  --tint-1: #e9e4da;   /* soft photo backdrops, cycled across cards */
  --tint-2: #dce3ea;
  --tint-3: #e2e6df;
  --tint-4: #ede7df;
  --shadow: 0 2px 12px rgba(30, 35, 32, 0.06);
  --shadow-lg: 0 12px 32px rgba(30, 35, 32, 0.12);
  --radius: 18px;
  --radius-lg: 28px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
  --font-display: "Readex Pro", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #141715;
  --surface: #1e2220;
  --surface-2: #252a27;
  --text: #eef0ec;
  --muted: #a9b0aa;
  --border: #2e3430;
  --accent: #4a7a61;
  --accent-hover: #5a8c72;
  --accent-soft: #1f2b25;
  --on-accent: #ffffff;
  --sale: #e07a5f;
  --danger: #e07a5f;
  --success: #5fb07f;
  --tint-1: #2a2722;
  --tint-2: #222830;
  --tint-3: #242923;
  --tint-4: #2b2723;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; display: block; }

/* The hidden attribute always wins over component display rules
   (e.g. .empty-note / .checkout-layout set display and used to override it). */
[hidden] { display: none !important; }

h1, h2, h3, .brand {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

a { color: inherit; text-decoration: none; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small-note { font-size: 0.8rem; text-align: center; margin-top: 10px; }

/* ---------- Announcement bar ---------- */
.announce-bar {
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.85rem;
  text-align: center;
  padding: 8px 16px;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: grid;
  /* minmax(0,1fr) keeps the two side columns exactly equal, so the logo
     in the middle is truly centered regardless of how wide each side is. */
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  height: 72px;
}
/* Menu on the leading side, logo centered, actions on the trailing side. */
.nav-left { justify-self: start; display: inline-flex; align-items: center; }
.nav-wrap > .brand { justify-self: center; }
.nav-wrap > .nav-actions { justify-self: end; }

.brand { font-size: 1.45rem; letter-spacing: 0.5px; }
.brand-logo { display: inline-flex; align-items: center; color: var(--text); }
.brand-logo-svg { display: block; height: 56px; width: auto; }
.brand-stitch { stroke: var(--accent); }
.site-header .brand-logo { transition: opacity 0.2s; }
.site-header .brand-logo:hover { opacity: 0.8; }

.main-nav { display: flex; gap: 22px; }
.main-nav a {
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.15s;
}
.main-nav a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--surface-2); }

/* Language switch is now an icon button (globe) — uses the .icon-btn circle. */

/* The toggle shows where it will take you: a moon in light mode, a sun in dark. */
.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-dark { display: block; }
[data-theme="dark"] .theme-icon-light { display: none; }

.cart-badge {
  position: absolute;
  top: 3px;
  inset-inline-end: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* ---------- Hero ---------- */
.hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding: 48px 24px 32px;
}
.hero-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }

.hero-kicker {
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
}

.hero h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); letter-spacing: -0.5px; line-height: 1.18; }
.hero-sub { max-width: 470px; color: var(--muted); font-size: 1.12rem; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

.hero-visual { flex: 1 1 440px; min-width: 0; }
.hero-photo {
  position: relative;
  display: block;
  height: clamp(340px, 42vw, 520px);
  border-radius: 32px;
  overflow: hidden;
  background: var(--accent-soft);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.hero-photo:hover img { transform: scale(1.03); }
.hero-tag {
  position: absolute;
  top: 20px;
  inset-inline-end: 20px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
}
.hero-product-chip {
  position: absolute;
  bottom: 20px;
  inset-inline-start: 20px;
  max-width: calc(100% - 40px);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  color: var(--text);
  border-radius: 18px;
  padding: 12px 14px 12px 18px;
  box-shadow: var(--shadow-lg);
}
[dir="rtl"] .hero-product-chip { padding: 12px 18px 12px 14px; }
.hero-product-text { display: flex; flex-direction: column; min-width: 0; }
.hero-product-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-product-price { color: var(--muted); font-size: 0.9rem; }
.hero-product-go {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-logo { width: min(440px, 100%); height: auto; margin-inline: auto; }

/* Arrows point "forward" in the reading direction. */
[dir="rtl"] .icon-arrow { transform: scaleX(-1); }

/* ---------- Benefits strip ---------- */
.benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  padding-block: 8px 0;
}
.benefit {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 20px;
}
a.benefit { transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease); }
a.benefit:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.benefit-icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.benefit-text { display: flex; flex-direction: column; line-height: 1.5; }
.benefit-text strong { font-weight: 600; }
.benefit-text span { color: var(--muted); font-size: 0.88rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { cursor: not-allowed; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
/* Disabled reads as "not yet" rather than faded green. */
.btn-primary:disabled { background: var(--surface-2); color: var(--muted); }
.btn-primary.is-added { background: var(--text); color: var(--bg); }

.btn-outline { background: transparent; border-color: var(--text); color: var(--text); }
.btn-outline:hover { background: var(--text); color: var(--bg); }

.btn-lg { min-height: 54px; padding: 12px 28px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { min-height: 36px; padding: 6px 16px; font-size: 0.85rem; border-radius: 10px; }

/* ---------- Sections ---------- */
.section { padding: 56px 24px; }
.section-title { font-size: clamp(1.6rem, 3vw, 2rem); margin-bottom: 8px; }

/* ---------- Category cards ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.category-card {
  display: flex;
  align-items: flex-end;
  min-height: 130px;
  padding: 18px;
  border-radius: var(--radius);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s, box-shadow 0.18s;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.cat-tone-1 { background: linear-gradient(140deg, #c96f4a, #8a4630); }
.cat-tone-2 { background: linear-gradient(140deg, #3b4a6b, #232d43); }
.cat-tone-3 { background: linear-gradient(140deg, #4a8b8c, #2e5b5c); }
.cat-tone-4 { background: linear-gradient(140deg, #b98d5f, #7d5b39); }

/* ---------- Shop toolbar / search / filters ---------- */
.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding-inline: 16px 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: min(360px, 100%);
}
[dir="rtl"] .search-form { padding-inline: 16px 5px; }
.search-form:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-icon { flex: none; color: var(--muted); }
.search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
}
.search-form .btn { border-radius: 999px; }

.filter-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.pill:hover { border-color: var(--text); }
.pill.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- Product grid & cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 36px 24px;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  overflow: hidden;
  background: var(--tint-1);
}
.product-card:nth-child(4n + 2) .product-media { background: var(--tint-2); }
.product-card:nth-child(4n + 3) .product-media { background: var(--tint-3); }
.product-card:nth-child(4n + 4) .product-media { background: var(--tint-4); }
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.product-card:hover .product-media img,
.product-media:focus-visible img { transform: scale(1.04); }

.product-badges {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}
.badge-featured {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
}

.product-body { display: flex; flex-direction: column; gap: 6px; padding: 0 4px; flex: 1; }
.product-cat { font-size: 0.8rem; color: var(--muted); }
.product-name { font-family: var(--font-body); font-size: 1.02rem; font-weight: 500; line-height: 1.5; }
.product-desc { font-size: 0.85rem; color: var(--muted); flex: 1; }
.product-price { font-size: 1.08rem; font-weight: 600; color: var(--text); }
.product-price.is-sale .price-now { color: var(--sale); }

.product-options { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 10px; }
.option-label { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: var(--muted); }

.size-select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
}

/* Color swatches */
.swatches { display: flex; gap: 8px; }
.swatch { cursor: pointer; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; }
.swatch-dot {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(30, 35, 32, 0.18);
  transition: transform 0.15s, box-shadow 0.15s;
}
.swatch input:checked + .swatch-dot {
  box-shadow: inset 0 0 0 1px rgba(30, 35, 32, 0.18), 0 0 0 2px var(--bg), 0 0 0 4px var(--text);
}
.swatch input:focus-visible + .swatch-dot { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Cards / generic ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.empty-note {
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ---------- Cart page ---------- */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
  margin-top: 20px;
}

.cart-items { display: flex; flex-direction: column; gap: 14px; }

.cart-row {
  display: grid;
  grid-template-columns: 72px 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
}

.cart-thumb { width: 72px; height: 90px; object-fit: cover; border-radius: 8px; }
.cart-name { font-weight: 600; }
.cart-meta, .cart-unit { font-size: 0.82rem; color: var(--muted); }
.cart-line-total { font-weight: 700; min-width: 70px; text-align: end; }

.qty-control { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; }
.qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
}
.qty-btn:hover { color: var(--accent); }
.qty-input {
  width: 40px;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: center;
  font-size: 0.92rem;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.remove-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}
.remove-btn:hover { color: var(--danger); background: var(--surface-2); }

.cart-summary h2, .checkout-summary h2, .checkout-fields h2 { font-size: 1.2rem; margin-bottom: 14px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.95rem; }
.summary-total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px; font-size: 1.1rem; }
.cart-summary .btn { margin-top: 10px; }

/* ---------- Checkout ---------- */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
  margin-top: 20px;
}

.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.form-row label { font-size: 0.88rem; font-weight: 600; }

.form-row input, .form-row textarea, .form-row select {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.form-row input.invalid, .form-row textarea.invalid { border-color: var(--danger); }

.field-error { color: var(--danger); font-size: 0.78rem; min-height: 1em; }

.form-alert {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.summary-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.summary-thumb { width: 44px; height: 55px; object-fit: cover; border-radius: 6px; }
.summary-item-info .muted { font-size: 0.78rem; }

/* Success panel */
.success-panel { text-align: center; max-width: 520px; margin: 30px auto; padding: 40px 30px; }
.success-check {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 2rem;
  line-height: 64px;
}
.success-panel h2 { margin-bottom: 12px; }
.success-panel p { color: var(--muted); margin-bottom: 8px; }
.success-panel .btn { margin-top: 18px; }

/* ---------- Toasts ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--text);
  color: var(--bg);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100;
  max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- WhatsApp floating button ---------- */
.whatsapp-fab {
  position: fixed;
  bottom: 22px;
  inset-inline-end: 22px;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: var(--shadow-lg);
  z-index: 90;
  transition: transform 0.15s;
}
.whatsapp-fab:hover { transform: scale(1.08); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 48px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding: 56px 24px 32px;
}
.footer-about { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.footer-about > .muted { max-width: 320px; line-height: 1.8; }
.footer-brand .brand-logo-svg { height: 58px; }
.footer-heading { font-weight: 600; font-size: 0.95rem; margin-bottom: 10px; }
.footer-link { display: block; color: var(--muted); font-size: 0.92rem; padding: 4px 0; }
.footer-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 5px; }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 24px 28px; font-size: 0.85rem; }

/* Coloured social buttons */
.social-links { display: flex; flex-wrap: wrap; gap: 8px; }
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid;
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.social-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.social-instagram { background: #fcedf4; border-color: #f3c6da; color: #9c1f57; }
.social-whatsapp  { background: #eaf8ef; border-color: #bfe8cd; color: #136b35; }
.social-facebook  { background: #edf3fe; border-color: #c9daf8; color: #1450a8; }
.social-tiktok    { background: var(--surface-2); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .social-instagram { background: #3a1d2b; border-color: #5a2a41; color: #f6a8c9; }
[data-theme="dark"] .social-whatsapp  { background: #17301f; border-color: #234a30; color: #8fdcaa; }
[data-theme="dark"] .social-facebook  { background: #172338; border-color: #22385a; color: #9dbdf2; }

/* ---------- Admin ---------- */
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 0;
}
.admin-nav { display: flex; gap: 10px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: middle;
}
.admin-table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.admin-table img { width: 44px; height: 55px; object-fit: cover; border-radius: 6px; }

.status-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
}
.status-pending,
.status-new        { background: var(--accent-soft); color: var(--accent); }
.status-processing { background: color-mix(in srgb, #3b6bc9 15%, var(--surface)); color: #3b6bc9; }
.status-completed  { background: color-mix(in srgb, var(--success) 15%, var(--surface)); color: var(--success); }
.status-cancelled  { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin: 20px 0; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-card .stat-label { color: var(--muted); font-size: 0.85rem; }

.login-panel { max-width: 380px; margin: 60px auto; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
}

@media (max-width: 560px) {
  .hero-inner { padding: 60px 20px 70px; }
  .section { padding: 40px 16px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  .cart-row {
    grid-template-columns: 60px 1fr auto;
    grid-template-areas:
      "thumb info remove"
      "thumb qty total";
    row-gap: 10px;
  }
  .cart-thumb { grid-area: thumb; width: 60px; height: 75px; }
  .cart-info { grid-area: info; }
  .qty-control { grid-area: qty; justify-self: start; }
  .cart-line-total { grid-area: total; }
  .remove-btn { grid-area: remove; justify-self: end; }
}

/* ============================================================
   v2 additions: subcategory filter, product cards actions,
   product details page + gallery, admin toolbar bits.
   ============================================================ */

/* Category card subtitle */
.category-sub { display: block; font-size: 0.72rem; opacity: 0.85; font-family: inherit; margin-top: 4px; }

/* Subcategory filter row */
.filter-subpills { margin-top: -14px; margin-bottom: 26px; }
.pill-sub { font-size: 0.8rem; padding: 5px 13px; }

/* Product card: link resets + action row */
.product-name a { color: inherit; }
.product-name a:hover { color: var(--accent); }
a.product-media { display: block; }
.product-actions { display: flex; gap: 8px; margin-top: auto; }
.product-actions .add-to-cart { flex: 1; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.85rem; color: var(--muted); margin-bottom: 22px; }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- Product detail layout ---------- */
.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

/* Gallery */
.gallery { position: sticky; top: 84px; }
.gallery-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 5;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.15s;
}
.gallery-nav:hover { background: var(--surface); color: var(--accent); }
.gallery-prev { inset-inline-start: 12px; }
.gallery-next { inset-inline-end: 12px; }
/* Arrows point outward-correct in RTL */
[dir="rtl"] .gallery-prev { transform: translateY(-50%) scaleX(-1); }
[dir="rtl"] .gallery-next { transform: translateY(-50%) scaleX(-1); }

.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.gallery-thumb {
  width: 64px;
  height: 80px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.15s;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--accent); }

/* Detail info column */
.product-detail-info { display: flex; flex-direction: column; gap: 14px; }
.product-detail-name { font-size: 2rem; }
.product-detail-price { font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.detail-heading {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 8px;
  font-family: inherit;
  font-weight: 700;
}
.product-detail-desc p { color: var(--text); }
.detail-option { margin-top: 4px; }
.detail-size { min-width: 120px; }

.detail-buy { display: flex; gap: 12px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.detail-buy .qty-control { border-color: var(--border); }
.detail-add { flex: 1; min-width: 180px; }

.product-info-table { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 18px; }
.product-info-table dl { display: flex; flex-direction: column; gap: 8px; }
.product-info-table dl > div { display: flex; gap: 14px; font-size: 0.9rem; }
.product-info-table dt { min-width: 130px; color: var(--muted); }
.product-info-table dd { font-weight: 500; }

/* Order filter/search bar (admin) */
.order-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.order-filters .search-form input { width: min(240px, 60vw); }

/* ============================================================
   v3 additions: discounts, stock, hover-zoom, lightbox, checkout polish
   ============================================================ */

/* Button loading spinner */
.btn.is-loading { pointer-events: none; opacity: 0.9; }
.btn.is-loading::before {
  content: ""; display: inline-block; width: 14px; height: 14px;
  margin-inline-end: 8px; vertical-align: -2px;
  border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Discount + out-of-stock badges */
.badge-discount {
  position: absolute; top: 12px; inset-inline-end: 12px;
  background: var(--danger); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.5px;
  padding: 4px 10px; border-radius: 999px;
}
.badge-oos {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  color: var(--text); font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; font-size: 0.9rem;
}
.product-card.is-out .product-media img { opacity: 0.55; }

/* Discounted price display */
.price-now { color: var(--accent); font-weight: 700; }
.price-original { color: var(--muted); text-decoration: line-through; font-weight: 400; font-size: 0.85em; margin-inline-start: 6px; }
.badge-discount-inline { position: static; display: inline-block; margin-inline-start: 8px; vertical-align: middle; }

/* Stock indicator (details page) */
.stock-indicator { font-size: 0.88rem; font-weight: 600; }
.stock-in  { color: var(--success); }
.stock-low { color: #c9791f; }
.stock-out { color: var(--danger); }

/* Form hint text */
.field-hint { color: var(--muted); font-size: 0.78rem; }

/* Hover zoom on the gallery main image */
.gallery-main.zoomable { cursor: zoom-in; }
.gallery-main img { transition: transform 0.12s ease-out; }
.gallery-main.zoom-active img { transform: scale(2); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.9); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox-img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 6px; }
.lightbox-close, .lightbox-nav {
  position: absolute; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.16); color: #fff; cursor: pointer;
}
.lightbox-close { top: 18px; inset-inline-end: 20px; width: 44px; height: 44px; font-size: 1.3rem; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 50px; height: 50px; font-size: 1.8rem; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { inset-inline-start: 16px; }
.lightbox-next { inset-inline-end: 16px; }

/* Admin gallery manager */
.image-manager { display: flex; flex-wrap: wrap; gap: 12px; }
.image-tile { position: relative; width: 100px; }
.image-tile > img { width: 100px; height: 125px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.image-primary-tag {
  position: absolute; top: 6px; inset-inline-start: 6px;
  background: var(--accent); color: var(--on-accent);
  font-size: 0.62rem; font-weight: 700; padding: 2px 7px; border-radius: 999px;
}
.image-tile-actions { margin-top: 6px; }
.image-tile-actions form { display: flex; gap: 4px; }
.image-tile-actions .icon-btn { width: 30px; height: 30px; border: 1px solid var(--border); font-size: 0.85rem; }
.image-tile-actions .icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }
.image-tile-actions .icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Admin invoice: product cell with image + description */
.invoice-table td { vertical-align: top; }
.invoice-product { display: flex; gap: 12px; align-items: flex-start; min-width: 220px; }
.invoice-thumb {
  width: 56px; height: 70px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2); flex-shrink: 0;
}
.invoice-product-info { min-width: 0; }
.invoice-name { font-weight: 600; margin-bottom: 3px; }
.invoice-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.4; max-width: 340px; }

/* Admin color picker widget */
.color-builder { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.color-builder input[type="color"] { width: 44px; height: 38px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; padding: 2px; }
.color-builder input[type="text"] { flex: 1; min-width: 160px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); }
.color-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.color-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.85rem; }
.color-chip-dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border); }
.color-chip-x { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 0.8rem; padding: 0 2px; }
.color-chip-x:hover { color: var(--danger); }
.color-advanced summary { cursor: pointer; font-size: 0.82rem; }
.color-advanced textarea { margin-top: 8px; }

@media (max-width: 800px) {
  .product-detail { grid-template-columns: 1fr; gap: 26px; }
  .gallery { position: static; }
  .product-detail-name { font-size: 1.6rem; }
}

/* ============================================================
   v4 additions: slide-in menu, Instagram icon, size pills,
   colour / size shop filters.
   ============================================================ */

/* Menu toggle & Instagram icon live in the header actions cluster. */
.menu-toggle { display: inline-flex; }
.instagram-link:hover { color: #d1418a; }

/* ---------- Slide-in navigation drawer ---------- */
body.menu-open { overflow: hidden; }
.nav-drawer { position: fixed; inset: 0; z-index: 200; }
.nav-drawer[hidden] { display: none; }
.nav-drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 14, 8, 0.5);
  opacity: 0; transition: opacity 0.25s;
}
.nav-drawer.open .nav-drawer-backdrop { opacity: 1; }

.nav-drawer-panel {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: min(320px, 82vw);
  background: var(--surface);
  border-inline-end: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 18px 20px 30px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}
.nav-drawer.open .nav-drawer-panel { transform: translateX(0); }
/* In RTL the panel sits on the right (inset-inline-start flips on its own);
   only the physical translate needs its sign flipped. */
[dir="rtl"] .nav-drawer-panel { transform: translateX(100%); }
[dir="rtl"] .nav-drawer.open .nav-drawer-panel { transform: translateX(0); }

.nav-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.nav-drawer-head .brand { font-size: 1.3rem; color: var(--accent); }
.nav-drawer-close { width: 38px; height: 38px; font-size: 1.05rem; }

.nav-drawer-nav { display: flex; flex-direction: column; }
.nav-drawer-link {
  padding: 11px 8px;
  color: var(--text);
  border-radius: 8px;
  font-size: 1rem;
  transition: background 0.15s, color 0.15s;
}
.nav-drawer-link:hover { background: var(--surface-2); color: var(--accent); }
.nav-drawer-sub { padding-inline-start: 22px; font-size: 0.9rem; color: var(--muted); }
.nav-drawer-heading {
  margin: 14px 8px 4px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
}

/* ---------- Size pills (product cards) ---------- */
.option-size { flex: 1; }
.size-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.size-pill { cursor: pointer; }
.size-pill input { position: absolute; opacity: 0; pointer-events: none; }
.size-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.size-pill:hover span { border-color: var(--accent); color: var(--accent); }
.size-pill input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.size-pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Nudge when a size is required but not yet chosen. */
.product-card.needs-size .size-pills { animation: nudge 0.3s; }
.product-card.needs-size .size-pill span { border-color: var(--danger); }
@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ---------- Colour / size shop filters ---------- */
.shop-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 26px;
}
.shop-filter { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: var(--muted); }
.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
  min-width: 150px;
}
.filter-select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.shop-filter-clear { align-self: center; font-size: 0.85rem; color: var(--accent); padding: 6px 4px; }
.shop-filter-clear:hover { text-decoration: underline; }

@media (max-width: 560px) {
  /* Compact the header so every action icon — including Instagram — fits on a
     phone with the logo still centered. */
  .site-header .container { padding-inline: 8px; }
  .nav-wrap { gap: 2px; height: 64px; }
  .brand-logo-svg { height: 46px; }
  .site-header .icon-btn { width: 40px; height: 40px; }
  .site-header .nav-actions { gap: 0; }
  .filter-select { min-width: 0; }
  .shop-filter { flex: 1; }
}

/* ============================================================
   v5 additions: Kara redesign — scroll reveal, card details,
   product page polish.
   ============================================================ */

/* ---------- Scroll reveal ----------
   Content is only hidden when JS runs (html.js), and never when the
   visitor asks for reduced motion. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .product-media img, .hero-photo img { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Product card details ---------- */
.product-badges .badge-discount { position: static; background: var(--sale); }
.badge-discount { background: var(--sale); }
.product-card .option-label { font-size: 0.82rem; }
.product-card .size-pill span { min-width: 40px; min-height: 36px; border-radius: 10px; }
.product-actions .add-to-cart { min-height: 46px; }

/* ---------- Product page ---------- */
.gallery-main { border-radius: var(--radius-lg); border: 0; }
.gallery-thumb { border-radius: 12px; }
.gallery-thumb.active { border-color: var(--text); }
.product-detail-name { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.product-detail-price { color: var(--text); font-weight: 600; }
.product-detail-price .price-now { color: var(--sale); }
.detail-heading { text-transform: none; letter-spacing: 0; font-size: 0.95rem; color: var(--text); font-weight: 600; }
.detail-sizes { gap: 10px; }
.detail-sizes .size-pill span { min-width: 58px; min-height: 48px; border-radius: 12px; font-size: 0.95rem; font-weight: 600; border-width: 1.5px; }
.size-pill input:checked + span { background: var(--text); border-color: var(--text); color: var(--bg); }
.size-pill input:disabled + span { opacity: 0.5; cursor: not-allowed; }
/* Sold out in the chosen colour: struck through; not made in that colour: faint + dashed. */
.size-pill.is-sold-out span { text-decoration: line-through; }
.size-pill.is-unavailable span { opacity: 0.3; border-style: dashed; }
.size-pill.is-sold-out, .size-pill.is-unavailable { cursor: not-allowed; }
.size-pill.is-sold-out:hover span, .size-pill.is-unavailable:hover span { border-color: var(--border); color: inherit; }
.detail-buy .qty-control { min-height: 56px; border-radius: 14px; border-width: 1.5px; background: var(--surface); }
.detail-buy .qty-btn { width: 48px; height: 52px; }
.detail-add { min-height: 56px; }
.detail-add-hint { flex-basis: 100%; min-height: 1.4em; font-size: 0.9rem; color: var(--muted); }
.product-info-table { border-top-color: var(--border); }

/* ---------- Cart / checkout polish ---------- */
.cart-thumb, .summary-thumb { border-radius: 12px; }
.form-row input, .form-row textarea, .form-row select { min-height: 48px; border-radius: 12px; background: var(--surface); }
.form-row textarea { min-height: 96px; }

/* The header/footer logo is small, so its stitch gets a heavier line than the
   print logo to stay visible (needle = the masked path). */
.brand-logo-svg .brand-stitch { stroke-width: 9; stroke-dasharray: 14 17; }
.brand-logo-svg path[mask] { stroke-width: 9; }

@media (max-width: 560px) {
  /* Two cards per row: stack size above colour so pills wrap in rows. */
  .product-card .product-options { flex-direction: column; gap: 10px; }
  .product-card .size-pill span { min-width: 36px; padding: 4px 7px; }
  .hero-inner { padding: 28px 16px 20px; gap: 28px; }
  .hero-photo { height: 360px; border-radius: 24px; }
  .benefits { padding-inline: 16px; }
  .footer-about { align-items: flex-start; }
}

/* ============================================================
   v6 additions: non-destructive image framing, feature badges,
   colour options (incl. dual colours), private order page,
   WhatsApp button placement.
   ============================================================ */

/* ---------- Framed images ----------
   Each image carries --fit, --fx, --fy and --zoom (set inline from the admin's
   framing settings). The file itself is never cropped; the same percentages
   apply at every screen size. */
img.framed {
  width: 100%;
  height: 100%;
  object-fit: var(--fit, cover);
  object-position: var(--fx, 50%) var(--fy, 50%);
  transform: scale(var(--zoom, 1));
  transform-origin: var(--fx, 50%) var(--fy, 50%);
}
.product-media { aspect-ratio: var(--ratio, 4 / 5); }
.product-media img.framed { transition: transform 0.7s var(--ease); }
.product-card:hover .product-media img.framed,
.product-media:focus-visible img.framed { transform: scale(calc(var(--zoom, 1) * 1.04)); }
.hero-photo img.framed:hover { transform: scale(calc(var(--zoom, 1) * 1.03)); }
.gallery-main { aspect-ratio: var(--ratio, 4 / 5); }
.gallery-main img.framed { transition: transform 0.12s ease-out, opacity 0.16s ease; }
/* Colour change: the photo fades out, swaps, then fades back in. */
.gallery-main img.framed.is-swapping,
.product-media img.framed.is-swapping { opacity: 0; }
.product-media img.framed { transition: transform 0.7s var(--ease), opacity 0.18s ease; }
.gallery-thumbs[hidden], .gallery-thumb[hidden] { display: none; }
.gallery-main.zoom-active img.framed { transform: scale(calc(var(--zoom, 1) * 2)); }
.gallery-thumb img.framed { transform: scale(var(--zoom, 1)); }

/* ---------- Feature badges (managed in Admin → Features) ---------- */
.badge-feature {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}
.badge-accent { background: var(--accent); color: var(--on-accent); }
.badge-dark   { background: #1e2320; color: #fff; }
.badge-light  { background: #fff; color: #1e2320; }
.badge-sale   { background: #a3472e; color: #fff; }
.badge-gold   { background: #b8892f; color: #fff; }
.badge-blue   { background: #1f4f8f; color: #fff; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Colour options ---------- */
.swatch-dot { background: var(--c1, #ccc); }
.swatch-dot.is-dual { background: linear-gradient(135deg, var(--c1) 0 50%, var(--c2) 50% 100%); }
.swatch.is-sold-out { cursor: not-allowed; opacity: 0.45; position: relative; }
.swatch.is-sold-out::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 2px;
  background: var(--text);
  transform: rotate(-45deg);
}
.swatch input:disabled + .swatch-dot { cursor: not-allowed; }
.product-card.needs-color .swatch-dot { box-shadow: 0 0 0 2px var(--danger); }
.detail-color-name { font-weight: 500; color: var(--muted); }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Private order page ---------- */
.order-page { max-width: 1100px; }
.order-hero { text-align: center; padding: 32px 24px; margin-bottom: 20px; }
.order-hero .section-title { margin: 8px 0 6px; }
.order-number { font-size: 1.1rem; margin-bottom: 6px; }
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.order-h2 { font-size: 1.2rem; margin-bottom: 12px; }
.order-items { display: flex; flex-direction: column; }
.order-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.order-item:last-child { border-bottom: 0; }
.order-thumb { width: 64px; height: 80px; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.order-item-name { font-weight: 600; }
.order-item-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-weight: 600; white-space: nowrap; }
.order-facts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.order-facts div { display: flex; justify-content: space-between; gap: 12px; }
.order-facts dt { color: var(--muted); }
.order-facts dd { font-weight: 600; text-align: end; }
.order-status-pill { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--accent-soft); font-size: 0.88rem; }
.order-status-pill.status-returned,
.order-status-pill.status-partially_returned { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
.order-savings { color: var(--sale); }
.order-contact-title { margin: 18px 0 8px; font-weight: 600; }
.order-back { margin-top: 16px; }
@media (max-width: 860px) {
  .order-layout { grid-template-columns: 1fr; }
}

/* ---------- Floating WhatsApp button ----------
   Above page content, below dialogs/drawers/lightbox (z-index 200), and clear
   of the iPhone home indicator (safe area). */
.whatsapp-fab {
  z-index: 150;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  inset-inline-end: calc(18px + env(safe-area-inset-right, 0px));
}
body.menu-open .whatsapp-fab { visibility: hidden; }
