/* =========================================================================
   DP Trade — V2 overrides (design audit followup)
   Activates when <html data-design-version="v2">. V1 stays untouched.
   ========================================================================= */

/* ── Design toggle (visible in both versions) ─────────────────────────── */
.design-toggle {
  display: inline-flex;
  padding: 2px;
  border: 1px solid rgba(22, 22, 22, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  gap: 2px;
}
.design-toggle__btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 6px 14px;
  border-radius: 999px;
  font: 600 12px/1 var(--font-body);
  letter-spacing: 0.06em;
  color: var(--color-neutral-gray-700);
  cursor: pointer;
}
.design-toggle__btn.is-active {
  background: var(--color-primary-wine-100);
  color: #fff;
}
.design-toggle--nav {
  margin-left: auto;
  align-self: center;
  flex-shrink: 0;
}
.design-toggle--uikit {
  margin: 16px 24px 0;
  align-self: flex-start;
}

/* V2-only DOM nodes hidden under V1 */
[data-design-version="v1"] [data-v2-only] { display: none !important; }
[data-design-version="v2"] [data-v2-hide] { display: none !important; }

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 24px;
  padding-bottom: 8px;
  font-size: 13px;
  color: var(--color-neutral-gray-600);
}
.breadcrumbs a {
  color: var(--color-neutral-gray-600);
  text-decoration: none;
}
.breadcrumbs a:hover { color: var(--color-primary-wine-100); }
.breadcrumbs [aria-current="page"] { color: var(--color-neutral-black); }

/* Form success */
.form-success {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #F5F0E8;
  color: var(--color-primary-wine-100);
  font-weight: 500;
}

/* =========================================================================
   V2 SCOPE — everything below only applies when data-design-version="v2"
   ========================================================================= */

/* ── Global typography ────────────────────────────────────────────────── */
[data-design-version="v2"] body {
  font-family: var(--font-body);
  background: var(--color-background-base);
}

[data-design-version="v2"] h1,
[data-design-version="v2"] h2,
[data-design-version="v2"] h3,
[data-design-version="v2"] h4 {
  font-family: var(--font-heading);
  text-transform: none !important;
  font-weight: 400;
  letter-spacing: 0;
}

[data-design-version="v2"] .brand-logo,
[data-design-version="v2"] .brand-logo span:first-child {
  text-transform: none;
}
[data-design-version="v2"] .brand-logo small { font-size: 12px; }

[data-design-version="v2"] .phone-link {
  color: var(--color-primary-wine-100);
  font-weight: 500;
}

/* ── Hero (home) ──────────────────────────────────────────────────────── */
[data-design-version="v2"] .hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 400;
  text-transform: none !important;
  letter-spacing: 0;
  line-height: 1.05;
}

[data-design-version="v2"] .section-heading h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 400;
  text-transform: uppercase !important;
  letter-spacing: 0;
  line-height: 1.04;
}

/* ── Product card (grid) ──────────────────────────────────────────────── */
[data-design-version="v2"] .product-card {
  background: var(--color-surface-warm);
  border-color: rgba(22, 22, 22, 0.08);
}

[data-design-version="v2"] .product-media,
[data-design-version="v2"] .product-media--amber,
[data-design-version="v2"] .product-media--green {
  background: #F5F0E8 !important;
}

[data-design-version="v2"] .product-card h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
  text-transform: none !important;
  letter-spacing: 0;
  line-height: 1.12;
}

[data-design-version="v2"] .product-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(22, 22, 22, 0.08);
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
[data-design-version="v2"] .product-footer strong {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary-wine-100);
}
[data-design-version="v2"] .product-footer .button,
[data-design-version="v2"] .product-card .button--primary {
  background: transparent;
  color: var(--color-primary-wine-100);
  border: 1px solid var(--color-primary-wine-100);
  width: 100%;
  justify-content: center;
  font-weight: 500;
}
[data-design-version="v2"] .product-footer .button:hover,
[data-design-version="v2"] .product-card .button--primary:hover {
  background: var(--color-primary-wine-100);
  color: #fff;
}

/* Compact grid on home */
[data-design-version="v2"] .product-grid--compact .product-card h3 {
  font-size: 17px;
}

/* List cards (catalog) — same typography refresh */
[data-design-version="v2"] .product-card--list h3 {
  font-family: var(--font-heading);
  text-transform: none !important;
  letter-spacing: 0;
  font-weight: 400;
}

/* ── Catalog head ─────────────────────────────────────────────────────── */
[data-design-version="v2"] .catalog-head h1 {
  font-family: var(--font-heading);
  font-weight: 400;
  text-transform: none !important;
  letter-spacing: 0;
}

/* ── Mega menu ────────────────────────────────────────────────────────── */
[data-design-version="v2"] .mega-menu {
  text-align: left;
}

[data-design-version="v2"] .mega-intro {
  align-items: start;
}

[data-design-version="v2"] .mega-intro h2 {
  font-size: 22px;
  font-weight: 400;
  text-transform: none !important;
  letter-spacing: 0;
  font-family: var(--font-heading);
  line-height: 1.08;
}

[data-design-version="v2"] .menu-grid {
  grid-template-columns: minmax(160px, 0.72fr) minmax(140px, 0.72fr) minmax(280px, 1.35fr) minmax(180px, 0.9fr);
  align-items: start;
}

[data-design-version="v2"] .menu-column {
  align-items: flex-start;
  text-align: left;
}

[data-design-version="v2"] .menu-column a {
  font-weight: 400;
}

[data-design-version="v2"] .visual-column img {
  max-width: 160px;
  max-height: 100px;
  width: 160px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
}

[data-design-version="v2"] .country-link {
  color: var(--color-primary-wine-100);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

[data-design-version="v2"] .appellation-group a:not(.country-link) {
  padding-left: 12px;
  font-size: 14px;
  text-transform: none;
  font-weight: 400;
}

[data-design-version="v2"] .popular-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}
[data-design-version="v2"] .popular-list a {
  min-width: 120px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 14px;
  border: 1px solid rgba(125, 2, 29, 0.14);
  border-radius: 4px;
  background: rgba(255, 253, 250, 0.72);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  text-align: left;
}

/* Producer cards */
[data-design-version="v2"] .producer-card strong,
[data-design-version="v2"] .news-card h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  text-transform: none !important;
  letter-spacing: 0;
}
[data-design-version="v2"] .news-section { background: var(--color-surface-warm); }

/* ── Page hero (about / contacts / guidelines) ────────────────────────── */
[data-design-version="v2"] .page-hero h1 {
  font-family: var(--font-heading);
  font-weight: 400;
  text-transform: none !important;
  letter-spacing: 0;
  line-height: 1.08;
}

[data-design-version="v2"] .page-hero--about h1 {
  font-size: clamp(40px, 4vw, 56px);
}

[data-design-version="v2"] .page-hero--contacts {
  padding: 48px 0 24px;
  background-image: none;
  background: var(--color-background-base);
  color: var(--color-neutral-black);
}
[data-design-version="v2"] .page-hero--contacts h1 {
  font-size: clamp(32px, 3.4vw, 48px);
  color: var(--color-neutral-black);
}
[data-design-version="v2"] .page-hero--contacts p {
  color: var(--color-neutral-gray-700);
  font-size: 16px;
}
[data-design-version="v2"] .page-hero--contacts .page-hero__meta {
  box-shadow: none;
  background: var(--color-surface-warm);
}
[data-design-version="v2"] .page-hero__meta strong {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  text-transform: none !important;
  letter-spacing: 0;
  color: var(--color-primary-wine-100);
}

/* ── About / article ──────────────────────────────────────────────────── */
[data-design-version="v2"] .article-body { max-width: 640px; }

[data-design-version="v2"] .article-body h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 400;
  text-transform: none !important;
  letter-spacing: 0;
}

[data-design-version="v2"] .article-body .lead {
  font-family: var(--font-heading);
  font-weight: 400;
}

[data-design-version="v2"] .article-body blockquote {
  border-left: 1px solid rgba(22, 22, 22, 0.2);
  background: transparent;
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
  color: var(--color-neutral-black);
}

[data-design-version="v2"] .feature-card {
  min-height: 0;
  align-content: start;
  gap: 8px;
}
[data-design-version="v2"] .feature-card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  text-transform: none !important;
  letter-spacing: 0;
  font-weight: 400;
}

[data-design-version="v2"] .muted-section,
[data-design-version="v2"] .info-card--accent {
  background: var(--color-surface-warm);
}

/* ── Contacts ─────────────────────────────────────────────────────────── */
[data-design-version="v2"] .contact-panel a {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--color-primary-wine-100);
}

/* Move legal block to bottom of stack */
[data-design-version="v2"] .contact-stack {
  display: flex;
  flex-direction: column;
}
[data-design-version="v2"] .contact-panel:has(> span:only-of-type) {
  /* no-op fallback; target by text below if :has unsupported */
}
[data-design-version="v2"] .contact-stack .contact-panel:last-child {
  order: 99;
  font-size: 13px;
  background: transparent;
  box-shadow: none;
  border-color: rgba(22, 22, 22, 0.08);
  padding: 16px 20px;
}
[data-design-version="v2"] .contact-stack .contact-panel:last-child span {
  color: var(--color-neutral-gray-600);
  font-weight: 500;
}

/* Contact form */
[data-design-version="v2"] .contact-form h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 400;
  text-transform: none !important;
  letter-spacing: 0;
}
[data-design-version="v2"] .contact-form label {
  font-weight: 400;
  color: var(--color-neutral-gray-700);
}

/* ── Footer ───────────────────────────────────────────────────────────── */
[data-design-version="v2"] .contacts-card h2,
[data-design-version="v2"] .nav-group h2 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
}

[data-design-version="v2"] .nav-group a,
[data-design-version="v2"] .contact-link,
[data-design-version="v2"] .footer-legal {
  font-family: var(--font-body);
}

[data-design-version="v2"] .contact-phone {
  color: var(--color-primary-wine-100);
  font-weight: 600;
}

/* ── Buttons (global) ─────────────────────────────────────────────────── */
[data-design-version="v2"] .button--primary {
  background: var(--color-primary-wine-100);
  border-color: var(--color-primary-wine-100);
  text-transform: none;
  letter-spacing: 0;
}
[data-design-version="v2"] .button--secondary {
  background: var(--color-surface-warm);
  color: var(--color-primary-wine-100);
  border-color: transparent;
  text-transform: none;
  letter-spacing: 0;
}

/* ── Product detail page ──────────────────────────────────────────────── */
[data-design-version="v2"] .detail-copy h1 {
  font-family: var(--font-heading);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 400;
  text-transform: none !important;
  letter-spacing: 0;
}
[data-design-version="v2"] .detail-copy > p:not(.eyebrow) {
  max-width: 66ch;
}
[data-design-version="v2"] .detail-copy .hero-actions { margin-top: 16px; }

/* Remove cool background conflicts */
[data-design-version="v2"] .news-section,
[data-design-version="v2"] .section--muted {
  background: var(--color-surface-warm);
}

/* ── White-background product card variants ─────────────────────────────
   For bottle images with white/transparent backgrounds. Work under both
   V1 and V2; typography inherits from the active version.                */

.product-card[class*="--white"] {
  background: #ffffff;
  border: 1px solid rgba(22, 22, 22, 0.08);
  box-shadow: none;
}
.product-card[class*="--white"] .product-media {
  background: #ffffff !important;
  min-height: 240px;
}
.product-card[class*="--white"] .product-photo {
  max-height: 220px;
  object-fit: contain;
}

/* Variant A — pure white, minimal outline */
.product-card--white-pure {
  padding: 20px;
}

/* Variant B — elevated: white on warm page with soft shadow */
.product-card--white-elevated {
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(22, 22, 22, 0.04), 0 12px 32px rgba(22, 22, 22, 0.06);
  padding: 20px;
}

/* Variant C — hairline gold divider between media and body */
.product-card--white-hairline .product-media {
  border-bottom: 1px solid var(--color-accent-gold, #b9965b);
  padding-bottom: 12px;
  margin-bottom: 4px;
}

/* Variant D — thin burgundy frame around the media */
.product-card--white-framed .product-media {
  border: 1px solid rgba(125, 2, 29, 0.18);
  border-radius: 2px;
}

/* Variant E — split: white media, warm beige body */
.product-card--white-split {
  padding: 0;
  overflow: hidden;
}
.product-card--white-split .product-media {
  border-radius: 0;
}
.product-card--white-split .product-meta,
.product-card--white-split .product-footer {
  padding-left: 20px;
  padding-right: 20px;
  background: #F5F0E8;
}
.product-card--white-split .product-meta { padding-top: 16px; }
.product-card--white-split .product-footer { padding-bottom: 20px; }

/* Wide (catalog) variants — apply to .product-card--list */
.product-card--list[class*="--white"] {
  background: #ffffff;
  border: 1px solid rgba(22, 22, 22, 0.08);
  box-shadow: none;
}
.product-card--list[class*="--white"] .product-image {
  background: #ffffff;
}

/* Wide A — outline only, all white */
.product-card--list.product-card--white-wide {
  /* base already applied above */
}

/* Wide B — white image, warm info column */
.product-card--list.product-card--white-wide-split {
  padding: 0;
  overflow: hidden;
  background: #F5F0E8;
}
.product-card--list.product-card--white-wide-split .product-image {
  background: #ffffff;
  align-self: stretch;
  padding: 20px;
  border-right: 1px solid rgba(22, 22, 22, 0.06);
  max-height: none;
  min-height: 100%;
  height: 100%;
}
.product-card--list.product-card--white-wide-split .product-info,
.product-card--list.product-card--white-wide-split .product-buy {
  padding-top: 20px;
  padding-bottom: 20px;
}
.product-card--list.product-card--white-wide-split .product-buy {
  padding-right: 20px;
}

/* Wide C — white throughout with gold vertical hairline before info */
.product-card--list.product-card--white-wide-hairline .product-image {
  border-right: 1px solid var(--color-accent-gold, #b9965b);
  padding-right: 20px;
}

/* Showcase page layout */
.card-whitebg-section { background: var(--color-background-base); }
.card-whitebg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.card-whitebg-block { margin-top: 48px; }
.card-whitebg-block h2 {
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 6px;
}
.card-whitebg-block .eyebrow { margin: 0; }
.card-whitebg-block .variant-note {
  color: var(--color-neutral-gray-600);
  font-size: 14px;
  margin: 0 0 24px;
  max-width: 60ch;
}
