:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --muted: #f5f2ed;
  --line: #ded8cf;
  --text: #121212;
  --soft-text: #5a5650;
  --accent: #7b1f2a;
  --accent-dark: #4e121b;
  --gold: #a77a2d;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}
body.drawer-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; border-radius: 0; }
button:disabled { cursor: not-allowed; opacity: .48; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(120px, 170px) 1fr minmax(120px, 170px);
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
}

.brand {
  grid-column: 1;
  grid-row: 1;
  z-index: 2;
}

.brand img {
  width: 138px;
  height: auto;
}

nav {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.7vw, 22px);
  width: 100%;
  min-width: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

nav a,
nav button {
  background: none;
  border: 0;
  color: var(--text);
  padding: 6px 0;
  cursor: pointer;
  white-space: nowrap;
}

nav a:hover,
nav button:hover {
  color: var(--accent);
}

#tradeLoginButton,
#tradeLogoutButton {
  position: absolute;
  right: clamp(18px, 4vw, 48px);
  top: 50%;
  transform: translateY(-50%);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .1em;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--text);
  padding: 8px 12px;
}

.hidden { display: none !important; }

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 78px clamp(18px, 4vw, 36px);
  border-bottom: 1px solid var(--line);
}

.section-tight {
  padding-top: 24px;
}

.page-intro {
  padding-top: 48px;
  padding-bottom: 24px;
  border-bottom: 0;
}
.page-intro p:last-child { max-width: 720px; color: var(--soft-text); font-size: 18px; }
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; min-height: 72vh; }
.hero h1 { font-size: clamp(42px, 6vw, 78px); line-height: .98; letter-spacing: -.05em; margin: 12px 0 20px; }
.hero p { font-size: 18px; max-width: 640px; color: var(--soft-text); }
.hero-image { margin: 0; border-left: 1px solid var(--line); padding-left: 26px; }
.hero-image img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.kicker { margin: 0 0 8px; color: var(--accent); text-transform: uppercase; letter-spacing: .15em; font-size: 12px; font-weight: 700; }
h1, h2 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1; margin: 0 0 14px; letter-spacing: -.04em; }
h3 { font-size: 22px; margin: 0 0 10px; }
.subheading { margin-top: 42px; font-size: clamp(28px, 3.5vw, 44px); }
.section-heading { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: end; margin-bottom: 28px; }
.section-heading p:last-child { color: var(--soft-text); margin: 0; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--text); padding: 12px 18px; cursor: pointer; min-height: 44px; background: white; }
.button.primary { background: var(--text); color: white; }
.button.secondary { background: white; color: var(--text); }
.button:hover { border-color: var(--accent); }
.button.primary:hover { background: var(--accent); }
.text-link { display: inline-flex; align-items: center; border: 1px solid var(--text); background: white; padding: 9px 10px; cursor: pointer; }
.text-link:hover { border-color: var(--accent); color: var(--accent); }
.card-image-link { display: block; margin-bottom: 14px; }
.card-image-link:hover img { opacity: .86; }
.wine-card h3 a:hover, .winery-card h3 a:hover, .subtle-link:hover { color: var(--accent); }

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--soft-text);
}
.filters select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  padding: 10px;
  background: white;
}
.availability-note { margin-bottom: 22px; color: var(--soft-text); }

.wine-grid, .winery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.wine-card, .winery-card, .team-card { border-top: 1px solid var(--line); padding-top: 16px; background: var(--paper); }
.wine-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  object-position: center;
  background: var(--muted);
  padding: 18px;
  border: 1px solid var(--line);
}

.winery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  background: var(--muted);
}

body[data-page="wine"] .detail-layout img {
  aspect-ratio: 3 / 4;
  object-fit: contain;
  object-position: center;
  background: var(--muted);
  padding: 24px;
  border: 1px solid var(--line);
}

body[data-page="winery"] .detail-layout img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.wine-card h3, .winery-card h3 { margin: 0 0 6px; font-size: 20px; }
.meta { color: var(--soft-text); font-size: 14px; margin: 0 0 10px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; align-items: center; min-height: 26px; }
.badge { border: 1px solid var(--line); padding: 4px 7px; font-size: 12px; color: var(--soft-text); }
.availability-badge { background: white; }

.icon-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  background: white;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}
.icon-organic::before { content: "O"; }
.icon-vegan::before { content: "V"; }
.icon-biodynamic::before { content: "BD"; font-size: 10px; }

.icon-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 60;
  transform: translateX(-50%);
  display: none;
  white-space: nowrap;
  background: var(--text);
  color: white;
  padding: 5px 7px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.icon-badge:hover::after,
.icon-badge:focus::after {
  display: block;
}

.trade-box { margin: 14px 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.locked { color: var(--soft-text); font-style: italic; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.card-actions button { border: 1px solid var(--text); background: white; padding: 9px 10px; cursor: pointer; }
.card-actions button:hover { border-color: var(--accent); color: var(--accent); }

.detail-panel { border-top: 0; }
.detail-panel:empty { display: none; }
.detail-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 36px; }
.detail-layout img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.details-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 24px; margin: 24px 0; }
.details-list div { border-top: 1px solid var(--line); padding-top: 10px; }
.details-list strong { display: block; font-size: 12px; color: var(--soft-text); text-transform: uppercase; letter-spacing: .08em; }
.awards { margin: 18px 0; display: grid; gap: 8px; }
.award { border-left: 3px solid var(--gold); padding-left: 10px; }

.two-column, .contact-section { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; }
.team-grid { display: grid; gap: 24px; }
.team-card {
  display: grid;
  grid-template-columns: 172px 1fr;
  gap: 24px;
  align-items: start;
}

.team-card img {
  width: 172px;
  height: 172px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.plain-form { display: grid; gap: 14px; }
.plain-form label { display: grid; gap: 6px; color: var(--soft-text); font-size: 14px; }
.plain-form input, .plain-form textarea { width: 100%; border: 1px solid var(--line); padding: 12px; background: white; color: var(--text); }
.form-result { min-height: 20px; color: var(--accent); margin: 0; }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
  display: none;
  border: 0;
  background: rgba(0,0,0,.24);
  cursor: default;
}

body.drawer-open .drawer-backdrop {
  display: block;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  width: min(520px, 96vw);
  height: 100vh;
  padding: 24px;
  background: white;
  border-left: 1px solid var(--line);
  transform: translateX(105%);
  transition: transform .2s ease;
  overflow: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 0;
  margin-bottom: 12px;
}
.drawer-header button, .modal-close { border: 0; background: none; font-size: 28px; cursor: pointer; }
.enquiry-line {
  background: var(--muted);
  border: 1px solid var(--line);
  padding: 14px;
  margin: 10px 0;
  display: grid;
  gap: 8px;
}
.enquiry-line input { border: 1px solid var(--line); padding: 8px; width: 120px; }
.enquiry-line-error {
  border-color: var(--accent);
  background: #fbf4f3;
}
.line-error {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
}
.enquiry-validation-summary {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--accent);
  background: #fbf4f3;
}
button:disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: .45;
}
.enquiry-form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.enquiry-form-actions .button {
  flex: 1 1 180px;
}
.floating-enquiry { position: fixed; right: 18px; bottom: 18px; z-index: 25; border: 1px solid var(--text); background: var(--text); color: white; padding: 12px 16px; cursor: pointer; }
.floating-enquiry span { display: inline-block; min-width: 22px; margin-left: 8px; background: white; color: var(--text); padding: 2px 6px; }

.login-modal { border: 1px solid var(--text); padding: 0; width: min(430px, 92vw); }
.login-modal::backdrop { background: rgba(0,0,0,.35); }
.login-modal form { padding: 28px; position: relative; }
.modal-close { position: absolute; top: 10px; right: 14px; }
.trade-login-help {
  margin: 18px 0 22px;
  color: var(--soft-text);
  font-size: 14px;
}
.trade-login-help a { text-decoration: underline; text-underline-offset: 3px; }

.login-modal .button {
  margin-top: 0;
}


.site-footer {
  background: #333333;
  color: white;
  margin-top: 0;
  padding: 34px clamp(18px, 4vw, 48px);
}

.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.site-footer strong {
  display: block;
  margin-bottom: 4px;
}

.site-footer p {
  margin: 0;
  color: rgba(255,255,255,.72);
}

.site-footer nav {
  position: static;
  grid-column: auto;
  grid-row: auto;
  display: flex;
  justify-content: flex-end;
  width: auto;
  gap: 16px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  overflow: visible;
}

.site-footer nav a {
  color: rgba(255,255,255,.82);
}

.site-footer nav a:hover {
  color: white;
}

@media (max-width: 1120px) {
  nav {
    justify-content: flex-start;
    grid-column: 2 / 3;
    overflow-x: auto;
    padding-right: 16px;
  }
}

@media (max-width: 980px) {
  .hero, .two-column, .contact-section, .section-heading, .detail-layout { grid-template-columns: 1fr; }
  .wine-grid, .winery-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .site-header { grid-template-columns: minmax(120px, 150px) minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .site-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
  }

  .brand img {
    width: 120px;
  }

  .menu-toggle {
    display: block;
  }

  nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 66px;
    background: white;
    border-bottom: 1px solid var(--line);
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: visible;
  }

  nav.open {
    display: flex;
  }

  #tradeLoginButton,
  #tradeLogoutButton {
    position: static;
    transform: none;
    margin-top: 8px;
  }

  .wine-grid,
  .winery-grid,
  .filters,
  .details-list {
    grid-template-columns: 1fr;
  }


  .team-card {
    grid-template-columns: 120px 1fr;
  }

  .team-card img {
    width: 120px;
    height: 120px;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .section {
    padding-top: 52px;
    padding-bottom: 52px;
  }
}

.enquiry-line-warning {
  border-color: #d7b46a;
  background: #fffaf0;
}

.line-warning {
  margin: 0;
  color: #7b5a16;
  font-size: 13px;
}

.enquiry-warning-summary {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #d7b46a;
  background: #fffaf0;
  color: #7b5a16;
}
