/* ── MOBILE FOUNDATION ─────────────────────────────────── */
html, body { overflow-x: hidden; }

/* Touch targets — WCAG 2.5.5: minimum 44×44px */
.btn                { min-height: 44px; }
.add-to-cart-btn    { min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; }
.filter-pill        { min-height: 40px; display: inline-flex; align-items: center; }
.sidebar-option     { min-height: 44px; }
.qty-btn            { min-height: 44px; width: 44px; }
.nav-toggle         { min-height: 44px; min-width: 44px; align-items: center; justify-content: center; }
.faq-q              { min-height: 52px; display: flex; align-items: center; }
.shape-tab          { min-height: 52px; }
.sort-select        { min-height: 44px; }

/* css/components.css — All reusable UI components */

/* ── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 14px 28px; border-radius: 4px; border: none;
  cursor: pointer; text-decoration: none;
  transition: all .2s var(--ease-out);
  white-space: nowrap; position: relative; overflow: hidden;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0); transition: background .2s;
}
.btn:hover::after { background: rgba(255,255,255,.08); }

.btn-primary { background: var(--amber); color: var(--soil); }
.btn-primary:hover { background: var(--gold); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,131,42,.35); }

.btn-secondary { background: var(--loam); color: var(--cream); border: 1px solid rgba(200,131,42,.2); }
.btn-secondary:hover { border-color: var(--amber); color: var(--gold); transform: translateY(-1px); }

.btn-outline { background: transparent; color: var(--cream); border: 1.5px solid rgba(250,245,236,.25); }
.btn-outline:hover { border-color: var(--amber); color: var(--amber); }

.btn-ghost { background: transparent; color: var(--amber); border: none; padding: 12px 0; }
.btn-ghost:hover { color: var(--gold); }

.btn-lg { padding: 18px 36px; font-size: 15px; }
.btn-sm { padding: 9px 18px; font-size: 12px; }

.btn-icon { gap: 6px; }
.btn-icon svg, .btn-icon .icon { font-size: 18px; }

/* ── PRODUCT CARDS ───────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bark);
  border: 1px solid rgba(200,131,42,.08);
  border-radius: 8px; overflow: hidden;
  transition: border-color .25s, transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.product-card:hover {
  border-color: rgba(200,131,42,.35);
  transform: translateY(-5px);
  box-shadow: 0 24px 56px rgba(0,0,0,.5);
}

.product-image {
  aspect-ratio: 4/3; overflow: hidden; position: relative;
  background: var(--humus);
  display: flex; align-items: center; justify-content: center;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease-out); }
.product-card:hover .product-image img { transform: scale(1.05); }
.product-image-placeholder { font-size: 56px; opacity: .4; }

.product-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 2px;
}
.badge-new    { background: var(--moss); color: #e8f5e0; }
.badge-sale   { background: var(--error); color: #fff; }
.badge-popular{ background: var(--amber); color: var(--soil); }
.badge-local  { background: var(--loam); color: var(--straw); border: 1px solid rgba(200,131,42,.3); }

.product-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.product-category {
  font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: var(--amber); margin-bottom: .375rem;
}
.product-name {
  font-family: var(--font-display); font-size: 18px; font-weight: 600;
  color: var(--white); margin-bottom: .3rem; line-height: 1.15;
}
.product-desc {
  font-size: 12px; color: var(--stone); line-height: 1.6;
  margin-bottom: .875rem; flex: 1;
}
.product-meta { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.product-tag {
  font-size: 11px; color: var(--gravel); background: var(--humus);
  padding: 3px 8px; border-radius: 2px; letter-spacing: .06em;
}

.product-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; }
.product-price-block {}
.product-price {
  font-family: var(--font-display); font-size: 26px; font-weight: 700;
  color: var(--gold); letter-spacing: -.01em; line-height: 1;
}
.product-price-note { font-size: 11px; color: var(--stone); margin-top: 2px; }

.add-to-cart-btn {
  background: var(--amber); color: var(--soil);
  border: none; border-radius: 4px;
  padding: 10px 16px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all .2s; white-space: nowrap;
  letter-spacing: .04em;
}
.add-to-cart-btn:hover { background: var(--gold); transform: scale(1.05); }

/* ── CATEGORY CARDS ──────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.category-card {
  background: var(--humus);
  border: 1px solid rgba(200,131,42,.1);
  border-radius: 8px; padding: 1.375rem 1.125rem;
  text-decoration: none; display: block;
  transition: all .25s; text-align: left; cursor: pointer;
}
.category-card:hover {
  border-color: var(--amber);
  background: var(--loam);
  transform: translateY(-3px);
}
.category-icon { font-size: 30px; margin-bottom: .75rem; display: block; }
.category-name {
  font-family: var(--font-display); font-size: 18px; font-weight: 600;
  color: var(--white); display: block; margin-bottom: 2px;
}
.category-count { font-size: 11px; color: var(--stone); }

/* ── FILTER PILLS ────────────────────────────────────── */
.filter-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 2rem; align-items: center; }
.filter-label { font-size: 12px; color: var(--gravel); font-weight: 500; }
.filter-pill {
  background: var(--humus); border: 1px solid rgba(200,131,42,.15);
  color: var(--stone); padding: 7px 16px; border-radius: 50px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .2s; letter-spacing: .04em; text-transform: uppercase;
}
.filter-pill:hover  { color: var(--cream); border-color: rgba(200,131,42,.4); }
.filter-pill.active { background: var(--amber); color: var(--soil); border-color: var(--amber); }

.sort-select {
  background: var(--humus); color: var(--stone);
  border: 1px solid rgba(200,131,42,.15); border-radius: 4px;
  padding: 7px 32px 7px 12px; font-size: 12px; font-family: var(--font-body);
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%238a7d6e' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  transition: border-color .2s;
}
.sort-select:hover, .sort-select:focus { outline: none; border-color: var(--amber); }

/* ── SEARCH BAR ──────────────────────────────────────── */
.search-bar {
  display: flex; gap: 0; max-width: 480px; width: 100%;
}
.search-input {
  flex: 1; background: var(--humus); border: 1px solid rgba(200,131,42,.2);
  border-right: none; color: var(--cream);
  padding: 11px 16px; font-size: 16px; font-family: var(--font-body);
  border-radius: 4px 0 0 4px; outline: none; transition: border-color .2s;
}
.search-input::placeholder { color: var(--gravel); }
.search-input:focus { border-color: var(--amber); }
.search-btn {
  background: var(--amber); color: var(--soil);
  border: none; padding: 0 18px; border-radius: 0 4px 4px 0;
  font-size: 18px; cursor: pointer; transition: background .2s; flex-shrink: 0;
}
.search-btn:hover { background: var(--gold); }

/* ── FORMS ───────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--stone); margin-bottom: .5rem;
}
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--humus);
  border: 1px solid rgba(200,131,42,.2);
  color: var(--cream); font-family: var(--font-body); font-size: 16px;
  padding: 12px 14px; border-radius: 4px; outline: none;
  transition: border-color .2s;
}
.form-input::placeholder { color: var(--gravel); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(200,131,42,.12);
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-select { appearance: none; cursor: pointer; }
.form-hint { font-size: 11px; color: var(--gravel); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-error { border-color: var(--error) !important; }
.field-error { font-size: 11px; color: #e06050; margin-top: 4px; }

/* Qty stepper */
.qty-stepper {
  display: flex; align-items: center; gap: 0;
  background: var(--humus); border: 1px solid rgba(200,131,42,.2);
  border-radius: 4px; overflow: hidden; width: fit-content;
}
.qty-btn {
  background: none; border: none; color: var(--stone);
  width: 40px; height: 40px; font-size: 20px; cursor: pointer;
  transition: all .2s; display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: var(--loam); color: var(--gold); }
.qty-input {
  width: 56px; background: none; border: none;
  color: var(--white); font-size: 16px; font-weight: 600;
  text-align: center; padding: 0; outline: none;
}

/* ── TRUST BADGES ────────────────────────────────────── */
.trust-bar {
  background: var(--amber); padding: .75rem 1.5rem;
}
.trust-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap;
}
.trust-item {
  display: flex; align-items: center; gap: 7px;
  color: var(--soil); font-size: 12px; font-weight: 700;
}
.trust-item .ti-icon { font-size: 18px; }

/* ── TESTIMONIAL CARDS ───────────────────────────────── */
.testimonial-card {
  background: var(--bark); border: 1px solid rgba(200,131,42,.1);
  border-radius: 8px; padding: 1.375rem;
}
.stars { color: var(--amber); font-size: 13px; letter-spacing: 2px; margin-bottom: .75rem; }
.testimonial-text {
  font-family: var(--font-display); font-size: 15px; font-style: italic;
  color: var(--cream); line-height: 1.6; margin-bottom: 1rem;
}
.testimonial-author { font-size: 12px; color: var(--stone); font-weight: 600; letter-spacing: .06em; }

/* ── CALCULATOR WIDGET ───────────────────────────────── */
.calculator-card {
  background: var(--bark); border: 1px solid rgba(200,131,42,.15);
  border-radius: 10px; padding: 2rem; overflow: hidden;
}
.calc-result {
  background: var(--humus); border-radius: 6px;
  padding: 1.5rem; margin-top: 1.5rem; text-align: center;
}
.calc-result-value {
  font-family: var(--font-display); font-size: 52px; font-weight: 700;
  color: var(--gold); line-height: 1; letter-spacing: -.02em;
}
.calc-result-unit { font-size: 13px; color: var(--stone); margin-top: 4px; }
.calc-tabs {
  display: flex; gap: 0; margin-bottom: 1.5rem;
  background: var(--humus); border-radius: 6px; padding: 4px;
}
.calc-tab {
  flex: 1; padding: 8px; border-radius: 4px; border: none;
  background: none; color: var(--stone); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .2s; letter-spacing: .04em;
  text-transform: uppercase;
}
.calc-tab.active { background: var(--amber); color: var(--soil); }

/* ── DELIVERY MAP / ZONE DISPLAY ─────────────────────── */
.delivery-zone {
  background: var(--humus); border: 1px solid rgba(200,131,42,.1);
  border-radius: 8px; padding: 1.5rem; transition: border-color .2s;
}
.delivery-zone:hover { border-color: rgba(200,131,42,.3); }
.zone-name { font-size: 16px; font-weight: 600; color: var(--white); margin-bottom: .25rem; }
.zone-price { font-family: var(--font-display); font-size: 28px; color: var(--gold); margin-bottom: .5rem; }
.zone-desc  { font-size: 12px; color: var(--stone); line-height: 1.6; }
.zone-badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 2px; margin-bottom: .75rem;
}
.zone-free   { background: rgba(74,92,56,.3); color: #8fc870; }
.zone-local  { background: rgba(200,131,42,.2); color: var(--amber); }
.zone-region { background: rgba(90,61,34,.4); color: var(--straw); }

/* ── CHAT WIDGET ─────────────────────────────────────── */
.chat-launcher {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 500;
}
.chat-launcher-btn {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--amber); color: var(--soil);
  border: none; font-size: 24px; cursor: pointer;
  box-shadow: 0 8px 32px rgba(200,131,42,.4);
  transition: all .3s var(--ease-out);
  display: flex; align-items: center; justify-content: center;
}
.chat-launcher-btn:hover { transform: scale(1.1); background: var(--gold); }
.chat-unread {
  position: absolute; top: -4px; right: -4px;
  background: var(--error); color: #fff;
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--soil);
}

.chat-window {
  position: fixed; bottom: 6rem; right: 2rem; z-index: 500;
  /* SP-023 enhancement: the order-number field added a row to the
     prechat form; was 500px, bumped to 580px so the form fits without
     a scroll-within-scroll. Capped to viewport so it never overflows
     short laptops. */
  width: 360px; height: min(580px, calc(100vh - 8rem));
  background: var(--bark); border: 1px solid rgba(200,131,42,.2);
  border-radius: 12px; box-shadow: 0 24px 80px rgba(0,0,0,.6);
  display: flex; flex-direction: column;
  transform: scale(.9) translateY(20px); opacity: 0;
  pointer-events: none; transform-origin: bottom right;
  transition: all .3s var(--ease-out);
}
.chat-window.open {
  transform: scale(1) translateY(0); opacity: 1; pointer-events: all;
}

.chat-header {
  background: var(--humus); border-bottom: 1px solid rgba(200,131,42,.15);
  padding: 1rem 1.25rem; border-radius: 12px 12px 0 0;
  display: flex; align-items: center; gap: .75rem;
}
.chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--amber); color: var(--soil);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.chat-header-info { flex: 1; }
.chat-header-name { font-size: 13px; font-weight: 700; color: var(--white); }
.chat-header-status { font-size: 11px; color: var(--sage); }
.chat-header-status::before {
  content: '●'; font-size: 11px; margin-right: 4px;
}
.chat-close-btn {
  background: none; border: none; color: var(--gravel);
  font-size: 20px; cursor: pointer; padding: 4px;
  transition: color .2s;
}
.chat-close-btn:hover { color: var(--cream); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 1.25rem;
  display: flex; flex-direction: column; gap: 1rem;
  scrollbar-width: thin; scrollbar-color: var(--clay) transparent;
}
.chat-msg { display: flex; gap: .625rem; align-items: flex-end; }
.chat-msg.from-user { flex-direction: row-reverse; }
.msg-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--humus); display: flex; align-items: center;
  justify-content: center; font-size: 14px;
}
.msg-bubble {
  max-width: 76%; padding: 10px 14px; border-radius: 16px;
  font-size: 13px; line-height: 1.5;
}
.chat-msg.from-agent .msg-bubble {
  background: var(--humus); color: var(--cream);
  border-radius: 4px 16px 16px 16px;
}
.chat-msg.from-user .msg-bubble {
  background: var(--amber); color: var(--soil);
  border-radius: 16px 4px 16px 16px; font-weight: 500;
}
.msg-time { font-size: 11px; color: var(--gravel); margin-top: 3px; text-align: right; }

.chat-input-area {
  padding: .875rem 1.25rem; border-top: 1px solid rgba(200,131,42,.1);
}
.chat-input-row { display: flex; gap: .5rem; }
.chat-input {
  flex: 1; background: var(--humus); border: 1px solid rgba(200,131,42,.15);
  color: var(--cream); font-size: 16px; font-family: var(--font-body);
  padding: 10px 14px; border-radius: 50px; outline: none;
  transition: border-color .2s;
}
.chat-input::placeholder { color: var(--gravel); }
.chat-input:focus { border-color: var(--amber); }
.chat-send-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--amber); color: var(--soil);
  border: none; font-size: 16px; cursor: pointer;
  transition: all .2s; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--gold); transform: scale(1.1); }
.chat-powered { font-size: 11px; color: var(--clay); text-align: center; margin-top: .5rem; }

/* ── SP-023 additions: system messages + prechat + offline panels ────── */
.chat-msg.from-system { justify-content: center; }
.chat-msg.from-system .msg-avatar { background: transparent; font-size: 16px; }
.chat-msg.from-system .msg-bubble {
  background: rgba(200,131,42,.08); color: var(--stone);
  font-style: italic; font-size: 12.5px;
  border: 1px dashed rgba(200,131,42,.25); border-radius: 12px;
}

.chat-prechat { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }
.chat-prechat-intro {
  color: var(--stone); font-size: 13px; line-height: 1.5;
  margin: 0 0 1rem;
}
#chat-prechat-form label {
  display: block; color: var(--stone); font-size: 12px;
  margin-bottom: .75rem;
}
#chat-prechat-form label small { color: var(--gravel); font-weight: 400; }
#chat-prechat-form input,
#chat-prechat-form textarea {
  display: block; width: 100%; margin-top: 4px;
  background: var(--humus); border: 1px solid rgba(200,131,42,.15);
  color: var(--cream); font-size: 14px; font-family: var(--font-body);
  padding: 8px 12px; border-radius: 8px; outline: none;
  transition: border-color .2s; box-sizing: border-box;
}
#chat-prechat-form textarea { resize: vertical; min-height: 60px; }
#chat-prechat-form input:focus,
#chat-prechat-form textarea:focus { border-color: var(--amber); }
.chat-prechat-submit {
  width: 100%; padding: 10px 14px; background: var(--amber);
  color: var(--soil); border: none; border-radius: 50px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: var(--font-body); transition: background .2s;
}
.chat-prechat-submit:hover { background: var(--gold); }
.chat-prechat-error {
  margin-top: .75rem; padding: 8px 12px; border-radius: 8px;
  background: rgba(220,53,69,.12); color: #ff8a96;
  font-size: 12px;
}

.chat-offline {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 2rem 1.5rem; gap: 1rem;
}
.chat-offline-icon { font-size: 36px; opacity: .6; }
.chat-offline-msg {
  color: var(--stone); font-size: 13px; line-height: 1.5;
  margin: 0; max-width: 280px;
}
.chat-offline-btn {
  display: inline-block; padding: 10px 18px; background: var(--amber);
  color: var(--soil); border-radius: 50px; text-decoration: none;
  font-size: 13px; font-weight: 600; transition: background .2s;
}
.chat-offline-btn:hover { background: var(--gold); }

/* ── CART DRAWER ─────────────────────────────────────── */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100%;
  background: var(--bark); z-index: 201; box-shadow: -24px 0 80px rgba(0,0,0,.6);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .35s var(--ease-out);
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(200,131,42,.1);
  display: flex; align-items: center; justify-content: space-between;
}
.cart-drawer-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.cart-drawer-close {
  background: none; border: none; color: var(--stone);
  font-size: 24px; cursor: pointer; transition: color .2s;
}
.cart-drawer-close:hover { color: var(--cream); }

.cart-items { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; }
.cart-item {
  display: flex; gap: 1rem; padding: 1rem 0;
  border-bottom: 1px solid rgba(200,131,42,.08);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-image {
  width: 72px; height: 72px; border-radius: 6px;
  background: var(--humus); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; overflow: hidden;
}
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 3px; }
.cart-item-variant { font-size: 11px; color: var(--stone); margin-bottom: .5rem; }
.cart-item-price { font-family: var(--font-display); font-size: 18px; color: var(--gold); }
.cart-item-remove {
  background: none; border: none; color: var(--gravel);
  font-size: 16px; cursor: pointer; padding: 2px; align-self: flex-start;
  transition: color .2s;
}
.cart-item-remove:hover { color: var(--error); }

.cart-footer {
  padding: 1.25rem 1.5rem; border-top: 1px solid rgba(200,131,42,.1);
}
.cart-subtotal {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem;
}
.cart-subtotal-label { font-size: 13px; color: var(--stone); }
.cart-subtotal-value {
  font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--gold);
}
.cart-note {
  font-size: 11px; color: var(--gravel); margin-bottom: 1rem; line-height: 1.5;
}
.btn-checkout {
  width: 100%; background: var(--amber); color: var(--soil);
  border: none; padding: 16px; border-radius: 4px;
  font-size: 15px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  cursor: pointer; transition: all .2s;
}
.btn-checkout:hover { background: var(--gold); }
.cart-empty {
  text-align: center; padding: 3rem 1.5rem; color: var(--stone);
}
.cart-empty-icon { font-size: 48px; margin-bottom: 1rem; opacity: .4; }

/* ── TOAST NOTIFICATIONS ─────────────────────────────── */
.toast-container {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: .5rem;
  pointer-events: none;
}
.toast {
  background: var(--bark); border: 1px solid rgba(200,131,42,.3);
  border-radius: 8px; padding: .875rem 1.25rem;
  font-size: 13px; font-weight: 500; color: var(--cream);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  display: flex; align-items: center; gap: 10px;
  animation: fadeUp .3s var(--ease-out) both;
  min-width: 260px; max-width: 360px;
}
.toast.success { border-color: rgba(74,92,56,.6); }
.toast.error   { border-color: rgba(184,64,48,.5); }
.toast-icon { font-size: 18px; flex-shrink: 0; }

/* ── LOADING STATES ──────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--humus) 25%, var(--loam) 50%, var(--humus) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  background: var(--bark); border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(200,131,42,.06);
}
.loading-spinner {
  width: 32px; height: 32px; border: 3px solid rgba(200,131,42,.2);
  border-top-color: var(--amber); border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── EMPTY STATE ─────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 4rem 2rem; color: var(--stone);
}
.empty-state-icon { font-size: 56px; margin-bottom: 1rem; opacity: .3; }
.empty-state h3 { font-size: 22px; margin-bottom: .5rem; color: var(--stone); }
.empty-state p { font-size: 13px; line-height: 1.6; }

/* ── SECTION DIVIDER ─────────────────────────────────── */
.divider {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,131,42,.2), transparent);
  margin: 0;
}

/* ── RESPONSIVE COMPONENTS ───────────────────────────── */
@media (max-width: 768px) {
  .trust-inner { gap: 1.5rem; justify-content: flex-start; }
  /* SP-023 enhancement: the order-number field added a row to the
     pre-chat form. On any viewport that uses the full-width chat
     window (≤768px) the form now overflows the fixed 500px height —
     grow it to fit, capped so the launcher + safe area remain clear. */
  .chat-window { right: 1rem; left: 1rem; width: auto; height: min(580px, calc(100dvh - 7rem)); }
  .cart-drawer { width: 100%; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .chat-launcher { bottom: 1rem; right: 1rem; }
}


/* ── MOBILE-SPECIFIC OVERRIDES ─────────────────────────── */

/* Pre-checkout modal: slide up from bottom on mobile (sheet pattern) */
@media (max-width: 480px) {
  #pre-checkout-modal {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  #pre-checkout-modal > div {
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
    position: relative !important;
    max-height: 92dvh !important;
    overflow-y: auto !important;
  }
}

/* Product modal: full-screen bottom sheet on mobile */
@media (max-width: 600px) {
  .product-modal-overlay { align-items: flex-end; padding: 0; }
  .product-modal {
    grid-template-columns: 1fr !important;
    border-radius: 16px 16px 0 0;
    max-height: 92dvh; overflow-y: auto;
    width: 100%;
  }
  .modal-image { border-radius: 16px 16px 0 0; aspect-ratio: 16/9; }
  .modal-close { top: .75rem; right: .75rem; }
}

/* Cart drawer: safe area for iPhone home bar */
@media (max-width: 480px) {
  .cart-footer {
    padding-bottom: max(1.25rem, calc(env(safe-area-inset-bottom, 0px) + 1rem));
  }
  .cart-item-name { font-size: 14px; }
}

/* Chat: safe area + don't overlap thumb zone */
@media (max-width: 480px) {
  .chat-launcher {
    bottom: max(1.25rem, calc(env(safe-area-inset-bottom, 0px) + 1rem));
    right: 1rem;
  }
  .chat-window {
    /* Safe-area-aware bottom + side margins for iPhones with home bar.
       Height override lives in the ≤768px rule above (same effect). */
    bottom: max(5.5rem, calc(env(safe-area-inset-bottom, 0px) + 5.5rem));
    right: 1rem; left: 1rem; width: auto;
  }
}

/* Announce bar: wrap on very small screens */
@media (max-width: 360px) {
  .announce-bar { font-size: 11px; padding: 7px .75rem; }
}

/* Shop sidebar: hide on mobile, toggled by JS */
@media (max-width: 900px) {
  .shop-sidebar { display: none; }
  .shop-sidebar.open {
    display: block;
    background: var(--bark);
    border: 1px solid rgba(200,131,42,.15);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

/* Filter pills: horizontal scroll on mobile instead of wrapping everywhere */
@media (max-width: 600px) {
  .filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-pill { flex-shrink: 0; }
}

/* Calculator layout: full-width on mobile */
@media (max-width: 860px) {
  .calc-page { grid-template-columns: 1fr; gap: 2rem; }
  .calc-result-section { position: static; }
  .material-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .material-grid { grid-template-columns: repeat(2, 1fr); }
  .calc-page { padding: 2rem 1rem; }
}

/* Contact form rows: stack on mobile */
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* Hero stats: 2 columns on mobile */
@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
}

/* ════════════════════════════════════════════════════════
   MOBILE OPTIMISATION — reduces scroll depth and improves
   thumb reachability on all phones.
   Target: 375px (iPhone SE) to 430px (iPhone 15 Pro Max)
   ════════════════════════════════════════════════════════ */

/* ── Tighter section padding on mobile ──────────────────── */
/* base.css defines --section-pad: clamp(2rem,4.5vw,3.75rem)
   On phones that resolves to 2rem. We pull it tighter.     */
@media (max-width: 600px) {
  .section { padding: 1.5rem 1rem; }
  .section-header { margin-bottom: 1.125rem; }
  .section-inner  { padding: 0; }
}

/* ── Hero: much shorter on mobile ───────────────────────── */
/* 72vh on a 812px iPhone = 585px just for the hero.
   Mobile hero should be content-driven, not viewport-driven. */
@media (max-width: 860px) {
  .hero {
    min-height: 0 !important;   /* remove the vh floor entirely */
  }
  .hero-content {
    padding: 2.25rem 1rem 2rem !important;
  }
  .hero-body { font-size: 14px; margin-bottom: 1.25rem; }
  .hero-actions { gap: .625rem; margin-bottom: 1.25rem; }
  /* Stats row: 2-up instead of wrapping all over */
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .875rem 1.5rem;
    padding-top: 1.125rem;
  }
  .hero-stat-value { font-size: 22px; }
  .hero-stat-label { font-size: 10px; }
}

/* ── Products section ────────────────────────────────────── */
@media (max-width: 600px) {
  /* 2-col grid, tighter gap */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
  }
  .product-body { padding: .75rem; }
  .product-name { font-size: 14px; }
  .product-price { font-size: 20px; }
  .product-desc { display: none; } /* hidden — saves huge height per card */
  .add-to-cart-btn { font-size: 11px; padding: 8px 10px; }
  .product-footer { flex-direction: column; gap: .5rem; align-items: flex-start; }
  .product-image { aspect-ratio: 3/2; }  /* shorter image */
}
@media (max-width: 380px) {
  /* Very small phones: 1 col */
  .product-grid { grid-template-columns: 1fr; }
}

/* ── Category grid ───────────────────────────────────────── */
@media (max-width: 600px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
  }
  .category-card { padding: .875rem .625rem; }
  .category-icon { font-size: 22px; margin-bottom: .5rem; }
  .category-name { font-size: 13px; }
  .category-count { display: none; }
}
@media (max-width: 380px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Steps / How it works ────────────────────────────────── */
@media (max-width: 860px) {
  .steps-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}
@media (max-width: 500px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: .75rem;
  }
  .step-card {
    display: flex; align-items: flex-start; gap: 1rem;
    text-align: left; padding: 1rem .5rem;
  }
  .step-num {
    width: 40px; height: 40px; font-size: 18px;
    margin: 0; flex-shrink: 0;
    box-shadow: 0 0 0 4px rgba(200,131,42,.12);
  }
  .step-title { font-size: 15px; margin-bottom: .2rem; }
  .step-body  { font-size: 12px; }
}

/* ── Testimonials ────────────────────────────────────────── */
@media (max-width: 860px) {
  /* Horizontal scroll instead of 3→1 stacking */
  .testimonials-grid {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: .875rem;
    padding-bottom: .5rem;
    /* Negative margin to bleed to screen edge */
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .testimonials-grid::-webkit-scrollbar { display: none; }
  .testimonial-card {
    min-width: 280px;
    flex-shrink: 0;
  }
}

/* ── Calculator band ─────────────────────────────────────── */
@media (max-width: 600px) {
  .calc-band { padding: 1.5rem 1rem; }
  .calc-band-inner { gap: 1rem; }
  .calc-mini-fields { gap: .5rem; }
  .calc-cta-result { padding: 1rem 1.25rem; }
  .calc-cta-result-val { font-size: 36px; }
  /* Hide the calculator band entirely on very small — link to calc page instead */
  @media (max-width: 380px) {
    .calc-mini-fields { display: none; }
  }
}

/* ── CTA section ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .cta-section { padding: 2.25rem 1rem; }
  .cta-section p { margin: .5rem 0 1.25rem; }
  .cta-section .btn { width: 100%; justify-content: center; }
}

/* ── Feature banner ──────────────────────────────────────── */
@media (max-width: 600px) {
  .feature-banner {
    padding: 1.25rem;
    margin-top: 1.5rem;
  }
  .feature-banner h3 { font-size: 18px; }
}

/* ── Section header row ──────────────────────────────────── */
@media (max-width: 600px) {
  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: .625rem;
    margin-bottom: 1rem;
  }
}

/* ── Footer: tighter on mobile ───────────────────────────── */
@media (max-width: 768px) {
  .site-footer { padding: 2rem 1rem 1.25rem; }
  .footer-top  { gap: 1.5rem; margin-bottom: 1.5rem; }
  .footer-bottom { padding-top: 1rem; gap: .625rem; }
  .footer-brand p { max-width: none; }
  /* Collapse footer columns into 2-col then 1-col */
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; gap: 1.25rem; }
  /* Hide secondary footer columns on very small — keep brand + hours */
  .footer-col:not(.footer-hours) ul { columns: 2; column-gap: 1rem; }
}

/* ── Header: safe area top ───────────────────────────────── */
@media (max-width: 768px) {
  .announce-bar { position: sticky; top: 0; z-index: 201; }
  .site-header  { top: 36px; }   /* sit below announce bar */
  .header-inner { height: 56px; padding: 0 1rem; }
  .header-logo-img { height: 40px; }
}

/* ── Shop page: full-width on mobile ─────────────────────── */
@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr !important;
  }
  /* Compact filter bar */
  .shop-controls {
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
  }
  .search-bar { max-width: none; }
}

/* ── Delivery page: zones ────────────────────────────────── */
@media (max-width: 600px) {
  /* 4-col stats → 2×2 */
  .delivery-stats-grid,
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: 1fr 1fr !important;
    gap: .75rem;
  }
  .delivery-zone { padding: 1rem; }
  .zone-price { font-size: 22px; }
}

/* ── Contact page ────────────────────────────────────────── */
@media (max-width: 600px) {
  .contact-layout {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
}

/* ── Calculator page ─────────────────────────────────────── */
@media (max-width: 600px) {
  .calc-page {
    gap: 1.25rem;
    padding: 1.5rem 1rem !important;
  }
  .calculator-card { padding: 1.25rem; }
  .calc-result-value { font-size: 40px; }
  /* Shape tabs: full-width */
  .shape-tab { font-size: 11px; padding: 8px 6px; }
}

/* ── Typography: mobile scaling ──────────────────────────── */
@media (max-width: 480px) {
  .display-xl { font-size: clamp(36px, 10vw, 52px); }
  .display-lg { font-size: clamp(28px, 8vw, 40px); }
  .display-md { font-size: clamp(22px, 6vw, 32px); }
  h2 { font-size: clamp(20px, 5.5vw, 28px); }
  h3 { font-size: clamp(17px, 4.5vw, 22px); }
}

/* ── Prevent scroll bounce from showing white gaps ──────── */
html { background: var(--soil); }

/* ── Checkout: safe area bottom ──────────────────────────── */
@media (max-width: 600px) {
  .checkout-sticky-footer,
  .order-summary-sticky {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* ── Misc touch improvements ─────────────────────────────── */
@media (hover: none) {
  /* Remove hover transforms on touch — they get stuck */
  .product-card:hover  { transform: none; box-shadow: none; }
  .category-card:hover { transform: none; }
  .btn-primary:hover   { transform: none; box-shadow: none; }
  .btn-cart:hover      { transform: none; }
  /* Tap highlight */
  .btn, .product-card, .category-card, .filter-pill,
  .add-to-cart-btn, .btn-cart {
    -webkit-tap-highlight-color: rgba(200,131,42,.2);
  }
}

/* ── iOS Safari viewport height fix ──────────────────────── */
/* Prevents bottom bar from causing layout shifts */
@supports (height: 100dvh) {
  .mobile-nav { height: 100dvh; }
}
