/* product.css — la fiche vin : galerie, panneau d'achat, barre fixe, rail « Compléter la commande », zoom.
   Grille (style.css) : --edge, --gutter, --col-gap, --tap. Tailles de texte : jetons de type.css.
   Le chapitre dégustation (.mp-verre) et la bande « Le domaine » sont dans editorial.css (plan maître §4.10). */

#product-view {
  --mp-paper: var(--paper);
  --mp-ink: var(--ink);
  --mp-muted: #68675f;
  --mp-line: #d7d5cf;
  --mp-stage: var(--bottle-backdrop);
  --mp-button: #707768;
  background: var(--mp-paper);
  color: var(--mp-ink);
  font-family: var(--sans);
}
/* barre d'achat fixe : 64 px ; la place est réservée en permanence sous le pied de page (pas de saut, mention légale visible) */
body[data-view="product"] { --mp-sticky-h: 64px; --mp-layout-max: 100rem; --mp-panel-min: 31rem; }
body[data-view="product"] .site-footer { padding-bottom: calc(var(--mp-sticky-h) + 16px); }
/* le clavier ne laisse jamais un élément ciblé sous la barre fixe (front F4) */
html:has(body[data-view="product"]) { scroll-padding-bottom: calc(var(--mp-sticky-h) + 24px); }
body[data-view="product"] .announcement { z-index: 11; }
body[data-view="product"] .main-nav { background: rgb(255 255 255 / var(--nav-surface)); border-bottom-color: rgb(213 210 206 / var(--nav-surface)); }
body[data-view="product"] .main-nav > :is(.wordmark, .nav-left, .nav-right) { transition: color 145ms cubic-bezier(.35,0,.2,1); }
body[data-view="product"]:has(#mp-photo-stage > [data-scene]:not([aria-hidden])) .main-nav:not([data-dark-ink],.panel-open) {
  --photo-ink: white;
  --photo-shadow: 0 1px 2px rgb(0 0 0 / .35);
}
body[data-view="product"] .main-nav > .nav-left { color: var(--photo-ink, var(--ink)); }
body[data-view="product"] .main-nav > .wordmark { color: var(--photo-ink, #181714); }
body[data-view="product"] .main-nav :is(.nav-left .nav-link, .wordmark) { text-shadow: var(--photo-shadow, none); }
body[data-view="product"] .main-nav .wordmark__logo { filter: drop-shadow(var(--photo-shadow, 0 0 0 transparent)); }
@media (max-width:1023px) {
  body[data-view="product"] .main-nav > .nav-right { color: var(--photo-ink, var(--ink)); }
}
/* Sur ordinateur, l'encre du logo et des liens de gauche bascule au bord exact d'une photo « scene » : blanc sur la photo,
   encre sur le papier. La galerie finit sous le logo jusqu'à 1279 px, la jambe du R dépasse la photo de 1280 à 1599, la
   galerie commence dans la navigation de gauche à partir de 1600. Positions en % du fond fixe, donc de la largeur de la
   page hors gouttière de la barre de défilement (html { scrollbar-gutter: stable }, transitions.css), comme la grille
   .mp-layout. En vw, la bascule tombait 8 à 15 px trop loin : à 1024, le O de « MAISON » restait blanc sur le papier. */
@media (min-width:1024px) {
  body[data-view="product"]:has(#mp-photo-stage > [data-scene]:not([aria-hidden])) .main-nav:not([data-dark-ink],.panel-open) :is(.nav-left .nav-link, .wordmark) {
    /* la navigation de gauche : texte ; le logo : la même découpe, mais dans le masque à sa forme (plus bas) */
    /* 29/11 : la photo part du bord de l'écran à toutes les largeurs (voir .mp-gallery-area plus bas) ; elle finit au bord
       de la colonne de la galerie, dans la grille centrée */
    --photo-start: 0px;
    --photo-end: calc(max(0px, (100% - var(--mp-layout-max)) / 2) + min(58.333%, 58.333rem, 100% - var(--mp-panel-min)));
    background: linear-gradient(90deg, var(--ink) var(--photo-start), white var(--photo-start) var(--photo-end), var(--ink) var(--photo-end)) fixed;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
  }
  /* 24/11 : le logo est un SVG ; le même fond se découpe à sa forme par un masque (le fichier du dessin « petit corps »),
     le dessin lui-même s'efface */
  body[data-view="product"]:has(#mp-photo-stage > [data-scene]:not([aria-hidden])) .main-nav:not([data-dark-ink],.panel-open) .wordmark.wordmark {   /* même poids que la règle du texte : :is() compte .nav-left .nav-link */
    -webkit-background-clip: border-box; background-clip: border-box;
    -webkit-mask: url(assets/logo/maison-mercier-petit-corps.svg) 0 0 / 100% 100% no-repeat;
    mask: url(assets/logo/maison-mercier-petit-corps.svg) 0 0 / 100% 100% no-repeat;
  }
  body[data-view="product"]:has(#mp-photo-stage > [data-scene]:not([aria-hidden])) .main-nav:not([data-dark-ink],.panel-open) .wordmark__logo {
    opacity: 0; filter: none;
  }
}
#mp-photo-stage > picture[data-scene]::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: calc(var(--nav-height) + 7rem);
  background: linear-gradient(to bottom, rgb(12 11 10 / .68), rgb(12 11 10 / .57) 42%, transparent);
  pointer-events: none;
  transition: opacity 145ms ease;
}
body:has(.main-nav:is([data-dark-ink],.panel-open)) #mp-photo-stage > picture[data-scene]::after { opacity: 0; }
#product-view[hidden] { display: none; }
#product-view * { box-sizing: border-box; }
#product-view p, #product-view h1, #product-view h2, #product-view dl, #product-view dd { margin: 0; }
#product-view button, #product-view select { font: inherit; color: inherit; }
#product-view button { appearance: none; border: none; border-radius: 0; background: transparent; cursor: pointer; }
#product-view button:disabled { cursor: default; opacity: .45; }
#product-view :focus-visible { outline: 2px solid #403e39; outline-offset: 3px; }

/* ── Mise en page : galerie 7/12 collante, panneau 5/12 (L/XL) ── */
#product-view .mp-layout { display: grid; grid-template-columns: minmax(0,min(58.333%,calc(100% - var(--mp-panel-min)))) minmax(0,1fr); align-items: start; width: min(100%,var(--mp-layout-max)); margin-inline: auto; }
#product-view .mp-gallery-area { margin-top: calc(-1 * (var(--nav-height) + 30px)); align-self: stretch; min-width: 0; background: var(--mp-stage); }
#product-view .mp-gallery { position: sticky; top: 0; width: 100%; }
/* 29/11 (Benjamin : « c'est quoi cette barre blanche ») : au-delà de 100rem, la grille se centre et la photo s'arrêtait
   avant le bord gauche (une bande de papier de 64 px sur un écran de 1728 px). La galerie déborde jusqu'au bord de l'écran,
   à toutes les largeurs ; le panneau reste dans la grille. 100vw compte la gouttière de la barre de défilement quand elle
   existe : le débord passe alors de quelques pixels hors de l'écran, sans effet visible. */
@media (min-width: 1024px) {
  #product-view .mp-gallery-area { margin-left: min(0px, (var(--mp-layout-max) - 100vw) / 2); }
}
#product-view .mp-frame {
  position: relative;
  display: grid;
  width: 100%;
  height: 100vh;
  height: 100svh;
  place-items: center;
  touch-action: pan-y pinch-zoom;
  background: var(--mp-stage);
}
#product-view .mp-photo-stage { isolation: isolate; background: inherit; }
#product-view #mp-photo-stage:empty { visibility: hidden; }
#product-view #mp-photo-stage, #product-view .mp-photo-stage > picture { position: absolute; inset: 0; }
#product-view .mp-photo-stage > picture { display: block; background: inherit; }
#product-view .mp-photo-pending { visibility: hidden; }
#product-view .mp-photo-enter { animation: mp-crossfade .36s cubic-bezier(.3,.05,.25,1); }
@keyframes mp-crossfade { from { opacity: 0; } to { opacity: 1; } }
#product-view .mp-main-image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
#product-view .mp-thumbs { position: absolute; top: max(var(--nav-height), calc(50% - 10.5rem)); left: var(--edge); display: grid; gap: .9375rem; width: 6.0625rem; }
#product-view .mp-thumbs button {
  width: 100%;
  aspect-ratio: 97 / 73;
  min-height: 0;
  border: 1px solid transparent;
  padding: 0;
  overflow: hidden;
  background: var(--mp-stage);
  transition: border-color .15s ease;
}
#product-view .mp-thumbs button:hover { border-color: #928f87; }
#product-view .mp-thumbs button[aria-pressed=true] { border-color: var(--mp-ink); }
#product-view .mp-thumbs picture, #product-view .mp-thumbs img { display: block; width: 100%; height: 100%; }
#product-view .mp-thumbs img { object-fit: cover; }
@media (min-width:1024px) and (min-height:1101px) {
  #product-view .mp-thumbs { top: max(var(--nav-height), calc(50% - 16.65rem)); }
  #product-view .mp-thumbs button { aspect-ratio: 97 / 122; }
}
#product-view .mp-no-image { color: var(--mp-muted); }
#product-view .mp-panel { padding: 48px var(--edge) 64px clamp(32px,3.4vw,56px); min-width: 0; }

/* ── Panneau : surtitre et prix, nom, chapeau, format, quantité et ajout ── */
/* surtitre, puis le prix sur sa propre ligne, alignés à gauche à toutes les largeurs (vague 3, tour 2, T1-M1 : en flex
   avec retour à la ligne et texte aligné à droite, le prix tombait sous un surtitre long en « escalier » — 24 fiches à
   1440, 52 à 1024, 182 à 390) */
#product-view .mp-heading { display: grid; justify-items: start; gap: .45rem; }
#product-view #mp-origin { color: var(--mp-muted); }
#product-view .mp-unit-price { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .55rem; text-align: left; }
#product-view #mp-unit { white-space: nowrap; color: var(--mp-muted); }
#product-view #mp-case { flex-basis: 100%; }
#product-view #mp-name { margin: 14px 0 12px; overflow-wrap: anywhere; }
#product-view .mp-intro { max-width: var(--mesure-lecture); }
/* format et millésime : puces avec leur prix (balisage product.js du front) */
#product-view #mp-format { margin-top: 24px; }
#product-view .mp-format-label { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); }
#product-view .mp-formats { margin: 0; padding: 0; border: 0; min-width: 0; }
#product-view .mp-format-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#product-view .mp-format-chip { position: relative; display: inline-flex; flex-direction: column; justify-content: center; min-height: var(--tap); padding: 6px 14px; border: 1px solid #a9a49c; background: transparent; cursor: pointer; }
#product-view .mp-format-chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
#product-view .mp-format-chip-name { font: 500 var(--fs-n1)/var(--lh-ligne) var(--sans); }
#product-view .mp-format-chip-price { font: 400 var(--fs-n1)/var(--lh-petit) var(--sans); color: var(--mp-muted); font-variant-numeric: tabular-nums lining-nums; }
#product-view .mp-format-chip:hover { border-color: var(--mp-ink); }
#product-view .mp-format-chip:has(input:checked) { border-color: var(--mp-ink); background: var(--mp-ink); color: #fff; }
#product-view .mp-format-chip:has(input:checked) .mp-format-chip-price { color: rgb(255 255 255 / 86%); }
#product-view .mp-format-chip:has(input:focus-visible) { outline: 2px solid #403e39; outline-offset: 3px; }
#product-view .mp-format-chip.is-out .mp-format-chip-name { text-decoration: line-through; text-decoration-thickness: 1px; }
#product-view #mp-variant {
  appearance: auto; width: auto; max-width: 100%; min-height: var(--tap);
  border: 0; border-bottom: 1px solid currentColor; border-radius: 0;
  padding: .15rem .15rem .12rem; background: transparent; cursor: pointer;
}
#product-view .mp-pack { color: var(--mp-muted); margin-top: 8px; }
/* contenance inconnue : la précision sous les puces, jamais comme libellé de format (T1-m7) */
#product-view .mp-format-note { margin-top: 8px; color: var(--mp-muted); font: 400 var(--fs-n1)/var(--lh-petit) var(--sans); }
/* en petit, comme la ligne du format : la bouteille photographiée (photoNote, fr.js et il.js) et, quand l'introduction est la
   note de dégustation, le millésime auquel elle se rapporte (tour 3) */
#product-view :is(.mp-photo-note, .mp-intro-caveat) { margin-top: 8px; max-width: var(--mesure-lecture); color: var(--mp-muted); font: 400 var(--fs-n1)/var(--lh-petit) var(--sans); }
#product-view .mp-pack:empty { display: none; }
#product-view .mp-actions { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; margin-top: 20px; }
#product-view .mp-stepper { display: grid; grid-template-columns: 44px minmax(2.5rem,auto) 44px; align-items: stretch; min-height: 52px; border: 1px solid #676760; }
#product-view .mp-stepper output { align-self: center; text-align: center; font-variant-numeric: tabular-nums; }
#product-view .mp-stepper button { min-width: 44px; min-height: 44px; padding: 0; }
#product-view .mp-stepper button:not(:disabled):hover { background: #eceae4; }
#product-view .mp-order { min-height: 52px; padding: .7rem .75rem; background: var(--mp-button); color: white; transition: background .15s ease; }
#product-view .mp-order:hover { background: #565e50; }
/* « Ajouté » (data-added 1,2 s, motion-controls.css) : la coche occupe tout le bouton. Le soulignement de survol, posé sur le
   même ::after (1 px de haut, opacité .66, échelle 0 hors survol), la réduisait à un trait invisible : le bouton paraissait
   vide et l'on recliquait (tour 3, à la souris). */
#product-view .mp-order[data-added]::after { inset: -1px; height: auto; opacity: 1; transform: none; transition: none; }
/* le total de la commande pour ce vin : l'information pro, lisible (encre, pas gris) */
#product-view .mp-subtotal { padding-top: 10px; color: var(--mp-ink); }
#product-view .mp-unavailable { margin: .9rem 0 .45rem; }
#product-view .mp-contact, #product-view .mp-back { text-decoration: underline; text-underline-offset: .2em; color: inherit; }
#product-view .mp-contact { display: inline-flex; align-items: center; min-height: var(--tap); }
#product-view .mp-details { padding: 32px 0; margin-top: 32px; border-block: 1px solid var(--mp-line); }
#product-view .mp-tabs { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.15rem; }
#product-view .mp-tabs button { min-height: var(--tap); padding: 0; border-bottom: 1px solid transparent; }
#product-view .mp-tabs button[aria-selected=true] { color: #272821; border-bottom-color: currentColor; }
#product-view #mp-tab-panel { margin-top: 1.25rem; min-height: 2.2rem; overflow-wrap: anywhere; }
#product-view .mp-facts { display: grid; gap: .3rem; }
#product-view .mp-facts > div { display: flex; justify-content: space-between; gap: 1rem; }
#product-view .mp-facts dt { color: var(--mp-muted); }
#product-view .mp-facts dd { text-align: right; }
#product-view #mp-tab-panel dl { font-family: var(--sans); letter-spacing: normal; }
#product-view #mp-tab-panel p + p { margin-top: .7em; }
/* « À goûter aussi » : la carte unique, à l'horizontale */
#product-view .mp-related { margin-top: 1.6rem; padding-top: 2rem; border-top: 1px solid var(--mp-line); }
#product-view .mp-related h2 { margin-bottom: 1.4rem; }
#product-view .mp-related-card .wine-card { display: grid; grid-template-columns: minmax(0,35%) 1fr; align-items: start; gap: 0 1.25rem; }
#product-view .mp-related-card .wine-info { padding-top: 0; }
#product-view .mp-back { display: inline-flex; align-items: center; min-height: var(--tap); }
#product-view .mp-missing { padding: 9rem var(--edge) 4rem; }
#product-view .mp-missing a { display: inline-flex; align-items: center; min-height: var(--tap); margin-top: 1rem; }
#product-view .mp-reading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .65rem 1rem; margin-top: 1.3rem; }
#product-view .mp-reading a { display: inline-flex; align-items: center; min-height: var(--tap); text-decoration: underline; text-underline-offset: .2em; }
#product-view .mp-reading-note { color: var(--mp-muted); }
#product-view .mp-frame:has(.mp-no-image) { height: min(100svh,42rem); }
@media (min-width:1024px) and (max-height:480px) {
  #product-view .mp-thumbs { top: max(4rem, calc(50% - 6.3rem)); left: 1.25rem; width: 4rem; gap: .4rem; }
}
/* M et S : la galerie au-dessus (4:3 à la tablette, 4:5 au téléphone), le panneau dessous, l'achat dans le premier écran */
@media (max-width:1023px) {
  #product-view .mp-layout { display: flow-root; }
  #product-view .mp-gallery-area { margin-top: calc(-1 * var(--nav-height)); }
  #product-view .mp-gallery-area:has(.mp-archive) { margin-top: 0; }
  #product-view .mp-gallery { position: relative; top: auto; }
  #product-view .mp-frame { height: auto; aspect-ratio: 4 / 3; }
  #product-view .mp-frame:has(.mp-no-image) { height: auto; aspect-ratio: 4 / 3; }
  #product-view .mp-thumbs { left: 50%; top: auto; bottom: 0; transform: translateX(-50%); display: flex; width: auto; gap: 0; }
  #product-view .mp-thumbs button { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; aspect-ratio: auto; }
  #product-view .mp-thumbs button::before { content: ""; width: .5rem; height: .5rem; border-radius: 100%; background: #9d9a94; box-shadow: 0 0 0 1px #ffffffa0; }
  #product-view .mp-thumbs button[aria-pressed=true]::before { background: #46433e; }
  #product-view .mp-thumbs picture, #product-view .mp-thumbs img { display: none; }
  #product-view .mp-panel { padding: 26px var(--edge) 40px; }
  #product-view #mp-name { margin: 12px 0 10px; }
  #product-view #mp-format { margin-top: 18px; }
  #product-view .mp-actions { margin-top: 14px; }
  #product-view .mp-details { margin-top: 28px; padding: .5rem 0 1.5rem; }
  #product-view .mp-tabs { justify-content: center; gap: .25rem 1.5rem; }
  #product-view .mp-related-card .wine-card { grid-template-columns: minmax(0,30%) 1fr; gap: 0 1rem; }
}
@media (max-width:767px) {
  #product-view .mp-frame { aspect-ratio: 1 / 1; max-height: 58svh; }
  #product-view .mp-format-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: calc(-1 * var(--edge)); padding: 2px var(--edge) 2px 2px; scrollbar-width: none; }
  #product-view .mp-format-chips::-webkit-scrollbar { display: none; }
  #product-view .mp-format-chip { flex: none; }
  #product-view .mp-actions { grid-template-columns: auto minmax(0,1fr); gap: 10px; }
  #product-view .mp-stepper { min-height: 48px; }
  #product-view .mp-order { min-height: 48px; padding-inline: .5rem; }
  #product-view .mp-tabs { justify-content: space-between; gap: .25rem .8rem; }
  /* vague 3 (AGENTS.md : bouteille entière) — le cadre carré garde l'achat dans le premier écran, mais la photo 4:5 y
     était rognée en haut et en bas (col coupé, capsule sous le logo). Elle se pose entière sous l'en-tête ; le fond
     de scène (--mp-stage) prolonge le fond de studio des photos de bouteille. Plus de photo sous le logo : le logo
     garde son encre et le voile des scènes n'a plus lieu d'être. */
  #product-view .mp-gallery-area:not(:has(.mp-archive)) #mp-photo-stage > picture { padding-top: var(--nav-height); }
  #product-view #mp-photo-stage .mp-main-image { object-fit: contain; }
  #mp-photo-stage > picture[data-scene]::after { display: none; }
  body[data-view="product"]:has(#mp-photo-stage > [data-scene]:not([aria-hidden])) .main-nav:not([data-dark-ink],.panel-open) { --photo-ink: initial; --photo-shadow: initial; }
}

/* « Les gestes du vin » : styles dans editorial.css (§6), avec le gabarit de gallery-library.js. */

/* ── Zoom ── */
#product-view .mp-archive { width: min(85%,28rem); padding: clamp(1.5rem,5vw,4rem) 1.35rem; text-align: center; background: #f5f2eb; border-block: 1px solid #b7b2a5; }
#product-view #mp-open { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; cursor: zoom-in; }
#product-view #mp-open:focus-visible { outline-offset: -4px; }
body:has(.mp-zoom[open]) { overflow: hidden; }
#product-view .mp-zoom { border: 0; padding: 0; margin: auto; background: #f9f7f3; color: #403d39; width: min(96vw,90rem); max-width: 100vw; max-height: 96dvh;
  grid-template-rows: auto minmax(0,1fr) auto; height: 96dvh; }  /* la grille reste en place pendant la sortie animée (transitions.css) */
#product-view .mp-zoom[open] { display: grid; }
#product-view .mp-zoom::backdrop { background: rgb(22 20 18 / 76%); }
#product-view .mp-zoom :is(header,footer) { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .35rem 1rem; }
#product-view .mp-zoom button { min-height: 44px; min-width: 44px; display: grid; place-items: center; }
#product-view #mp-full-frame { position: relative; min-height: 0; background: var(--mp-stage); overflow: hidden; cursor: zoom-in; }
#product-view #mp-full-frame .mp-main-image { object-fit: contain; }
#product-view #mp-full-frame img { user-select: none; -webkit-user-drag: none; transform-origin: var(--lens-position,50% 50%); }
#product-view #mp-full-frame.mp-magnified { cursor: grab; touch-action: pinch-zoom; }
#product-view #mp-full-frame.mp-magnified:active { cursor: grabbing; }
#product-view #mp-full-frame[aria-disabled="true"] .mp-main-image { cursor: default; }
#product-view #mp-full-frame.mp-magnified img { transform: scale(var(--mp-zoom-scale, 1)); }
@media (prefers-reduced-motion:no-preference) {
  #product-view #mp-full-frame img { transition: transform .28s cubic-bezier(.22,1,.36,1); }
}
@media (max-width:767px) {
  #product-view .mp-zoom { width: 100vw; }
}

/* ── Compléter la commande : le rail de cartes uniques ── */
#product-view .mp-complete {
  --rail-gap: var(--col-gap);
  --rail-width: calc((100% - 3 * var(--col-gap)) / 4);
  padding: var(--section-y) 0;
  background: white;
}
#product-view .mp-complete header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--edge) var(--stack); }
#product-view #mp-colors { display: flex; gap: 8px; flex-wrap: wrap; }
#product-view #mp-colors button { min-height: var(--tap); padding: 0 22px; border: 1px solid currentColor; }
#product-view #mp-colors [aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: white; }
#product-view #mp-colors [aria-pressed=true]:focus-visible { outline-color: #403e39; outline-offset: 3px; }
#product-view .mp-slider { position: relative; }
#product-view #mp-wines { list-style: none; display: flex; align-items: stretch; gap: var(--rail-gap); margin: 0; padding: 0 var(--edge) 4px; overflow-x: auto; scrollbar-width: none; scroll-padding-inline: var(--edge); scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
#product-view #mp-wines::-webkit-scrollbar { display: none; }
#product-view #mp-wines li { display: flex; flex-direction: column; flex: 0 0 var(--rail-width); min-width: 0; scroll-snap-align: start; }
#product-view #mp-wines li > .wine-card { flex: 1; }
#product-view .mp-slider > button { position: absolute; top: calc(var(--rail-width) * .625); transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; background: var(--paper); color: #785c4e; box-shadow: 0 1px 6px rgb(0 0 0 / 12%); }
#product-view .mp-slider > button:disabled { opacity: 1; color: #baa9a2; visibility: hidden; }
#mp-prev-wine { left: max(4px, calc(var(--edge) - 22px)); }
#mp-next-wine { right: max(4px, calc(var(--edge) - 22px)); }
@media (min-width:1024px) and (max-width:1279px) { #product-view .mp-complete { --rail-width: calc((100% - 2 * var(--col-gap)) / 3); } }
@media (min-width:768px) and (max-width:1023px) { #product-view .mp-complete { --rail-width: calc((100% - var(--col-gap)) / 2); } }
@media (max-width:767px) {
  #product-view .mp-complete { --rail-width: calc((100% - var(--col-gap)) / 1.6); }
  #product-view .mp-complete header { flex-direction: column; align-items: stretch; gap: 12px; }
  #product-view #mp-colors { flex-wrap: nowrap; overflow-x: auto; margin-right: calc(-1 * var(--edge)); padding-right: var(--edge); scrollbar-width: none; }
  #product-view #mp-colors button { flex: none; padding-inline: 16px; }
  #product-view .mp-slider > button { display: none; }
}

/* ── Barre d'achat fixe : 64 px, une ligne au téléphone (prix + bouton) ── */
#product-view #mp-sticky {
  position: fixed; inset: auto 0 0; z-index: 8; background: var(--paper);
  display: grid; grid-template-columns: minmax(0,1fr) auto minmax(320px,30vw);
  gap: clamp(16px,3vw,64px); align-items: center; min-height: var(--mp-sticky-h);
  padding: 6px var(--edge) max(6px,env(safe-area-inset-bottom)); color: var(--ink);
  box-shadow: 0 -1px 0 var(--line);
}
#product-view .mp-sticky-wine { min-width: 0; }
#product-view .mp-sticky-wine strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#product-view .mp-sticky-wine small { display: block; margin-top: 2px; }
#product-view .mp-sticky-total { white-space: nowrap; }
#product-view #mp-sticky .mp-actions { margin: 0; }
#product-view #mp-sticky :is(.mp-stepper,.mp-order) { min-height: 48px; }
body:has(dialog[open],.main-nav.panel-open) #mp-sticky { visibility: hidden; }
@media (min-width: 1024px) and (min-aspect-ratio: 5/2) {
  #product-view #mp-photo-stage:has(img[src*="/studio/"]) .mp-main-image { object-fit: contain; }
}
@media (max-width:1023px) {
  #product-view #mp-sticky { grid-template-columns: minmax(0,1fr) auto minmax(0,22rem); gap: 12px; }
}
@media (max-width:767px) {
  body[data-view="product"] { --mp-sticky-h: 64px; }
  #product-view #mp-sticky { grid-template-columns: auto minmax(0,1fr); gap: 12px; }
  #product-view #mp-sticky .mp-sticky-wine, #product-view #mp-sticky .mp-stepper { display: none; }
  #product-view #mp-sticky .mp-actions { grid-template-columns: 1fr; }
  #product-view #mp-sticky .mp-order { padding-inline: 16px; }
}

/* la carte unique dans la fiche : le bouton d'ajout garde son cadre (la remise à zéro des boutons de la fiche l'enlevait) */
#product-view .wine-card .wine-add { border: 1px solid currentColor; }
#product-view .wine-card .wine-add:hover, #product-view .wine-card .wine-add:focus-visible { background: #4d4844; color: #fff; border-color: #4d4844; }
