/* ============================================================================
   SAFA ORGANIX SUPPORT — DESIGN SYSTEM
   Warm Moroccan / earthy. Edit tokens here; tweaks panel overrides some live.
============================================================================ */

:root {
  /* Palette (warm, low-chroma neutrals + earthy accents) */
  --sand:        #f7f2e8;   /* page background — cream */
  --sand-deep:   #ede8db;   /* alt sections */
  --paper:       #fdfaf4;   /* cards / surfaces */
  --ink:         #2c2620;   /* primary text */
  --ink-soft:    #6b6052;   /* secondary text */
  --line:        #e2d7c5;   /* hairlines */

  /* Earthy accents (shared low chroma, varied hue via oklch) */
  --clay:        #7b8a5a;               /* sage green — primary */
  --clay-deep:   #5a6842;
  --olive:       oklch(0.62 0.08 120);   /* muted green */
  --saffron:     oklch(0.72 0.11 75);    /* warm ochre */
  --teal:        oklch(0.62 0.07 200);   /* zellige teal */

  --primary:     var(--clay);
  --primary-deep:var(--clay-deep);

  /* Type */
  --font-display: "Marcellus", Georgia, serif;
  --font-body:    "Hanken Grotesk", system-ui, sans-serif;

  /* Shape */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow: 0 1px 2px rgba(44,38,32,.04), 0 14px 34px -18px rgba(44,38,32,.22);
  --shadow-sm: 0 1px 2px rgba(44,38,32,.05), 0 6px 16px -12px rgba(44,38,32,.20);

  /* Layout */
  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: .2px; }
p { margin: 0; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

/* Eyebrow / kicker */
.kicker {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--primary-deep); font-weight: 600;
}

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 11px 20px; font-size: 15px; font-weight: 600;
  text-decoration: none; transition: .18s ease; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper); border-color: var(--ink-soft); }
.btn-sm { padding: 8px 15px; font-size: 14px; }

/* ---- Header ------------------------------------------------------------ */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--sand) 90%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.hdr-inner { display: flex; align-items: center; gap: 18px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer; border: 0; background: none; padding: 0; }
.brand-logo {
  height: 56px; width: auto; display: block; flex: none;
  mix-blend-mode: multiply;
  transition: opacity .18s;
}
.brand:hover .brand-logo { opacity: .82; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, var(--saffron), var(--clay) 70%);
  display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-size: 22px; flex: none;
}
.brand-name { font-family: var(--font-display); font-size: 22px; line-height: 1; }
.brand-sub { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }

.hdr-search { flex: 1; max-width: 420px; margin-inline: auto; position: relative; }
.hdr-search input {
  width: 100%; height: 42px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); padding: 0 16px 0 42px; font-size: 15px; color: var(--ink);
  outline: none; transition: .18s;
}
.hdr-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.hdr-search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.hdr-actions { display: flex; align-items: center; gap: 10px; }

/* ---- Hero -------------------------------------------------------------- */
.hero { padding: clamp(40px, 7vw, 84px) 0 clamp(30px, 4.5vw, 54px); position: relative; overflow: hidden; }
.hero-layout { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: clamp(20px, 4vw, 56px); position: relative; }
.hero h1 { font-size: clamp(36px, 5.8vw, 68px); max-width: 14ch; }
.hero p { font-size: clamp(16px, 1.8vw, 19px); color: var(--ink-soft); max-width: 50ch; margin-top: 18px; }
.hero-tiles { position: absolute; inset: 0; opacity: .45; pointer-events: none;
  background-image: radial-gradient(var(--line) 1.4px, transparent 1.4px);
  background-size: 22px 22px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); }
.hero-logo-col { width: clamp(150px, 20vw, 260px); flex: none; }
.hero-logo-col img { width: 100%; height: auto; display: block; mix-blend-mode: multiply; opacity: .92; }
@media (max-width: 700px) { .hero-layout { grid-template-columns: 1fr; } .hero-logo-col { display: none; } }

/* ---- Section header ---------------------------------------------------- */
.sec { padding: clamp(34px, 5vw, 56px) 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 38px); }
.sec-head p { color: var(--ink-soft); max-width: 50ch; margin-top: 6px; }

/* ---- Category chips (home nav) ----------------------------------------- */
.cat-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.cat-chip {
  border: 1px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 9px 18px; font-size: 14.5px; font-weight: 600; color: var(--ink); transition: .16s;
}
.cat-chip:hover { border-color: var(--primary); color: var(--primary-deep); transform: translateY(-1px); }
.cat-chip[data-active="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- Product grid + cards ---------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 22px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; text-align: left; padding: 0; transition: .2s ease; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.card-media { aspect-ratio: 4 / 3; position: relative; }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--primary-deep); font-weight: 600; }
.card-title { font-size: 20px; }
.card-tag { font-size: 14px; color: var(--ink-soft); }
.card-foot { margin-top: auto; padding-top: 12px; font-size: 14px; font-weight: 600; color: var(--primary-deep); display: flex; align-items: center; gap: 6px; }

/* ---- Image placeholder / slot ------------------------------------------ */
.imgslot {
  width: 100%; height: 100%; position: relative; background: var(--sand-deep);
  background-image: repeating-linear-gradient(45deg, transparent, transparent 9px, color-mix(in srgb, var(--ink) 5%, transparent) 9px, color-mix(in srgb, var(--ink) 5%, transparent) 10px);
  display: grid; place-items: center; overflow: hidden;
}
.imgslot img { width: 100%; height: 100%; object-fit: cover; }
.imgslot-label {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px;
  color: var(--ink-soft); background: color-mix(in srgb, var(--paper) 80%, transparent);
  padding: 6px 11px; border-radius: 999px; border: 1px dashed var(--line); text-align: center;
}

/* ---- Product detail ---------------------------------------------------- */
.pd-back { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--ink-soft); background: none; border: 0; padding: 0; margin-bottom: 22px; white-space: nowrap; }
.pd-back:hover { color: var(--primary-deep); }
.pd-top { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: start; }
@media (max-width: 820px){ .pd-top { grid-template-columns: 1fr; } }

.pd-gallery { display: flex; flex-direction: column; gap: 12px; }
.pd-gallery-main { aspect-ratio: 4/3; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.pd-thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; }
.pd-thumb { aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); padding: 0; background: none; transition: .16s; }
.pd-thumb[data-active="true"] { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 30%, transparent); }

.pd-title { font-size: clamp(30px, 4.4vw, 46px); margin-top: 8px; }
.pd-tagline { font-size: 18px; color: var(--ink-soft); margin-top: 8px; }
.pd-desc { margin-top: 18px; font-size: 17px; }

.benefits { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.benefit { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500;
  background: color-mix(in srgb, var(--primary) 9%, var(--paper)); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line)); border-radius: 999px; padding: 7px 14px; }
.benefit svg { color: var(--primary-deep); flex: none; }

.pd-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

/* ---- Steps ------------------------------------------------------------- */
.steps-sec { background: var(--paper); border-block: 1px solid var(--line); margin-top: clamp(40px,6vw,70px); }
.steps { position: relative; margin-top: 8px; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 22px; padding: 22px 0; position: relative; }
.step:not(:last-child)::after { content:""; position: absolute; left: 27px; top: 56px; bottom: -8px; width: 2px; background: linear-gradient(var(--line), transparent); }
.step-num {
  width: 56px; height: 56px; border-radius: 50%; flex: none;
  background: color-mix(in srgb, var(--primary) 12%, var(--paper));
  border: 1.5px solid color-mix(in srgb, var(--primary) 30%, var(--line));
  color: var(--primary-deep); display: grid; place-items: center;
  font-family: var(--font-display); font-size: 24px; z-index: 1;
}
.step-title { font-family: var(--font-display); font-size: 22px; margin-bottom: 4px; }
.step-detail { color: var(--ink-soft); font-size: 16.5px; max-width: 60ch; }

/* ---- Tips -------------------------------------------------------------- */
.tips { background: color-mix(in srgb, var(--saffron) 14%, var(--paper)); border: 1px solid color-mix(in srgb, var(--saffron) 32%, var(--line)); border-radius: var(--r-lg); padding: 22px 24px; margin-top: 30px; }
.tips h4 { font-size: 16px; letter-spacing: .04em; text-transform: uppercase; font-family: var(--font-body); font-weight: 700; color: var(--primary-deep); margin-bottom: 10px; display:flex; align-items:center; gap:8px; }
.tips ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; }
.tips li { font-size: 16px; }

/* ---- FAQ (accordion) --------------------------------------------------- */
.faq-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; background: none; border: 0; padding: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 18px; font-family: var(--font-display); color: var(--ink); }
.faq-q:hover { color: var(--primary-deep); }
.faq-icon { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; transition: .2s; color: var(--primary-deep); }
.faq-item[data-open="true"] .faq-icon { transform: rotate(45deg); border-color: var(--primary); }
.faq-a { overflow: hidden; max-height: 0; transition: max-height .28s ease; }
.faq-item[data-open="true"] .faq-a { max-height: 320px; }
.faq-a-inner { padding: 0 0 22px; color: var(--ink-soft); font-size: 16.5px; max-width: 68ch; }

/* ---- Footer ------------------------------------------------------------ */
.ftr { background: var(--ink); color: color-mix(in srgb, var(--sand) 80%, #fff); margin-top: clamp(50px,7vw,90px); padding: clamp(40px,5vw,64px) 0 36px; }
.ftr a { color: inherit; text-decoration: none; opacity: .82; }
.ftr a:hover { opacity: 1; }
.ftr-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; }
.ftr-brand { font-family: var(--font-display); font-size: 26px; color: #fff; }
.ftr-brand-logo { height: 110px; width: auto; display: block; opacity: .92; transition: opacity .2s; }
.ftr-brand-logo:hover { opacity: 1; }
.ftr-links { display: flex; gap: 40px; flex-wrap: wrap; }
.ftr-col h5 { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: color-mix(in srgb,var(--sand) 60%, var(--ink-soft)); margin-bottom: 12px; font-family: var(--font-body); font-weight: 700; }
.ftr-col a, .ftr-col p { display: block; font-size: 15px; margin-bottom: 8px; }
.ftr-base { margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; opacity: .6; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; }

/* ---- Language toggle --------------------------------------------------- */
.lang-toggle {
  display: flex; align-items: center;
  background: var(--sand-deep); border-radius: 8px; padding: 3px; gap: 2px;
}
.lang-btn {
  font: 600 12.5px/1 var(--font-body); padding: 5px 11px;
  border: none; border-radius: 5px;
  background: transparent; color: var(--ink-soft);
  cursor: pointer; transition: all .15s; letter-spacing: .06em;
}
.lang-btn[data-active="true"] {
  background: var(--primary); color: #fff;
  box-shadow: 0 1px 3px rgba(44,38,32,.18);
}
.lang-btn:not([data-active="true"]):hover { color: var(--ink); }

/* ---- Misc / utility ---------------------------------------------------- */
.empty { text-align: center; padding: 60px 0; color: var(--ink-soft); }
.fade-in { animation: fade .4s ease; }
@keyframes fade { from { transform: translateY(8px); } to { transform: none; } }
.hide-sm { display: inline; }

/* ---- Tablet ------------------------------------------------------------ */
@media (max-width: 820px){
  .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
}

/* ---- Mobile ------------------------------------------------------------ */
@media (max-width: 680px){
  body { font-size: 16px; }
  .hdr-inner { flex-wrap: wrap; height: auto; padding-block: 10px; row-gap: 10px; column-gap: 10px; }
  .brand { flex: 1 1 auto; }
  .brand-logo { height: 44px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 20px; }
  .hdr-search { order: 3; flex-basis: 100%; max-width: none; }
  .hdr-actions { margin-left: auto; }
  .ftr-brand-logo { height: 68px; }

  .hero { padding-top: 38px; padding-bottom: 26px; }
  .hero h1 { max-width: none; }
  .cat-bar { margin-top: 22px; gap: 8px; }
  .cat-chip { padding: 9px 15px; font-size: 14px; }

  .sec-head { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 20px; }

  /* one column product grid on phones */
  .grid { grid-template-columns: 1fr; gap: 16px; }

  /* product detail */
  .pd-top { gap: 24px; }
  .pd-cta { gap: 10px; }
  .pd-cta .btn { flex: 1 1 auto; justify-content: center; }
  .pd-thumbs { grid-auto-columns: minmax(0, 1fr); }

  /* steps: tighter on small screens */
  .step { grid-template-columns: 44px 1fr; gap: 16px; padding: 18px 0; }
  .step:not(:last-child)::after { left: 21px; top: 48px; }
  .step-num { width: 44px; height: 44px; font-size: 20px; }
  .step-title { font-size: 20px; }

  .tips { padding: 18px 18px; }

  /* footer stacks */
  .ftr-grid { flex-direction: column; gap: 26px; }
  .ftr-links { gap: 32px; }
  .ftr-base { flex-direction: column; gap: 6px; }
}

@media (max-width: 380px){
  .hide-sm { display: none; }            /* Chat button becomes icon-only */
  .hdr-actions .btn { padding: 9px; }
}
