/* ── Fonts ───────────────────────────────────────────────── */
:root {
  --green-dark:   #1a3d2b;
  --green-mid:    #2d6a4f;
  --green-bright: #3a9e4f;
  --green-light:  #52b788;
  --green-pale:   #d8f3dc;
  --cream:        #faf7f2;
  --text:         #1a1a1a;
  --muted:        #6b7280;
  --border:       #e5e7eb;
  --radius:       8px;
  --radius-lg:    14px;
  --shadow:       0 1px 3px rgba(0,0,0,.08);
  --shadow-md:    0 4px 12px rgba(0,0,0,.1);
  --font-serif:   Georgia, 'Times New Roman', serif;
  --font-sans:    system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Layout ──────────────────────────────────────────────── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Nav ─────────────────────────────────────────────────── */
.site-nav {
  background: #ffffff;
  position: sticky; top: 0; z-index: 100;
  border-bottom: 2px solid var(--green-bright);
  box-shadow: 0 1px 8px rgba(0,0,0,.08);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 1.25rem; max-width: 1180px; margin: 0 auto;
  position: relative;
}
.nav-logo img { height: 48px; width: auto; display: block; }

/* Desktop nav links */
.nav-links {
  display: flex; align-items: center; gap: 1.25rem; font-size: .9rem;
}
.nav-links a { color: var(--green-dark); transition: color .15s; font-weight: 500; }
.nav-links a:hover { color: var(--green-bright); }

/* Mobile controls (cart + hamburger) — hidden on desktop */
.nav-mobile-controls { display: none; }

/* Hamburger button - hidden on desktop */
.nav-hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: .4rem; color: var(--green-dark);
  flex-direction: column; gap: 5px; align-items: center; justify-content: center;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--green-dark); border-radius: 2px;
  transition: all .25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.nav-mobile {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border-bottom: 2px solid var(--green-pale);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  padding: .75rem 1.25rem;
  flex-direction: column; gap: 0;
  z-index: 200;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  display: block; padding: .7rem 0;
  color: var(--green-dark); font-weight: 500; font-size: .95rem;
  border-bottom: 1px solid var(--border);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--green-mid); }

.nav-cart {
  display: flex; align-items: center; gap: .4rem;
  background: var(--green-mid); border-radius: 99px;
  padding: .35rem .9rem; font-size: .85rem; color: #fff; font-weight: 600;
  transition: background .15s; flex-shrink: 0;
}
.nav-cart:hover { background: var(--green-dark); color: #fff; }
.cart-count {
  background: #fff; color: var(--green-dark);
  border-radius: 99px; padding: 0 .45rem;
  font-size: .75rem; font-weight: 700;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.25rem; border-radius: var(--radius);
  font-size: .9rem; font-weight: 500; cursor: pointer;
  border: 1.5px solid transparent; transition: all .15s;
  font-family: var(--font-sans);
}
.btn-primary { background: var(--green-mid); color: #fff; border-color: var(--green-mid); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-outline { background: transparent; border-color: var(--green-mid); color: var(--green-mid); }
.btn-outline:hover { background: var(--green-pale); }
.btn-sm { padding: .35rem .85rem; font-size: .82rem; }
.btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  background: var(--green-dark);
  padding: 4rem 1.25rem;
  text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 60% 50%, rgba(58,158,79,.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-logo { height: 90px; width: auto; margin: 0 auto 1.25rem; }
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 5vw, 3rem);
  color: #fff; margin-bottom: .75rem; font-weight: 700;
}
.hero p {
  font-size: clamp(.95rem, 2.5vw, 1.1rem);
  color: rgba(255,255,255,.75);
  max-width: 520px; margin: 0 auto 2rem;
}

/* ── Section titles ──────────────────────────────────────── */
.section { padding: 2.5rem 0; }
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  font-weight: 700; margin-bottom: 1.5rem; color: var(--green-dark);
}

/* ── Product grid ────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.product-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: #fff; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.product-card img  { width: 100%; height: 200px; object-fit: cover; background: var(--cream); }
.product-card-placeholder {
  width: 100%; height: 200px;
  background: linear-gradient(135deg, var(--green-pale) 0%, #b7e4c7 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .4rem; font-size: 2.5rem; color: var(--green-mid);
}
.product-card-placeholder span {
  font-size: .72rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--green-mid); opacity: .7;
}
.product-card-body { padding: 1rem; }
.product-card-name { font-weight: 600; margin-bottom: .25rem; font-size: .95rem; font-family: var(--font-serif); }
.product-card-cat  { font-size: .78rem; color: var(--muted); margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .05em; }
.product-card-price { font-size: 1.05rem; font-weight: 700; color: var(--green-mid); }
.product-card-sale  { color: #dc2626; }
.product-card-was   { font-size: .82rem; text-decoration: line-through; color: var(--muted); margin-left: .3rem; font-weight: 400; }
.product-card-actions { margin-top: .75rem; }

/* ── Category pills ──────────────────────────────────────── */
.cat-grid { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.5rem; }
.cat-pill {
  padding: .4rem 1rem; border-radius: 99px;
  font-size: .83rem; font-weight: 500;
  border: 1.5px solid var(--border); background: #fff;
  transition: all .15s; cursor: pointer;
}
.cat-pill:hover, .cat-pill.active { background: var(--green-mid); color: #fff; border-color: var(--green-mid); }

/* ── Product detail ──────────────────────────────────────── */
.product-detail {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; padding: 2.5rem 0;
}
.product-detail-img { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.product-detail-img img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-detail-price { font-size: 1.7rem; font-weight: 700; color: var(--green-mid); margin: 1rem 0; font-family: var(--font-serif); }
.product-detail-desc  { color: var(--muted); line-height: 1.75; margin-bottom: 1.5rem; }

/* ── Cart & Checkout layout ──────────────────────────────── */
.cart-layout, .checkout-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

/* ── Cart table ──────────────────────────────────────────── */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; padding: .75rem 1rem; border-bottom: 2px solid var(--border); font-size: .82rem; color: var(--muted); }
.cart-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: .9rem; }
.cart-table .col-remove { width: 40px; }

/* Mobile cart — stack items */
.cart-mobile-item {
  display: none;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1rem; margin-bottom: .75rem; background: #fff;
}

.cart-summary { background: var(--cream); border-radius: var(--radius-lg); padding: 1.5rem; }
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: .6rem; font-size: .9rem; }
.cart-summary .total { font-size: 1.1rem; font-weight: 700; padding-top: .6rem; border-top: 1px solid var(--border); font-family: var(--font-serif); }

/* ── Forms ───────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: .3rem; }
.form-group label { font-size: .83rem; font-weight: 500; color: var(--muted); }
.form-group input, .form-group textarea, .form-group select {
  padding: .55rem .85rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: .9rem; font-family: var(--font-sans);
  transition: border-color .15s; width: 100%;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--green-mid);
}

/* ── Badges ──────────────────────────────────────────────── */
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 99px; font-size: .75rem; font-weight: 600; }
.badge-green  { background: var(--green-pale); color: var(--green-dark); }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-gray   { background: #f3f4f6; color: #374151; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; }

/* ── Category cards ──────────────────────────────────────── */
.cat-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 1rem; }
.cat-card {
  background: var(--green-pale); border-radius: var(--radius-lg);
  padding: 1.25rem 1rem; text-align: center;
  font-weight: 600; color: var(--green-dark);
  font-size: .9rem; transition: all .15s; border: 1.5px solid transparent;
}
.cat-card:hover { background: var(--green-mid); color: #fff; transform: translateY(-2px); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--green-dark); color: rgba(255,255,255,.9);
  padding: 2.5rem 1.25rem; margin-top: 4rem;
}
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-logo { height: 36px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .85rem; }
.footer-links a { color: rgba(255,255,255,.85); transition: color .15s; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: .8rem; color: rgba(255,255,255,.7); width: 100%; text-align: center; margin-top: .5rem; }

/* ── Utilities ───────────────────────────────────────────── */
.text-muted { color: var(--muted); font-size: .85rem; }
.stock-low  { color: #dc2626; font-weight: 600; }
.stock-ok   { color: var(--green-mid); }

/* ── Cart toast ──────────────────────────────────────────── */
.cart-toast {
  position: fixed; top: 1.25rem; right: 1.25rem; z-index: 9999;
  background: var(--green-dark); color: #fff;
  padding: .6rem 1rem; border-radius: var(--radius);
  font-size: .85rem; font-weight: 500;
  display: flex; align-items: center; gap: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  transform: translateY(-8px); opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none; white-space: nowrap;
}
.cart-toast.cart-toast-show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cart-toast a { color: #86efac; font-weight: 600; text-decoration: underline; white-space: nowrap; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (≤860px)
══════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .cart-layout, .checkout-layout {
    grid-template-columns: 1fr;
  }
  .cart-summary {
    position: static !important;
  }
  /* Shop sidebar collapses to top */
  .shop-layout {
    grid-template-columns: 1fr !important;
  }
  .shop-sidebar {
    position: static !important;
    /* Show categories as horizontal scroll pills */
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .5rem;
  }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (≤640px)
══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* Nav — show hamburger, show mobile controls, hide desktop links */
  .nav-links { display: none; }
  .nav-mobile-controls { display: flex; align-items: center; gap: .75rem; }
  .nav-hamburger { display: flex; }

  /* Hero */
  .hero { padding: 2.5rem 1rem; }
  .hero-logo { height: 70px; }

  /* Product grid — 2 columns on mobile */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .product-card img { height: 150px; }
  .product-card-body { padding: .75rem; }
  .product-card-name { font-size: .88rem; }
  .product-card-price { font-size: .95rem; }

  /* Product detail — single column */
  .product-detail { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.25rem 0; }

  /* Cart — hide table, show card layout */
  .cart-table { display: none; }
  .cart-mobile-item { display: block; }

  /* Cart & checkout layout */
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; gap: 1.25rem; }

  /* Forms */
  .form-grid { grid-template-columns: 1fr; }

  /* Category cards */
  .cat-card-grid { grid-template-columns: repeat(2, 1fr); }

  /* Footer */
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-links { gap: .75rem; }

  /* Section padding */
  .section { padding: 1.75rem 0; }

  /* Cart toast — full width on mobile */
  .cart-toast {
    left: 1rem; right: 1rem; top: 1rem;
    white-space: normal;
    max-width: none;
  }

  /* Two-column page blocks collapse */
  .page-content div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — Small mobile (≤380px)
══════════════════════════════════════════════════════════ */
@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
  .btn { padding: .5rem 1rem; font-size: .85rem; }
}

/* ── Value strip ─────────────────────────────────────────── */
.value-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.value-item {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.25rem;
  border-right: 1px solid rgba(255,255,255,.2);
}
.value-item:last-child { border-right: none; }
.value-icon { font-size: 1.5rem; flex-shrink: 0; }
.value-item strong { display: block; font-size: .88rem; font-weight: 600; }
.value-item span { font-size: .78rem; opacity: .85; }

/* ── Category cards ──────────────────────────────────────── */
.cat-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 1rem; }
.cat-card {
  background: var(--cream); border-radius: var(--radius-lg);
  padding: 1.5rem 1rem; text-align: center;
  border: 1.5px solid var(--border);
  transition: all .18s; display: block;
}
.cat-card:hover {
  background: var(--green-mid); border-color: var(--green-mid);
  transform: translateY(-3px); box-shadow: var(--shadow-md);
}
.cat-card:hover .cat-card-name { color: #fff; }
.cat-card:hover .cat-card-desc { color: rgba(255,255,255,.8); }
.cat-card-icon { font-size: 2rem; margin-bottom: .5rem; }
.cat-card-name { font-weight: 600; color: var(--green-dark); font-size: .92rem; margin-bottom: .2rem; }
.cat-card-desc { font-size: .75rem; color: var(--muted); line-height: 1.4; }

/* ── Shipping banner ─────────────────────────────────────── */
.shipping-banner {
  background: linear-gradient(135deg, var(--green-pale) 0%, #b7e4c7 100%);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  border: 1.5px solid var(--green-light);
}
.shipping-banner-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}

/* ── Responsive homepage ─────────────────────────────────── */
@media (max-width: 860px) {
  .value-strip { grid-template-columns: repeat(2, 1fr); }
  .value-item:nth-child(2) { border-right: none; }
  .value-item { border-bottom: 1px solid rgba(255,255,255,.2); }
  .value-item:nth-child(3), .value-item:nth-child(4) { border-bottom: none; }
}
@media (max-width: 640px) {
  .value-strip { grid-template-columns: 1fr; }
  .value-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.15); }
  .value-item:last-child { border-bottom: none; }
  .cat-card-grid { grid-template-columns: repeat(2, 1fr); }
  .shipping-banner { padding: 1.5rem; }
  .shipping-banner-inner { flex-direction: column; align-items: flex-start; }
}

/* ── Hero buttons ────────────────────────────────────────── */
.hero-btn {
  display: inline-flex; align-items: center;
  font-size: 1rem; font-weight: 600; font-family: var(--font-sans);
  padding: .75rem 2rem; border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer; text-decoration: none;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.hero-btn-primary {
  background: #fff; color: var(--green-dark); border-color: #fff;
}
.hero-btn-primary:hover {
  background: var(--green-pale); color: var(--green-dark); border-color: var(--green-pale);
}
.hero-btn-outline {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.6);
}
.hero-btn-outline:hover {
  background: rgba(255,255,255,.15); border-color: #fff; color: #fff;
}

/* ── Product image viewer — swipeable ───────────────────── */
#main-viewer { touch-action: pan-y; user-select:none; -webkit-user-select:none; }

/* ── Product gallery dots ───────────────────────────────── */
.gallery-dot.active { background: var(--green-mid) !important; }
.gallery-dots-wrap  { display:none }   /* hide on desktop — only show on touch */
@media (max-width: 860px) {
  .gallery-dots-wrap { display:flex }
}

/* ── Live search smooth filtering ───────────────────────── */
.product-card {
  transition: opacity .15s ease, transform .15s ease, box-shadow .15s ease;
}
/* Hide filtered cards — batched in rAF so no flicker or jump */
.card-hidden {
  display: none !important;
}
.card-hiding {
  opacity: 0;
  pointer-events: none;
}
/* No-results message — hidden by default, shown via JS class */
#live-no-results {
  display: none;
}
#live-no-results.nr-visible {
  display: block;
}

/* ── Why Choose Us ───────────────────────────────────────── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}
.why-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--cream);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.why-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-light);
}
.why-icon  { font-size: 2.5rem; margin-bottom: .75rem; }
.why-title { font-family: var(--font-serif); font-size: 1.05rem; color: var(--green-dark); margin-bottom: .5rem; font-weight: 600; }
.why-text  { font-size: .88rem; color: var(--muted); line-height: 1.65; }

@media (max-width: 640px) {
  .why-grid { grid-template-columns: 1fr; }
}

/* ── Testimonials ────────────────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.testimonial-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1.5px solid var(--border);
  display: flex; flex-direction: column; gap: .75rem;
  transition: transform .18s, box-shadow .18s;
}
.testimonial-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.testimonial-stars { font-size: .9rem; letter-spacing: .05em; }
.testimonial-text  { font-size: .92rem; color: #374151; line-height: 1.7; font-style: italic; flex: 1; }
.testimonial-author { display: flex; align-items: center; gap: .5rem; }
.testimonial-author strong { font-size: .88rem; color: var(--green-dark); }
.testimonial-location { font-size: .78rem; color: var(--muted); }

@media (max-width: 640px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* ── Plant care guide ────────────────────────────────────── */
.plant-care-grid {
  background: var(--green-pale);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(45,106,79,.15);
}
.plant-care-row {
  display: grid;
  grid-template-columns: 28px 110px 1fr;
  align-items: center;
  gap: .5rem;
  padding: .55rem .85rem;
  font-size: .88rem;
  border-bottom: 1px solid rgba(45,106,79,.1);
}
.plant-care-row:last-child { border-bottom: none; }
.plant-care-icon  { font-size: 1rem; text-align: center; }
.plant-care-label { color: var(--muted); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.plant-care-value { color: var(--green-dark); font-weight: 500; }

/* ── Shop sidebar filters ────────────────────────────────── */
.filter-group {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.filter-group:last-child { border-bottom: none; }
.filter-heading {
  font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); margin-bottom: .5rem;
}
.filter-link {
  display: block; padding: .35rem .6rem;
  border-radius: var(--radius); font-size: .85rem;
  color: var(--muted); transition: all .12s;
  text-decoration: none;
}
.filter-link:hover { background: var(--cream); color: var(--green-dark); }
.filter-link.active { background: var(--green-pale); color: var(--green-dark); font-weight: 600; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE OVERHAUL — fixes for all screen sizes
══════════════════════════════════════════════════════════ */

/* ── Shop layout base (desktop) ──────────────────────────── */
.shop-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.75rem;
  align-items: start;
}
.shop-sidebar {
  position: sticky;
  top: 72px;
}

/* Mobile filter toggle button — hidden on desktop */
.filter-toggle-btn {
  display: none;
}

/* ── Tablet (≤860px) — shop sidebar collapsible ─────────── */
@media (max-width: 860px) {
  .shop-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: .5rem 1rem;
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--green-dark);
    margin-bottom: .75rem;
    transition: all .15s;
  }
  .filter-toggle-btn:hover { border-color: var(--green-mid); color: var(--green-mid); }
  .filter-toggle-btn.active { background: var(--green-pale); border-color: var(--green-mid); color: var(--green-dark); }

  /* Sidebar hidden by default on mobile, slides in as drawer */
  .shop-sidebar {
    position: fixed !important;
    top: 0; left: -100%; bottom: 0;
    width: min(300px, 85vw);
    z-index: 500;
    background: #fff;
    overflow-y: auto;
    padding: 1.25rem;
    box-shadow: 4px 0 24px rgba(0,0,0,.15);
    transition: left .25s ease;
  }
  .shop-sidebar.filters-open {
    left: 0;
  }

  /* Overlay behind open drawer */
  body.filters-overlay::after {
    content: '';
    position: fixed; inset: 0; z-index: 499;
    background: rgba(0,0,0,.35);
  }
}

/* ── Mobile (≤640px) ─────────────────────────────────────── */
@media (max-width: 640px) {
  /* Hero buttons — smaller padding on mobile but never wrap */
  .hero-btn {
    padding: .65rem 1rem;
    font-size: .88rem;
    white-space: nowrap;
  }

  /* Product grid — already 2 cols, keep it */

  /* Plant care label shorter */
  .plant-care-row {
    grid-template-columns: 24px 90px 1fr;
    font-size: .82rem;
  }

  /* Cart toast smaller */
  .cart-toast { font-size: .8rem; padding: .5rem .75rem; }

  /* Section headings */
  .section-title { font-size: 1.2rem; }

  /* Cat card grid */
  .cat-card-grid { grid-template-columns: repeat(2, 1fr); }

  /* Testimonials and why — single column already handled */
}

/* ── Checkout form responsive ────────────────────────────── */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr !important; }
  .checkout-layout { gap: 1rem; }
}

/* ── Account pages ───────────────────────────────────────── */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ── Product detail page ─────────────────────────────────── */
@media (max-width: 640px) {
  .product-detail {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
    padding: 1rem 0;
  }
}

/* ── Nav touch targets ───────────────────────────────────── */
@media (max-width: 640px) {
  .nav-cart {
    padding: .4rem .75rem;
    font-size: .82rem;
  }
  .nav-mobile a { padding: .85rem 0; font-size: 1rem; }
}

/* ── Footer mobile ───────────────────────────────────────── */
@media (max-width: 640px) {
  .site-footer { padding: 2rem 1rem; margin-top: 2.5rem; }
  .footer-inner { gap: 1.25rem; }
}

/* ── Homepage sections mobile ────────────────────────────── */
@media (max-width: 640px) {
  .section { padding: 1.5rem 0; }
  .why-grid { grid-template-columns: 1fr; gap: 1rem; }
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* ── Mobile filter drawer close button ───────────────────── */
.filter-close-btn {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 860px) {
  .filter-close-btn { display: flex; }
}
