/* =========================================================
   AVO – Phase 1: Branding & Responsive UI
   Design tokens
   ========================================================= */
:root {
  --green-700: #0b6b34;
  --green-600: #0f7a3d;
  --green-500: #16a34a;
  --green-100: #e7f5ec;
  --green-50: #f2faf5;
  --accent: #f59e0b;
  --accent-100: #fef3c7;
  --text: #1c1f1d;
  --text-muted: #5b625e;
  --border: #e6e9e7;
  --surface: #ffffff;
  --surface-alt: #f6f7f5;
  --danger: #dc2626;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 20, 0.06);
  --shadow: 0 6px 20px rgba(16, 24, 20, 0.08);
  --shadow-lg: 0 20px 50px rgba(16, 24, 20, 0.18);

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 1200px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

body.no-scroll {
  overflow: hidden;
}

img,
svg {
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

:focus-visible {
  outline: 3px solid var(--green-500);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--green-600);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.1s, border-color 0.2s, color 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--green-600);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--green-700);
}

.btn-outline {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--green-600);
  color: var(--green-700);
}

.btn-accent {
  background: var(--accent);
  color: #1c1f1d;
}

.btn-accent:hover {
  background: #e08e06;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  transition: border-color 0.2s, background 0.2s;
}

.icon-btn:hover {
  border-color: var(--green-600);
  background: var(--green-50);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #1c1f1d;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.badge[hidden] {
  display: none;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-mark {
  width: 40px;
  height: 40px;
}

.logo-text {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--green-700);
}

.location-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 0;
  background: transparent;
  padding: 4px 8px;
  border-radius: 10px;
  text-align: left;
  max-width: 220px;
}

.location-btn:hover {
  background: var(--surface-alt);
}

.location-eta {
  font-size: 0.95rem;
  font-weight: 800;
}

.location-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.location-label svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.search {
  order: 3;
  flex: 1 1 100%;
  position: relative;
}

.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  padding: 0 14px 0 42px;
  font-size: 0.95rem;
  transition: border-color 0.2s, background 0.2s;
}

.search input:focus {
  outline: none;
  border-color: var(--green-600);
  background: #fff;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-btn .label {
  display: none;
}

/* =========================================================
   Hero / banners
   ========================================================= */
.hero {
  padding: 20px 0 8px;
}

.hero-grid {
  display: grid;
  gap: 14px;
}

.banner {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 24px;
  overflow: hidden;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.banner-main {
  background: linear-gradient(135deg, var(--green-600), var(--green-700));
  color: #fff;
  min-height: 220px;
}

.banner-main::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.banner-main h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 520px;
}

.banner-main p {
  margin: 0;
  opacity: 0.9;
  max-width: 440px;
}

.banner-main .btn {
  align-self: flex-start;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.16);
  padding: 6px 10px;
  border-radius: 999px;
}

.eyebrow svg {
  width: 14px;
  height: 14px;
}

.banner-side {
  background: var(--accent-100);
}

.banner-side.alt {
  background: var(--green-100);
}

.banner-side h2 {
  margin: 0;
  font-size: 1.2rem;
}

.banner-side p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-700);
}

.banner-icon svg {
  width: 22px;
  height: 22px;
}

/* =========================================================
   Sections
   ========================================================= */
.section {
  padding: 28px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.section-head p {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.link-btn {
  border: 0;
  background: none;
  color: var(--green-600);
  font-weight: 700;
  padding: 6px 4px;
  white-space: nowrap;
}

.link-btn:hover {
  color: var(--green-700);
  text-decoration: underline;
}

/* Categories */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
  border-color: var(--green-500);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.category-card[aria-pressed="true"] {
  border-color: var(--green-600);
  background: var(--green-50);
}

.category-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-icon svg {
  width: 26px;
  height: 26px;
}

.category-name {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
}

/* Toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.toolbar .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.toolbar select {
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0 10px;
  font-size: 0.9rem;
  color: var(--text);
  min-width: 150px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-700);
  font-weight: 700;
  font-size: 0.82rem;
  border: 0;
  align-self: flex-end;
  height: 40px;
}

.chip svg {
  width: 14px;
  height: 14px;
}

.result-count {
  margin-left: auto;
  align-self: flex-end;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding-bottom: 10px;
}

/* Product grid & rails */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.product-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 1fr);
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.product-rail > * {
  scroll-snap-align: start;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
  transition: box-shadow 0.2s, border-color 0.2s;
  min-width: 0;
}

.product-card:hover {
  box-shadow: var(--shadow);
  border-color: transparent;
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border: 0;
  width: 100%;
  padding: 0;
}

.product-media svg {
  width: 44%;
  height: 44%;
  opacity: 0.85;
}

.discount-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--green-600);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
}

.wish-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  z-index: 1;
}

.wish-btn svg {
  width: 17px;
  height: 17px;
}

.wish-btn[aria-pressed="true"] {
  color: var(--danger);
}

.wish-btn[aria-pressed="true"] svg {
  fill: currentColor;
}

.eta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-alt);
  border-radius: 6px;
  padding: 2px 6px;
  align-self: flex-start;
  margin-bottom: 6px;
}

.eta-tag svg {
  width: 12px;
  height: 12px;
}

.product-brand {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.product-name {
  margin: 2px 0 2px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.product-pack {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.product-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.price {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.price strong {
  font-size: 0.98rem;
}

.price s {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.add-btn {
  min-width: 72px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--green-600);
  background: var(--green-50);
  color: var(--green-700);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0 12px;
  transition: background 0.2s, color 0.2s;
}

.add-btn:hover:not(:disabled) {
  background: var(--green-600);
  color: #fff;
}

.add-btn:disabled {
  border-color: var(--border);
  background: var(--surface-alt);
  color: var(--text-muted);
  cursor: not-allowed;
}

.qty {
  display: inline-flex;
  align-items: center;
  height: 36px;
  border-radius: 10px;
  background: var(--green-600);
  color: #fff;
  overflow: hidden;
}

.qty button {
  width: 30px;
  height: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty button:hover {
  background: var(--green-700);
}

.qty button svg {
  width: 14px;
  height: 14px;
}

.qty span {
  min-width: 22px;
  text-align: center;
  font-weight: 800;
  font-size: 0.88rem;
}

.out-of-stock .product-media {
  filter: grayscale(1);
  opacity: 0.6;
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}

.empty-state svg {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  color: var(--green-600);
}

.empty-state h3 {
  margin: 0 0 4px;
  color: var(--text);
}

.empty-state p {
  margin: 0 0 14px;
}

/* Skeleton loader */
.skeleton {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 10px;
}

.skeleton .sk {
  background: linear-gradient(90deg, #eef0ef 25%, #f7f8f7 50%, #eef0ef 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 8px;
}

.skeleton .sk-media {
  aspect-ratio: 1 / 1;
  margin-bottom: 10px;
}

.skeleton .sk-line {
  height: 12px;
  margin-bottom: 8px;
}

.skeleton .sk-line.short {
  width: 60%;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Info strip */
.info-grid {
  display: grid;
  gap: 12px;
}

.info-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.info-card .banner-icon {
  flex-shrink: 0;
}

.info-card h3 {
  margin: 0 0 2px;
  font-size: 1rem;
}

.info-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* How it works */
.steps {
  display: grid;
  gap: 12px;
  counter-reset: step;
  padding: 0;
  margin: 0;
  list-style: none;
}

.steps li {
  position: relative;
  padding: 18px 18px 18px 64px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green-600);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps h3 {
  margin: 0 0 2px;
  font-size: 1rem;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Contact */
.contact-card {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--green-50);
  border: 1px solid var(--green-100);
}

.contact-card h2 {
  margin: 0 0 4px;
}

.contact-card p {
  margin: 0;
  color: var(--text-muted);
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.contact-list svg {
  width: 18px;
  height: 18px;
  color: var(--green-600);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Footer */
.site-footer {
  margin-top: 32px;
  background: #101512;
  color: #c9d1cc;
  padding: 40px 0 24px;
}

.footer-grid {
  display: grid;
  gap: 28px;
}

.site-footer .logo-text {
  color: #fff;
}

.site-footer p {
  margin: 10px 0 0;
  font-size: 0.9rem;
  max-width: 320px;
}

.site-footer h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 0.95rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

/* =========================================================
   Mobile sticky cart bar
   ========================================================= */
.cart-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--green-600);
  color: #fff;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  transform: translateY(140%);
  transition: transform 0.25s ease;
  text-align: left;
}

.cart-bar.visible {
  transform: translateY(0);
}

.cart-bar small {
  display: block;
  opacity: 0.85;
  font-size: 0.78rem;
}

.cart-bar strong {
  font-size: 1rem;
}

.cart-bar .go {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
}

.cart-bar svg {
  width: 18px;
  height: 18px;
}

/* =========================================================
   Overlays: drawer + modal
   ========================================================= */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(16, 21, 18, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  width: min(420px, 100%);
  background: var(--surface-alt);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: var(--shadow-lg);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.drawer-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.panel {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
  border-bottom: 0;
}

.cart-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-thumb svg {
  width: 26px;
  height: 26px;
}

.cart-info {
  min-width: 0;
}

.cart-info .name {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-info .meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cart-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.cart-right .line-total {
  font-weight: 800;
  font-size: 0.9rem;
}

.remove-btn {
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0;
}

.remove-btn:hover {
  color: var(--danger);
  text-decoration: underline;
}

.bill-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 4px 0;
  color: var(--text-muted);
}

.bill-row.total {
  border-top: 1px dashed var(--border);
  margin-top: 6px;
  padding-top: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1rem;
}

.free {
  color: var(--green-600);
  font-weight: 700;
}

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
  padding: 12px;
  border-radius: 12px;
  background: var(--accent-100);
  color: #7c4a03;
}

.notice svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.notice.success {
  background: var(--green-100);
  color: var(--green-700);
}

.notice.error {
  background: #fde8e8;
  color: #9b1c1c;
}

.drawer-foot {
  padding: 16px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
}

.modal {
  position: fixed;
  z-index: 70;
  left: 50%;
  top: 50%;
  width: min(440px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, -46%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s, opacity 0.2s;
}

.modal.open {
  transform: translate(-50%, -50%);
  opacity: 1;
  pointer-events: auto;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.modal-head p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.modal-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.form {
  display: grid;
  gap: 12px;
}

.form label {
  font-size: 0.85rem;
  font-weight: 700;
}

.input-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.input-group:focus-within {
  border-color: var(--green-600);
}

.input-group .prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--surface-alt);
  font-weight: 700;
  border-right: 1px solid var(--border);
}

.input-group input,
.form input.input {
  flex: 1;
  height: 46px;
  border: 0;
  padding: 0 12px;
  font-size: 1rem;
  outline: none;
  min-width: 0;
}

.form input.input {
  border: 1px solid var(--border);
  border-radius: 12px;
}

.form input.input:focus {
  border-color: var(--green-600);
}

.field-error {
  color: var(--danger);
  font-size: 0.8rem;
  min-height: 1em;
  margin: -4px 0 0;
}

.fine-print {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

/* Product detail modal */
.detail {
  display: grid;
  gap: 16px;
}

.detail .product-media {
  margin: 0;
}

.detail h2 {
  margin: 0;
  font-size: 1.3rem;
}

.detail-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.detail-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-700);
  align-self: flex-start;
}

.stock-pill.out {
  background: #fde8e8;
  color: #9b1c1c;
}

/* Toast */
.toast-region {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  width: min(360px, calc(100% - 24px));
  pointer-events: none;
}

.toast {
  background: #101512;
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.2s ease;
}

.toast svg {
  width: 18px;
  height: 18px;
  color: #4ade80;
  flex-shrink: 0;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Location options */
.location-options {
  display: grid;
  gap: 10px;
}

.location-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  width: 100%;
}

.location-option:hover,
.location-option[aria-pressed="true"] {
  border-color: var(--green-600);
  background: var(--green-50);
}

.location-option svg {
  width: 20px;
  height: 20px;
  color: var(--green-600);
  flex-shrink: 0;
}

.location-option strong {
  display: block;
  font-size: 0.92rem;
}

.location-option span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (min-width: 560px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .login-btn .label {
    display: inline;
  }

  .login-btn.btn {
    padding: 10px 14px;
  }
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .banner-main {
    grid-row: span 2;
    padding: 36px;
  }

  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-card {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    padding: 32px;
  }

  .footer-grid {
    grid-template-columns: 1.5fr repeat(3, 1fr);
  }

  .detail {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .modal.wide {
    width: min(760px, calc(100% - 24px));
  }

  .cart-bar {
    display: none;
  }

  .toast-region {
    bottom: 24px;
  }
}

@media (min-width: 960px) {
  .search {
    order: 0;
    flex: 1 1 auto;
    max-width: 560px;
  }

  .header-actions {
    margin-left: 0;
  }

  .product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .product-rail {
    grid-auto-columns: calc((100% - 48px) / 5);
  }

  .info-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(10, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}


/* =========================================================
   Checkout Modal Styles
   ========================================================= */
.payment-options {
  display: grid;
  gap: 10px;
}

.payment-option {
  display: flex;
  cursor: pointer;
}

.payment-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: 12px;
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
}

.payment-label svg {
  width: 22px;
  height: 22px;
  color: var(--green-600);
  flex-shrink: 0;
}

.payment-label small {
  color: var(--text-muted);
  display: block;
  font-size: 0.78rem;
  margin-top: 2px;
}

.payment-option input:checked + .payment-label {
  border-color: var(--green-600);
  background: var(--green-50);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-2 label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
}

.co-bill {
  background: var(--surface-alt);
  border-radius: 12px;
  padding: 14px;
}

.co-bill h4 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

/* OTP display on order success */
.otp-display {
  background: var(--green-50);
  border: 2px dashed var(--green-500);
  border-radius: 16px;
  padding: 20px;
  margin: 0 auto;
  max-width: 280px;
}

.otp-number {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--green-700);
  margin: 8px 0 6px;
}

/* Customer order cards in My Orders modal */
.my-order-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}

.my-order-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.my-order-id {
  font-weight: 800;
  color: var(--green-700);
}

@media (max-width: 560px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   v2 – Images, account, addresses & map, checkout, tracking
   ========================================================= */
.product-media { overflow: hidden; }
.product-img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 0.25s; }
.product-card:hover .product-img { transform: scale(1.04); }
.detail-media { max-width: 420px; width: 100%; }
.low-stock {
  position: absolute; left: 8px; bottom: 8px; background: #fff7ed; color: #9a3412;
  font-size: 0.68rem; font-weight: 800; padding: 3px 7px; border-radius: 6px;
}
.cart-thumb { overflow: hidden; }
.thumb-img { width: 100%; height: 100%; object-fit: contain; }
.category-icon { width: 72px; height: 72px; overflow: hidden; }
.category-icon img { width: 100%; height: 100%; object-fit: cover; }

/* Hero art */
.banner-main { flex-direction: row; align-items: center; gap: 12px; }
.banner-copy { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; flex: 1 1 auto; }
.banner-art { width: 44%; max-width: 330px; height: auto; flex-shrink: 0; position: relative; z-index: 1; display: none; }
button.banner { border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; flex-direction: row; align-items: center; gap: 14px; }
button.banner:hover { box-shadow: var(--shadow); }
.banner-side-art { width: 96px; height: auto; flex-shrink: 0; }
@media (min-width: 640px) { .banner-art { display: block; } }

.store-banner { background: #fef3c7; color: #92400e; text-align: center; font-weight: 700; font-size: 0.9rem; padding: 10px 16px; }

/* Generic UI bits */
.toast.error { background: #7f1d1d; }
.toast.error svg { color: #fecaca; }
.spinner {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--text-muted); font-weight: 500; }
.inline-icon { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.link-btn.danger, .btn.danger { color: var(--danger); }
.btn.danger-bg { background: var(--danger); color: #fff; }
.footer-link { background: none; border: 0; color: inherit; padding: 0; font: inherit; cursor: pointer; }
.footer-link:hover, .footer-bottom a:hover { color: #fff; text-decoration: underline; }
.input, select.input, textarea.input {
  width: 100%; height: 46px; border: 1px solid var(--border); border-radius: 12px; padding: 0 12px;
  font-size: 1rem; background: #fff; outline: none;
}
.input:focus { border-color: var(--green-600); }
textarea.input, .textarea { height: auto; min-height: 64px; padding: 10px 12px; resize: vertical; }
.form label { display: flex; flex-direction: column; gap: 6px; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.sep { border: 0; border-top: 1px solid var(--border); margin: 8px 0; }

/* Auth */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-alt); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.seg-btn { border: 0; background: none; padding: 9px; border-radius: 9px; font-weight: 700; color: var(--text-muted); }
.seg-btn.active { background: #fff; color: var(--green-700); box-shadow: var(--shadow-sm); }
.suffix-btn { border: 0; background: var(--surface-alt); padding: 0 12px; color: var(--text-muted); display: flex; align-items: center; }
.suffix-btn svg { width: 18px; height: 18px; }
.help summary { cursor: pointer; font-size: 0.85rem; font-weight: 700; color: var(--green-700); }
.help p { margin-top: 6px; }

/* Account */
.account-head { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--green-600); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem;
}
.list-link { display: flex; align-items: center; gap: 10px; border: 0; width: 100%; text-align: left; font-weight: 700; cursor: pointer; }
.list-link span { flex: 1; }
.list-link svg { width: 18px; height: 18px; color: var(--green-600); }
.panel-title-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.panel-title-row h3 { margin: 0; }
form.panel { gap: 10px; }
form.panel h3 { margin: 0; }
.addr-card { padding: 10px 0; border-bottom: 1px solid var(--border); display: grid; gap: 6px; }
.addr-card:last-child { border-bottom: 0; }
.addr-text { display: block; font-size: 0.86rem; color: var(--text); margin: 2px 0; }
.addr-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.addr-actions .link-btn { font-size: 0.82rem; }
.badge-soft {
  display: inline-block; font-size: 0.7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-alt); color: var(--text-muted); vertical-align: 1px;
}
.badge-soft.ok { background: var(--green-100); color: var(--green-700); }
.badge-soft.warn { background: #fef3c7; color: #92400e; }
.badge-soft.bad { background: #fee2e2; color: #991b1b; }
.location-option div { min-width: 0; }

/* Address editor + map */
.addr-editor { display: grid; gap: 16px; }
.map-col { display: grid; gap: 8px; position: relative; }
.map-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; background: #fff; }
.map-search svg { width: 18px; height: 18px; color: var(--text-muted); }
.map-search input { border: 0; outline: none; height: 44px; flex: 1; font-size: 0.95rem; min-width: 0; }
.map-results {
  list-style: none; margin: 0; padding: 4px; position: absolute; top: 48px; left: 0; right: 0; z-index: 1001;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 240px; overflow: auto;
}
.map-results button { width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; font-size: 0.85rem; }
.map-results button:hover { background: var(--green-50); }
.map-wrap { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #e8eee9; }
.addr-map { height: 280px; width: 100%; }
.map-wrap.failed .addr-map, .map-wrap.failed .center-pin { display: none; }
.map-wrap.failed { border: 0; background: none; }
.map-wrap.failed .map-gps { position: static; }
.center-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); z-index: 500; pointer-events: none; color: #dc2626; }
.center-pin svg { width: 40px; height: 40px; fill: #fecaca; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.3)); }
.map-gps { position: absolute; right: 10px; bottom: 10px; z-index: 500; font-size: 0.82rem; padding: 8px 12px; box-shadow: var(--shadow); }
.map-status { font-size: 0.82rem; color: var(--text-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 20px; }
.map-status svg { width: 15px; height: 15px; color: var(--green-600); }
.map-status.warn { color: #9a3412; }
.chip-row { display: flex; gap: 8px; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span { display: inline-block; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; font-weight: 700; font-size: 0.85rem; cursor: pointer; }
.chip-radio input:checked + span { border-color: var(--green-600); background: var(--green-50); color: var(--green-700); }
.chip-radio input:focus-visible + span { outline: 3px solid var(--green-500); }

/* Checkout */
.checkout-grid { display: grid; gap: 18px; }
.co-section { display: grid; gap: 10px; margin-bottom: 16px; }
.co-section h3 { margin: 0; font-size: 1rem; }
.addr-choices { display: grid; gap: 8px; }
.addr-choice { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer; }
.addr-choice:has(input:checked) { border-color: var(--green-600); background: var(--green-50); }
.addr-choice input { margin-top: 4px; accent-color: var(--green-600); }
.addr-choice-body { display: grid; gap: 2px; min-width: 0; }
.addr-choice-body .link-btn { justify-self: start; font-size: 0.8rem; }
.checkout-side { display: grid; gap: 10px; align-content: start; }
.co-bill .notice { margin-top: 10px; }
.co-bill .btn { margin-top: 8px; }
.bill-row.muted { font-size: 0.82rem; }

/* Success */
.success-box { text-align: center; display: grid; gap: 14px; padding: 6px 0; }
.success-icon { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: flex; align-items: center; justify-content: center; }
.success-icon svg { width: 32px; height: 32px; }
.success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Orders */
.my-order-card { display: block; width: 100%; text-align: left; background: #fff; font: inherit; color: inherit; cursor: pointer; }
.my-order-card:hover { border-color: var(--green-500); box-shadow: var(--shadow-sm); }
.order-items-line { font-size: 0.85rem; color: var(--text-muted); margin: 6px 0; }
.status-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 800;
  text-transform: capitalize; background: var(--surface-alt); color: var(--text-muted); white-space: nowrap;
}
.status-pill.payment_pending { background: #fff7ed; color: #9a3412; }
.status-pill.pending { background: #fef3c7; color: #92400e; }
.status-pill.accepted { background: #dbeafe; color: #1e3a8a; }
.status-pill.picked_up { background: #ede9fe; color: #4c1d95; }
.status-pill.delivered { background: #d1fae5; color: #065f46; }
.status-pill.cancelled { background: #fee2e2; color: #991b1b; }
.order-detail { display: grid; gap: 14px; }
.order-status-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.timeline li { position: relative; display: grid; justify-items: center; text-align: center; gap: 2px; font-size: 0.78rem; color: var(--text-muted); }
.timeline li::before { content: ""; position: absolute; top: 8px; left: -50%; right: 50%; height: 3px; background: var(--border); }
.timeline li:first-child::before { display: none; }
.timeline .dot { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--border); position: relative; z-index: 1; }
.timeline li.done .dot, .timeline li.current .dot { background: var(--green-600); border-color: var(--green-600); }
.timeline li.done::before, .timeline li.current::before { background: var(--green-600); }
.timeline li.current .dot { box-shadow: 0 0 0 5px var(--green-100); }
.timeline li.done strong, .timeline li.current strong { color: var(--text); }
.timeline small { font-size: 0.68rem; }
.otp-inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--green-50); border: 2px dashed var(--green-500); border-radius: 14px; padding: 12px 16px; }
.otp-inline strong { font-size: 1.6rem; letter-spacing: 0.2em; color: var(--green-700); }
.otp-inline small { color: var(--text-muted); }
.partner-card { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.partner-card > div { flex: 1; }
.partner-card > svg { width: 28px; height: 28px; color: var(--green-600); }
.track-map { height: 240px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.order-actions-row { display: flex; gap: 10px; flex-wrap: wrap; }

@media (min-width: 768px) {
  .addr-editor { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .addr-map { height: 360px; }
  .checkout-grid { grid-template-columns: 1.4fr 1fr; }
  .checkout-side { position: sticky; top: 0; }
  .modal.wide { width: min(900px, calc(100% - 24px)); }
}
@media (max-width: 560px) {
  .form-row-3 { grid-template-columns: 1fr 1fr; }
  .modal { padding: 16px; }
  .timeline { font-size: 0.7rem; }
}

/* Legal pages */
.legal { max-width: 760px; padding-top: 24px; padding-bottom: 48px; line-height: 1.65; }
.legal h1 { font-size: 1.8rem; margin: 0 0 4px; }
.legal h2 { font-size: 1.1rem; margin: 26px 0 6px; }
.legal a { color: var(--green-700); text-decoration: underline; }
.legal a.btn { text-decoration: none; }

.form label[for] { display: block; }
.form label > .input, .form label > select, .form label > textarea { flex: none; }
.addr-choice-body .badge-soft, .addr-card .badge-soft { justify-self: start; }
#location-text { display: inline-block; max-width: min(46vw, 260px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
