/* ==========================================================================
   Engifted — product.css
   Layout modeled on the wrldinvsn.com product page UX: breadcrumb row,
   1.2fr / 1fr grid, 4:5 gallery with thumbnail rail, sticky info column,
   centered title + struck-through compare price, size chips, full-width
   add-to-bag, accordions, related grid.
   ========================================================================== */

.pdp { padding-bottom: clamp(60px, 8vw, 120px); }
.crumbs {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 18px 0;
  font-family: var(--f-display); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--c-muted);
}
.crumbs a:hover { color: var(--c-ink); }
.crumbs__current { color: var(--c-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pdp__grid { display: grid; gap: 32px; }
@media (min-width: 1024px) {
  .pdp__grid { grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: start; }
  .pdp__info { position: sticky; top: calc(var(--header-h) + var(--announce-h) + 24px); }
}

/* ---------- Gallery ---------- */
.gallery { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (min-width: 640px) {
  .gallery { flex-direction: row-reverse; gap: 14px; }
}
.gallery__main { position: relative; flex: 1; min-width: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--c-surface); touch-action: pan-y; }
.gallery__track { position: absolute; inset: 0; }
.gallery__slide {
  position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .55s var(--ease);
}
.gallery__slide.is-active { opacity: 1; z-index: 1; }
.gallery__slide picture, .gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery__main.is-zoom { cursor: zoom-out; }
.gallery__main.is-zoom .gallery__slide.is-active img { transform: scale(1.8); transition: transform .3s var(--ease); }
.gallery__main:not(.is-zoom) { cursor: zoom-in; }
.gallery__arrow {
  position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9);
  display: grid; place-items: center; transition: background-color .3s, color .3s;
}
.gallery__arrow:hover { background: var(--c-ink); color: #fff; }
.gallery__arrow--prev { left: 12px; }
.gallery__arrow--next { right: 12px; }
.gallery__count {
  position: absolute; right: 14px; bottom: 14px; z-index: 3; background: rgba(255,255,255,.9);
  font-family: var(--f-display); font-size: .72rem; letter-spacing: .14em; padding: 6px 10px;
}
.gallery__thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.gallery__thumbs::-webkit-scrollbar { display: none; }
@media (min-width: 640px) {
  .gallery__thumbs { flex-direction: column; width: 84px; flex-shrink: 0; overflow-y: auto; max-height: 100%; }
}
.gallery__thumb {
  flex-shrink: 0; width: 72px; aspect-ratio: 4 / 5; padding: 0; border: 1px solid transparent; background: var(--c-surface);
  opacity: .55; transition: opacity .3s, border-color .3s;
}
@media (min-width: 640px) { .gallery__thumb { width: 100%; } }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb:hover { opacity: .85; }
.gallery__thumb[aria-selected="true"] { opacity: 1; border-color: var(--c-ink); }

/* ---------- Info ---------- */
.pdp__info { min-width: 0; text-align: center; }
.pdp__collection { margin-bottom: .6em; }
.pdp__title {
  font-family: var(--f-display); font-weight: 700; font-style: italic; text-transform: uppercase;
  letter-spacing: var(--track-tight); line-height: 1; font-size: clamp(1.8rem, 3vw, 2.8rem); margin: 0;
}
.pdp__price { margin-top: 14px; font-size: 1.2rem; align-items: baseline; }
.pdp__save {
  font-family: var(--f-display); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase;
  background: var(--c-accent); color: #fff; padding: 4px 8px;
}
.pdp__desc { margin-top: 24px; font-size: .95rem; line-height: 1.7; color: #555; text-align: left; }

.pdp__form { margin-top: 32px; text-align: left; }
.pdp__sizehead { display: flex; justify-content: space-between; align-items: baseline; }
.pdp__sizehead .eyebrow { margin: 0; }
.pdp__chosen { color: var(--c-ink); margin-left: .6em; letter-spacing: .1em; }
.pdp__guide { font-size: .78rem; text-decoration: underline; text-underline-offset: 3px; color: var(--c-muted); }
.pdp__form .size-grid { margin-top: 12px; }
.pdp__form .size-btn { flex: 1 1 0; min-width: 52px; }
.pdp__stock { min-height: 1.4em; margin: 10px 0 0; font-size: .85rem; color: var(--c-accent); }
.pdp__form.is-shake .size-grid { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.pdp__actions { margin-top: 18px; display: grid; gap: 10px; }

.accordion { margin-top: 40px; border-top: 1px solid var(--c-line); text-align: left; }
.accordion details { border-bottom: 1px solid var(--c-line); }
.accordion summary {
  list-style: none; cursor: pointer; padding: 18px 0; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--f-display); font-size: .78rem; letter-spacing: .24em; text-transform: uppercase; color: var(--c-ink);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 1.2rem; letter-spacing: 0; transition: transform .3s var(--ease); }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion__body { padding: 0 0 20px; font-size: .92rem; color: #555; animation: acc-down .35s var(--ease-out); }
.accordion__body ul { margin: 0; padding-left: 1.1em; }
.accordion__body a { text-decoration: underline; text-underline-offset: 3px; }
@keyframes acc-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.related { margin-top: clamp(80px, 9vw, 120px); }
.related__title { text-align: center; font-size: clamp(1.8rem, 3vw, 2.8rem); margin-bottom: 40px; }

/* ---------- Mobile sticky add bar ---------- */
.pdp__sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--c-line);
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transform: translateY(100%); transition: transform .35s var(--ease-out);
}
.pdp__sticky.is-show { transform: none; }
.pdp__sticky strong { display: block; font-family: var(--f-display); text-transform: uppercase; font-size: .82rem; letter-spacing: .04em; }
.pdp__sticky .price { justify-content: flex-start; font-size: .85rem; }
.pdp__sticky .btn { padding: 14px 22px; flex-shrink: 0; }
@media (min-width: 1024px) { .pdp__sticky { display: none !important; } }
