/* Winery detail only — body.page-winery (does not affect homepage cards) */

.page-winery .wy-sec {
  padding: clamp(56px, 7vw, 88px) 0;
  border-top: 1px solid rgba(217, 192, 138, .16);
}
.page-winery .wy-sec-tight {
  padding: clamp(40px, 5vw, 64px) 0;
}
.page-winery .wy-sec-head {
  margin: 0 0 28px;
}
.page-winery .wy-copy {
  max-width: 46rem;
  gap: 18px;
}

/* Gallery — editorial magazine: Rodina dominant + Vinice/Sklep stack */
.page-winery .wy-gallery .wy-media-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); /* ~59% / 41% */
  grid-template-rows: 1fr 1fr;
  gap: 14px;
  height: clamp(520px, 40vw, 700px);
  margin-top: 0;
}
.page-winery .wy-gallery .wy-media {
  margin: 0;
  border: 1px solid rgba(217, 192, 138, .2);
  background: #16070b;
  aspect-ratio: auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
  display: block; /* never inherit .wy-cellar display:grid */
}
.page-winery .wy-gallery .wy-media.wy-family {
  grid-row: 1 / -1;
}
.page-winery .wy-gallery .wy-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
/* Prefer faces / horizon — local overrides only, no new assets */
.page-winery[data-winery="tenuta-la-pergola"] .wy-gallery .wy-family img {
  object-position: center 28%;
}
.page-winery[data-winery="musso"] .wy-gallery .wy-family img {
  object-position: center 22%;
}
.page-winery[data-winery="borgogno"] .wy-gallery .wy-family img {
  object-position: center 26%;
}
.page-winery[data-winery="aurelio-settimo"] .wy-gallery .wy-family img {
  object-position: center 32%;
}
.page-winery .wy-gallery .wy-vineyard img {
  object-position: center 40%;
}
.page-winery[data-winery="aurelio-settimo"] .wy-gallery .wy-vineyard img {
  object-position: center 58%;
}
.page-winery .wy-gallery .wy-shot-cellar img {
  object-position: center 45%;
}
/* Portrait tiles in the small cellar slot — keep faces / aisle readable */
.page-winery .wy-gallery .wy-shot-cellar.wy-portrait img {
  object-fit: cover;
  object-position: center 22%;
}
.page-winery[data-winery="musso"] .wy-gallery .wy-shot-cellar.wy-portrait img {
  object-position: center 42%;
}
.page-winery[data-winery="tenuta-la-pergola"] .wy-gallery .wy-shot-cellar.wy-portrait img {
  object-position: center 52%;
}
.page-winery[data-winery="borgogno"] .wy-gallery .wy-shot-cellar.wy-portrait img {
  object-position: center 18%;
}
.page-winery .wy-gallery .wy-media figcaption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 1;
  font: .55rem Cinzel, serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #d9c08a;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
}

/* Terroir cards — no repeated place eyebrow; lighter nested frame */
.page-winery .wy-grid3 article,
.page-winery .wy-grid2 article {
  border: 1px solid rgba(217, 192, 138, .18);
  background: linear-gradient(145deg, rgba(95, 28, 40, .32), rgba(16, 5, 8, .55));
  padding: 22px 22px 24px;
}
.page-winery .wy-grid3 article > span.wy-place-label,
.page-winery .wy-grid2 article > span.wy-place-label {
  display: none;
}
.page-winery .wy-grid3 h3,
.page-winery .wy-grid2 h3 {
  margin: 0 0 10px;
  letter-spacing: .02em;
}

/* Sustainability — avoid double border stack; keep 4-up on desktop */
.page-winery .wy-cellar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-color: rgba(217, 192, 138, .2);
  background: linear-gradient(145deg, rgba(73, 19, 32, .22), rgba(17, 5, 9, .48));
}
.page-winery .wy-sec-ornament {
  background: linear-gradient(180deg, rgba(217, 192, 138, .04), transparent 30%, transparent 70%, rgba(217, 192, 138, .04));
}

/* Quote as bridge before wines */
.page-winery .wy-quote {
  max-width: 40rem;
}

/* Borgogno story — text block vertically centered vs vineyard (hero-like) */
.page-winery[data-winery="borgogno"] .wy-story-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 4vw, 56px);
  align-items: center;
  min-height: 0;
}
.page-winery[data-winery="borgogno"] .wy-story-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  max-width: 40rem;
}
.page-winery[data-winery="borgogno"] .wy-story-copy .wy-sec-head {
  margin: 0 0 22px;
}
.page-winery[data-winery="borgogno"] .wy-story-split .wy-copy {
  display: block;
  max-width: none;
  width: auto;
  margin: 0;
  padding: 0;
  gap: 0;
  min-height: 0;
}
.page-winery[data-winery="borgogno"] .wy-story-split .wy-copy p {
  max-width: none;
  margin: 0 0 22px 0;
  padding: 0;
}
.page-winery[data-winery="borgogno"] .wy-story-split .wy-copy p:last-child {
  margin: 0;
}
.page-winery[data-winery="borgogno"] .wy-story-photo {
  margin: 0;
  padding: 0;
  width: 100%;
  max-height: 420px;
  min-height: 0;
  height: auto;
  overflow: hidden;
  background: transparent;
  align-self: center;
  border: 0;
}
.page-winery[data-winery="borgogno"] .wy-story-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  margin: 0;
  padding: 0;
  object-fit: cover;
  object-position: center;
  aspect-ratio: 4 / 3;
}

/* Borgogno quote — calm text-only block */
.page-winery[data-winery="borgogno"] .wy-quote {
  max-width: min(960px, 100%);
  width: min(960px, 100%);
  margin: 0;
}

/* Optional visit portrait beside quote — Musso / other wineries */
.page-winery .wy-visit-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.72fr);
  gap: clamp(28px, 4.5vw, 56px);
  align-items: center;
}
.page-winery .wy-visit-split .wy-quote {
  max-width: none;
  margin: 0;
}
.page-winery .wy-visit-portrait {
  margin: 0;
  aspect-ratio: 3 / 4;
  max-height: min(520px, 68vh);
  height: auto;
  overflow: hidden;
  border: 1px solid rgba(217, 192, 138, .2);
  background: #16070b;
  position: relative;
}
.page-winery .wy-visit-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
.page-winery .wy-visit-portrait figcaption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 1;
  font: .55rem Cinzel, serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #d9c08a;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
}

/* Wine grid — all wineries: photo fills frame (no black letterbox) */
.page-winery .wy-wines {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.page-winery .wy-wine.is-collapsed {
  display: none;
}

.page-winery .wy-wine {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  margin: 0;
  background: #35131b;
  border: 1px solid rgba(217, 192, 138, .24);
}
.page-winery .wy-wine::before,
.page-winery .wy-wine::after,
.page-winery .wy-wine-media::before,
.page-winery .wy-wine-media::after {
  content: none !important;
  display: none !important;
}
.page-winery .wy-wine-media {
  display: block;
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: #2a1016;
  overflow: hidden;
  line-height: 0;
  aspect-ratio: 4 / 5;
  flex: none;
}
.page-winery .wy-wine-media--empty {
  background: #16070b;
  font: .62rem Cinzel, serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.page-winery .wy-wine-media img,
.page-winery .wy-wine > img {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center center !important;
  background: transparent !important;
  transform: none !important;
}
.page-winery .wy-wine-b {
  padding: 16px;
  margin: 0;
  position: relative;
  z-index: 1;
  background: #35131b;
  border: 0;
}
.page-winery .wy-wines-more {
  margin-top: 28px;
  text-align: left;
}
.page-winery .wy-wines-more[hidden] {
  display: none !important;
}
.page-winery .wy-wines-more .wy-btn {
  cursor: pointer;
}

/* Privé teaser on winery */
.page-winery .wy-prive-tease {
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid rgba(217, 192, 138, .14);
}
.page-winery .wy-prive-tease h2 {
  font: 500 clamp(1.45rem, 2.4vw, 1.85rem) / 1.15 "Playfair Display", serif;
  margin: 0 0 12px;
  color: #ebddbc;
}
.page-winery .wy-prive-tease > p {
  max-width: 36rem;
  margin: 0 0 22px;
  color: #e1d2b1;
}
.page-winery .wy-prive-tease .cellar-tease-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.page-winery .wy-prive-tease .cellar-tease-grid > a {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(217, 192, 138, .16);
  padding: 10px 12px;
  background: rgba(16, 5, 8, .35);
}
.page-winery .wy-prive-tease .cellar-tease-grid img {
  width: 50px;
  height: 77px;
  object-fit: contain;
  background: #16070b;
}
.page-winery .wy-prive-tease .cellar-tease-grid small {
  font: .55rem Cinzel, serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #d9c08a;
}
.page-winery .wy-prive-tease .cellar-tease-grid h3 {
  font: 500 1.05rem "Playfair Display", serif;
  margin: 4px 0;
}
.page-winery .wy-prive-tease .cellar-tease-grid p {
  margin: 0;
  font-size: .82rem;
  color: #cbb98e;
}
.page-winery .wy-prive-cta {
  margin: 0;
}

/* Closing CTA */
.page-winery .wy-close-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 1099px) {
  .page-winery .wy-wines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-winery .wy-prive-tease .cellar-tease-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* Tablet 768–1099: Rodina full width top, Vinice + Sklep below */
  .page-winery .wy-gallery .wy-media-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: clamp(300px, 38vw, 420px) clamp(220px, 28vw, 300px);
    height: auto;
  }
  .page-winery .wy-gallery .wy-media.wy-family {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .page-winery .wy-visit-split {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .page-winery .wy-visit-portrait {
    max-width: 360px;
    width: 100%;
    max-height: none;
  }
}

@media (max-width: 900px) {
  .page-winery .wy-grid3 {
    grid-template-columns: 1fr;
  }
  .page-winery .wy-cellar {
    grid-template-columns: 1fr 1fr;
  }
  .page-winery .wy-cellar article + article {
    border-left: 0;
    border-top: 1px solid rgba(217, 192, 138, .16);
  }
  .page-winery .wy-cellar article:nth-child(odd) {
    border-right: 1px solid rgba(217, 192, 138, .12);
  }
  .page-winery .wy-cellar article:nth-child(1),
  .page-winery .wy-cellar article:nth-child(2) {
    border-top: 0;
  }
}

@media (max-width: 767px) {
  .page-winery .wy-wines,
  .page-winery .wy-prive-tease .cellar-tease-grid,
  .page-winery .wy-grid2,
  .page-winery .wy-cellar {
    grid-template-columns: 1fr;
  }
  .page-winery .wy-cellar article:nth-child(odd) {
    border-right: 0;
  }
  .page-winery .wy-btn {
    min-height: 48px;
    width: 100%;
  }
  .page-winery .wy-close-cta,
  .page-winery .wy-hero .cta {
    flex-direction: column;
  }
  .page-winery .wy-prive-tease .cellar-tease-grid > a {
    grid-template-columns: 45px 1fr;
  }
  /* Borgogno story: stacked — heading, copy, then image */
  .page-winery[data-winery="borgogno"] .wy-story-split {
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: stretch;
  }
  .page-winery[data-winery="borgogno"] .wy-story-copy {
    max-width: none;
  }
  .page-winery[data-winery="borgogno"] .wy-story-photo,
  .page-winery[data-winery="borgogno"] .wy-story-photo img {
    min-height: 0;
    max-height: 360px;
    width: 100%;
    height: auto;
  }
  /* Mobile: Rodina → Vinice → Sklep stack */
  .page-winery .wy-gallery .wy-media-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    height: auto;
    gap: 12px;
  }
  .page-winery .wy-gallery .wy-media,
  .page-winery .wy-gallery .wy-media.wy-family {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    min-height: 0;
    max-height: none;
  }
  .page-winery .wy-gallery .wy-media.wy-portrait {
    aspect-ratio: 3 / 4;
  }
  .page-winery .wy-visit-portrait {
    max-width: 320px;
    margin-inline: auto;
  }
}

/* Aurelio first allocation list on winery page (same badge pattern as Privé / shop) */
.page-winery .aurelio-names {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.page-winery .aurelio-names li {
  font-family: var(--engrave, Cinzel, serif);
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mut, #cbb98e);
}
.page-winery .aurelio-names .badge-way {
  color: var(--gold-l, #e7c879);
  margin-right: 6px;
}
