/* Vitrine, controles de descoberta e movimento entre as camadas. */
:root { --ease-enter: cubic-bezier(.17, .75, .21, 1); --ease-exit: cubic-bezier(.55, .04, .8, .35); }
html { scrollbar-gutter: stable; }
.store-nav { display: flex; gap: clamp(.55rem, 2vw, 1.75rem); align-items: center; }
.store-nav a { font-size: .84rem; min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; padding-inline: .15rem; }
.cart-trigger:hover { background: var(--soft); border-radius: 7px; }
.store-nav a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .36rem; }

.hero { background: var(--hero-bg); }
.hero-stage { min-height: clamp(350px, 35vw, 490px); position: relative; display: grid; align-items: center; overflow: clip; isolation: isolate; touch-action: pan-y pinch-zoom; }
.hero-stage::before { content: ""; z-index: -1; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, var(--hero-bg) 25%, rgba(var(--hero-fill), .97) 36%, rgba(var(--hero-fill), .12) 61%, transparent 77%); }
.hero-visual { position: absolute; inset: 0 0 0 34%; z-index: -2; overflow: clip; }
.hero-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 44%; }
.hero-frame.is-portrait { width: 68%; margin-inline-start: auto; object-position: 50% 55%; mask-image: linear-gradient(90deg, transparent, #000 16%); }
.hero-frame.is-entering { animation: frame-reveal .61s var(--ease-enter) both; }
.hero-frame.is-leaving { animation: frame-leave .6s var(--ease-enter) both; }
.hero[data-direction="prev"] .hero-frame.is-entering { --motion-x: -24px; }
.hero[data-direction="next"] .hero-frame.is-entering { --motion-x: 24px; }
.hero-caption { padding-block: 2.4rem; }
.hero-copy { max-width: 650px; padding-inline-start: clamp(0px, 3vw, 54px); }
.hero .hero-copy h1 { max-width: 10em; font-size: clamp(2.8rem, 5.55vw, 5.7rem); line-height: .93; letter-spacing: -.045em; margin: .55rem 0 .8rem; }
.hero-copy h1 span { display: block; }
.hero-intro { max-width: 29ch; font: italic 1.16rem/1.37 var(--serif); margin: .85rem 0 1.42rem; }
.hero-copy .primary { min-width: 156px; }
.hero-copy.is-entering > * { animation: copy-rise .48s var(--ease-enter) both; }
.hero-copy.is-entering > :nth-child(2) { animation-delay: .035s; }
.hero-copy.is-entering > :nth-child(3) { animation-delay: .075s; }
.hero-copy.is-entering > :nth-child(4) { animation-delay: .105s; }
.hero-empty .hero-stage { min-height: 270px; }

.hero-navigation { position: relative; z-index: 1; border-block: 1px solid var(--edge); background: var(--surface); }
.hero-nav-inner { display: flex; align-items: stretch; justify-content: space-between; gap: 1rem; }
.hero-rail { display: flex; gap: clamp(.55rem, 2vw, 1.6rem); align-items: stretch; overflow-x: auto; scrollbar-width: thin; }
.hero-choice { position: relative; display: flex; align-items: center; gap: .65rem; flex: 0 0 auto; min-height: 58px; padding: .45rem .6rem; text-align: start; color: var(--muted); }
.hero-choice:focus-visible { outline-offset: -3px; }
.hero-choice::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .26s var(--ease-enter); }
.hero-choice[aria-current="true"] { color: var(--ink); background: linear-gradient(0deg, color-mix(in srgb, var(--gold) 14%, transparent), transparent 65%); }
.hero-choice[aria-current="true"]::after { transform: scaleX(1); }
.hero.is-playing .hero-choice[aria-current="true"]::after { animation: chapter-progress 8s linear both; }
.hero-choice img { width: 29px; height: 35px; border-radius: 3px; object-fit: cover; object-position: center 55%; }
.chapter-name { font-family: var(--serif); font-weight: 600; font-size: clamp(.85rem, 1.35vw, 1.1rem); white-space: nowrap; }
.hero-controls { display: flex; align-items: center; gap: .15rem; flex: none; }
.chapter-button { display: grid; place-items: center; min-width: 44px; height: 44px; border-radius: 50%; color: var(--ink); transition: background .2s; }
.chapter-button:hover, .chapter-button:focus-visible { background: var(--soft); }

.tasting-callout { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding-block: 1.35rem; margin-top: 1.85rem; border-block: 1px solid var(--edge); }
.tasting-callout h2 { font-size: clamp(1.55rem, 3.1vw, 2.6rem); margin-block: .22rem .17rem; letter-spacing: -.025em; }
.tasting-callout p:last-child { color: var(--muted); }
.tasting-callout button { flex: none; }
.collection-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem .9rem; align-items: end; margin-bottom: .95rem; }
.collection-heading h2 { font-size: clamp(1.85rem, 4.5vw, 3.5rem); letter-spacing: -.032em; }
.collection-heading .eyebrow { margin-bottom: .25rem; }
.collection-heading .result-count { margin: 0 0 .2rem; }
.toolbar { margin-bottom: .85rem; }
.product-card { position: relative; isolation: isolate; transition: box-shadow .22s var(--ease-enter), border-color .2s, translate .22s var(--ease-enter); }
.product-card:focus-within { z-index: 1; border-color: var(--gold); box-shadow: 0 7px 24px color-mix(in srgb, var(--black) 18%, transparent); }
.product-card::after, .primary::after {
  content: ""; pointer-events: none; position: absolute; inset: 0; border-radius: inherit; opacity: 0;
  background: radial-gradient(ellipse 145px 100px at var(--light-x, 50%) var(--light-y, 45%), color-mix(in srgb, var(--gold) 30%, transparent), transparent);
  transition: opacity .24s var(--ease-enter);
}
.product-card:focus-within::after { opacity: .55; }
.primary { position: relative; box-shadow: inset 0 1px 0 #ffffff42, 0 3px 7px #29251f20; transition: transform .21s var(--ease-enter), box-shadow .23s, filter .2s; }
.primary:focus-visible::after { opacity: .65; }
.primary:active { transform: translateY(1px) scale(.973); box-shadow: inset 0 1px 3px #29251f40; }
.primary:active::after { opacity: 1; }
.primary.is-lit::after { animation: click-light .56s var(--ease-enter); }
@media (hover: hover) and (pointer: fine) {
  .product-card:hover { z-index: 1; translate: 0 -3px; border-color: var(--gold); box-shadow: 0 10px 26px color-mix(in srgb, var(--black) 18%, transparent); }
  .product-card:hover::after { opacity: .72; }
  .primary:hover::after { opacity: .85; }
}

dialog { box-shadow: 0 24px 88px #1b140f55, 0 0 0 1px color-mix(in srgb, var(--gold) 14%, transparent); --layer-x: 0px; --layer-y: 24px; --layer-start-opacity: 0; --layer-duration: .33s; }
dialog[open] { animation: layer-in var(--layer-duration) var(--ease-enter) both; }
dialog[open]::backdrop { animation: backdrop-in var(--layer-duration) var(--ease-enter) both; background-color: #1b140fb9; }
dialog[open].is-closing { animation: layer-out .19s var(--ease-exit) both; pointer-events: none; }
dialog[open].is-closing::backdrop { animation: backdrop-out .19s ease-in both; }
.product-dialog { --layer-y: 19px; width: min(840px, 100% - 1.5rem); overflow: auto; }
.product-detail { min-height: min(438px, calc(100dvh - 3rem)); }
.detail-visual { position: relative; min-height: 0; overflow: hidden; background: var(--soft); }
.detail-visual .detail-image { position: absolute; inset: 0; height: 100%; min-height: 0; }
.product-dialog .detail-copy { align-self: center; }
.drawer { --layer-x: 100%; --layer-y: 0px; --layer-start-opacity: 1; }
.drawer-heading.layer-heading {
  position: sticky; z-index: 3; top: -1.1rem; margin: -1.1rem -1.25rem .85rem;
  padding: 1.1rem 1.25rem .8rem; background: var(--surface); border-bottom: 1px solid var(--edge);
}
.layer-heading .eyebrow { margin-bottom: .12rem; }
.layer-heading .icon-button { flex: 0 0 44px; }
.tasting-dialog { width: min(510px, 100%); }
.tasting-intro { margin-bottom: .72rem; color: var(--muted); }
.tasting-families { display: flex; flex-wrap: wrap; gap: .38rem; margin: 0 0 1rem; }
.tasting-families button { border: 1px solid var(--edge); border-radius: 100px; padding: .36rem .75rem; min-height: 40px; font-size: .89rem; }
.tasting-families [aria-pressed="true"] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.tasting-options { display: grid; gap: .52rem; }
.tasting-option {
  display: grid; grid-template-columns: 50px minmax(0, 1fr) 44px; gap: .62rem;
  align-items: center; min-height: 67px; padding: .38rem; border: 1px solid var(--edge);
  border-radius: 7px; transition: border-color .25s, background .25s;
}
.tasting-option.is-picked { border-color: var(--gold); background: var(--soft); }
.tasting-option img { width: 50px; height: 53px; object-fit: cover; object-position: 50% 55%; border-radius: 4px; }
.tasting-product { display: block; padding: 0; text-align: left; font: 650 1rem/1.12 var(--serif); }
.tasting-product:hover { text-decoration: underline; }
.tasting-option-meta { color: var(--muted); font-size: .79rem; margin-top: .26rem; }
.tasting-option [aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tasting-status { min-height: 1.35rem; margin: .37rem 0; color: var(--muted); font-size: .83rem; }
.tasting-tray { position: sticky; bottom: -1.1rem; margin: .48rem -1.25rem -1.1rem; padding: .85rem 1.25rem 1.1rem; background: var(--surface); border-top: 1px solid var(--edge); box-shadow: 0 -8px 27px #29251f13; }
.tasting-picks { display: flex; flex-wrap: wrap; gap: .32rem; margin-top: .38rem; max-height: 5.5rem; overflow-y: auto; }
.tasting-tray-summary { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.tasting-submit { width: 100%; margin-top: .65rem; }
.filters-dialog .extra-filters { display: grid; align-items: center; background: transparent; padding: 0; gap: .85rem; }
.filters-dialog .extra-filters label { font-size: .94rem; }
.filter-actions { display:flex; flex-wrap: wrap; gap: .55rem; justify-content: space-between; margin-top: 1.35rem; }
#cart-count.is-changing { animation: bag-bump .34s var(--ease-enter) both; }
.cart-row.is-updated { animation: row-highlight .6s var(--ease-enter) both; }
.toast:not([hidden]) { animation: toast-in .3s var(--ease-enter) both; }

@keyframes frame-reveal { from {opacity: 0; transform: translateX(var(--motion-x, 15px)) scale(1.025);} to {opacity: 1; transform: translateX(0) scale(1);} }
@keyframes frame-leave { from {opacity: 1;} to {opacity: 0;} }
@keyframes copy-rise { from {opacity: 0; transform: translateY(12px);} to {opacity: 1; transform: translateY(0);} }
@keyframes chapter-progress { from {transform: scaleX(0);} to {transform: scaleX(1);} }
@keyframes layer-in { from {opacity: var(--layer-start-opacity); transform: translate(var(--layer-x), var(--layer-y));} to {opacity: 1; transform: translate(0);} }
@keyframes layer-out { from {opacity: 1; transform: translate(0);} to {opacity: var(--layer-start-opacity); transform: translate(var(--layer-x), var(--layer-y));} }
@keyframes backdrop-in { from {opacity: 0;} to {opacity: 1;} }
@keyframes backdrop-out { from {opacity: 1;} to {opacity: 0;} }
@keyframes click-light { 0% {opacity: 0;} 23% {opacity: 1;} 100% {opacity: 0;} }
@keyframes bag-bump { 0%, 100% {transform: scale(1);} 40% {transform: scale(1.27);} }
@keyframes row-highlight { from {background-color: color-mix(in srgb, var(--gold) 28%, transparent);} to {background-color: transparent;} }
@keyframes toast-in { from {opacity: 0; translate: 0 10px;} to {opacity: 1; translate: 0 0;} }

@media (max-width: 720px) {
  .store-nav { display: none; }
  .hero-stage { min-height: 420px; align-items: stretch; }
  .hero-stage::before { background: linear-gradient(180deg, var(--hero-bg) 20%, rgba(var(--hero-fill), .99) 32%, rgba(var(--hero-fill), .08) 59%, transparent 80%); }
  .hero-visual { inset: 33% 0 0; }
  .hero-frame { object-position: 90% 48%; }
  .hero-frame.is-portrait { width: 100%; margin: 0; object-position: 50% 60%; mask-image: none; }
  .hero-caption { width: calc(100% - 2.4rem); padding-block: 1.15rem 1rem; }
  .hero-copy { padding: 0; display: flex; flex-direction: column; min-height: 100%; align-items: start; }
  .hero .hero-copy h1 { font-size: clamp(2.4rem, 9.9vw, 4.2rem); margin: .48rem 0 .42rem; }
  .hero-intro { font-size: 1rem; margin-top: .2rem; }
  .hero-copy .primary { margin-top: auto; align-self: center; }
  .hero-nav-inner { gap: .32rem; width: calc(100% - 1rem); }
  .hero-rail { gap: .3rem; }
  .hero-choice { padding-inline: .32rem; min-height: 53px; }
  .hero-choice img { width: 32px; height: 37px; }
  .hero-choice .chapter-name { display: none; }
  .hero-controls { gap: 0; }
  .tasting-callout { margin-top: 1.1rem; display: grid; gap: .65rem; padding-block: .85rem; }
  .tasting-callout button { justify-self: start; }
  .tasting-callout p:last-child { font-size: .875rem; }
  dialog.drawer, dialog.product-dialog {
    --layer-x: 0px; --layer-y: 100%; --layer-start-opacity: 1;
    position: fixed; width: 100%; max-width: none; height: auto; max-height: min(92dvh, 860px); inset: auto 0 0; margin: 0;
    border-radius: 16px 16px 0 0; padding-bottom: max(1.1rem, env(safe-area-inset-bottom));
  }
  dialog.product-dialog { padding-bottom: env(safe-area-inset-bottom); }
  .product-detail { min-height: 0; }
  .product-dialog .detail-visual { height: min(36dvh, 265px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; }
  .product-card:hover, .primary:active { transform: none; translate: none; }
}

.tasting-picks button { background: var(--soft); border-radius: 4px; padding: .35rem .45rem; min-height: 34px; font-size: .78rem; text-align: left; }
.tasting-picks button:hover { background: var(--olive-faint); }
.tasting-picks button:focus-visible { outline-offset: -3px; }
.cart-feedback { margin-bottom: .6rem; padding: .55rem .7rem; border-inline-start: 3px solid var(--gold); background: var(--soft); font-size: .9rem; }
@media (prefers-reduced-motion: reduce) {
  .hero-copy.is-entering > * { animation-delay: 0s !important; }
}


.top { position: sticky; top: 0; box-shadow: 0 2px 9px #29251f0d; }
#colecao, #provador { scroll-margin-top: 5.3rem; }
.sheet-grip { display: none; }
@media (max-width: 720px) {
  dialog[open] { translate: 0 var(--sheet-offset, 0px); }
  .sheet-grip { display: grid; place-items: center; touch-action: none; min-height: 26px; }
  .sheet-grip { cursor: grab; }
  .sheet-grip:active { cursor: grabbing; }
  .sheet-grip::after { content: ""; display: block; width: 34px; height: 4px; border-radius: 4px; background: var(--edge); }
  .drawer .sheet-grip { margin: -1.1rem -1.25rem 1.1rem; background: var(--surface); }
  .product-dialog .dialog-close { top: 1.8rem; }
}
