/* ===== Corkd — Home of Queensland Wine =====
   Mobile-first: base rules target ~375-414px, then progressively enhanced
   at 768px (tablet) and 1024px+ (desktop) via min-width media queries. */

:root {
  --wine: #4a1330;
  --wine-dark: #2c0a1c;
  --wine-light: #6e2049;
  --rust: #c1673c;
  --rust-dark: #9e4f2b;
  --rust-light: #e0895a;
  --ink: #241b1a;
  --ink-light: #6b5f5a;
  --paper: #faf6ee;
  --paper-dark: #efe4d2;
  --border: #e2d6c1;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font-sans); }

/* Sticky-footer shell: on short pages (e.g. login) the footer strip
   stays pinned to the bottom of the viewport instead of leaving a
   stray gap of body background underneath it. */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-content {
  display: block;
  flex: 1 0 auto;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

/* ===================================================================
   Nav
   =================================================================== */

.corkd-navbar {
  display: block;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--wine-dark);
  color: #ecdccb;
  font-size: 11px;
  padding: 6px 16px;
  gap: 12px;
}
.nav-topbar-tagline { display: none; }
.nav-topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-topbar-link { text-decoration: none; font-weight: 600; }
.nav-topbar-shipping { display: none; color: #ecdccb; }
.nav-topbar-greeting { color: #ecdccb; }
.nav-account-slot { display: flex; align-items: center; gap: 6px; white-space: nowrap; }

.nav-mainbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.nav-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--wine);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-menu-toggle:active { opacity: 0.6; }

.nav-logo { flex-shrink: 0; }
.nav-logo img { height: 52px; display: block; }

.nav-links {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: 8px 16px 20px;
  gap: 4px;
  box-shadow: 0 12px 24px rgba(44, 10, 28, 0.12);
}
.nav-links.nav-open { display: flex; }

.nav-link {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.nav-link:active { color: var(--wine); }

.nav-search {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
  order: 99;
}
.nav-search input {
  border: none;
  padding: 12px;
  flex: 1;
  font-size: 15px;
  outline: none;
  min-width: 0;
}
.nav-search-btn {
  border: none;
  background: var(--paper-dark);
  padding: 12px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  min-height: 44px;
}

.nav-cart {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--wine);
  color: #fff;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  min-height: 44px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-cart:active { background: var(--wine-light); }
.nav-cart-icon { display: flex; }
.nav-cart-label { display: none; }

/* ===================================================================
   Hero
   =================================================================== */

.hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--wine-dark);
  color: #fff;
  padding: 32px 20px;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }

.hero-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroFade 18s infinite ease-in-out;
}
.hero-bg-slide:nth-child(1) { animation-delay: 0s; }
.hero-bg-slide:nth-child(2) { animation-delay: 6s; }
.hero-bg-slide:nth-child(3) { animation-delay: 12s; }

@keyframes heroFade {
  0%   { opacity: 0; }
  3%   { opacity: 1; }
  30%  { opacity: 1; }
  34%  { opacity: 0; }
  100% { opacity: 0; }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(44,10,28,0.62) 0%, rgba(44,10,28,0.45) 55%, rgba(44,10,28,0.26) 100%);
}

.hero-text { position: relative; z-index: 2; max-width: 560px; }

.hero-text > *:first-child {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 8vw, 52px);
  line-height: 1.12;
  margin: 0 0 16px 0;
  border-left: 4px solid var(--rust);
  padding-left: 16px;
}

.hero-subtext {
  display: block;
  font-size: 15px;
  color: #ecdccb;
  max-width: 440px;
  margin-bottom: 22px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: var(--rust);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 12px 24px;
  border-radius: 3px;
}
.hero-cta:active { background: var(--rust-dark); }

/* ===================================================================
   Category tiles
   =================================================================== */

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
  padding: 0 16px;
}

.category-tile {
  position: relative;
  padding: 20px 16px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background-size: cover;
  background-position: 78% center;
  border-radius: 10px;
  overflow: hidden;
}
.category-tile:active { opacity: 0.9; }

.category-tile.tile-reds {
  background-image: linear-gradient(180deg, rgba(44,10,20,0.02) 0%, rgba(36,9,17,0.10) 42%, rgba(28,7,13,0.55) 68%, rgba(20,5,10,0.92) 100%), url('/images/categories/red.jpg');
}
.category-tile.tile-whites {
  background-image: linear-gradient(180deg, rgba(50,38,10,0.02) 0%, rgba(40,30,8,0.10) 42%, rgba(30,23,7,0.55) 68%, rgba(20,15,5,0.92) 100%), url('/images/categories/white.jpg');
}
.category-tile.tile-sparkling {
  background-image: linear-gradient(180deg, rgba(58,50,36,0.02) 0%, rgba(44,40,30,0.10) 42%, rgba(32,29,22,0.55) 68%, rgba(18,17,13,0.92) 100%), url('/images/categories/sparkling.jpg');
}
.category-tile.tile-liqueur {
  background-image: linear-gradient(180deg, rgba(70,42,10,0.02) 0%, rgba(55,32,8,0.10) 42%, rgba(42,24,7,0.55) 68%, rgba(28,16,5,0.92) 100%), url('/images/categories/liqueur.jpg');
}

.category-tile-icon { display: block; margin-bottom: 8px; opacity: 0.95; color: var(--rust-light); }

.category-tile-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.category-tile-subtitle {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 10px;
}

.category-tile-link {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--rust-light);
}

/* ===================================================================
   USP band: mix & match / no wine clubs
   =================================================================== */

.usp-band {
  background: var(--wine-dark);
  color: var(--paper);
  padding: 32px 16px;
  margin-top: 24px;
}
.usp-heading-col { margin-bottom: 20px; }
.usp-heading {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.28;
  color: var(--paper);
}
.usp-heading-sub {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: rgba(250,246,238,0.72);
  max-width: 34em;
}
.usp-points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.usp-point { display: flex; flex-direction: column; gap: 4px; }
.usp-point-icon { color: var(--rust-light); margin-bottom: 4px; }
.usp-point-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--paper);
}
.usp-point-body {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(250,246,238,0.68);
}

/* ===================================================================
   Mid section: Featured + Story
   =================================================================== */

.mid-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 32px 16px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.01em;
}

.section-title-light {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--rust);
  margin-bottom: 6px;
}

.featured-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.view-all-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--wine);
  letter-spacing: 0.01em;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* ===================================================================
   Product card
   =================================================================== */

.product-card { display: block; }
.product-card-link { display: block; }

.product-card-image {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 6px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 8px;
}
.product-card-image img {
  max-height: 145px;
  max-width: 88%;
  object-fit: contain;
}
.product-card-placeholder {
  font-size: 11px;
  color: var(--ink-light);
  text-align: center;
  padding: 0 10px;
}

.strange-bird-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--rust);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 7px;
  border-radius: 10px;
}
.strange-bird-badge-inline {
  display: inline-block;
  position: static;
  margin-bottom: 12px;
}

.product-card-brand {
  display: block;
  font-size: 10.5px;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}
.product-card-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  line-height: 1.25;
}
.product-card-price {
  display: block;
  font-weight: 700;
  color: var(--wine);
  font-size: 14px;
}

/* ===================================================================
   Story column
   =================================================================== */

.story-col {
  position: relative;
  margin-top: 28px;
  padding: 36px 24px;
  border-radius: 8px;
  overflow: hidden;
  background-image: linear-gradient(115deg, rgba(36, 12, 22, 0.88) 0%, rgba(36, 12, 22, 0.66) 44%, rgba(36, 12, 22, 0.30) 100%),
    url("/images/backgrounds/vineyard-qld.jpg");
  background-size: cover;
  background-position: 76% center;
  background-repeat: no-repeat;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.story-col .section-title-light { color: var(--gold-light, #e8c98f); }
.story-heading {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  margin-bottom: 14px;
  color: #fff;
}
.story-paragraph {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 12px;
  max-width: 420px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}
.contact-page .story-paragraph {
  color: #5a4a44;
  text-shadow: none;
  max-width: 560px;
  margin-bottom: 24px;
}
.story-cta {
  display: inline-block;
  min-height: 44px;
  padding-top: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  border-bottom: 2px solid #fff;
}

/* ===================================================================
   About page
   =================================================================== */

.about-hero {
  position: relative;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background: var(--wine-dark);
  color: #fff;
  padding: 44px 20px;
}
.about-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('/images/about/big-apple-day.jpg');
  background-size: cover;
  background-position: center 58%;
}
.about-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(44,10,28,0.82) 0%, rgba(44,10,28,0.60) 46%, rgba(44,10,28,0.80) 100%);
}
.about-hero-content { position: relative; z-index: 2; max-width: 560px; }
.about-hero-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--rust-light);
  margin-bottom: 10px;
}
.about-hero-heading {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 8vw, 44px);
  line-height: 1.16;
  margin-bottom: 16px;
}
.about-hero-sub {
  display: block;
  font-size: 15px;
  color: #ecdccb;
  max-width: 460px;
  margin-bottom: 24px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}
.about-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.about-btn-outline {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 22px;
  border: 1.5px solid rgba(255,255,255,0.75);
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  border-radius: 3px;
}
.about-btn-outline:active { background: rgba(255,255,255,0.12); }

.about-section { padding: 44px 20px; }
.about-section-inner { max-width: 640px; margin: 0 auto; }
.about-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--rust);
  margin-bottom: 10px;
}
.about-heading {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 23px;
  line-height: 1.28;
  margin-bottom: 16px;
}
.about-body {
  display: block;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-light);
  margin-bottom: 14px;
}
.about-body:last-child { margin-bottom: 0; }

.about-section-dark {
  background: var(--wine-dark);
}
.about-section-dark .about-eyebrow { color: var(--rust-light); }
.about-section-dark .about-heading { color: #fff; }
.about-section-dark .about-body { color: rgba(250,246,238,0.82); }
.about-stat-highlight {
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
}

.about-cta {
  position: relative;
  overflow: hidden;
  padding: 48px 20px;
  color: #fff;
  min-height: 440px;
  display: flex;
  align-items: center;
}
.about-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('/images/about/big-apple-night.jpg');
  background-size: cover;
  background-position: center 38%;
}
.about-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(18,5,12,0.92) 0%, rgba(18,5,12,0.76) 48%, rgba(18,5,12,0.42) 100%);
}
.about-cta-content { position: relative; z-index: 2; max-width: 480px; }
.about-cta-heading {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 6vw, 32px);
  margin-bottom: 14px;
}
.about-cta-body {
  display: block;
  font-size: 14.5px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 22px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}
.about-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.about-cta-address {
  display: block;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.7);
}

/* ===================================================================
   My Account (order history + shipping address)
   =================================================================== */

.account-subtitle {
  display: block;
  color: var(--ink-light);
  font-size: 14px;
  margin-bottom: 8px;
}

.account-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.account-section:first-of-type { margin-top: 24px; }
.account-section-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  margin-bottom: 14px;
}

.account-orders-empty { padding: 8px 0 4px; }

.account-orders-list { display: flex; flex-direction: column; gap: 16px; }
.account-order-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}
.account-order-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.account-order-id { font-weight: 700; font-size: 14px; }
.account-order-date { color: var(--ink-light); font-size: 13px; }
.account-order-status {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--paper-dark);
  color: var(--ink-light);
}
.account-order-status-paid,
.account-order-status-fulfilled { background: #eaf3e8; color: #2f6b3a; }
.account-order-status-pending { background: #fbf1de; color: #9e6f1f; }
.account-order-status-cancelled,
.account-order-status-refunded { background: #fbe9e4; color: var(--wine-dark); }

.account-order-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.account-order-item-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
}
.account-order-item-image {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--paper-dark);
}
.account-order-item-image-placeholder {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--paper-dark);
  font-size: 18px;
}
.account-order-item-name { font-size: 13.5px; }
.account-order-item-price { font-size: 13.5px; font-weight: 600; text-align: right; }

.account-order-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.account-order-shipto { font-size: 12.5px; color: var(--ink-light); }
.account-order-total { font-size: 15px; font-weight: 700; }

.account-address-hint { margin-bottom: 18px; }
.account-address-form { max-width: 480px; }
.account-address-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.account-address-save { margin-top: 6px; width: auto; padding-left: 32px; padding-right: 32px; }
.account-address-status {
  display: block;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
}
.account-address-status-success { background: #eaf3e8; color: #2f6b3a; border: 1px solid #bfdcbb; }
.account-address-status-error { background: #fbe9e4; color: var(--wine-dark); border: 1px solid #eec3b6; }

/* ===================================================================
   Footer
   =================================================================== */

.corkd-footer {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--paper-dark);
  border-top: 1px solid var(--border);
  padding: 20px 16px;
  margin-top: 12px;
  gap: 16px;
}
.footer-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
}
.footer-badge-icon { color: var(--wine); flex-shrink: 0; }
.footer-badge-title {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.footer-badge-subtitle {
  display: block;
  font-size: 11.5px;
  color: var(--ink-light);
}

/* ===================================================================
   Static / catalog / product / cart page shells
   =================================================================== */

.catalog-page, .static-page, .cart-page, .product-page { padding: 24px 16px 48px; }

.catalog-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
}
.catalog-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
}
.catalog-count { color: var(--ink-light); font-size: 13px; }
.catalog-empty { display: block; color: var(--ink-light); padding: 24px 0; }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* ===== Catalog filter side panel ===== */

.catalog-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.catalog-filter-toggle {
  order: -2; /* above both the (collapsed) filter panel and the grid */
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--wine);
  cursor: pointer;
  text-align: left;
}
.catalog-filters {
  order: -1; /* filters above the grid on mobile, where a side-by-side
                fixed panel wouldn't fit */
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px 6px;
  /* Collapsed by default on mobile so the wine grid is visible without
     scrolling past every filter checkbox first; the toggle button above
     expands this in place. Reset to always-visible at the desktop
     breakpoint (see @media 1024px+ below). */
  display: none;
}
.catalog-filters.is-open { display: block; }

.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.filter-panel-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--wine);
}
.filter-clear-btn {
  background: none;
  border: none;
  color: var(--rust-dark);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}
.filter-clear-btn:hover { text-decoration: underline; }

.filter-group { padding: 12px 0; border-top: 1px solid var(--border); }
.filter-group:first-of-type { border-top: none; }
.filter-group-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-light);
  margin-bottom: 8px;
}
.filter-group-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-group-options-scroll {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}
.filter-option-row { display: flex; align-items: center; }
.filter-option-check .Wt-chkbox { margin-right: 8px; }
.filter-option-check {
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== Product detail ===== */

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.product-detail-image {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.product-detail-image:hover { z-index: 30; }
.product-detail-image img {
  max-height: 260px;
  max-width: 85%;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform-origin: center center;
}
.product-detail-image:hover img {
  transform: scale(2);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}
.product-detail-image.zoomed { z-index: 30; }
.product-detail-image.zoomed img {
  transform: scale(2);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
  cursor: zoom-out;
}

.product-detail-brand {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-light);
  font-size: 12px;
  margin-bottom: 6px;
}
.product-detail-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  margin-bottom: 10px;
}
.product-detail-price {
  display: block;
  font-size: 21px;
  font-weight: 700;
  color: var(--wine);
  margin-bottom: 16px;
}
.product-detail-row { margin-bottom: 10px; font-size: 14px; }
.product-detail-label { font-weight: 700; }
.product-detail-description {
  display: block;
  margin: 16px 0;
  color: var(--ink-light);
  line-height: 1.6;
  font-size: 14px;
}
.product-detail-tags { margin-bottom: 18px; }
.product-tag {
  display: inline-block;
  background: var(--paper-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 12px;
  font-size: 12px;
  margin: 0 8px 8px 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  background: var(--wine);
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 4px;
  cursor: pointer;
}
.btn-primary:active { background: var(--wine-light); }
.btn-primary:disabled { background: #c2b6ab; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  background: #fff;
  color: var(--wine);
  border: 1px solid var(--border);
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 4px;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--paper); }

.product-detail-actions { margin-top: 8px; }
.product-detail-add { }

.product-detail-qty-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.product-detail-qty-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink-light);
  text-transform: uppercase;
}
.product-detail-qty .qty-btn { width: 38px; height: 38px; font-size: 17px; }
.product-detail-qty .qty-value { min-width: 34px; font-size: 16px; }

.qty-stepper { display: inline-flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--wine);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.qty-btn:hover { background: var(--paper); }
.qty-btn:active { background: var(--paper-dark); }
.qty-value {
  min-width: 22px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}

.added-to-cart-msg {
  display: block;
  margin-top: 10px;
  padding: 10px 14px;
  background: #eaf3e8;
  color: #2f6b3a;
  border: 1px solid #bfdcbb;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* ===== Cart page ===== */

.cart-table { margin: 16px 0; border-top: 1px solid var(--border); }
.cart-row {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  grid-template-areas:
    "image name remove"
    "image meta remove";
  align-items: center;
  gap: 4px 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cart-row-image-link {
  grid-area: image;
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper-dark);
  flex-shrink: 0;
}
.cart-row-image-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cart-row-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 24px;
}
.cart-row-name {
  font-weight: 600;
  font-size: 14px;
  grid-area: name;
  color: var(--ink);
  text-decoration: none;
}
.cart-row-name:hover { color: var(--wine); text-decoration: underline; }
.cart-row-qty { color: var(--ink-light); font-size: 13px; grid-area: meta; }
.cart-row-price { font-weight: 700; font-size: 13px; grid-area: meta; text-align: right; padding-right: 56px; }
.cart-row-remove {
  grid-area: remove;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 14px;
  min-height: 40px;
  font-size: 12px;
  cursor: pointer;
}

.cart-summary {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  margin-top: 20px;
}

.cart-summary-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.cart-summary-row { display: flex; justify-content: space-between; font-size: 14px; }
.cart-summary-label { color: var(--ink-light); }
.cart-summary-value { font-weight: 600; }
.cart-summary-row-discount .cart-summary-value { color: var(--rust-dark); }
.cart-summary-row-free .cart-summary-value { color: #3f7d4f; text-transform: uppercase; letter-spacing: 0.04em; }
.cart-summary-hint {
  display: block;
  font-size: 12.5px;
  color: var(--ink-light);
  font-style: italic;
  margin-top: -2px;
}

.cart-total { font-size: 20px; font-weight: 700; text-align: right; }

/* ===== Age certification (checkbox + checkout dialog) ===== */

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-light);
  line-height: 1.4;
}
.age-certify-checkbox { margin-top: 4px; }

.age-dialog .Wt-dialogcontent { padding: 4px 4px 12px; }
.age-dialog.Wt-dialog .titlebar {
  background: var(--wine);
  color: #fff;
  border-color: var(--wine-dark);
}
.age-dialog-text {
  display: block;
  font-size: 14.5px;
  color: var(--ink);
  margin-bottom: 14px;
}

/* ===== Contact page ===== */

.contact-info-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0 8px;
}

.contact-info-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  background: #fff;
}
.contact-info-card-primary {
  background: var(--wine);
  border-color: var(--wine);
}

.contact-info-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 8px;
}
.contact-info-card-primary .contact-info-label { color: rgba(255, 255, 255, 0.75); }

.contact-info-phone {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}
.contact-info-phone:hover { text-decoration: underline; }

.contact-info-email {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--wine);
  text-decoration: none;
}
.contact-info-email:hover { text-decoration: underline; }

.contact-info-hint {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}
.contact-info-card:not(.contact-info-card-primary) .contact-info-hint { color: var(--ink-light); }

.contact-hours-list {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.contact-hours-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 3px 0;
  font-size: 13px;
}
.contact-hours-day { color: rgba(255, 255, 255, 0.75); }
.contact-hours-time { color: #fff; font-weight: 600; }

.contact-form-heading {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 28px 0 4px;
}

.contact-form-note {
  display: block;
  font-size: 13px;
  color: var(--ink-light);
  margin-top: -4px;
}

.contact-form { max-width: 100%; margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.form-input, .form-textarea {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  font-size: 16px;
  font-family: var(--font-sans);
  width: 100%;
  min-height: 44px;
}
.form-textarea { min-height: 120px; }

/* ===================================================================
   Auth pages (login / signup)
   =================================================================== */

.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 16px 180px;
  min-height: calc(100vh - 64px);
  background-image: linear-gradient(160deg, rgba(36, 12, 22, 0.68) 0%, rgba(36, 12, 22, 0.5) 55%, rgba(36, 12, 22, 0.3) 100%),
    url("/images/backgrounds/vineyard-qld.jpg");
  background-size: cover;
  background-position: 78% center;
  background-repeat: no-repeat;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 22px;
  box-shadow: 0 20px 48px rgba(20, 6, 12, 0.35);
}

.auth-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  margin-bottom: 6px;
}
.auth-subtitle {
  display: block;
  color: var(--ink-light);
  font-size: 14px;
  margin-bottom: 20px;
}
.auth-error {
  display: block;
  background: #fbe9e4;
  color: var(--wine-dark);
  border: 1px solid #eec3b6;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
}

.auth-success {
  display: block;
  background: #eaf3e8;
  color: #2f6b3a;
  border: 1px solid #bfdcbb;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
}

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-submit { margin-top: 6px; }
.auth-forgot-link { display: block; font-size: 13px; margin-top: -4px; margin-bottom: 4px; text-align: right; }

.auth-switch {
  margin-top: 20px;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-light);
}
.auth-switch-link { font-weight: 700; color: var(--wine); }

/* ===================================================================
   Admin pages (login / dashboard / product form)
   =================================================================== */

.admin-page { max-width: 1080px; margin: 0 auto; }

.admin-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.admin-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
}
.admin-subtitle { display: block; color: var(--ink-light); font-size: 13.5px; }
.admin-back-link { font-size: 13px; color: var(--wine); font-weight: 600; }
.admin-header-actions { display: flex; align-items: center; gap: 10px; }
.admin-add-btn { width: auto; padding: 10px 16px; font-size: 13px; }
.admin-logout-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
}

.admin-count { display: block; color: var(--ink-light); font-size: 13px; margin-bottom: 10px; }

.admin-table { border-top: 1px solid var(--border); }
.admin-row {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  grid-template-areas: "name name name" "cat price actions" "stock stock actions";
  gap: 6px 10px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.admin-row-head { display: none; }
.admin-col-name { grid-area: name; }
.admin-col-cat { grid-area: cat; color: var(--ink-light); }
.admin-col-price { grid-area: price; font-weight: 600; }
.admin-col-abv { display: none; }
.admin-col-stock { grid-area: stock; font-size: 12px; }
.admin-col-actions { grid-area: actions; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.admin-product-name { display: block; font-weight: 600; }
.admin-product-brand { display: block; color: var(--ink-light); font-size: 12.5px; }
.admin-product-sku { display: block; color: var(--ink-light); font-size: 11.5px; letter-spacing: 0.02em; }

.admin-stock-in { color: #2f6b3a; }
.admin-stock-out { color: var(--wine-dark); }

.admin-edit-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--wine);
  border: 1px solid var(--wine);
  border-radius: 4px;
  padding: 6px 10px;
}
.admin-delete-btn, .admin-delete-cancel-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink-light);
}
.admin-delete-confirm-btn {
  background: var(--wine-dark);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12.5px;
  cursor: pointer;
}
.admin-confirm-text { font-size: 12.5px; color: var(--wine-dark); font-weight: 600; }

.admin-form-page .admin-form {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}
.admin-field { display: flex; flex-direction: column; gap: 6px; }
.admin-field-label { font-size: 12.5px; font-weight: 700; color: var(--ink-light); text-transform: uppercase; letter-spacing: 0.03em; }
.admin-checks { flex-direction: row; gap: 24px; align-items: center; }
.admin-form-actions { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.admin-cancel-link { font-size: 13.5px; color: var(--ink-light); font-weight: 600; }
.admin-form-error { margin-top: 0; }

/* ===================================================================
   Tablet — 768px+
   =================================================================== */

@media (min-width: 768px) {
  .nav-topbar { padding: 8px 32px; font-size: 12px; }
  .nav-topbar-tagline { display: inline; }
  .nav-topbar-shipping { display: inline; }

  .nav-mainbar { padding: 10px 32px; }
  .nav-logo img { height: 60px; }
  .nav-search input { font-size: 14px; }
  .nav-cart-label { display: inline; }

  .hero { min-height: 400px; padding: 40px 40px; }

  .category-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; padding: 0 32px; }

  .usp-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 36px 32px;
    margin-top: 32px;
  }
  .usp-heading-col { margin-bottom: 0; flex: 0 0 auto; max-width: 340px; }
  .usp-heading { font-size: 26px; }
  .usp-points { grid-template-columns: repeat(3, 1fr); gap: 32px; flex: 1; }

  .mid-section { grid-template-columns: 2.1fr 1fr; gap: 0; padding: 40px 32px; }
  .featured-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; padding-right: 32px; }
  .story-col { padding: 40px 32px; margin-top: 0; margin-left: 24px; min-height: 100%; }

  .corkd-footer { grid-template-columns: repeat(3, 1fr); padding: 24px 32px; }

  .catalog-page, .static-page, .cart-page, .product-page { padding: 32px 32px 56px; }
  .catalog-header { flex-direction: row; align-items: baseline; gap: 16px; }
  .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px; }

  .product-detail-layout { grid-template-columns: 320px 1fr; gap: 36px; }
  .product-detail-image { min-height: 380px; }

  .btn-primary { width: auto; }

  .cart-row {
    grid-template-columns: 68px 2fr 1fr 1fr auto;
    grid-template-areas: unset;
  }

  .admin-header { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .admin-row-head { display: grid; color: var(--ink-light); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 700; }
  .admin-row, .admin-row-head {
    grid-template-columns: 2fr 0.9fr 0.7fr 0.6fr 0.8fr auto;
    grid-template-areas: none;
  }
  .admin-row > *, .admin-row-head > * { grid-area: auto; }
  .admin-col-abv { display: block; }
  .admin-col-actions { justify-content: flex-end; }
  .cart-row-image-link { grid-area: unset; width: 68px; height: 68px; }
  .cart-row-name, .cart-row-qty, .cart-row-price { grid-area: unset; }
  .cart-row-price { padding-right: 0; }
  .cart-summary { align-items: flex-end; }
  .cart-summary-breakdown { width: 320px; }

  .account-page { max-width: 760px; margin: 0 auto; }
  .account-order-item-row { grid-template-columns: 52px 1fr auto; }

  .contact-info-grid { flex-direction: row; }
  .contact-info-card { flex: 1; }
  .contact-form { max-width: 480px; }

  .about-hero { min-height: 520px; padding: 56px 40px; }
  .about-section { padding: 64px 32px; }
  .about-section-inner { max-width: 720px; }
  .about-heading { font-size: 28px; }
  .about-cta { min-height: 480px; padding: 64px 40px; }
}

/* ===================================================================
   Desktop — 1024px+
   =================================================================== */

@media (min-width: 1024px) {
  .nav-mainbar { gap: 32px; padding: 10px 32px; }
  .nav-menu-toggle { display: none; }
  .nav-logo img { height: 76px; }

  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    flex: 1;
    gap: 28px;
    padding: 0;
    border-bottom: none;
    box-shadow: none;
    background: transparent;
  }
  .nav-link {
    padding: 0;
    border-bottom: none;
    min-height: auto;
    font-size: 13px;
    letter-spacing: 0.03em;
  }
  .nav-link:hover { color: var(--wine); }

  .nav-search {
    margin-top: 0;
    order: 0;
    flex: 1;
    max-width: 320px;
    margin-left: auto;
  }
  .nav-cart { margin-left: 0; padding: 12px 20px; }
  .nav-cart:hover { background: var(--wine-light); }

  .hero { min-height: 460px; padding: 0 48px; }
  .hero-cta:hover { background: var(--rust-dark); }

  .category-tile:hover { opacity: 1; }

  .featured-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .view-all-link:hover { text-decoration: underline; }

  .product-detail-layout { grid-template-columns: 380px 1fr; gap: 48px; }
  .btn-primary:hover { background: var(--wine-light); }

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

  .about-hero { min-height: 560px; padding: 0 64px; }
  .about-btn-outline:hover { background: rgba(255,255,255,0.12); }
  .about-cta { min-height: 500px; padding: 0 64px; }

  .catalog-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 28px;
  }
  .catalog-filter-toggle { display: none; }
  .catalog-filters {
    display: block; /* always visible as a sticky side panel on desktop --
                        the mobile collapse/toggle above doesn't apply */
    order: 0;
    flex: 0 0 240px;
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 116px);
    overflow-y: auto;
  }
  .catalog-grid { flex: 1; }
  .filter-clear-btn:hover { color: var(--wine); }
  .filter-option-check:hover { color: var(--rust-dark); }
}
