/* ============================================================
   Dawood Trading & Wholesale Pte Ltd — dawood-trading.netlify.app
   Palette: client brief (cream/spice brown/turmeric) anchored to
   the real Dawood brand green from the logo.
   Radius rule: interactive = pill · cards/panels = 16px · media = 20px
   ============================================================ */

@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dmsans-var.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("/assets/fonts/playfair-var.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --cream: #F7EFE3;
  --cream-2: #F1E5D0;
  --card: #FFFDF8;
  --sand: #C79A63;
  --brown: #4B2A1D;
  --body: #5C4636;
  --muted: #8A7361;
  --gold: #D9962B;
  --green: #045419;
  --green-dark: #03340F;
  --green-tint: rgba(4, 84, 25, 0.08);
  --gold-tint: rgba(217, 150, 43, 0.12);
  --line: rgba(199, 154, 99, 0.35);
  --ink: #241812;
  --shadow: 0 10px 30px rgba(75, 42, 29, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px; /* mobile bottom bar clearance */
}
@media (min-width: 768px) { body { padding-bottom: 0; } }

img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--green); }

h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--brown);
  line-height: 1.15;
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 5.5vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; font-family: "DM Sans", sans-serif; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
section { padding: 56px 0; }
@media (min-width: 768px) { section { padding: 80px 0; } }

.section-head { max-width: 62ch; margin-bottom: 32px; }
.section-head p { margin-top: 10px; }

.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: 600 0.95rem/1 "DM Sans", sans-serif;
  min-height: 48px; padding: 13px 24px;
  border-radius: 999px; border: 0; cursor: pointer;
  text-decoration: none; transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost {
  background: transparent; color: var(--brown);
  border: 1.5px solid rgba(75, 42, 29, 0.45);
}
.btn-ghost:hover { background: rgba(75, 42, 29, 0.06); }
.btn-on-dark { background: #fff; color: var(--green); }
.btn-on-dark:hover { background: var(--cream); }
.btn .icon { width: 1.2em; height: 1.2em; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.main-nav { display: none; }
@media (min-width: 860px) {
  .main-nav { display: flex; gap: 28px; }
  .main-nav a {
    color: var(--brown); text-decoration: none; font-weight: 500; font-size: 0.97rem;
    padding: 6px 2px; border-bottom: 2px solid transparent;
  }
  .main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--gold); }
}
.header-cta { min-height: 42px; padding: 10px 18px; font-size: 0.9rem; }

/* ---------- hero (home) ---------- */
.hero { padding: 40px 0 48px; }
.hero .wrap {
  display: grid; gap: 32px; align-items: center;
}
@media (min-width: 860px) {
  .hero { padding: 56px 0 64px; }
  .hero .wrap { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
}
.hero h1 { max-width: 15ch; }
.hero .sub { margin: 18px 0 26px; max-width: 46ch; font-size: 1.05rem; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-media img {
  border-radius: 20px; width: 100%; aspect-ratio: 8 / 9; object-fit: cover;
}
@media (min-width: 860px) { .hero-media img { aspect-ratio: 4 / 4.6; } }

/* trust chips strip */
.chips-strip {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 20px 20px;
  max-width: 1160px; margin: 0 auto;
  scrollbar-width: none;
}
.chips-strip::-webkit-scrollbar { display: none; }
.tchip {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 15px; font-size: 0.85rem; font-weight: 500; color: var(--brown);
  background: var(--card);
}
.tchip .icon { color: var(--gold); width: 1.05em; height: 1.05em; }

/* ---------- category cards ---------- */
.cat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
@media (min-width: 768px) { .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.cat-card {
  border-radius: 16px; overflow: hidden; text-decoration: none;
  background: var(--card); border: 1px solid var(--line);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.cat-card .glyph {
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
}
.cat-card .glyph .icon { width: 44px; height: 44px; }
.glyph-green { background: var(--green-tint); color: var(--green); }
.glyph-gold { background: var(--gold-tint); color: var(--gold); }
.cat-card .label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; font-weight: 600; font-size: 0.95rem; color: var(--brown);
}
.cat-card .label .icon { width: 1em; height: 1em; color: var(--gold); }

/* ---------- packaging band ---------- */
.pack-band { background: var(--cream-2); }
.pack-band .panel {
  background: #fff; border-radius: 16px; padding: 22px;
  border: 1px solid var(--line);
}
.pack-band img { margin: 0 auto; max-height: 200px; width: auto; }
.pack-band .cap { text-align: center; margin-top: 16px; font-size: 0.95rem; }

/* ---------- why grid ---------- */
.why-grid { display: grid; gap: 26px; }
@media (min-width: 700px) { .why-grid { grid-template-columns: 1fr 1fr; gap: 34px 48px; } }
.why-item { display: flex; gap: 16px; align-items: flex-start; }
.why-item .badge {
  flex: none; width: 48px; height: 48px; border-radius: 999px;
  background: var(--green-tint); color: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.why-item .badge .icon { width: 24px; height: 24px; }
.why-item p { margin-top: 4px; font-size: 0.95rem; }

/* ---------- product cards ---------- */
.prod-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .prod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .prod-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.pcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.pcard .top { display: flex; align-items: center; gap: 12px; }
.pcard .pglyph {
  flex: none; width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.pcard .pglyph .icon { width: 22px; height: 22px; }
.pcard .pname { font-weight: 600; color: var(--brown); font-size: 1.02rem; line-height: 1.3; }
.pcard .pcat { font-size: 0.8rem; color: var(--muted); margin-top: 1px; }
.pcard .pnote { font-size: 0.82rem; color: var(--muted); }
.btn-wa {
  background: var(--green); color: #fff; min-height: 44px; padding: 10px 18px;
  font-size: 0.9rem;
}
.btn-wa:hover { background: var(--green-dark); }

/* ---------- catalog controls (products page) ---------- */
.catalog-hero { padding: 36px 0 8px; }
.catalog-hero .sub { max-width: 56ch; margin-top: 12px; }
.filters {
  position: sticky; top: 64px; z-index: 30;
  background: var(--cream); padding: 14px 0 12px;
  border-bottom: 1px solid var(--line);
}
.search-box { position: relative; max-width: 560px; }
.search-box .icon {
  position: absolute; left: 16px; top: 50%; translate: 0 -50%;
  color: var(--muted); width: 20px; height: 20px; pointer-events: none;
}
.search-box input {
  width: 100%; min-height: 50px; padding: 12px 16px 12px 48px;
  border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--brown);
  font: 500 1rem "DM Sans", sans-serif;
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus { outline: 2px solid var(--green); border-color: var(--green); }
.cat-chips {
  display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; padding-bottom: 4px;
  scrollbar-width: none;
}
.cat-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1.5px solid var(--line); background: var(--card);
  color: var(--brown); border-radius: 999px; padding: 9px 16px;
  font: 500 0.88rem "DM Sans", sans-serif; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.chip:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.count-line { font-size: 0.88rem; color: var(--muted); margin: 18px 0 4px; }

.pgroup { margin: 30px 0 14px; }
.pgroup h2 { font-size: 1.35rem; }
.pgroup .gline { height: 1px; background: var(--line); margin-top: 10px; }

/* bulk CTA insert */
.bulk-panel {
  background: var(--green); color: #fff; border-radius: 16px;
  padding: 26px 22px; margin: 34px 0;
  display: grid; gap: 16px;
}
@media (min-width: 768px) {
  .bulk-panel { grid-template-columns: 1fr auto; align-items: center; padding: 30px 34px; }
}
.bulk-panel h2, .bulk-panel h3 { color: #fff; font-family: "Playfair Display", serif; font-size: 1.4rem; }
.bulk-panel p { margin-top: 6px; color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; }

/* empty state */
.empty {
  text-align: center; padding: 56px 20px; display: none;
}
.empty.show { display: block; }
.empty .icon { width: 44px; height: 44px; color: var(--sand); margin: 0 auto 14px; }
.empty p { max-width: 34ch; margin: 0 auto 20px; }

/* ---------- wholesale band / image band ---------- */
.band {
  position: relative; border-radius: 0; overflow: hidden;
  background: var(--ink);
}
.band .bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.42;
}
.band .inner {
  position: relative; padding: 64px 20px; max-width: 1160px; margin: 0 auto;
}
@media (min-width: 768px) { .band .inner { padding: 96px 20px; } }
.band h2 { color: #fff; max-width: 18ch; }
.band p { color: rgba(255, 255, 255, 0.88); max-width: 52ch; margin: 14px 0 24px; }

/* ---------- pills (who we supply) ---------- */
.pill-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .pill-grid { grid-template-columns: repeat(4, 1fr); } }
.pill-item {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 14px; text-align: center; font-weight: 600; font-size: 0.92rem;
  color: var(--brown);
}

/* checklist */
.check-list { display: grid; gap: 12px; max-width: 560px; }
.check-list li {
  list-style: none; display: flex; gap: 12px; align-items: flex-start;
  font-size: 1rem; color: var(--body);
}
.check-list .icon { color: var(--green); width: 22px; height: 22px; margin-top: 2px; }

/* ---------- contact / map ---------- */
.contact-grid { display: grid; gap: 24px; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 0.9fr 1.1fr; gap: 36px; } }
.contact-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px;
}
.contact-card dl { display: grid; gap: 14px; margin: 18px 0 22px; }
.contact-card dt {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); font-weight: 600;
}
.contact-card dd { color: var(--brown); font-weight: 500; }
.contact-card dd a { color: var(--brown); text-decoration: none; }
.contact-card dd a:hover { color: var(--green); }
.contact-card .cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.map-frame { border: 0; border-radius: 20px; width: 100%; height: 100%; min-height: 320px; display: block; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink); color: rgba(247, 239, 227, 0.8);
  padding: 48px 0 110px; margin-top: 8px; font-size: 0.93rem;
}
@media (min-width: 768px) { .site-footer { padding-bottom: 48px; } }
.site-footer .cols { display: grid; gap: 30px; }
@media (min-width: 768px) { .site-footer .cols { grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; } }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.site-footer img.flogo { height: 54px; width: auto; margin-bottom: 14px; }
.site-footer a { color: rgba(247, 239, 227, 0.85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer .fine {
  border-top: 1px solid rgba(247, 239, 227, 0.15);
  margin-top: 34px; padding-top: 18px; font-size: 0.8rem;
  color: rgba(247, 239, 227, 0.55);
}

/* ---------- floating whatsapp ---------- */
.fab-wa {
  position: fixed; right: 16px; bottom: 88px; z-index: 50;
  width: 56px; height: 56px; border-radius: 999px;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(3, 52, 15, 0.35);
  transition: transform 0.15s, background 0.2s;
}
.fab-wa:hover { background: var(--green-dark); transform: scale(1.05); }
.fab-wa .icon { width: 28px; height: 28px; }
@media (min-width: 768px) { .fab-wa { bottom: 24px; right: 24px; } }

/* ---------- mobile bottom bar ---------- */
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 768px) { .bottom-bar { display: none; } }
.bottom-bar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 4px 8px; text-decoration: none;
  color: var(--brown); font-size: 0.7rem; font-weight: 600;
}
.bottom-bar .icon { width: 22px; height: 22px; }
.bottom-bar a.active { color: var(--green); }

/* ---------- reveal on scroll (subtle) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1); }
  .reveal.in { opacity: 1; transform: none; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
