@import url("./styles.css");

body.wine-detail {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(201, 166, 107, 0.18), transparent 32%),
    linear-gradient(180deg, #070a11, #0a0d15 45%, #070910);
  color: #ede8e1;
  font-family: "Cormorant Garamond", serif;
  position: relative;
  overflow-x: hidden;
  isolation: isolate;
}

body.wine-detail::before,
body.wine-detail::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body.wine-detail::before {
  background-image:
    url("../converted_no_bg_clean.svg"),
    url("../converted_no_bg_clean.svg");
  background-repeat: no-repeat, no-repeat;
  background-size: min(980px, 72vw) auto, min(760px, 58vw) auto;
  background-position: calc(100% + 220px) 56%, -250px 18%;
  opacity: 0.16;
  filter: grayscale(1) contrast(1.08) brightness(0.86);
  mix-blend-mode: screen;
  animation: wineDetailSvgDrift 28s ease-in-out infinite alternate;
}

body.wine-detail::after {
  background:
    radial-gradient(44% 36% at 78% 58%, rgba(201, 166, 107, 0.08), transparent 78%),
    radial-gradient(34% 26% at 18% 22%, rgba(147, 38, 67, 0.1), transparent 82%);
  opacity: 0.62;
}

@keyframes wineDetailSvgDrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -16px, 0); }
}

.wine-page {
  width: min(1160px, 92vw);
  margin: 0 auto;
  padding: 120px 0 80px;
  position: relative;
  z-index: 1;
}

.wine-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d8b883;
  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  margin-bottom: 36px;
}

.wine-layout {
  display: grid;
  grid-template-columns: minmax(220px, 380px) 1fr;
  gap: 38px;
  align-items: center;
  position: relative;
}

.wine-layout > * {
  position: relative;
  z-index: 1;
}

.wine-bottle {
  background: transparent;
  border: 1px solid rgba(201, 166, 107, 0.24);
  padding: 26px;
}

.wine-bottle img {
  max-height: 540px;
  margin: 0 auto;
}

body.wine-detail[data-slug="malvasia-nera"] .wine-bottle img {
  filter: brightness(1.24) contrast(1.08);
}

.wine-copy .kicker {
  color: #d5b076;
  margin: 0 0 6px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-family: "Cinzel", serif;
  font-size: 0.84rem;
}

.wine-copy h1 {
  margin: 0 0 18px;
  font-family: "Cinzel", serif;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.15;
}

.wine-copy .lead {
  margin: 0 0 14px;
  color: #d9dbe2;
  font-size: 1.45rem;
  line-height: 1.5;
}

.wine-copy .body {
  margin: 0 0 22px;
  color: #b7bcc8;
  font-size: 1.3rem;
  line-height: 1.55;
}

.wine-copy .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid rgba(201, 166, 107, 0.45);
  color: #debe85;
  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.85rem;
}

.wine-copy .cta:hover {
  background: rgba(201, 166, 107, 0.1);
}

@media (max-width: 860px) {
  body.wine-detail::before {
    background-size: min(980px, 125vw) auto, min(760px, 98vw) auto;
    background-position: 160% 68%, -250px 14%;
    opacity: 0.12;
  }

  body.wine-detail::after {
    opacity: 0.48;
  }

  .wine-layout {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .wine-bottle img {
    max-height: 380px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.wine-detail::before {
    animation: none;
  }
}

/* Wine detail remake: warm paper system aligned with catalog */
body.wine-detail {
  background:
    linear-gradient(90deg, rgba(95, 69, 45, 0.05) 1px, transparent 1px),
    radial-gradient(70% 90% at 100% 10%, rgba(111, 23, 48, 0.08), transparent 58%),
    linear-gradient(180deg, #f1eadf 0%, #e6dac8 100%) !important;
  background-size: 96px 96px, auto, auto !important;
  color: #201b16;
}

body.wine-detail .site-header {
  background: rgba(32, 27, 22, 0.96) !important;
  border-bottom: 1px solid rgba(215, 189, 130, 0.18) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.wine-detail::before {
  opacity: 0.045;
  filter: grayscale(1) contrast(1.05);
  mix-blend-mode: multiply;
}

body.wine-detail::after {
  opacity: 0.24;
  background:
    radial-gradient(44% 36% at 78% 58%, rgba(159, 116, 61, 0.12), transparent 78%),
    radial-gradient(34% 26% at 18% 22%, rgba(111, 23, 48, 0.08), transparent 82%);
}

.wine-top,
.wine-copy .kicker {
  color: #9f743d;
}

.wine-bottle {
  border-color: rgba(95, 69, 45, 0.22);
  background: rgba(250, 246, 238, 0.52);
}

.wine-copy h1 {
  color: #201b16;
}

.wine-copy .lead {
  color: #3f352b;
}

.wine-copy .body {
  color: #665d51;
}

.wine-copy .cta {
  background: #6f1730 !important;
  border-color: #6f1730 !important;
  color: #fff8ef !important;
}

.wine-copy .cta:hover {
  background: #571126 !important;
  border-color: #571126 !important;
}

/* ============================================
   LIGHT THEME — SINGLE SOURCE OF TRUTH
   Every wine detail page must read as the warm "paper" catalog, top to bottom.
   The shared styles.css leaves <html> dark (var(--bg)), which flashes black when
   you navigate into a wine and shows as black overscroll on mobile. Force the
   whole document light here (this file is only loaded by detail pages) and
   override the competing dark body.wine-detail rule from styles.css.
   ============================================ */
html {
  background: #f1eadf !important;
}

body.wine-detail {
  background:
    linear-gradient(90deg, rgba(95, 69, 45, 0.05) 1px, transparent 1px),
    radial-gradient(70% 90% at 100% 10%, rgba(111, 23, 48, 0.08), transparent 58%),
    linear-gradient(180deg, #f1eadf 0%, #e6dac8 100%) !important;
  background-size: 96px 96px, auto, auto !important;
  color: #201b16 !important;
}
