.product-compact-desktop { display: none; }
@media (min-width:681px) {
  .product-overview { grid-template-columns: minmax(0, 3fr) minmax(0, 5fr); gap: var(--compact-gap, clamp(1rem, 3vw, 2.5rem)); align-items: start; margin-block-start: 1rem; }
  .product-overview .gallery-slide { aspect-ratio: 4 / 3; height: auto; padding: clamp(.75rem, 2vw, 1.5rem); grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
  .product-overview .gallery-image-button { grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
  .product-overview .gallery-slide img { min-width: 0; max-width: 100%; max-height: 100%; }
  .product-overview .gallery-controls { margin-block-start: .5rem; }
  .product-overview .gallery-counter { margin-block-end: .35rem; }
  .product-overview .gallery-thumbnails button { flex-basis: 3rem; height: 3rem; }
  .product-overview .product-summary { min-width: 0; padding-block: .25rem; }
  .product-overview .product-summary h1 { margin: .5rem 0 1rem; }
  .product-summary .summary-price { margin-block: .3rem; }
  .product-summary > p { margin-block: .4rem; }
  .product-summary > .button { margin-block-start: .75rem; padding-block: .75em; }
  .product-summary .description-preview { margin-block-start: .85rem; padding-block-start: .65rem; }
  .product-summary .description-preview ul { margin-block: .5rem; }
  .product-summary .description-preview li { margin-block-end: .25rem; }
  .product-summary .compact-best-offer { display: block; font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
  .compact-best-offer a { font-weight: 600; text-decoration: underline; text-underline-offset: .15em; }
  .product-summary .product-brand-link:hover { color: var(--ink); }
  .product-section-nav { display: flex; flex-wrap: wrap; gap: .25rem clamp(.75rem, 2vw, 1.5rem); border-bottom: 1px solid var(--line); margin-block-start: 1.25rem; }
  .product-section-nav a { display: block; padding: .65rem 0; font-size: .875rem; font-weight: 600; color: var(--muted); }
  .product-section-nav a { border-bottom: .125rem solid transparent; }
  .product-section-nav a[aria-current="location"] { color: var(--ink); border-bottom-color: currentColor; }
  .product-section-nav a:hover { color: var(--ink); }
  html.product-compact-nav-ready { --product-nav-top: calc(var(--kupiti-sticky-header-height) + var(--kupiti-sticky-shortcut-height)); scroll-padding-top: calc(var(--kupiti-sticky-header-height) + var(--kupiti-sticky-shortcut-height) + var(--product-nav-height, 0px) + .75rem); }
  html.product-compact-nav-ready.kupiti-shortcuts-hidden { --product-nav-top: var(--kupiti-sticky-header-height); scroll-padding-top: calc(var(--kupiti-sticky-header-height) + var(--kupiti-sticky-shortcut-height) + var(--product-nav-height, 0px) + .75rem); }
  .product-compact-nav-ready .product-section-nav { position: sticky; top: var(--product-nav-top); z-index: 20; background: var(--paper); transition: top 200ms ease; }
  .product-compact-nav-ready #shop-offers, .product-compact-nav-ready #price-history, .product-compact-nav-ready #product-information, .product-compact-nav-ready #product-description, .product-compact-nav-ready #product-specifications { scroll-margin-top: 0; }
  .shop-offers > .section-title { margin-block: 1.25rem .75rem; }
  .shop-offers .offer-row { padding: .85rem 1rem; gap: .75rem var(--compact-gap, 1rem); margin-block-end: .65rem; }
  .shop-offers .offer-row .offer-merchant { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .25rem .75rem; flex: 1 1 0; min-width: 0; }
  .shop-offers .offer-row .retailer-identity { grid-column: 1; grid-row: 1; margin: 0; min-width: 0; }
  .shop-offers .offer-row .offer-stock { grid-column: 2; grid-row: 1 / span 2; align-self: center; justify-self: end; max-width: 100%; }
  .shop-offers .offer-row .offer-merchant > small { grid-column: 1; overflow-wrap: anywhere; }
  .shop-offers .offer-row:not(.offer-row--recorded) .offer-stock { font-size: .75rem; color: var(--ink); }
  .shop-offers .offer-row .offer-price { flex: 0 1 30%; min-width: 0; overflow-wrap: anywhere; }
  .shop-offers .offer-row .button, .shop-offers .offer-row .offer-history__disabled { flex: 0 0 auto; max-width: 100%; padding: .95em 1.1em; gap: .75em; }
}
@media (min-width:681px) and (max-width:1000px) {
  .product-overview { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .shop-offers .offer-row .offer-merchant { flex: 1 1 100%; }
  .shop-offers .offer-row .offer-merchant > small { grid-column: 1 / -1; }
  .shop-offers .offer-row .offer-stock { grid-row: 1; }
  .shop-offers .offer-row .offer-price { flex: 1 1 0; }
}

@media (min-width:681px) and (max-height:460px) {
  .product-compact-nav-ready .product-section-nav { position: static; }
  html.product-compact-nav-ready, html.product-compact-nav-ready.kupiti-shortcuts-hidden { scroll-padding-top: calc(var(--kupiti-sticky-header-height) + var(--kupiti-sticky-shortcut-height) + .75rem); }
}
@media (prefers-reduced-motion: reduce) { .product-compact-nav-ready .product-section-nav { transition: none; } }

@media (min-width:1001px) {
  .product-image-viewer.gallery-desktop-expanded { inset: 0; margin: 0; width: 100%; height: 100dvh; border-radius: 0; box-shadow: none; }
  .gallery-desktop-expanded .product-image-viewer__layout { grid-template: auto minmax(0, 1fr) auto auto / minmax(0, 1fr); }
  .gallery-desktop-expanded.gallery-with-offers .product-image-viewer__layout { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }
  .gallery-desktop-expanded .product-image-viewer__top { grid-row: 1; grid-column: 1 / -1; }
  .gallery-desktop-expanded .product-image-viewer__stage { grid-row: 2; grid-column: 1 / -1; background: white; }
  .gallery-desktop-expanded.gallery-with-offers .product-image-viewer__stage { grid-column: 2; }
  .gallery-desktop-expanded .product-image-viewer__bottom { grid-row: 3; grid-column: 1 / -1; }
  .gallery-desktop-expanded .gallery-offer-sidebar { grid-row: 2; grid-column: 1; overflow: auto; min-height: 0; min-width: 0; padding: clamp(.75rem, 1.5vw, 1.5rem); border-inline-end: 1px solid var(--line); overscroll-behavior: contain; }
  .gallery-desktop-expanded .gallery-product-title { color: var(--ink); font-size: 1rem; font-weight: 600; line-height: 1.4; margin: 0 0 1rem; overflow-wrap: anywhere; }
  .gallery-desktop-expanded .gallery-offer-sidebar h2 { font-size: .9rem; margin: 0 0 .5rem; letter-spacing: normal; }
  .gallery-desktop-expanded .gallery-offer-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .3rem .5rem; padding-block: .65rem; border-block-end: 1px solid var(--line); }
  .gallery-desktop-expanded .gallery-offer-merchant { display: flex; gap: .4rem; align-items: center; min-width: 0; }
  .gallery-desktop-expanded .gallery-offer-merchant img { width: 2rem; height: 2rem; object-fit: contain; flex: none; }
  .gallery-desktop-expanded .gallery-offer-merchant-text { display: grid; min-width: 0; overflow-wrap: anywhere; font-size: .8rem; }
  .gallery-desktop-expanded .gallery-offer-cost { display: grid; gap: .2rem; text-align: end; font-size: .8rem; font-variant-numeric: tabular-nums; }
  .gallery-desktop-expanded .gallery-offer-item small { font-size: .7rem; color: var(--muted); line-height: 1.35; }
  .gallery-desktop-expanded .gallery-offer-checked { grid-column: 1 / -1; overflow-wrap: anywhere; }
  .gallery-desktop-expanded .gallery-offer-link { display: grid; place-items: center; background: var(--ink); color: white; border-radius: .35rem; padding: .45em .65em; font-size: 1rem; }
  .gallery-desktop-expanded .gallery-viewer-thumbnails { grid-row: 4; grid-column: 1 / -1; display: flex; gap: .5rem; padding: .5rem 1rem; overflow-x: auto; justify-content: safe center; border-block-start: 1px solid var(--line); }
  .gallery-desktop-expanded .gallery-viewer-thumb { flex: 0 0 auto; width: 3.5rem; aspect-ratio: 1; padding: .25rem; border: 1px solid var(--line); border-radius: .4rem; background: white; }
  .gallery-desktop-expanded .gallery-viewer-thumb[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
  .gallery-desktop-expanded .gallery-viewer-thumb img { width: 100%; height: 100%; object-fit: contain; }
}

@media (min-width:1001px) {
  .gallery-desktop-expanded .gallery-offer-sidebar,
  .gallery-desktop-expanded .gallery-viewer-thumbnails {
    scrollbar-width: thin;
    scrollbar-color: var(--muted) transparent;
    scrollbar-color: color-mix(in srgb, var(--muted), var(--line)) transparent;
  }
  .gallery-desktop-expanded .gallery-offer-link .icon {
    display: block;
    width: 1em;
    height: 1em;
  }
}

.product-nav-label-mobile, .mobile-price-alert { display: none; }
.product-summary-actions { display: contents; }
@media (min-width:681px) {
  .product-summary > .product-summary-actions > .button { margin-block-start: .75rem; padding-block: .75em; }
}
@media (max-width:680px) {
  .product-overview .product-summary { padding-block: .25rem 0; min-width: 0; }
  .product-overview .product-summary h1 { margin-block: .4rem .85rem; line-height: 1.3; }
  .product-summary .product-brand-link { display: inline-flex; align-self: flex-start; color: var(--ink); font-weight: 600; font-size: .75rem; padding-block: .3rem; }
  .product-summary--has-offers { display: flex; flex-direction: column; }
  .product-summary--has-offers > h1 { order: 1; }
  .product-summary--has-offers > .summary-label,
  .product-summary--has-offers > .summary-price,
  .product-summary--has-offers > .compact-best-offer {
    background: var(--line);
    background: color-mix(in srgb, var(--line) 65%, var(--paper));
    padding-inline: .85rem;
    min-width: 0;
    overflow-wrap: anywhere;
    margin: 0;
  }
  .product-summary--has-offers > .summary-label { order: 2; padding-block: .8rem .15rem; border-radius: .85rem .85rem 0 0; color: var(--ink); }
  .product-summary--has-offers > .summary-price { order: 3; padding-block: .15rem .8rem; border-radius: 0 0 .85rem .85rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
  .product-summary--has-offers:has(> .compact-best-offer) > .summary-price { border-radius: 0; padding-block-end: .3rem; }
  .product-summary--has-offers > .compact-best-offer { order: 4; display: block; padding-block: 0 .85rem; border-radius: 0 0 .85rem .85rem; color: var(--ink); font-size: .85rem; line-height: 1.45; }
  .product-summary--has-offers > .compact-best-offer a { font-weight: 600; text-decoration: none; }
  .product-summary > .mobile-delivery-note { order: 5; margin: .5rem 0 0; color: var(--muted); }
  .mobile-summary-count:not(.mobile-summary-count--markets) { display: none; }
  .product-summary-actions { order: 6; display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem; margin-block-start: .8rem; }
  .product-summary-actions > .button, .product-summary-actions > .mobile-price-alert {
    display: inline-flex; flex: 1 1 auto; justify-content: center; align-items: center;
    gap: .4em; margin: 0; padding: .65em .7em; min-height: 2.75rem; min-width: 0;
    max-width: 100%; border-radius: .55rem; font: inherit; font-size: .85rem; font-weight: 600; line-height: 1.3;
    text-align: center; overflow-wrap: anywhere;
  }
  .product-summary-actions > .mobile-price-alert { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
  .product-summary-actions > .mobile-price-alert[hidden] { display: none; }
  .product-summary-actions svg { flex: none; width: 1.1em; height: 1.1em; }
  .product-summary--has-offers > .description-preview { order: 7; }
  .product-section-nav { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0 .65rem; margin-block: .9rem 0; border-bottom: 1px solid var(--line); }
  .product-section-nav a { display: flex; align-items: center; justify-content: center; flex: 1 1 auto; min-height: 2.75rem; min-width: 0; padding: .35rem .15rem; border-bottom: .125rem solid transparent; font-size: .8rem; font-weight: 600; line-height: 1.35; text-align: center; color: var(--muted); }
  html:not(.product-mobile-nav-ready) .product-section-nav a:first-child,
  .product-mobile-nav-ready .product-section-nav a[aria-current="location"] { color: var(--ink); border-bottom-color: currentColor; }
  .product-nav-label-desktop { display: none; }
  .product-nav-label-mobile { display: inline; margin-inline-end: .2em; }
  .product-section-nav + .shop-offers > .section-title { margin-block-start: .85rem; }
}

@media (max-width:680px) {
  html.product-mobile-nav-ready { scroll-padding-top: calc(var(--product-nav-height) + .5rem); }
  .product-mobile-nav-ready .product-section-nav { position: sticky; top: 0; z-index: 9; background: var(--paper); }
  .product-mobile-nav-ready #shop-offers,
  .product-mobile-nav-ready #price-history,
  .product-mobile-nav-ready #product-information,
  .product-mobile-nav-ready #product-description,
  .product-mobile-nav-ready #product-specifications { scroll-margin-top: 0; }
}
