@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@500;600&display=swap");

/* Overrides: set primary ink to black and add top margin for manifesto logo */
:root{--ink:#000000}
.manifesto-organic-logo{margin-top:20px}
main > .manifesto{display:none}

/* Keep the legal notice centered at the bottom of every banner. */
.excess-legend {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
}

/* Keep responsive product artwork filling its existing banner geometry. */
.wine-stage-media {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wine-stage-media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center !important;
  animation: 0.7s both wineFade;
}

.product-page-hero-media {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.product-page-hero-media > .product-page-hero-image {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center !important;
  animation: 0.8s both wineFade;
}

/* Small visible bottle markers reveal handwritten purchase text on hover. */
.hero-wine-hotspots {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.hero-wine-mobile-actions {
  display: none;
}

.hero-wine-hotspot {
  position: absolute;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.hero-wine-hotspot::before {
  content: "";
  width: 12px;
  height: 12px;
  display: block;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease;
}

.hero-wine-hotspot--ensamble { top: 25.8%; left: 55.5%; }
.hero-wine-hotspot--mezcla { top: 24.6%; left: 66%; }
.hero-wine-hotspot--malbec { top: 24.6%; left: 76%; }
.hero-wine-hotspot--nebbiolo { top: 25.8%; left: 86%; }

.hero-wine-hotspot-label {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  width: max-content;
  max-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #fff;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  text-align: center;
  text-shadow: 0 2px 9px rgba(0, 0, 0, 0.68);
  transform: translate(-50%, 6px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms step-end;
}

.hero-wine-hotspot-name,
.hero-wine-hotspot-action {
  font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  font-weight: 600;
  line-height: 0.9;
}

.hero-wine-hotspot-name {
  font-size: clamp(24px, 2.16vw, 36px);
  letter-spacing: -0.04em;
}

.hero-wine-hotspot-action {
  font-size: clamp(19px, 1.44vw, 23px);
}

.hero-wine-hotspot:hover .hero-wine-hotspot-label,
.hero-wine-hotspot:focus-visible .hero-wine-hotspot-label {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}

.hero-wine-hotspot:hover::before,
.hero-wine-hotspot:focus-visible::before {
  transform: scale(1.25);
}

.hero-wine-hotspot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Compensate for the extra image crop on tall desktop displays. */
@media (min-width: 801px) and (max-aspect-ratio: 3 / 2) {
  .hero-wine-hotspot--ensamble { left: 57%; }
  .hero-wine-hotspot--mezcla { left: 68%; }
  .hero-wine-hotspot--malbec { left: 79%; }
  .hero-wine-hotspot--nebbiolo { left: 90%; }
}

@media (max-width: 800px), (hover: none), (pointer: coarse) {
  .hero-wine-hotspots { display: none; }
}

@media (max-width: 800px) {
  /* Place the four mobile purchase actions directly beneath the bottle group. */
  .hero-wine-mobile-actions {
    z-index: 4;
    width: min(calc(100% - 32px), 360px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    position: absolute;
    top: 75%;
    left: 50%;
    transform: translateX(-50%);
  }

  .hero-wine-mobile-action {
    min-height: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 6px 8px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.96);
    text-align: center;
    transition: background 180ms ease, color 180ms ease;
  }

  .hero-wine-mobile-action:active,
  .hero-wine-mobile-action:focus-visible {
    color: var(--ink);
    background: #fff;
  }

  .hero-wine-mobile-action-name {
    font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive;
    font-size: 18px;
    font-weight: 600;
    line-height: 0.9;
  }

  .hero-wine-mobile-action-copy {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 7px;
    font-weight: 700;
  }
}

/* Crop the manifesto video on larger screens without leaving empty bands. */
@media (min-width: 801px) {
  .manifesto-sticky {
    height: 100svh;
    top: 0;
  }

  .manifesto-sticky video {
    object-position: center;
    transform: scale(1.667);
    transform-origin: center;
  }

  .hero-content .hero-organic-seal {
    position: static;
    align-self: flex-start;
    flex: 0 0 auto;
    margin-top: 36px;
  }
}

/* Preserve smooth, high-quality interpolation for product photography. */
.wine-stage > img,
.product-page-hero-image {
  image-rendering: auto !important;
  will-change: auto;
}

/* Increase banner sizes for better visual impact */
.wine-story {
  min-height: 600px;
}

.wine-stage {
  min-height: 600px;
}

/* Keep each product photograph centered in its banner. */
.wine-stage > img {
  image-orientation: from-image;
  object-position: center center !important;
}

/* Keep product-page hero images centered as well. */
.product-page-hero-image {
  min-height: 600px;
  object-position: center center !important;
}

/* Ensure product page hero container is optimized */
.product-page-hero {
  min-height: clamp(600px, 90svh, 1000px) !important;
}

/* Optimize image containers for high DPI displays */
@media (min-width: 1200px) {
  .wine-story {
    min-height: 700px;
  }
  
  .wine-stage {
    min-height: 700px;
  }
  
  .product-page-hero {
    min-height: clamp(700px, 90svh, 1200px) !important;
  }
}

/* Keep each banner's supporting copy aligned with its title. */
.wine-stage .wine-stage-copy,
.wine-stage-copy {
  align-items: flex-start !important;
  margin-inline: auto !important;
}

.wine-stage-copy h3,
.wine-stage-copy p,
.wine-stage-copy em {
  text-align: left !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  display: block !important;
  width: auto !important;
}

.wine-stage-copy em {
  font-style: italic !important;
}

.wine-stage-copy .wine-more-button {
  text-align: left !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  display: inline-flex !important;
  width: auto !important;
}

.wine-stage-actions {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.wine-stage-actions .wine-more-button {
  margin-top: 0 !important;
}

.wine-purchase-button {
  color: var(--ink) !important;
  background: var(--cream) !important;
  border-color: var(--cream) !important;
  text-shadow: none !important;
}

.wine-purchase-button:hover,
.wine-purchase-button:focus-visible {
  background: #fff !important;
  border-color: #fff !important;
}

@media (max-width: 800px) {
  /* Let the stage match the carousel height so bottom CTAs are not clipped. */
  .wine-story,
  .wine-stage {
    min-height: 0 !important;
  }

  .manifesto-sticky video {
    object-position: center;
    transform: scale(1.667);
    transform-origin: center;
  }

  .hero-content .hero-organic-seal {
    position: absolute;
    bottom: 28px;
    left: 50%;
    margin: 0;
    transform: translateX(-50%);
  }

  .wine-stage-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
    width: min(100%, 300px);
    align-self: center;
  }

  .wine-stage-actions .wine-more-button {
    justify-content: center;
    width: 100% !important;
    min-width: 0;
    padding-inline: 10px;
    padding-block: 8px;
    text-align: center !important;
  }

  .wine-stage-copy {
    padding-bottom: 48px;
  }

  .wine-stage-copy .wine-stage-actions {
    margin-top: auto;
  }

  .product-carousel-controls {
    color: var(--ink);
    justify-content: center;
    width: min(100% - 56px, 300px);
    margin: 14px auto 0;
    padding: 0;
    position: static;
  }

  .product-carousel-controls button {
    color: var(--ink);
    border-color: rgba(24, 53, 42, 0.28);
  }

  .product-carousel-controls span {
    color: var(--ink);
    opacity: 0.7;
  }

}
