/* ============================================================
   KISSAN KING — Design tokens
   Palette grounded in the farm: wheat-paper ground, deep crop
   green, harvest-gold accent (the "king" note), soil brown,
   irrigation-water blue used sparingly.
   Signature element: the "Mohar" (seal) badge — a stamped
   circular mark used for trust badges + best-seller tags.
   ============================================================ */
:root {
  --wheat: #F6EFDD;
  --paper: #FFFDF8;
  --ink: #201C13;
  --ink-soft: #524A38;
  --green: #1F4D2C;
  --green-dark: #123018;
  --green-tint: #E4EEE3;
  --gold: #E3A008;
  --gold-dark: #B9800A;
  --soil: #6B4226;
  --sky: #2F7A9E;
  --danger: #B3261E;
  --line: #E4DAC3;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px -12px rgba(32, 28, 19, 0.25);
  --shadow-sm: 0 4px 12px -4px rgba(32, 28, 19, 0.18);

  --font-display: "Fraunces", "Noto Nastaliq Urdu", serif;
  --font-body: "Inter", "Noto Nastaliq Urdu", sans-serif;
  --font-ur: "Noto Nastaliq Urdu", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--wheat);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body[dir="rtl"] { font-family: var(--font-ur); line-height: 2.1; }
body[dir="rtl"] h1, body[dir="rtl"] h2, body[dir="rtl"] h3 { line-height: 1.9; }

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0 0 .4em; color: var(--green-dark); }
body[dir="rtl"] h1, body[dir="rtl"] h2, body[dir="rtl"] h3 { font-family: var(--font-ur); font-weight: 700; }
p { margin: 0 0 1em; color: var(--ink-soft); }

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

/* ---------- Announcement bar ---------- */
.announce {
  background: var(--green-dark);
  color: var(--wheat);
  font-size: 13.5px;
  padding: 8px 0;
}
.announce .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.announce-items { display: flex; gap: 18px; flex-wrap: wrap; opacity: .95; }
.announce-items span { white-space: nowrap; }

.lang-toggle {
  display: inline-flex;
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-toggle button {
  border: none;
  background: transparent;
  color: var(--wheat);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.lang-toggle button.active { background: var(--gold); color: var(--green-dark); }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%;
  background: conic-gradient(from 180deg, var(--gold), var(--green), var(--gold));
  display: flex; align-items: center; justify-content: center;
  color: var(--paper); font-family: var(--font-display); font-weight: 700; font-size: 17px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 21px; color: var(--green-dark); line-height: 1.1; }
.brand-sub { font-size: 11px; color: var(--soil); letter-spacing: .06em; text-transform: uppercase; }

nav.main-links { display: flex; gap: 26px; }
nav.main-links a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14.5px;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
nav.main-links a:hover { border-color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  position: relative;
  border: 1px solid var(--line); background: var(--paper);
  border-radius: 999px; width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { border-color: var(--green); }
.cart-count {
  position: absolute; top: -6px; inset-inline-end: -6px;
  background: var(--gold); color: var(--green-dark);
  font-size: 11px; font-weight: 700; border-radius: 999px;
  min-width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 12px 22px; font-weight: 700; font-size: 15px;
  border: 2px solid transparent; text-decoration: none;
}
.btn-primary { background: var(--green); color: var(--wheat); }
.btn-primary:hover { background: var(--green-dark); }
.btn-gold { background: var(--gold); color: var(--green-dark); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-outline { border-color: var(--green); color: var(--green-dark); background: transparent; }
.btn-outline:hover { background: var(--green-tint); }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1DA851; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }

/* ---------- Promo banner ---------- */
.promo-banner {
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  color: var(--green-dark);
}
.promo-banner-inner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 20px; text-align: center; font-weight: 700; font-size: 14px;
  flex-wrap: wrap;
}
.promo-icon { font-size: 16px; }

/* ---------- Payment details box (checkout) ---------- */
.pay-details-box {
  background: var(--green-tint); border: 1.5px dashed var(--green);
  border-radius: 12px; padding: 14px 16px; margin: -2px 0 14px; font-size: 13.5px;
}
.pay-details-box .row { display: flex; justify-content: space-between; padding: 3px 0; }
.pay-details-box .row strong { color: var(--green-dark); }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 5px; display: none; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--danger); }
.field.has-error .field-error { display: block; }

/* ---------- Track order ---------- */
.track-result { background: var(--wheat); border-radius: 12px; padding: 16px; margin-top: 16px; }
.track-status-badge {
  display: inline-block; padding: 5px 14px; border-radius: 999px; font-weight: 700; font-size: 13px;
  background: var(--green-tint); color: var(--green-dark); margin-bottom: 10px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 40px;
  background:
    radial-gradient(600px 300px at 85% -10%, rgba(227,160,8,.18), transparent 60%),
    var(--wheat);
  overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-tint); color: var(--green-dark);
  font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.hero h1 { font-size: clamp(32px, 4.4vw, 50px); line-height: 1.08; }
.hero .lede { font-size: 17px; max-width: 46ch; }
.hero-ctas { display: flex; gap: 14px; margin-top: 22px; flex-wrap: wrap; }

.seal {
  width: 220px; height: 220px; border-radius: 50%; margin: 0 auto;
  background: var(--green);
  color: var(--wheat);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: var(--shadow);
  border: 3px dashed rgba(246,239,221,.5);
}
.seal::before {
  content: ""; position: absolute; inset: 10px; border-radius: 50%;
  border: 1px solid rgba(246,239,221,.35);
}
.seal-text { text-align: center; font-family: var(--font-display); }
.seal-text .k { font-size: 34px; font-weight: 700; display: block; }
.seal-text .sub { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.hero-art { display: flex; justify-content: center; }

/* ---------- Trust strip ---------- */
.trust {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
}
.trust .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust-item { display: flex; align-items: center; gap: 12px; }
.trust-badge {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--green-tint); color: var(--green-dark);
  display: flex; align-items: center; justify-content: center;
  border: 2px dashed var(--gold);
  font-size: 18px;
}
.trust-item strong { display: block; font-size: 14px; color: var(--ink); }
.trust-item span { font-size: 12.5px; color: var(--ink-soft); }

/* ---------- Section shell ---------- */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.section-head .eyebrow { margin-bottom: 10px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 36px); }

/* ---------- Product grid ---------- */
.grid-products {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px;
}
.card-product {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card-product:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media {
  position: relative; aspect-ratio: 4 / 3; background: var(--green-tint);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .fallback { font-family: var(--font-display); color: var(--green); font-size: 15px; text-align: center; padding: 10px; }
.badge-stamp {
  position: absolute; top: 10px; inset-inline-start: 10px;
  background: var(--gold); color: var(--green-dark);
  font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  border: 1.5px dashed var(--green-dark);
}
.card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat { font-size: 11.5px; color: var(--soil); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.card-body h3 { font-size: 18px; margin-bottom: 2px; cursor: pointer; }
.card-body h3:hover { color: var(--green); }
.card-tagline { font-size: 13.5px; color: var(--ink-soft); flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; gap: 10px; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--green-dark); }
.price .strike { font-family: var(--font-body); font-weight: 400; font-size: 13px; color: var(--ink-soft); text-decoration: line-through; margin-inline-end: 6px; }

.qty-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; font-family: "Inter", sans-serif; direction: ltr; }
.qty-stepper button { background: var(--wheat); border: none; width: 30px; height: 30px; font-size: 16px; font-weight: 700; font-family: inherit; line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0; }
.qty-stepper input { width: 32px; border: none; text-align: center; background: transparent; font-weight: 700; font-size: 14px; font-family: inherit; display: flex; align-items: center; justify-content: center; padding: 0; }

/* ---------- Why / steps ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.why-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--green-tint);
  display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px;
}
.why-card h3 { font-size: 17px; }
.why-card p { font-size: 14px; margin: 0; }

.steps { counter-reset: step; }
.step {
  display: flex; gap: 18px; align-items: flex-start; padding: 18px 0;
  border-bottom: 1px dashed var(--line);
}
.step:last-child { border-bottom: none; }
.step-num {
  counter-increment: step;
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--green); color: var(--wheat); font-family: var(--font-display); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step-num::before { content: counter(step); }
.step h3 { font-size: 16.5px; margin-bottom: 4px; }
.step p { font-size: 14px; margin: 0; }

/* ---------- Contact / footer ---------- */
.contact-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 30px;
  background: var(--green-dark); color: var(--wheat);
  border-radius: 20px; padding: 40px; align-items: center;
}
.contact-wrap h2 { color: var(--wheat); }
.contact-wrap p { color: rgba(246,239,221,.85); }
.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.contact-info { display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.contact-info a { text-decoration: none; }

footer.site { background: var(--paper); border-top: 1px solid var(--line); padding: 40px 0 24px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; margin-bottom: 26px; }
.footer-grid h4 { font-size: 14px; margin-bottom: 10px; color: var(--green-dark); }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { text-decoration: none; font-size: 14px; color: var(--ink-soft); }
.footer-links a:hover { color: var(--green); }
.pay-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-badges span {
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; color: var(--soil);
  background: var(--wheat);
}
.footer-bottom { border-top: 1px solid var(--line); padding-top: 18px; font-size: 12.5px; color: var(--ink-soft); text-align: center; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 50;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(37,211,102,.5);
  font-size: 28px;
}
.wa-float:hover { background: #1DA851; }

/* ---------- Drawer / Modals ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(20,17,10,.5);
  opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 60;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; inset-inline-end: 0; height: 100%; width: min(420px, 92vw);
  background: var(--paper); z-index: 70; box-shadow: -12px 0 30px rgba(0,0,0,.15);
  transform: translateX(110%); transition: transform .25s ease;
  display: flex; flex-direction: column;
}
body[dir="rtl"] .drawer { transform: translateX(-110%); }
.drawer.open { transform: translateX(0); }
body[dir="rtl"] .drawer.open { transform: translateX(0); }
.drawer-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.drawer-head h3 { margin: 0; font-size: 19px; }
.drawer-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 16px 20px; border-top: 1px solid var(--line); }

.close-btn { background: none; border: none; font-size: 22px; color: var(--ink-soft); line-height: 1; }

.cart-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-line img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--green-tint); flex-shrink: 0; }
.cart-line .info { flex: 1; min-width: 0; }
.cart-line .info strong { font-size: 14px; display: block; }
.cart-line .info .p { font-size: 13px; color: var(--ink-soft); }
.cart-line .remove { background: none; border: none; color: var(--danger); font-size: 12.5px; text-decoration: underline; padding: 0; margin-top: 4px; }
.cart-empty { text-align: center; padding: 40px 10px; color: var(--ink-soft); }

.summary-row { display: flex; justify-content: space-between; font-size: 15px; padding: 4px 0; }
.summary-row.total { font-weight: 700; font-size: 18px; color: var(--green-dark); padding-top: 10px; border-top: 1px dashed var(--line); margin-top: 8px; }

.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -48%) scale(.98);
  width: min(560px, 92vw); max-height: 88vh; overflow-y: auto;
  background: var(--paper); border-radius: 18px; z-index: 80;
  box-shadow: var(--shadow); padding: 26px 26px 28px;
  opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-close { position: absolute; top: 16px; inset-inline-end: 18px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 14.5px; font-family: inherit; background: var(--wheat);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green); background: var(--paper); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.pay-options { display: grid; gap: 10px; }
.pay-option {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14.5px; font-weight: 600;
}
.pay-option input { accent-color: var(--green); }
.pay-option.selected { border-color: var(--green); background: var(--green-tint); }

.benefits-list { padding-inline-start: 20px; margin: 0 0 14px; }
.benefits-list li { margin-bottom: 7px; font-size: 14.5px; color: var(--ink-soft); }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--green-dark); color: var(--wheat); padding: 12px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.order-conf { text-align: center; padding: 10px 0; }
.order-conf .stamp {
  width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 16px; background: var(--green-tint);
  border: 2.5px dashed var(--gold); display: flex; align-items: center; justify-content: center; font-size: 32px; color: var(--green);
}
.order-ref { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--green-dark); margin: 8px 0 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  nav.main-links { display: none; }
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-ctas { justify-content: center; }
  .hero-art { order: -1; }
  .trust .container { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; padding: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
}
