/* Shared compact origin subtitle, only in wine profile heroes. */
.wine-detail-hero .wine-intro .wine-hero-origin{
  margin:8px 0 0;
  font-family:var(--heading);
  font-size:clamp(20px,2vw,27px);
  font-weight:500;
  font-style:italic;
  line-height:1.18;
  letter-spacing:-.02em;
  color:#8d6528;
}
.wine-detail-hero .wine-hero-origin+.wine-subtitle{margin-top:10px}

/* Wine profile heroes follow the header edges; extra space belongs to the copy. */
.wine-detail-hero > .shell{
  width:min(1600px,calc(100% - clamp(40px,8vw,160px)));
}
.wine-detail-hero .wine-intro{min-width:0}
.wine-detail-hero .wine-intro h1,
.wine-detail-hero .wine-subtitle{max-width:none}
@media(min-width:901px){
  /* Preserve the former left track: (min(1180px,100vw - 40px) - 90px) * .45. */
  .wine-detail-hero .wine-detail-grid{
    grid-template-columns:min(490.5px,calc(45vw - 58.5px)) minmax(0,1fr);
  }
}
@media(max-width:600px){
  .wine-detail-hero > .shell{width:min(1600px,calc(100% - 28px))}
}

/* Equal visible bottle height, independent of transparent canvas margins.
   Build-time alpha bounds position the unmodified source inside this frame. */
.wine-detail-hero .wine-photo{--wine-bottle-height:500px}
.wine-detail-hero .wine-bottle-frame{
  display:block;
  position:relative;
  left:calc(var(--wine-bottle-height) * var(--bottle-center));
  flex:none;
  width:calc(var(--wine-bottle-height) * var(--bottle-width));
  height:var(--wine-bottle-height);
  overflow:hidden;
  transform:rotate(-12deg);
  transform-origin:calc(50% - var(--wine-bottle-height) * var(--bottle-center)) 58%;
  filter:drop-shadow(11px 16px 10px rgba(50,28,20,.17));
  transition:transform .62s cubic-bezier(.2,.78,.2,1),filter .62s ease;
  will-change:transform;
}
.wine-detail-hero .wine-photo .wine-bottle-frame>img{
  position:absolute;
  display:block;
  left:calc(var(--wine-bottle-height) * var(--bottle-x));
  top:calc(var(--wine-bottle-height) * var(--bottle-y));
  width:calc(var(--wine-bottle-height) * var(--bottle-image-width));
  height:calc(var(--wine-bottle-height) * var(--bottle-image-height));
  max-width:none;
  max-height:none;
  transform:none;
  filter:none;
  transition:none;
  will-change:auto;
}
.wine-detail-hero .wine-photo:hover .wine-bottle-frame,
.wine-detail-hero .wine-photo:focus .wine-bottle-frame{
  transform:rotate(0deg) scale(1.12);
  filter:drop-shadow(15px 20px 12px rgba(50,28,20,.21));
}
@media(max-width:900px){
  .wine-detail-hero .wine-photo{--wine-bottle-height:400px}
}
@media(max-width:600px){
  .wine-detail-hero .wine-photo{--wine-bottle-height:300px}
}
@media(hover:none){
  .wine-detail-hero .wine-photo .wine-bottle-frame,
  .wine-detail-hero .wine-photo:hover .wine-bottle-frame,
  .wine-detail-hero .wine-photo:focus .wine-bottle-frame{
    transform:none;
    filter:drop-shadow(9px 13px 9px rgba(50,28,20,.16));
  }
}
@media(prefers-reduced-motion:reduce){
  .wine-detail-hero .wine-photo .wine-bottle-frame,
  .wine-detail-hero .wine-photo:hover .wine-bottle-frame,
  .wine-detail-hero .wine-photo:focus .wine-bottle-frame{transform:none;transition:none}
}
