/*
Theme Name:   SabMileyGa Child
Template:     storefront
Version:      1.0.0
Description:  SabMileyGa.pk child theme — 100% COD, Pakistan-first, mobile-first.
Author:       SabMileyGa.pk
Text Domain:  smg
*/

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand */
  --smg-green:      #128C7E;
  --smg-green-600:  #0E6F63;
  --smg-accent:     #FF6A00;
  --smg-accent-600: #E85D00;
  --smg-gold:       #FFB703;
  --smg-ink:        #14181F;
  --smg-body:       #4A5460;
  --smg-line:       #E6E9EE;
  --smg-surface:    #FFFFFF;
  --smg-surface-2:  #F6F8FA;
  --smg-danger:     #D7263D;
  --smg-success:    #1DB954;

  /* Typography */
  --smg-font:    "Inter", "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --smg-font-ur: "Noto Nastaliq Urdu", serif;

  /* Type scale — fluid, mobile-first */
  --fs-h1:   clamp(1.6rem,  5.2vw, 2.75rem);
  --fs-h2:   clamp(1.35rem, 4vw,   2rem);
  --fs-h3:   clamp(1.1rem,  3.2vw, 1.35rem);
  --fs-body: 0.975rem;
  --fs-sm:   0.825rem;

  /* Space / shape */
  --sp:          8px;
  --radius:      14px;
  --radius-sm:   10px;
  --shadow-1:    0 1px 2px rgba(20,24,31,.06), 0 4px 14px rgba(20,24,31,.06);
  --shadow-cta:  0 6px 18px rgba(255,106,0,.28);
  --tap:         48px;
}

/* ============================================================
   2. GLOBAL RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--smg-font);
  font-size: var(--fs-body);
  color: var(--smg-body);
  background: var(--smg-surface-2);
  margin: 0;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--smg-ink);
  font-weight: 800;
  line-height: 1.2;
}

a { color: var(--smg-green-600); text-decoration: none; }
a:hover { color: var(--smg-green); }

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

/* Accessibility: visible focus */
:focus-visible {
  outline: 3px solid var(--smg-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
   3. ANNOUNCEMENT BAR
   ============================================================ */
.smg-topbar {
  background: linear-gradient(90deg, var(--smg-green), var(--smg-green-600));
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 9px 12px;
  text-align: center;
  line-height: 1.4;
  position: relative;
  z-index: 1000;
}
.smg-topbar a { color: #FFE9A8; text-decoration: underline; }
.smg-topbar strong { color: #fff; }

/* ============================================================
   4. BUTTONS
   ============================================================ */
.smg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 22px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  letter-spacing: .2px;
  font-size: .9rem;
  border: 0;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none;
  font-family: var(--smg-font);
}
.smg-btn:active  { transform: translateY(1px); }

.smg-btn--buy {
  background: var(--smg-accent);
  color: #fff !important;
  box-shadow: var(--shadow-cta);
  width: 100%;
  text-transform: uppercase;
  font-size: .95rem;
  min-height: 54px;
}
.smg-btn--buy:hover { background: var(--smg-accent-600); color: #fff; }

.smg-btn--wa {
  background: var(--smg-green);
  color: #fff !important;
  width: 100%;
  min-height: 50px;
}
.smg-btn--wa:hover { background: var(--smg-green-600); color: #fff; }

.smg-btn--ghost {
  background: #fff;
  color: var(--smg-ink);
  border: 2px solid var(--smg-line);
}
.smg-btn--ghost:hover { border-color: var(--smg-green); color: var(--smg-green); }

/* ============================================================
   5. FLOATING WHATSAPP BUTTON
   ============================================================ */
.smg-wa-float {
  position: fixed;
  right: 14px;
  bottom: 76px;
  z-index: 9999;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(37,211,102,.45);
  transition: transform .2s ease;
}
.smg-wa-float:hover { transform: scale(1.1); }
.smg-wa-float svg   { width: 30px; height: 30px; fill: #fff; }
@media (min-width: 1024px) { .smg-wa-float { bottom: 26px; } }

/* ============================================================
   6. BADGES
   ============================================================ */
.smg-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: .3px;
}
.smg-badge--save  { background: var(--smg-danger); color: #fff; }
.smg-badge--cod   { background: #E8F7EE; color: #0E6F63; }
.smg-badge--stock { background: #EAF9EF; color: #12803C; }
.smg-badge--gold  { background: var(--smg-gold); color: #3D2900; }

/* Loop badge (overlay on image) */
.smg-loop-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

/* ============================================================
   7. PRICE DISPLAY
   ============================================================ */
.smg-price ins,
.woocommerce ul.products li.product .price ins,
.woocommerce .price ins {
  text-decoration: none;
  color: var(--smg-ink);
  font-weight: 900;
  font-size: 1.15rem;
}
.smg-price del,
.woocommerce ul.products li.product .price del,
.woocommerce .price del {
  color: #97A1AE;
  font-weight: 500;
  margin-inline-start: 8px;
  font-size: .9rem;
}

/* ============================================================
   8. PRODUCT GRID — Mobile 2-up / Desktop 4-up
   ============================================================ */
.woocommerce ul.products {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 768px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}
@media (min-width: 1200px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
  }
}

.woocommerce ul.products li.product {
  background: var(--smg-surface);
  border: 1px solid var(--smg-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  margin: 0 !important;
  width: auto !important;
  position: relative;
}

.woocommerce ul.products li.product a img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: .875rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--smg-ink);
  padding: 10px 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.woocommerce ul.products li.product .price {
  padding: 4px 10px 6px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}

.woocommerce ul.products li.product .smg-quick-cod {
  margin: 8px 10px 10px;
  font-size: .82rem;
  min-height: 44px;
  padding: 0 12px;
}

/* Push the CTA to the bottom of every card */
.woocommerce ul.products li.product {
  justify-content: space-between;
}

/* ============================================================
   9. HOME PAGE — HERO
   ============================================================ */
.smg-hero {
  background: linear-gradient(135deg, #0E6F63 0%, #128C7E 55%, #1AAE9F 100%);
  color: #fff;
  padding: 34px 16px 40px;
  text-align: center;
}
.smg-hero h1 {
  font-size: var(--fs-h1);
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 10px;
  color: #fff;
}
.smg-hero p {
  opacity: .92;
  max-width: 46ch;
  margin: 0 auto 20px;
  font-size: 1.05rem;
  line-height: 1.6;
}
.smg-hero .smg-btn { margin: 6px 4px; width: auto; min-width: 200px; }
.smg-hero .smg-btn--buy { background: var(--smg-accent); box-shadow: var(--shadow-cta); }
.smg-hero .smg-micro {
  margin-top: 18px;
  font-size: var(--fs-sm);
  opacity: .8;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.smg-hero .smg-micro span::before { content: "✓ "; font-weight: 800; }

/* ============================================================
   10. USP / VALUE PROPOSITION BAR
   ============================================================ */
.smg-usp {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .smg-usp { grid-template-columns: repeat(4, 1fr); }
}
.smg-usp__item {
  background: var(--smg-surface);
  border: 1px solid var(--smg-line);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-1);
}
.smg-usp__item .smg-usp__icon { font-size: 1.6rem; display: block; margin-bottom: 6px; }
.smg-usp__item h4 { font-size: .95rem; margin: 0 0 4px; color: var(--smg-ink); }
.smg-usp__item p  { font-size: var(--fs-sm); color: var(--smg-body); margin: 0; line-height: 1.45; }

/* ============================================================
   11. SECTION WRAPPERS
   ============================================================ */
.smg-section {
  padding: 28px 14px;
  max-width: 1260px;
  margin: 0 auto;
}
.smg-section--full { max-width: none; padding-inline: 0; }

.smg-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.smg-section__header h2 { font-size: var(--fs-h2); margin: 0; color: var(--smg-ink); }
.smg-section__header a  { font-size: var(--fs-sm); color: var(--smg-green); font-weight: 600; }

/* ============================================================
   12. CATEGORY SCROLLING CIRCLES
   ============================================================ */
.smg-cats {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 14px 14px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.smg-cats::-webkit-scrollbar { display: none; }
.smg-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  text-align: center;
  text-decoration: none;
}
.smg-cat-item__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #E8F7EE;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  border: 2px solid var(--smg-line);
  transition: border-color .15s;
}
.smg-cat-item:hover .smg-cat-item__icon { border-color: var(--smg-green); }
.smg-cat-item span { font-size: .75rem; font-weight: 600; color: var(--smg-ink); max-width: 72px; line-height: 1.3; }

/* ============================================================
   13. URGENCY STRIP
   ============================================================ */
.smg-urgency {
  background: var(--smg-ink);
  color: #fff;
  padding: 12px 16px;
  text-align: center;
  font-weight: 700;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.smg-urgency .smg-timer {
  background: var(--smg-accent);
  color: #fff;
  padding: 3px 10px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  font-size: .95rem;
  font-weight: 900;
  letter-spacing: .05em;
}

/* ============================================================
   14. SOCIAL PROOF / TESTIMONIALS
   ============================================================ */
.smg-reviews {
  background: var(--smg-surface);
  padding: 28px 14px;
}
.smg-reviews h2 { text-align: center; margin-bottom: 20px; }
.smg-review-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 1260px;
  margin: 0 auto;
}
@media (min-width: 600px)  { .smg-review-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .smg-review-grid { grid-template-columns: repeat(3, 1fr); } }

.smg-review-card {
  background: var(--smg-surface-2);
  border: 1px solid var(--smg-line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-1);
}
.smg-review-card .smg-stars { color: var(--smg-gold); font-size: 1rem; letter-spacing: 1px; margin-bottom: 8px; }
.smg-review-card blockquote {
  margin: 0 0 12px;
  font-size: .925rem;
  line-height: 1.55;
  color: var(--smg-ink);
  font-style: italic;
}
.smg-review-card cite { font-size: var(--fs-sm); font-weight: 700; color: var(--smg-green-600); font-style: normal; }
.smg-review-card .smg-review-city { font-size: var(--fs-sm); color: var(--smg-body); }

/* Parcel photos strip */
.smg-parcel-photos {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 0 4px;
  scrollbar-width: none;
  margin-top: 20px;
}
.smg-parcel-photos img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex: 0 0 auto;
  border: 1px solid var(--smg-line);
}

/* ============================================================
   15. HOW COD WORKS — 4-STEP STRIP
   ============================================================ */
.smg-how-cod {
  background: #F1FBF6;
  border-top: 1px solid #BFE8D2;
  border-bottom: 1px solid #BFE8D2;
  padding: 28px 14px;
}
.smg-how-cod h2 { text-align: center; margin-bottom: 22px; }
.smg-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 860px;
  margin: 0 auto;
}
@media (min-width: 768px) { .smg-steps { grid-template-columns: repeat(4, 1fr); } }
.smg-step {
  background: var(--smg-surface);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  border: 1px solid #BFE8D2;
  box-shadow: var(--shadow-1);
}
.smg-step__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--smg-green);
  color: #fff;
  font-weight: 900;
  font-size: .9rem;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
}
.smg-step h4 { font-size: .875rem; margin: 0 0 4px; color: var(--smg-ink); }
.smg-step p  { font-size: var(--fs-sm); color: var(--smg-body); margin: 0; line-height: 1.4; }

/* ============================================================
   16. FAQ ACCORDION
   ============================================================ */
.smg-faq { max-width: 780px; margin: 0 auto; padding: 28px 14px; }
.smg-faq h2 { text-align: center; margin-bottom: 22px; }
.smg-faq details {
  border: 1px solid var(--smg-line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--smg-surface);
  overflow: hidden;
}
.smg-faq summary {
  padding: 16px 18px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--smg-ink);
}
.smg-faq summary::-webkit-details-marker { display: none; }
.smg-faq summary::after { content: "+"; font-size: 1.2rem; color: var(--smg-green); flex-shrink: 0; }
.smg-faq details[open] summary::after { content: "−"; }
.smg-faq .smg-faq__body { padding: 0 18px 16px; font-size: .925rem; line-height: 1.65; color: var(--smg-body); }

/* ============================================================
   17. CATEGORY / SHOP ARCHIVE PAGE
   ============================================================ */
.smg-filterbar {
  position: sticky;
  top: 56px;
  z-index: 50;
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--smg-line);
  overflow-x: auto;
  scrollbar-width: none;
}
@media (min-width: 1024px) { .smg-filterbar { display: none; } }

.smg-pricechips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.smg-chip {
  display: inline-block;
  border: 1px solid var(--smg-line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--smg-ink);
  background: #fff;
  text-decoration: none;
  transition: all .12s;
  white-space: nowrap;
}
.smg-chip:hover, .smg-chip.is-active {
  background: var(--smg-green);
  color: #fff;
  border-color: var(--smg-green);
}

/* Desktop sidebar layout */
.smg-archive-wrap {
  display: flex;
  gap: 24px;
  max-width: 1260px;
  margin: 0 auto;
  padding: 16px 14px;
  align-items: flex-start;
}
.smg-sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
}
@media (max-width: 1023px) { .smg-sidebar { display: none; } }
.smg-archive-content { flex: 1; min-width: 0; }

.smg-sidebar-section { margin-bottom: 22px; }
.smg-sidebar-section h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--smg-body); margin: 0 0 10px; font-weight: 700; }

/* Mobile bottom-sheet drawer */
.smg-drawer {
  position: fixed;
  inset: auto 0 0 0;
  max-height: 82vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 18px;
  z-index: 9998;
  transform: translateY(100%);
  transition: transform .25s ease;
  box-shadow: 0 -8px 32px rgba(20,24,31,.16);
}
.smg-drawer.is-open { transform: none; }
.smg-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,24,31,.4);
  z-index: 9997;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.smg-drawer-overlay.is-open { opacity: 1; pointer-events: all; }
.smg-drawer-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--smg-line);
  margin: 0 auto 16px;
}

/* Mid-grid trust banner */
.smg-midbanner {
  grid-column: 1 / -1;
  background: #E8F7EE;
  border: 1px dashed var(--smg-green);
  border-radius: var(--radius);
  padding: 20px 18px;
  text-align: center;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.smg-midbanner p { margin: 0; font-size: .95rem; color: var(--smg-ink); line-height: 1.5; }
.smg-midbanner .smg-btn--wa { width: auto; min-width: 220px; }

/* ============================================================
   18. SINGLE PRODUCT (PDP)
   ============================================================ */
.woocommerce div.product {
  padding: 0 14px;
  max-width: 1260px;
  margin: 0 auto;
}

.woocommerce div.product .woocommerce-product-gallery {
  margin-bottom: 22px;
}
.woocommerce div.product .woocommerce-product-gallery img {
  border-radius: var(--radius);
  border: 1px solid var(--smg-line);
}

/* Product title */
.woocommerce div.product .product_title {
  font-size: var(--fs-h2);
  font-weight: 900;
  color: var(--smg-ink);
  margin: 0 0 6px;
  line-height: 1.2;
}

/* Rating */
.woocommerce div.product .woocommerce-product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

/* Price on PDP */
.woocommerce div.product p.price {
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.woocommerce div.product p.price ins {
  font-weight: 900;
  color: var(--smg-ink);
  text-decoration: none;
}
.woocommerce div.product p.price del {
  color: #97A1AE;
  font-size: 1rem;
  margin-inline-start: 8px;
}

/* Status badges row */
.smg-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}

/* COD Guarantee box */
.smg-guarantee {
  background: #F1FBF6;
  border: 1px solid #BFE8D2;
  border-radius: var(--radius);
  padding: 18px;
  margin: 22px 0;
}
.smg-guarantee h3 {
  margin: 0 0 10px;
  font-size: var(--fs-h3);
  color: var(--smg-green-600);
}
.smg-guarantee ol {
  margin: 0;
  padding-inline-start: 20px;
  color: var(--smg-body);
  font-size: .925rem;
}
.smg-guarantee li { margin-bottom: 6px; line-height: 1.5; }

/* Delivery estimate bar */
.smg-dispatch-bar {
  background: var(--smg-surface-2);
  border: 1px solid var(--smg-line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  color: var(--smg-ink);
  font-weight: 600;
  margin: 12px 0;
}
.smg-dispatch-bar .smg-timer {
  background: var(--smg-success);
  color: #fff;
  padding: 3px 10px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  font-size: .9rem;
  font-weight: 900;
  margin-left: auto;
}

/* WooCommerce product tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs {
  border-bottom: 2px solid var(--smg-line);
  padding: 0;
  list-style: none;
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li {
  padding: 0;
  border: 0;
  background: none;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 12px 18px;
  font-weight: 700;
  font-size: .875rem;
  color: var(--smg-body);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  color: var(--smg-green);
  border-bottom-color: var(--smg-green);
}
.woocommerce div.product .woocommerce-tabs .panel {
  padding: 18px 0;
  font-size: .925rem;
  color: var(--smg-body);
  line-height: 1.7;
}

/* Mobile sticky buy bar */
@media (max-width: 767px) {
  .smg-sticky-buy {
    position: fixed;
    inset: auto 0 0 0;
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    border-top: 1px solid var(--smg-line);
    z-index: 9990;
    box-shadow: 0 -6px 18px rgba(20,24,31,.10);
  }
  .smg-sticky-buy .smg-btn {
    flex: 1;
    font-size: .82rem;
    padding: 0 10px;
    min-height: 46px;
  }
  body.single-product { padding-bottom: 78px; }
}
@media (min-width: 768px) { .smg-sticky-buy { display: none; } }

/* ============================================================
   19. CART PAGE
   ============================================================ */
@media (max-width: 767px) {
  .woocommerce-cart table.shop_table thead { display: none; }
  .woocommerce-cart table.shop_table tr.cart_item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px;
    border: 1px solid var(--smg-line);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 12px;
    background: var(--smg-surface);
  }
  .woocommerce-cart table.shop_table td { border: 0; padding: 2px 0; }
  .woocommerce-cart td.product-remove { grid-column: 2; justify-self: end; }
  .woocommerce-cart td.product-thumbnail { grid-row: 1 / 3; }
}

/* Quantity buttons */
.quantity .qty {
  width: 50px;
  text-align: center;
  border: 1px solid var(--smg-line);
  border-radius: 6px;
  padding: 8px 4px;
  font-weight: 700;
  font-size: 1rem;
}

/* Cart totals */
.cart_totals .order-total .amount {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--smg-accent);
}
.cart_totals h2 {
  font-size: var(--fs-h3);
  margin-bottom: 14px;
  color: var(--smg-ink);
}

/* Cart delivery notice */
.smg-cart-notice {
  background: #FFF7E6;
  border: 1px solid #FFD98A;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: var(--fs-sm);
  color: #6B4A00;
  margin: 14px 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.smg-cart-notice::before { content: "⚠️"; flex-shrink: 0; }

/* Cart checkout button */
.wc-proceed-to-checkout a.checkout-button,
.wc-proceed-to-checkout .checkout-button {
  background: var(--smg-accent) !important;
  color: #fff !important;
  font-weight: 900;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-cta);
  text-transform: uppercase;
  font-size: .95rem;
  letter-spacing: .2px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-family: var(--smg-font);
  transition: background .12s;
}
.wc-proceed-to-checkout a.checkout-button:hover { background: var(--smg-accent-600) !important; }

/* Trust strip at cart bottom */
.smg-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 16px 0 8px;
  font-size: var(--fs-sm);
  color: var(--smg-body);
  font-weight: 600;
}
.smg-trust-strip span { display: flex; align-items: center; gap: 5px; }

/* ============================================================
   20. CHECKOUT PAGE
   ============================================================ */
.woocommerce-checkout #customer_details h3,
.woocommerce-checkout h3#order_review_heading {
  font-size: var(--fs-h3);
  color: var(--smg-ink);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--smg-line);
}

.woocommerce form .form-row label {
  font-weight: 600;
  font-size: .875rem;
  color: var(--smg-ink);
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
  border: 1px solid var(--smg-line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: .95rem;
  width: 100%;
  transition: border-color .12s;
  font-family: var(--smg-font);
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row select:focus {
  border-color: var(--smg-green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(18,140,126,.12);
}

/* Landmark field visual hint */
.smg-field-landmark .form-row-wide input {
  border-color: var(--smg-green-600);
  background: #F8FDFC;
}

/* COD notice above place-order button */
.smg-cod-notice {
  background: #E8F7EE;
  border: 1px solid #BFE8D2;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--smg-green-600);
  font-weight: 700;
  font-size: .95rem;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.smg-cod-notice::before { content: "💵"; font-size: 1.1rem; flex-shrink: 0; }

/* Place order button */
#place_order {
  background: var(--smg-accent) !important;
  color: #fff !important;
  border: 0;
  border-radius: var(--radius-sm);
  min-height: 54px;
  font-size: 1rem;
  font-weight: 900;
  font-family: var(--smg-font);
  text-transform: uppercase;
  letter-spacing: .2px;
  cursor: pointer;
  width: 100%;
  box-shadow: var(--shadow-cta);
  transition: background .12s;
}
#place_order:hover { background: var(--smg-accent-600) !important; }

/* ============================================================
   21. ORDER CONFIRMATION (THANK YOU PAGE)
   ============================================================ */
.smg-thankyou-wa {
  background: var(--smg-surface);
  border: 1px solid #BFE8D2;
  border-radius: var(--radius);
  padding: 22px;
  margin: 20px 0;
  text-align: center;
  box-shadow: var(--shadow-1);
}
.smg-thankyou-wa h3 { color: var(--smg-green-600); margin-bottom: 10px; }
.smg-thankyou-wa p { font-size: .95rem; color: var(--smg-body); margin-bottom: 16px; line-height: 1.6; }

/* ============================================================
   22. MOBILE STICKY BOTTOM NAV
   ============================================================ */
.smg-bottom-nav {
  position: fixed;
  inset: auto 0 0 0;
  background: #fff;
  border-top: 1px solid var(--smg-line);
  display: flex;
  z-index: 9980;
  box-shadow: 0 -4px 16px rgba(20,24,31,.08);
}
@media (min-width: 768px) { .smg-bottom-nav { display: none; } }

.smg-bottom-nav a, .smg-bottom-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  font-size: .65rem;
  font-weight: 600;
  color: var(--smg-body);
  text-decoration: none;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--smg-font);
  min-height: var(--tap);
}
.smg-bottom-nav a span, .smg-bottom-nav button span { font-size: 1.25rem; }
.smg-bottom-nav .smg-bnav--wa { color: var(--smg-green); }
.smg-bottom-nav a.active { color: var(--smg-green); }

/* Push content above bottom nav */
body { padding-bottom: 64px; }
@media (min-width: 768px) { body { padding-bottom: 0; } }

/* ============================================================
   23. MOBILE HEADER
   ============================================================ */
.smg-header {
  background: #fff;
  border-bottom: 1px solid var(--smg-line);
  position: sticky;
  top: 0;
  z-index: 990;
  box-shadow: var(--shadow-1);
}
.smg-header__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  max-width: 1260px;
  margin: 0 auto;
}
.smg-logo { display: flex; flex-direction: column; line-height: 1; text-decoration: none; }
.smg-logo__name { font-size: 1.15rem; font-weight: 900; color: var(--smg-green); }
.smg-logo__tagline { font-size: .6rem; color: var(--smg-body); font-weight: 500; white-space: nowrap; }

.smg-search-bar {
  flex: 1;
  display: flex;
  background: var(--smg-surface-2);
  border: 1px solid var(--smg-line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  min-height: 40px;
}
.smg-search-bar input {
  flex: 1;
  border: 0;
  background: none;
  padding: 8px 12px;
  font-size: .875rem;
  font-family: var(--smg-font);
  color: var(--smg-ink);
}
.smg-search-bar input:focus { outline: none; }
.smg-search-bar button {
  background: var(--smg-green);
  border: 0;
  color: #fff;
  padding: 0 12px;
  cursor: pointer;
  font-size: 1rem;
}

.smg-header-actions { display: flex; gap: 6px; align-items: center; }
.smg-cart-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: var(--smg-ink);
  text-decoration: none;
  font-size: 1.25rem;
}
.smg-cart-icon .smg-cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--smg-accent);
  color: #fff;
  font-size: .6rem;
  font-weight: 900;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

/* ============================================================
   24. MOBILE MENU DRAWER
   ============================================================ */
.smg-nav-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(300px, 85vw);
  background: #fff;
  z-index: 10000;
  transform: translateX(-100%);
  transition: transform .28s ease;
  overflow-y: auto;
  box-shadow: 6px 0 28px rgba(20,24,31,.18);
}
.smg-nav-drawer.is-open { transform: none; }
.smg-nav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,24,31,.5);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s;
}
.smg-nav-drawer-overlay.is-open { opacity: 1; pointer-events: all; }

.smg-drawer-header {
  padding: 16px;
  border-bottom: 1px solid var(--smg-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.smg-drawer-header .smg-logo__name { font-size: 1.1rem; }
.smg-close-btn {
  background: none;
  border: 0;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--smg-body);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.smg-nav-list { list-style: none; padding: 10px 0; margin: 0; }
.smg-nav-list > li > a, .smg-nav-list > li > button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--smg-ink);
  text-decoration: none;
  border: 0;
  background: none;
  width: 100%;
  cursor: pointer;
  font-family: var(--smg-font);
  border-bottom: 1px solid var(--smg-line);
}
.smg-nav-list > li > a:hover { background: var(--smg-surface-2); color: var(--smg-green); }
.smg-nav-list .smg-wa-link { color: var(--smg-green); }

/* ============================================================
   25. BREADCRUMBS
   ============================================================ */
.woocommerce-breadcrumb, .smg-breadcrumb {
  font-size: var(--fs-sm);
  color: var(--smg-body);
  padding: 10px 14px;
  max-width: 1260px;
  margin: 0 auto;
}
.woocommerce-breadcrumb a { color: var(--smg-green); }

/* ============================================================
   26. FOOTER
   ============================================================ */
.smg-footer {
  background: var(--smg-ink);
  color: rgba(255,255,255,.8);
  padding: 36px 14px 20px;
  margin-top: 40px;
}
.smg-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  max-width: 1260px;
  margin: 0 auto 28px;
}
@media (min-width: 600px)  { .smg-footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .smg-footer-grid { grid-template-columns: repeat(4, 1fr); } }
.smg-footer h4 { color: #fff; font-size: .9rem; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.smg-footer a { color: rgba(255,255,255,.7); font-size: var(--fs-sm); line-height: 2; display: block; text-decoration: none; }
.smg-footer a:hover { color: #fff; }
.smg-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 16px;
  font-size: var(--fs-sm);
  text-align: center;
  opacity: .6;
  max-width: 1260px;
  margin: 0 auto;
}
.smg-courier-logos {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}
.smg-courier-logos img { height: 28px; width: auto; filter: brightness(0) invert(1); opacity: .6; }

/* ============================================================
   27. UTILITY CLASSES
   ============================================================ */
.smg-center  { text-align: center; }
.smg-green-text { color: var(--smg-green-600); }
.smg-orange-text { color: var(--smg-accent); }
.smg-muted   { color: var(--smg-body); }
.smg-mt-1    { margin-top: 8px; }
.smg-mt-2    { margin-top: 16px; }
.smg-mb-2    { margin-bottom: 16px; }
.smg-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   28. LOAD MORE BUTTON (replaces infinite scroll)
   ============================================================ */
.smg-load-more {
  display: block;
  margin: 24px auto 0;
  background: none;
  border: 2px solid var(--smg-line);
  border-radius: var(--radius-sm);
  padding: 14px 32px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  color: var(--smg-ink);
  font-family: var(--smg-font);
  transition: border-color .12s, color .12s;
}
.smg-load-more:hover { border-color: var(--smg-green); color: var(--smg-green); }

/* ============================================================
   29. WP ADMIN BAR COMPENSATION
   ============================================================ */
@media (min-width: 783px) {
  .admin-bar .smg-header { top: 32px; }
  .admin-bar .smg-topbar { top: 32px; }
}

/* ============================================================
   30. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
