.seo-product .product-overview {
  display: grid;
  grid-template-areas: "media heading" "media info";
  grid-template-rows: auto 1fr;
  align-items: start;
  row-gap: 16px;
}

.seo-product-heading { grid-area: heading; min-width: 0; }
.product-overview .seo-product-media { grid-area: media; min-width: 0; align-content: start; gap: 8px; }
.product-overview .seo-product-info { grid-area: info; align-content: start; min-width: 0; gap: 12px; }
.seo-product-heading h1 {
  margin: 6px 0 0;
  color: var(--text);
  font: 600 clamp(32px, 3.1vw, 50px)/1.08 Georgia, serif;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

.photo-stage, .photo-view { position: relative; touch-action: pan-y pinch-zoom; }
.photo-stage {
  display: grid;
  height: clamp(300px, 36vw, 500px);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.photo-stage > picture, .photo-stage > picture img { display: block; width: 100%; height: 100%; min-height: 0; }
.photo-stage > picture img { object-fit: contain; }
.photo-stage:has(.photo-zoom) > picture { cursor: zoom-in; }
.photo-step, .photo-zoom, .photo-position, .photo-close, .photo-double {
  display: inline-grid;
  align-items: center;
  justify-content: center;
  position: absolute;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--surface);
  color: var(--text);
  font: 650 13px/1.2 system-ui, sans-serif;
}
.photo-step, .photo-close, .photo-zoom, .photo-double { min-height: 44px; cursor: pointer; }
.photo-step { top: 50%; width: 44px; transform: translateY(-50%); font-size: 28px; }
.photo-step.prev { left: 8px; }
.photo-step.next { right: 8px; }
.photo-zoom { bottom: 8px; right: 8px; padding: 0 13px; text-decoration: none; }
.photo-position { left: 9px; top: 9px; min-height: 28px; padding: 0 9px; }
.photo-step[hidden], .photo-view [hidden] { display: none; }
.product-overview .seo-product-thumbs {
  display: flex;
  gap: 7px;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 3px;
  overflow-x: auto;
}
.seo-product-thumbs > a { flex: 0 0 auto; display: block; border: 2px solid transparent; border-radius: 8px; }
.seo-product-thumbs > a[aria-current="true"] { border-color: var(--accent-dark); }
.seo-product-thumbs > a img { display: block; width: 50px; height: 50px; border: 0; border-radius: 5px; object-fit: cover; }
.product-overview :is(a,button,summary):focus-visible, .product-photo-dialog button:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 1px;
}
.product-photo-dialog {
  width: min(96vw, 1100px);
  max-height: 94vh;
  max-height: 94dvh;
  margin: auto;
  padding: 6px 10px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  overflow: auto;
}
.product-photo-dialog::backdrop { background: rgb(20 12 16 / 86%); }
html:has(.product-photo-dialog[open]) { overflow: hidden; }
.product-photo-dialog[open] {
  display: grid;
  grid-template: "count zoom close" auto "photo photo photo" auto / max-content max-content minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}
.product-photo-dialog .photo-position { position: static; grid-area: count; }
.photo-close { position: static; grid-area: close; justify-self: end; padding: 0 16px; }
.photo-double { position: static; grid-area: zoom; min-width: 48px; }
.product-photo-dialog:not(:has([data-photo-count]:not([hidden]))) .photo-double { grid-area: count; }
.photo-double[aria-pressed="true"] { border-color: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent-dark); }
.photo-double:disabled { opacity: .5; cursor: default; }
.photo-view { grid-area: photo; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; height: min(72vh, 740px); height: min(72dvh, 740px); }
.photo-view img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.photo-pan, .photo-view [data-photo-error] { grid-area: 1 / 1; }
.photo-pan { display: flex; width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; }
.photo-pan img { flex: none; max-width: none; max-height: none; margin: auto; cursor: zoom-in; }
.photo-pan.is-magnified { overflow: auto; overscroll-behavior: contain; }
.photo-view:has(.is-magnified), .photo-pan.is-magnified { touch-action: pan-x pan-y pinch-zoom; }
.photo-pan.is-magnified img { cursor: zoom-out; }
@media (pointer: fine) {
  .photo-pan.is-magnified img { cursor: grab; user-select: none; }
  .photo-pan.is-dragging, .photo-pan.is-dragging img { cursor: grabbing; }
}
.photo-pan.is-magnified:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: -2px; }

html[data-storefront-style] .product-overview .seo-buy-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 9px 16px;
  padding: 10px 0 12px;
  border: 0;
  border-block: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--text);
}
.product-overview .seo-buy-panel .seo-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.product-overview .seo-price strong { color: var(--text); font-size: 25px; }
.product-overview .seo-price del { color: var(--muted-strong); }
.product-overview .seo-buy-panel .button { min-height: 44px; min-width: 118px; }
html[data-storefront-style="c"] :is(.product-overview .seo-buy-panel,.product-modal-footer) .button.primary { color: #25121b; }
.product-overview .product-delivery-note { margin: 0; font-size: 14px; }
.product-detail-section { padding: 0; border-bottom: 1px solid var(--line); }
.product-detail-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.product-detail-section summary::-webkit-details-marker { display: none; }
.product-detail-section summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.product-detail-section[open] summary::after { transform: rotate(225deg); }
.product-detail-section p { margin: 0 0 14px; white-space: pre-line; overflow-wrap: anywhere; }
.product-modal-media > picture { touch-action: pan-y pinch-zoom; }
.product-modal-media > .responsive-product-picture,
.product-modal-media > .quick-photo-zoom { grid-area: 1 / 1; }
.product-modal-media > .quick-photo-zoom {
  position: relative;
  inset: auto;
  z-index: 3;
  place-self: end end;
  margin: 0 12px 12px 0;
}
.product-modal-media:has(.quick-photo-zoom:not([hidden])) > picture { cursor: zoom-in; }
.quick-photo-zoom:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
.quick-photo-zoom, .product-photo-dialog button { touch-action: manipulation; }
.quick-photo-zoom[hidden], .product-photo-dialog [hidden] { display: none; }
.product-photo-dialog [data-photo-error] { max-width: 26ch; text-align: center; }
@media (min-width: 681px) {
  .product-modal-media:has(.product-modal-thumbs) > .quick-photo-zoom { margin-bottom: 96px; }
}
.product-modal-footer { background: var(--surface); border-top-color: var(--line); }
.product-modal-footer .modal-price strong { color: var(--text); }
.product-modal-footer .modal-actions .button { min-height: 44px; }

@media (max-width: 820px) {
  .product-photo-dialog { box-sizing: border-box; width: calc(100vw - 12px); max-width: none; padding-inline: 4px; }
  .seo-product .product-overview { grid-template-columns: minmax(0,1fr); grid-template-areas: "heading" "media" "info"; grid-template-rows: auto; gap: 11px; }
  .seo-product .seo-breadcrumbs { margin-bottom: 10px; }
  .seo-product .seo-breadcrumbs > :nth-last-child(-n + 2) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .seo-product-heading .product-category { display: none; }
  .seo-product-heading h1 { margin: 0; font-size: clamp(25px, 6.4vw, 35px); }
  .photo-stage { height: clamp(170px, 32vh, 300px); height: clamp(170px, 32svh, 300px); }
  .seo-product-thumbs > a img { width: 46px; height: 46px; }
  .product-overview .seo-product-info { gap: 9px; }
}
