/* Atelier product page: gallery + sticky buy column, swatches, sizes, accordions, card rows, phone buy bar. */
:root { interpolate-size: allow-keywords; }
.pdp { padding-top: calc(var(--announce-h) + var(--header-h)); }

/* ---- breadcrumb ---- */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 20px var(--gutter); list-style: none; font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .6; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- layout ---- */
.pdp__grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); gap: clamp(24px, 4vw, 64px); padding: 0 var(--gutter); }

/* ---- gallery: stacked on desktop, swipe on phones ---- */
.gallery__track { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.gallery__item { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bone-lo); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.gallery__dots { display: none; }

/* ---- buy column ---- */
.buy { position: sticky; top: calc(var(--header-h) + 24px); padding-bottom: 48px; }
.pdp__title { margin: 0 0 12px; font: 400 clamp(2.4rem, 1.6rem + 2.6vw, 3.8rem)/1 var(--serif); letter-spacing: -.02em; }
.pdp__title em { color: var(--clay); }
.pdp__price { margin: 0 0 20px; font-size: 1.25rem; }
.pdp__lede { max-width: 52ch; margin: 0; color: var(--ink-soft); }

fieldset { min-width: 0; margin: 24px 0 0; padding: 0; border: 0; }
legend { width: 100%; margin-bottom: 12px; padding: 0; font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; }
.sizes legend { display: flex; justify-content: space-between; align-items: baseline; }
.sizes__guide { font-size: var(--fs-sm); letter-spacing: 0; text-transform: none; text-underline-offset: 3px; }

.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .15); outline: 1px solid transparent; outline-offset: 4px; transition: outline-color .3s, transform .3s var(--ease-out); }
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { outline-color: var(--espresso); }
.swatch:focus-visible { outline: 2px solid var(--clay); }

.sizes__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.sizes__grid label { display: grid; place-items: center; height: 48px; border: 1px solid var(--line); font-size: var(--fs-sm); cursor: pointer; transition: border-color .3s, background-color .3s, color .3s; }
.sizes__grid label:hover { border-color: var(--espresso); }
.sizes__grid input:checked + label { background: var(--espresso); border-color: var(--espresso); color: var(--bone); }
.sizes__grid input:focus-visible + label { outline: 2px solid var(--clay); outline-offset: 2px; }
.sizes__grid input:disabled + label { color: var(--ink-soft); cursor: not-allowed; background: linear-gradient(to top right, transparent calc(50% - .5px), var(--line) 50%, transparent calc(50% + .5px)); }
.sizes__grid input:disabled + label:hover { border-color: var(--line); }
.sizes__note { margin: 10px 0 0; font-size: var(--fs-sm); color: var(--ink-soft); }

.btn--buy { margin-top: 28px; min-height: 58px; }
.btn--buy .btn__label, .btn--buy .btn__done { transition: transform .5s var(--ease-out), opacity .4s; }
.btn__done { position: absolute; inset: 0; display: grid; place-items: center; transform: translateY(140%); opacity: 0; }
.btn--buy.is-added::before { transform: scaleY(0); }
.btn--buy.is-added .btn__label { transform: translateY(-140%); opacity: 0; }
.btn--buy.is-added .btn__done { transform: none; opacity: 1; }

.perks { display: grid; gap: 8px; margin: 20px 0 28px; padding: 0; list-style: none; font-size: var(--fs-sm); }
.perks li { display: flex; align-items: center; gap: 10px; }
.perks li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--clay); }

/* ---- accordion (native <details>; animates where ::details-content is supported) ---- */
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 18px 0; list-style: none; cursor: pointer; font-size: var(--fs-sm); letter-spacing: .12em; text-transform: uppercase; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::before, .accordion summary::after { content: ""; position: absolute; right: 2px; top: 50%; width: 12px; height: 1px; background: currentColor; transition: transform .45s var(--ease-out); }
.accordion summary::after { transform: rotate(90deg); }
.accordion details[open] summary::after { transform: rotate(0deg); }
.accordion details::details-content { block-size: 0; overflow: hidden; transition: block-size .45s var(--ease-out), content-visibility .45s allow-discrete; }
.accordion details[open]::details-content { block-size: auto; }
.accordion__body { padding-bottom: 20px; color: var(--ink-soft); }
.accordion__body ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.accordion__body li { display: flex; gap: 10px; align-items: baseline; }
.accordion__body li::before { content: ""; flex: none; width: 4px; height: 4px; border-radius: 50%; background: currentColor; transform: translateY(-3px); }

/* ---- card rows ---- */
.rowset .h2 { margin-bottom: clamp(28px, 3vw, 44px); }
.rowset + .rowset { padding-top: 0; }

/* ---- phone buy bar ---- */
.buybar { position: fixed; inset: auto 0 0; z-index: 55; display: flex; align-items: center; gap: 12px; padding: 10px var(--gutter); background: var(--bone-hi); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .5s var(--ease-out); }
.buybar.is-on { transform: none; }
.buybar img { width: 44px; height: 55px; object-fit: cover; }
.buybar__text { flex: 1; min-width: 0; font-size: var(--fs-sm); }
.buybar__text p { margin: 0; }
.buybar__name { font-family: var(--serif); font-size: 1rem; }
.buybar .btn { min-height: 44px; padding: 0 18px; }
.demo-pill { transition: opacity .3s; }
.buybar.is-on ~ .demo-pill { opacity: 0; pointer-events: none; }

@media (min-width: 900px) {
  .buybar { display: none; }
}
@media (max-width: 899px) {
  .pdp__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pdp__gallery { margin: 0 calc(-1 * var(--gutter)); }
  .gallery__track { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .gallery__track::-webkit-scrollbar { display: none; }
  .gallery__item { flex: 0 0 100%; scroll-snap-align: start; }
  .gallery__dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
  .gallery__dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--line); transition: width .4s var(--ease-out), background-color .4s; }
  .gallery__dots i.is-on { width: 18px; background: var(--espresso); }
  .buy { position: static; padding-top: 24px; }
}
