:root {
  --listing-grid-min: 15.5rem;
  --listing-grid-gap-x: clamp(1.25rem, 2vw, 2rem);
  --listing-grid-gap-y: clamp(1.75rem, 2.5vw, 2.5rem);
  --listing-title-size: clamp(1.75rem, 2.2vw, 2.375rem);
  --listing-intro-size: 0.875rem;
  --listing-product-title-size: 1rem;
  --listing-price-size: 1rem;
  --listing-meta-size: 0.8125rem;
  --listing-card-info-gap: 0.625rem;
  --listing-artwork-portrait-width-ratio: 0.84;
  --listing-artwork-square-scale: 0.92;
  --listing-sidebar-width: 16.25rem;
  --listing-main-three-col-min: 36rem;
  --listing-main-four-col-min: 68rem;
  --listing-filter-option-size: 0.8125rem;
  --listing-filter-section-end: 1.125rem;
  --listing-filter-section-gap: 1.25rem;
  --listing-filter-toggle-after: 0.375rem;
  --listing-chip-height: 2rem;
  --listing-chip-font-size: 0.8125rem;
  --listing-chip-padding-x: 0.6875rem;
  --listing-chip-gap: 0.5rem;
  --listing-chip-radius: var(--radius-sm);
  --listing-cart-size: 2.5rem;
  --listing-cart-icon-size: 1.375rem;
  --listing-favorite-size: 2rem;
  --listing-favorite-icon-size: 1.1875rem;
}

/* --- Public product listing (Phase 3B.2A) --- */

.catalog-listing {
  background: var(--color-page);
}

.page-container.catalog-listing__inner {
  padding-block: var(--space-md) var(--space-2xl);
}

.catalog-listing__breadcrumb {
  margin-bottom: 0.5rem;
}

.catalog-listing__breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--color-muted);
}

.catalog-listing__breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.catalog-listing__breadcrumb-item:not(:last-child)::after {
  content: "/";
  color: var(--color-taupe);
  pointer-events: none;
}

.catalog-listing__breadcrumb-item a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.catalog-listing__breadcrumb-item a:hover {
  color: var(--color-graphite);
  text-decoration: none;
}

.catalog-listing__breadcrumb-item span[aria-current="page"] {
  color: var(--color-graphite);
}

.catalog-listing__header {
  margin-bottom: var(--space-lg);
  max-width: 48rem;
}

.catalog-listing__title {
  margin: 0 0 0.375rem;
  font-family: var(--font-heading);
  font-size: var(--listing-title-size);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: var(--color-primary);
}

.catalog-listing__intro {
  margin: 0;
  max-width: 36rem;
  font-family: var(--font-body);
  font-size: var(--listing-intro-size);
  font-weight: 400;
  line-height: 1.45;
  color: var(--color-muted);
}

.catalog-listing__count {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--color-muted);
}

.catalog-listing__layout {
  display: block;
}

.catalog-listing__main {
  min-width: 0;
  container-type: inline-size;
  container-name: listing-main;
}

@media (min-width: 1024px) {
  .catalog-listing__layout:not(.catalog-listing__layout--no-sidebar) {
    display: grid;
    grid-template-columns: var(--listing-sidebar-width) minmax(0, 1fr);
    gap: var(--space-xl);
    align-items: start;
  }
}

.catalog-filters {
  display: none;
}

@media (min-width: 1024px) {
  .catalog-filters {
    display: block;
    position: sticky;
    top: calc(var(--header-height) + var(--space-md));
    align-self: start;
    padding: 0.625rem;
    background: var(--color-raised-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-raised);
  }
}

.catalog-filters__catalog-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--color-border);
}

.catalog-filters__catalog-title {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-graphite);
}

.catalog-filters__catalog-count {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-graphite);
}

.catalog-filters__section {
  padding-block: 0.375rem var(--listing-filter-section-end);
  border-bottom: 1px solid var(--color-border);
}

.catalog-filters__section:first-child {
  padding-top: 0;
}

.catalog-filters__section + .catalog-filters__section {
  padding-top: var(--listing-filter-section-gap);
}

.catalog-filters__section:last-of-type {
  border-bottom: none;
  padding-bottom: 0.625rem;
}

.catalog-filters__heading {
  margin: 0 0 0.375rem;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-graphite);
}

.catalog-filters__options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
}

.catalog-filters__label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 1.625rem;
  font-family: var(--font-body);
  font-size: var(--listing-filter-option-size);
  line-height: 1.4;
  color: var(--color-graphite);
  cursor: pointer;
}

.catalog-filters__option-text {
  flex: 1 1 auto;
  min-width: 0;
}

.catalog-filters__option-count {
  flex: 0 0 auto;
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  color: var(--color-muted);
}

.catalog-filters__checkbox {
  appearance: none;
  -webkit-appearance: none;
  accent-color: var(--color-commerce-action);
  width: 0.8125rem;
  height: 0.8125rem;
  margin: 0;
  flex: 0 0 auto;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  background: var(--color-raised-surface);
  cursor: pointer;
  transition:
    background-color var(--duration-fast) ease,
    border-color var(--duration-fast) ease;
}

.catalog-filters__checkbox:checked {
  border-color: var(--color-commerce-action);
  background-color: var(--color-commerce-action);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23FCFAF6' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2 5 8.7 9.5 3.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.625rem 0.625rem;
}

.catalog-filters__label:has(.catalog-filters__checkbox:checked) .catalog-filters__option-text,
.catalog-filters__label:has(.catalog-filters__checkbox:checked) .catalog-filters__option-count,
.catalog-filters__label--plain-choice:has(.catalog-filters__radio:checked) .catalog-filters__option-text,
.catalog-filters__label--plain-choice:has(.catalog-filters__radio:checked) .catalog-filters__option-count {
  color: var(--color-commerce-action);
  font-weight: 750;
}

.catalog-filters__checkbox:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.catalog-filters__radio--plain {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  accent-color: var(--color-commerce-action);
}

.catalog-filters__label--plain-choice:has(.catalog-filters__radio:focus-visible) {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.catalog-filters__shortcut {
  display: flex;
  align-items: center;
  min-height: 1.625rem;
  margin-top: 0.125rem;
  font-family: var(--font-body);
  font-size: var(--listing-filter-option-size);
  font-weight: 700;
  line-height: 1.4;
  color: #9c6229;
  text-decoration: none;
}

.catalog-filters__shortcut:hover {
  color: #7d4e1f;
}

.catalog-filters__shortcut:focus-visible {
  color: #7d4e1f;
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.catalog-filters__toggle {
  margin-top: 0.625rem;
  margin-bottom: var(--listing-filter-toggle-after);
  padding: 0;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--color-muted);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.catalog-filters__toggle:hover,
.catalog-filters__toggle:focus-visible {
  color: var(--color-graphite);
}

.catalog-filters__actions {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding-top: 0.5rem;
  margin-top: 0.125rem;
  border-top: 1px solid var(--color-border);
}

.catalog-filters__apply {
  display: block;
  width: 100%;
  min-height: 2.5rem;
  margin: 0;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--color-commerce-action);
  border-radius: var(--radius-sm);
  background: var(--color-commerce-action);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-bright);
  cursor: pointer;
  transition:
    background-color var(--duration-fast) ease,
    border-color var(--duration-fast) ease;
}

.catalog-filters__apply:hover,
.catalog-filters__apply:focus-visible {
  background: var(--color-secondary-green);
  border-color: var(--color-secondary-green);
}

.catalog-filters__apply:active {
  background: var(--color-deep-green);
  border-color: var(--color-deep-green);
}

.catalog-filters__apply.is-dirty {
  box-shadow: 0 0 0 1px rgba(39, 49, 38, 0.08);
}

/* Progressive enhancement: hide Apply when auto-apply JS initialized.
   Button remains in HTML for no-JS fallback. Clear/reset stays visible. */
.catalog-filters__form.is-auto-apply [data-filter-apply] {
  display: none;
}

.catalog-filters__apply:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.catalog-filters__clear {
  align-self: center;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-burgundy);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.catalog-filters__clear:hover,
.catalog-filters__clear:focus-visible {
  color: var(--color-burgundy-dark);
}

.catalog-filters__options--tree {
  gap: 0.125rem;
}

.catalog-filters__tree-item {
  list-style: none;
}

.catalog-filters__tree-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 1.75rem;
}

.catalog-filters__tree-link {
  display: flex;
  flex: 1 1 auto;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.125rem 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--color-graphite);
  text-decoration: none;
}

.catalog-filters__tree-link--child {
  padding-left: 1rem;
}

.catalog-filters__tree-link:hover,
.catalog-filters__tree-link:focus-visible {
  color: var(--color-deep-green);
}

/* Selected CATEGORY (root or child): action green + strong weight.
   Scoped to category tree links only — not room/style checkbox labels. */
.catalog-filters__tree-link.is-active,
.catalog-filters__tree-row.is-active > .catalog-filters__tree-link {
  font-weight: 750;
  color: var(--color-commerce-action);
}

/* Implied/expanded parent without being the selected filter stays subtle. */
.catalog-filters__tree-link.is-implied:not(.is-active) {
  font-weight: 400;
  color: var(--color-muted);
}

.catalog-filters__tree-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
}

.catalog-filters__tree-toggle:hover,
.catalog-filters__tree-toggle:focus-visible {
  color: var(--color-graphite);
}

.catalog-filters__tree-toggle:focus-visible {
  outline: 2px solid var(--color-deep-green);
  outline-offset: 2px;
}

.catalog-filters__tree-toggle-icon {
  display: block;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.catalog-filters__tree-toggle[aria-expanded="true"] .catalog-filters__tree-toggle-icon {
  transform: rotate(45deg);
}

.catalog-filters__tree-children {
  margin: 0;
  padding: 0 0 0.125rem;
  list-style: none;
}

.catalog-listing__toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.catalog-listing__toolbar-left {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 auto;
}

.catalog-listing__toolbar-count {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--color-muted);
}

.catalog-listing__toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--listing-chip-gap);
}

.catalog-listing__active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--listing-chip-gap);
  min-width: 0;
}

.catalog-listing__active-label {
  font-family: var(--font-body);
  font-size: var(--listing-chip-font-size);
  color: var(--color-muted);
}

.catalog-listing__chip-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--listing-chip-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.catalog-listing__chip {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: var(--listing-chip-height);
  padding: 0.3125rem var(--listing-chip-padding-x);
  border: 1px solid var(--color-border);
  border-radius: var(--listing-chip-radius);
  background: var(--color-raised-surface);
  font-family: var(--font-body);
  font-size: var(--listing-chip-font-size);
  line-height: 1.25;
  color: var(--color-graphite);
  text-decoration: none;
  transition:
    border-color var(--duration-fast) ease,
    color var(--duration-fast) ease,
    background-color var(--duration-fast) ease;
}

.catalog-listing__chip:hover {
  border-color: var(--color-taupe);
  text-decoration: none;
}

.catalog-listing__chip:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.catalog-listing__chip-text {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  min-width: 0;
}

.catalog-listing__chip-facet {
  font-weight: 600;
}

.catalog-listing__chip-value {
  font-weight: 400;
}

.catalog-listing__chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-inline-start: 0.125rem;
  border-radius: var(--listing-chip-radius);
  font-size: 0.9375rem;
  line-height: 1;
  color: var(--color-muted);
  transition:
    color var(--duration-fast) ease,
    background-color var(--duration-fast) ease;
}

.catalog-listing__chip:hover .catalog-listing__chip-remove,
.catalog-listing__chip:focus-visible .catalog-listing__chip-remove {
  color: var(--color-graphite);
  background-color: rgba(232, 222, 208, 0.55);
}

.catalog-listing__clear-filters {
  display: inline-flex;
  align-items: center;
  min-height: var(--listing-chip-height);
  padding: 0.25rem 0.125rem;
  font-family: var(--font-body);
  font-size: var(--listing-chip-font-size);
  font-weight: 500;
  color: var(--color-secondary-green);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  transition: color var(--duration-fast) ease;
}

.catalog-listing__clear-filters:hover {
  color: var(--color-commerce-action);
  text-decoration: underline;
}

.catalog-listing__clear-filters:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.catalog-listing__sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.catalog-listing__sort-label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.catalog-listing__sort-control {
  position: relative;
}

.catalog-listing__sort-control::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.625rem;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid var(--color-muted);
  border-bottom: 1.5px solid var(--color-muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.catalog-listing__sort-select {
  min-width: 11.5rem;
  padding: 0.45rem 1.75rem 0.45rem 0.625rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-raised-surface);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--color-graphite);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.catalog-listing__sort-select:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--listing-grid-gap-y) var(--listing-grid-gap-x);
  align-items: start;
}

@media (min-width: 640px) {
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(var(--listing-grid-min), 1fr));
  }
}

/* Sidebar layouts: three substantial columns when main area is wide enough. */
@container listing-main (min-width: var(--listing-main-three-col-min)) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Full-width listings only: fourth column when main track width supports it. */
@container listing-main (min-width: var(--listing-main-four-col-min)) {
  .catalog-listing__layout--no-sidebar .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  align-self: start;
  box-sizing: border-box;
}

/* Sidebar desktop 3-col: align Product visuals to column edges (start / center / end). */
@container listing-main (min-width: 36rem) {
  .catalog-listing__layout:not(.catalog-listing__layout--no-sidebar) .catalog-grid .product-card:nth-child(3n + 1) {
    align-items: flex-start;
  }

  .catalog-listing__layout:not(.catalog-listing__layout--no-sidebar) .catalog-grid .product-card:nth-child(3n + 2) {
    align-items: center;
  }

  .catalog-listing__layout:not(.catalog-listing__layout--no-sidebar) .catalog-grid .product-card:nth-child(3n) {
    align-items: flex-end;
  }
}

.product-card__visual {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--listing-card-info-gap);
  width: calc(var(--product-visual-width-ratio, 1) * 100%);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.product-card__media {
  position: relative;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  aspect-ratio: var(--product-aspect-ratio, 5 / 7);
  padding: 0;
  background: transparent;
  overflow: hidden;
  isolation: isolate;
}

.product-card__media--portrait {
  aspect-ratio: var(--product-aspect-ratio, 5 / 7);
}

.product-card__media--landscape {
  aspect-ratio: var(--product-aspect-ratio, 7 / 5);
}

.product-card__media--square {
  aspect-ratio: var(--product-aspect-ratio, 1);
}

.product-card__info {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.1875rem;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.product-card__favorite {
  position: absolute;
  top: 0.375rem;
  right: 0.375rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--listing-favorite-size);
  height: var(--listing-favorite-size);
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--color-raised-surface);
  color: var(--color-graphite);
  box-shadow: var(--shadow-raised);
  cursor: pointer;
  opacity: 0.92;
}

.product-card__favorite[data-favorite-toggle]:hover,
.product-card__favorite[data-favorite-toggle]:focus-visible {
  color: var(--color-caramel);
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.product-card__favorite[aria-pressed="true"] {
  color: var(--color-burgundy);
}

.product-card__favorite[aria-pressed="true"] svg {
  fill: var(--color-burgundy-soft);
  stroke: var(--color-burgundy);
}

.product-card__favorite svg {
  width: var(--listing-favorite-icon-size);
  height: var(--listing-favorite-icon-size);
}

.product-card__favorite--interactive {
  cursor: pointer;
}

.product-card__media-link {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.product-card__media-link:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.product-card__link {
  display: flex;
  flex-direction: column;
  gap: var(--listing-card-info-gap);
  text-decoration: none;
  color: inherit;
}

.product-card__link:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.product-card__image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.product-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--color-muted);
  font-size: 0.8125rem;
  text-align: center;
  padding: var(--space-sm);
}

.product-card__title-link {
  display: block;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.product-card__name {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-body);
  font-size: var(--listing-product-title-size);
  font-weight: 600;
  color: var(--color-graphite);
  line-height: 1.35;
  transition: color var(--duration-fast) ease;
}

.product-card__size,
.product-card__detail {
  margin: 0 0 0.3125rem;
  font-family: var(--font-body);
  font-size: var(--listing-meta-size);
  font-weight: 400;
  line-height: 1.35;
  color: var(--color-muted);
}

.product-card__buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--listing-cart-size);
  box-sizing: border-box;
}

.product-card__price-link {
  flex: 1 1 auto;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.product-card__cart-form {
  flex: 0 0 auto;
  margin: 0;
}

.product-card__cart-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  min-width: var(--listing-cart-size);
  height: var(--listing-cart-size);
  margin: 0;
  padding: 0 0.625rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-commerce-action);
  color: var(--color-bright);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--duration-fast) ease;
}

.product-card__cart-action svg {
  width: var(--listing-cart-icon-size);
  height: var(--listing-cart-icon-size);
}

.product-card__cart-action:hover,
.product-card__cart-action:focus-visible {
  background: var(--color-secondary-green);
}

.product-card__cart-action:active {
  background: var(--color-deep-green);
}

.product-card__cart-action:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.product-card__link:hover .product-card__name,
.product-card__link:focus-visible .product-card__name,
.product-card__title-link:hover .product-card__name,
.product-card__title-link:focus-visible .product-card__name {
  color: var(--color-primary);
}

.product-card__price {
  flex: 0 1 auto;
  margin: 0;
  min-width: 0;
  font-family: var(--font-body);
  font-size: var(--listing-price-size);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  color: var(--color-graphite);
}

.product-card__price-prefix {
  font-size: var(--listing-price-size);
  font-weight: 600;
  color: var(--color-graphite);
}

.product-card__price-amount {
  font-size: var(--listing-price-size);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-graphite);
}

.catalog-empty {
  padding: var(--space-2xl) 0;
  text-align: center;
}

.catalog-empty__message {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-muted);
}

.catalog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.625rem;
  margin-top: var(--space-2xl);
  flex-wrap: wrap;
}

.catalog-pagination__pages {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog-pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  min-height: 1.75rem;
  padding: 0 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--color-muted);
  text-decoration: none;
  line-height: 1;
  transition: color var(--duration-fast) ease, background-color var(--duration-fast) ease;
}

.catalog-pagination__page:hover {
  color: var(--color-graphite);
  background: rgba(232, 222, 208, 0.45);
  text-decoration: none;
}

.catalog-pagination__page:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.catalog-pagination__page.is-current {
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(69, 87, 71, 0.08);
}

.catalog-pagination__control.is-disabled {
  pointer-events: none;
}

.catalog-pagination a.catalog-pagination__control,
.catalog-pagination a.catalog-pagination__control:hover,
.catalog-pagination a.catalog-pagination__control:focus-visible {
  text-decoration: none;
}

.catalog-listing__benefits {
  margin: var(--space-xl) 0 0;
  padding: 0.75rem var(--space-lg);
  background: var(--color-cream);
  border-radius: var(--radius-md);
  color: var(--color-text);
}

.catalog-listing__benefits-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog-listing__benefits-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  text-align: left;
}

.catalog-listing__benefits-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  height: 1.875rem;
  color: var(--color-graphite);
}

.catalog-listing__benefits-icon svg {
  width: 1.875rem;
  height: 1.875rem;
  color: inherit;
  fill: currentColor;
}

.catalog-listing__benefits-icon svg[fill="none"] {
  fill: none;
}

.catalog-listing__benefits-icon--sparkle svg {
  width: 2rem;
  height: 2rem;
}

.catalog-listing__benefits-icon--return svg {
  width: 1.8125rem;
  height: 1.8125rem;
}

.catalog-listing__benefits-copy {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.catalog-listing__benefits-title {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
}

.catalog-listing__benefits-secondary {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--color-muted);
}

@media (min-width: 480px) {
  .catalog-listing__benefits-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm) var(--space-md);
  }
}

@media (min-width: 640px) {
  .catalog-listing__benefits {
    padding: 0.875rem var(--space-xl);
  }

  .catalog-listing__benefits-list {
    gap: var(--space-md) var(--space-lg);
  }
}

@media (min-width: 1024px) {
  .catalog-listing__benefits {
    padding: 0.875rem var(--space-xl);
  }

  .catalog-listing__benefits-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    align-items: center;
  }

  .catalog-listing__benefits-item {
    justify-content: center;
    padding: 0 var(--space-lg);
  }

  .catalog-listing__benefits-item:not(:last-child) {
    border-right: 1px solid var(--color-border);
  }

  .catalog-listing__benefits-item:first-child {
    padding-left: 0;
  }

  .catalog-listing__benefits-item:last-child {
    padding-right: 0;
    border-right: none;
  }
}

/* Legacy aliases — keep typography import compatibility */
.catalog-page__header {
  margin-bottom: var(--space-xl);
  max-width: 42rem;
}

.catalog-page__title {
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.catalog-page__intro {
  margin: 0;
  color: var(--color-muted);
  font-size: 1.05rem;
  font-family: var(--font-body);
}
/* Product detail — approved visualization alignment */
.product-detail {
  --pdp-accent-gold: #C9922E;
  --pdp-control-radius: var(--radius-sm);
  --pdp-panel-radius: var(--radius-md);
  --pdp-action-green: var(--color-commerce-action);
  --pdp-action-green-hover: var(--color-secondary-green);
  --pdp-wall-shadow:
    drop-shadow(-14px 16px 28px rgba(39, 49, 38, 0.28))
    drop-shadow(-6px 10px 18px rgba(39, 49, 38, 0.18))
    drop-shadow(-2px 4px 6px rgba(39, 49, 38, 0.10));
  --pdp-paper-shadow:
    -2px 4px 8px rgba(39, 49, 38, 0.07),
    -1px 2px 3px rgba(39, 49, 38, 0.05);
  --pdp-gallery-gap: 1rem;
  --pdp-gallery-rail-width: 6.375rem;
  --pdp-gallery-thumb-size: 3.125rem;
  --pdp-gallery-thumb-max-width: 6rem;
  --pdp-gallery-thumb-max-height: 5.625rem;
  --pdp-gallery-thumb-gap: 0.5625rem;
  --pdp-gallery-stage-max-width: 28.125rem;
  --pdp-gallery-stage-max-height: min(48vh, 26rem);
  --pdp-gallery-stage-padding: 0.85rem 0.9rem 1rem 0.85rem;
  --pdp-gallery-art-max-width: 82%;
  --pdp-gallery-art-max-height: 86%;
  --pdp-gallery-image-radius: var(--radius-sm);
  --preview-paper-short-side: 340px;
  --preview-wall-scale: 1.20;
  --pdp-gallery-landscape-wall-width: calc(
    var(--preview-paper-short-side) * 7 / 5 * var(--preview-wall-scale)
  );
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
}

.product-detail__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.product-detail .product-detail__other-size-toggle,
.product-detail .product-detail__custom-size-inquiry-action,
.product-detail .product-detail__frame-color-summary-change,
.product-detail .product-detail__white-margin-summary-change,
.product-detail .product-detail__margin-custom-apply {
  font-weight: 600;
}

@media (min-width: 1024px) {
  .product-detail {
    --pdp-gallery-layout-gap: clamp(2.5rem, 3vw, 3.75rem);
    --pdp-gallery-stage-fit-width: min(
      var(--pdp-gallery-stage-max-width),
      calc(
        100vw - (var(--gutter-desktop) * 2)
        - var(--pdp-gallery-rail-width)
        - var(--pdp-gallery-gap)
        - 460px
        - var(--pdp-gallery-layout-gap)
      )
    );
    --pdp-gallery-stage-fit-width-single: min(
      var(--pdp-gallery-stage-max-width),
      calc(
        100vw - (var(--gutter-desktop) * 2)
        - 460px
        - var(--pdp-gallery-layout-gap)
      )
    );
    --pdp-gallery-landscape-stage-fit-width: min(
      var(--pdp-gallery-landscape-wall-width),
      calc(
        100vw - (var(--gutter-desktop) * 2)
        - 460px
        - var(--pdp-gallery-layout-gap)
      )
    );
  }

  .product-detail__layout {
    width: 100%;
    grid-template-columns: max-content minmax(320px, 460px);
    gap: var(--pdp-gallery-layout-gap);
    align-items: start;
  }
}

.product-detail__gallery {
  width: 100%;
  min-width: 0;
}

@media (min-width: 1024px) {
  .product-detail__gallery {
    width: fit-content;
    max-width: 100%;
    justify-self: start;
  }
}

.product-detail__info {
  min-width: 0;
  padding-top: var(--space-xs);
}

@media (min-width: 768px) {
  .product-detail__info {
    padding-top: var(--space-md);
  }
}

@media (min-width: 1024px) {
  .product-detail__info {
    justify-self: start;
    min-width: 0;
  }
}

.product-detail__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  color: var(--color-graphite);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.product-detail__price {
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-graphite);
  margin: 0 0 var(--space-md);
}

.product-detail__fieldset {
  border: none;
  margin: 0 0 var(--space-lg);
  padding: 0;
}

.product-detail__legend {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
  padding: 0;
}

.product-detail__option-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.product-detail__option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--color-graphite);
}

.product-detail__radio {
  flex-shrink: 0;
  accent-color: var(--pdp-action-green);
}

.product-detail__medium-switch {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.product-detail__medium-current {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--pdp-action-green);
  color: var(--color-bright);
  border-radius: var(--pdp-control-radius);
  font-size: 0.9rem;
  font-weight: 500;
}

.product-detail__medium-current:hover {
  background: var(--pdp-action-green-hover);
}

.product-detail__medium-link {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--color-graphite);
}

.product-detail__medium-link:hover {
  background: var(--color-sand);
  text-decoration: none;
}

/* PDP commerce core */
.product-detail__breadcrumb {
  margin-bottom: var(--space-lg);
}

.product-detail__breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--text-small);
  color: var(--color-muted);
}

.product-detail__breadcrumb-item:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--color-muted);
}

.product-detail__breadcrumb-item a {
  color: inherit;
  text-decoration: none;
}

.product-detail__breadcrumb-item a:hover {
  color: var(--color-caramel);
  text-decoration: none;
}

.product-detail__header {
  margin-bottom: 0;
}

.product-detail__description {
  margin: 0 0 0.75rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--color-muted);
  max-width: 38rem;
}

.product-detail__header-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0 0 0.875rem;
}

.product-detail__choice-list--segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 2px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.product-detail__choice-list--segmented .product-detail__choice {
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.product-detail__choice-list--segmented .product-detail__choice--link {
  background: transparent;
}

.product-detail__delivery-panel {
  display: flex;
  align-items: center;
  gap: 0.8125rem;
  margin: 0 0 var(--space-md);
  min-height: 3.75rem;
  padding: 0.9375rem 1.125rem;
  border: none;
  border-radius: var(--pdp-control-radius, var(--radius-sm));
  background: #DCE8D8;
  box-shadow: none;
}

.product-detail__delivery-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  color: var(--color-commerce-action);
}

.product-detail__delivery-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.product-detail__delivery-copy {
  display: grid;
  gap: 0.3125rem;
  min-width: 0;
}

.product-detail__delivery-line {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-commerce-action);
}

.product-detail__delivery-line strong {
  font-weight: 650;
  color: var(--color-commerce-action);
}

.product-detail__delivery-line--muted {
  color: var(--color-commerce-action);
}

.product-detail__delivery-line--muted strong {
  color: var(--color-commerce-action);
}

.product-detail__purchase-row {
  --pdp-purchase-action-height: 2.875rem;
  --pdp-purchase-qty-width: 3rem;
  --pdp-purchase-wishlist-icon: 1.625rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.625rem;
  margin: 0 0 var(--space-sm);
}

.product-detail__purchase-row .product-detail__add-to-cart {
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--pdp-purchase-action-height);
  height: var(--pdp-purchase-action-height);
  padding: 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.8125rem;
  line-height: 1;
}

.product-detail__wishlist {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--pdp-purchase-action-height, 2.875rem);
  min-width: var(--pdp-purchase-action-height, 2.875rem);
  height: var(--pdp-purchase-action-height, 2.875rem);
  min-height: var(--pdp-purchase-action-height, 2.875rem);
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-raised-surface);
  color: var(--color-graphite);
  box-shadow: none;
  cursor: pointer;
  opacity: 1;
}

.product-detail__wishlist svg {
  width: var(--pdp-purchase-wishlist-icon, 1.625rem);
  height: var(--pdp-purchase-wishlist-icon, 1.625rem);
  stroke-width: 1.125;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-detail__wishlist:hover,
.product-detail__wishlist:focus-visible {
  color: var(--color-caramel);
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.product-detail__wishlist[aria-pressed="true"] {
  color: var(--color-burgundy);
}

.product-detail__wishlist[aria-pressed="true"] svg {
  fill: var(--color-burgundy-soft);
  stroke: var(--color-burgundy);
}

.product-detail__copy-note {
  margin: 0.5rem 0 0;
  max-width: 36rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--color-muted);
}

.product-detail__quantity--compact {
  flex: 0 0 auto;
  width: var(--pdp-purchase-qty-width, 3rem);
  min-width: 0;
}

.product-detail__quantity--compact .product-detail__dimension-label {
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-detail__quantity--compact .product-detail__text-input--quantity {
  width: var(--pdp-purchase-qty-width, 3rem);
  max-width: var(--pdp-purchase-qty-width, 3rem);
  min-height: var(--pdp-purchase-action-height, 2.875rem);
  height: var(--pdp-purchase-action-height, 2.875rem);
  padding-inline: 0.3125rem;
  text-align: center;
}

.product-detail__trust-row {
  --pdp-trust-icon-size: 1.2375rem;
  --pdp-trust-title-size: 0.70284375rem;
  --pdp-trust-subtitle-size: 0.641484375rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.456890625rem;
  margin: var(--space-lg) 0 var(--space-md);
  padding: 0;
  list-style: none;
}

.product-detail__trust-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
  font-family: var(--font-body);
  line-height: 1.3;
  color: var(--color-muted);
}

.product-detail__trust-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: var(--pdp-trust-icon-size);
  height: var(--pdp-trust-icon-size);
  margin-top: 0.0625rem;
  color: var(--color-graphite);
}

.product-detail__trust-icon svg {
  width: var(--pdp-trust-icon-size);
  height: var(--pdp-trust-icon-size);
  fill: currentColor;
}

.product-detail__trust-icon--packaging svg,
.product-detail__trust-icon--quality_check svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-detail__trust-copy {
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
  min-width: 0;
}

.product-detail__trust-title {
  font-size: var(--pdp-trust-title-size);
  font-weight: 650;
  line-height: 1.3;
  color: var(--color-graphite);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

@media (min-width: 768px) {
  .product-detail__trust-title {
    white-space: nowrap;
  }
}

.product-detail__trust-subtitle {
  font-size: var(--pdp-trust-subtitle-size);
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-muted);
}

@media (min-width: 768px) {
  .product-detail__trust-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .product-detail__trust-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
}

.product-detail__info-strip {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--color-border);
}

.product-detail__info-strip-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .product-detail__info-strip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-sm);
  }
}

.product-detail__info-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-cream);
}

.product-detail__info-card-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.product-detail__info-card-list {
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-graphite);
}

.product-detail__info-card-list--compact {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.product-detail__info-card-list li + li {
  margin-top: 0.25rem;
}

.product-detail__info-card-note {
  margin: 0 0 0.65rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-graphite);
}

.product-detail__info-card-body {
  margin: 0 0 0.75rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-muted);
}

.product-detail__info-card-link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-caramel);
  text-decoration: none;
}

.product-detail__info-card-link:hover {
  text-decoration: underline;
}

.product-detail__info-card-link--b2b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.125rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--pdp-control-radius);
  background: var(--pdp-action-green);
  color: var(--color-bright);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-detail__info-card-link--b2b:hover {
  background: var(--pdp-action-green-hover);
  text-decoration: none;
}

.product-detail__long-description {
  margin-top: var(--space-xl);
  max-width: 48rem;
}

.product-detail__long-description-title {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-graphite);
}

.product-detail__long-description-body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--color-muted);
}

/* Lower PDP — Phase A editorial shell */
.pdp-lower {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--color-border);
  --pdp-editorial-burgundy: #8a3041;
}

.pdp-lower__micro-rule {
  display: block;
  width: 1.75rem;
  height: 2px;
  margin: 0 0 0.625rem;
  background: var(--pdp-editorial-burgundy);
}

.pdp-lower__section-header {
  margin: 0 0 1rem;
}

.pdp-lower__section-accent {
  display: block;
  width: 1.75rem;
  height: 2px;
  margin: 0 0 0.625rem;
  background: var(--pdp-editorial-burgundy);
}

.pdp-lower__section-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--color-graphite);
}

.pdp-lower__info-band {
  margin: 0 calc(-1 * var(--gutter-mobile)) 3rem;
  padding: clamp(1.75rem, 2.5vw, 2rem) clamp(1.75rem, 3vw, 2.25rem);
  background: var(--color-cream);
  border-radius: 0;
}

@media (min-width: 768px) {
  .pdp-lower__info-band {
    margin-inline: 0;
  }
}

.pdp-lower__info-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pdp-lower__info-column {
  margin: 0;
  padding: clamp(1rem, 2vw, 1.25rem) 0;
}

.pdp-lower__info-column:not(:last-child) {
  border-bottom: 1px solid var(--color-border);
}

.pdp-lower__info-eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--color-muted);
}

.pdp-lower__info-lead {
  margin: 0 0 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-graphite);
}

.pdp-lower__info-body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-graphite);
}

@media (min-width: 1024px) {
  .pdp-lower__info-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .pdp-lower__info-column {
    padding: 0 clamp(1rem, 2vw, 1.25rem);
    border-bottom: none;
  }

  .pdp-lower__info-column:not(:last-child) {
    border-bottom: none;
    border-right: 1px solid var(--color-border);
  }

  .pdp-lower__info-column:first-child {
    padding-left: 0;
  }

  .pdp-lower__info-column:last-child {
    padding-right: 0;
  }
}

.pdp-lower__description {
  max-width: 56rem;
  margin-bottom: 2.75rem;
}

.pdp-lower__description-header {
  margin: 0 0 1rem;
}

.pdp-lower__description-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-graphite);
}

.pdp-lower__description-body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-graphite);
}

.pdp-lower__description-body p {
  margin: 0 0 0.875rem;
}

.pdp-lower__description-body p:last-child {
  margin-bottom: 0;
}

.pdp-lower__description-subtitle {
  margin: 1.625rem 0 0.6875rem;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-graphite);
}

.pdp-lower__poster-list {
  margin: 0 0 0.875rem;
  padding: 0;
  list-style: none;
}

.pdp-lower__poster-list li {
  margin: 0 0 0.35rem;
}

.pdp-lower__poster-list li:last-child {
  margin-bottom: 0;
}

.pdp-lower__disclosures {
  max-width: 44rem;
  margin-bottom: 3rem;
}

.pdp-lower__related {
  margin-bottom: 3rem;
}

.pdp-lower__related-header {
  margin: 0 0 1.25rem;
}

.pdp-lower__related-grid.catalog-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1024px) {
  .pdp-lower__related-grid.catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.pdp-lower__disclosures .pdp-lower__section-header {
  margin-bottom: 0.75rem;
}

.pdp-lower__disclosure-list {
  border-top: 1px solid var(--color-border);
}

.pdp-lower__disclosure-item {
  border-bottom: 1px solid var(--color-border);
}

.pdp-lower__disclosure-heading {
  margin: 0;
}

.pdp-lower__disclosure-trigger {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin: 0;
  padding: clamp(0.875rem, 1.5vw, 1.125rem) 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.pdp-lower__disclosure-trigger:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.pdp-lower__disclosure-question {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-graphite);
}

.pdp-lower__disclosure-icon {
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1;
  color: var(--color-muted);
}

.pdp-lower__disclosure-panel {
  padding: 0 0 clamp(0.875rem, 1.5vw, 1.125rem);
}

.pdp-lower__disclosure-paragraph {
  margin: 0 0 0.75rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-muted);
}

.pdp-lower__disclosure-paragraph:last-of-type {
  margin-bottom: 0;
}

.pdp-lower__disclosure-link-wrap {
  margin: 0.75rem 0 0;
}

.pdp-lower__disclosure-link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-caramel);
  text-decoration: none;
}

.pdp-lower__disclosure-link:hover {
  text-decoration: underline;
}

.product-detail__eyebrow {
  margin: 0 0 0.25rem;
  font-family: var(--font-body);
  font-size: var(--text-small);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.product-detail__title-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.product-detail__material {
  margin: 0 0 var(--space-lg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-muted);
}

.product-detail__choice-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.product-detail__choice-list--wrap {
  flex-direction: row;
  flex-wrap: wrap;
}

.product-detail__choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-graphite);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.3;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) ease,
    border-color var(--duration-fast) ease,
    color var(--duration-fast) ease;
}

.product-detail__choice > span {
  background: transparent;
  color: inherit;
}

.product-detail__choice--radio {
  position: relative;
}

.product-detail__choice-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.product-detail__choice-input:focus-visible + span {
  outline: none;
}

.product-detail__choice-list--sizes .product-detail__choice--radio:has(.product-detail__choice-input:checked) {
  background: var(--color-surface);
  border-color: var(--pdp-accent-gold);
  color: var(--color-graphite);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(201, 146, 46, 0.15);
}

.product-detail__choice-list--sizes .product-detail__choice--radio:has(.product-detail__choice-input:checked) span {
  color: var(--color-graphite);
}


/* PDP Step 3 — size + product type spacing and interaction */
.product-detail__fieldset--size {
  margin-bottom: 1rem;
}

.product-detail__fieldset--size .product-detail__legend {
  margin-bottom: 0.4375rem;
}

.product-detail__choice-list--sizes {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  align-content: flex-start;
  gap: 0.375rem;
  width: 100%;
}

[data-standard-size-options] .product-detail__choice--radio:not(.product-detail__choice--preset) {
  flex: 0 0 auto;
  width: auto;
  max-width: max-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.375rem;
  height: auto;
  padding: 0.53125rem 0.5625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  border-radius: var(--pdp-control-radius);
}

.product-detail__choice-list--sizes .product-detail__choice--radio span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: inherit;
  white-space: nowrap;
}

/* Main size row — ISO presets: dimensions primary, ISO code secondary below */
[data-standard-size-options] .product-detail__choice--preset {
  flex: 0 0 auto;
  width: auto;
  max-width: max-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.375rem;
  height: auto;
  padding: 0.53125rem 0.5625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  border-radius: var(--pdp-control-radius);
}

[data-standard-size-options] .product-detail__choice--preset:has(.product-detail__preset-label) {
  min-height: 2.75rem;
  padding: 0.375rem 0.5625rem 0.3125rem;
}

[data-standard-size-options] .product-detail__choice--preset .product-detail__preset-chip {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 0.0625rem;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
}

[data-standard-size-options] .product-detail__choice--preset .product-detail__preset-label,
[data-standard-size-options] .product-detail__choice--preset .product-detail__preset-dimensions {
  display: block;
  white-space: nowrap;
}

[data-standard-size-options] .product-detail__choice--preset:not(:has(.product-detail__preset-label)) .product-detail__preset-chip {
  flex-direction: row;
  line-height: 1.2;
}

[data-standard-size-options] .product-detail__preset-dimensions {
  font-size: 0.8125rem;
  font-weight: 500;
  color: inherit;
  white-space: nowrap;
  line-height: 1.15;
}

[data-standard-size-options] .product-detail__preset-label {
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-muted);
  line-height: 1.1;
}

[data-standard-size-options] .product-detail__choice--preset:has(.product-detail__choice-input:checked) .product-detail__preset-dimensions {
  font-weight: 600;
  color: var(--color-graphite);
}

[data-standard-size-options] .product-detail__choice--preset:has(.product-detail__choice-input:checked) .product-detail__preset-label {
  font-weight: 400;
  color: var(--color-muted);
}

.product-detail__choice-list--sizes .product-detail__choice--radio:hover:not(:has(.product-detail__choice-input:checked)) {
  border-color: rgba(201, 146, 46, 0.55);
}

.product-detail__choice-list--sizes .product-detail__choice--radio:has(.product-detail__choice-input:focus-visible) {
  outline: 2px solid var(--color-graphite);
  outline-offset: 2px;
}

.product-detail__fieldset--type {
  margin-bottom: 1.125rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.product-detail__fieldset--type .product-detail__legend {
  margin-bottom: 0.4375rem;
}

.product-detail__fieldset--type .product-detail__choice-list--segmented,
.product-detail__choice-list--type.product-detail__medium-switch {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  width: max-content;
  max-width: 100%;
  min-height: 2.5rem;
  gap: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--pdp-control-radius);
  background: var(--color-surface);
  overflow: hidden;
}

.product-detail__choice-list--type .product-detail__choice {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 2.5rem;
  height: auto;
  padding: 0 1.25rem;
  margin: 0;
  border: none;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
}

.product-detail__choice-list--type .product-detail__choice + .product-detail__choice {
  border-left: 1px solid var(--color-border);
}

.product-detail__price--core {
  margin-top: 0;
  margin-bottom: 1.125rem;
}

.product-detail__choice-list--type .product-detail__choice--link {
  background: var(--color-surface);
  color: var(--color-graphite);
}

.product-detail__choice-list--type .product-detail__choice--link:hover {
  background: rgba(69, 87, 71, 0.08);
  color: var(--color-graphite);
  text-decoration: none;
}

.product-detail__choice-list--type .product-detail__choice--link:focus-visible {
  outline: 2px solid var(--pdp-action-green);
  outline-offset: -2px;
  z-index: 1;
}

.product-detail__choice-list--type .product-detail__choice--active,
.product-detail__choice-list--type .product-detail__choice:has(.product-detail__choice-input:checked) {
  background: var(--pdp-action-green);
  border-color: var(--pdp-action-green);
  color: var(--color-bright);
  font-weight: 500;
}

/* Selected background belongs to the whole control — never paint the inner label. */
.product-detail__choice-list--type .product-detail__choice--active > span,
.product-detail__choice-list--type .product-detail__choice:has(.product-detail__choice-input:checked) > span {
  background: transparent;
  color: inherit;
}

.product-detail__choice-list--type .product-detail__choice--active:hover,
.product-detail__choice-list--type .product-detail__choice:has(.product-detail__choice-input:checked):hover {
  background: var(--pdp-action-green-hover);
  border-color: var(--pdp-action-green-hover);
  color: var(--color-bright);
}

.product-detail__choice-list--type .product-detail__choice--active:hover > span,
.product-detail__choice-list--type .product-detail__choice:has(.product-detail__choice-input:checked):hover > span {
  background: transparent;
  color: inherit;
}

/* Production finish — compact segmented control (poster OPRAWA / canvas WYKOŃCZENIE) */
.product-detail__fieldset--finish {
  margin-bottom: 0.875rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.product-detail__finish-oprawa-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.product-detail__frame-color-popover {
  position: absolute;
  top: calc(100% + 0.3125rem);
  right: 0;
  z-index: 30;
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--pdp-control-radius);
  background: var(--color-surface);
  box-shadow: 0 2px 10px rgba(28, 28, 28, 0.06);
}

.product-detail__frame-color-popover[hidden] {
  display: none !important;
}

.product-detail__frame-color-popover-label {
  margin: 0 0 0.375rem;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--color-muted);
}

.product-detail__frame-color-summary {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  margin-top: 0.3125rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  line-height: 1.25;
  color: var(--color-muted);
}

.product-detail__frame-color-summary[hidden] {
  display: none !important;
}

.product-detail__frame-color-summary-text {
  color: var(--color-graphite);
  font-weight: 400;
}

.product-detail__frame-color-summary-sep {
  color: var(--color-muted);
}

.product-detail__frame-color-summary-change {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: var(--color-caramel);
  cursor: pointer;
  text-decoration: none;
}

.product-detail__frame-color-summary-change:hover {
  text-decoration: underline;
}

.product-detail__frame-color-summary-change:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.product-detail__frame-color-error {
  margin-top: 0.375rem;
}

.product-detail__choice-list--frame-color {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  width: max-content;
  max-width: 100%;
  min-height: 2rem;
  gap: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-raised-surface);
  overflow: hidden;
}

.product-detail__choice-list--frame-color .product-detail__choice--segment {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0 0.875rem;
  margin: 0;
  border: none;
  border-radius: 0;
  background: var(--color-raised-surface);
  color: var(--color-graphite);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.product-detail__choice-list--frame-color .product-detail__choice--segment + .product-detail__choice--segment {
  border-left: 1px solid var(--color-border);
}

.product-detail__choice-list--frame-color .product-detail__choice-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.product-detail__choice-list--frame-color .product-detail__choice--segment:has(.product-detail__choice-input:checked) {
  background: var(--color-surface);
  color: var(--color-graphite);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(201, 146, 46, 0.15);
  outline: 1px solid var(--pdp-accent-gold);
  outline-offset: -1px;
  z-index: 1;
}

.product-detail__choice-list--frame-color .product-detail__choice--segment:has(.product-detail__choice-input:focus-visible) {
  outline: 2px solid var(--color-graphite);
  outline-offset: -2px;
  z-index: 1;
}

[data-frame-color-popover] .product-detail__choice-list--frame-color {
  gap: 0.375rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

[data-frame-color-popover] .product-detail__choice-list--frame-color .product-detail__choice--segment {
  position: relative;
  min-height: 2rem;
  padding: 0.4375rem 0.5625rem;
  border: 1px solid var(--color-border);
  border-radius: var(--pdp-control-radius);
  background: var(--color-surface);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
}

[data-frame-color-popover] .product-detail__choice-list--frame-color .product-detail__choice--segment:hover:not(:has(.product-detail__choice-input:checked)) {
  border-color: rgba(201, 146, 46, 0.55);
}

[data-frame-color-popover] .product-detail__choice-list--frame-color .product-detail__choice--segment:has(.product-detail__choice-input:checked) {
  position: relative;
  z-index: 1;
  background: var(--color-surface);
  border-color: var(--pdp-accent-gold);
  color: var(--color-graphite);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(201, 146, 46, 0.15);
  outline: none;
}

[data-frame-color-popover] .product-detail__choice-list--frame-color .product-detail__choice--segment:has(.product-detail__choice-input:checked) span {
  color: var(--color-graphite);
}

[data-frame-color-popover] .product-detail__choice-list--frame-color .product-detail__choice--segment:has(.product-detail__choice-input:focus-visible) {
  outline: 2px solid var(--color-graphite);
  outline-offset: 2px;
}

@media (max-width: 479px) {
  .product-detail__choice-list--frame-color {
    flex-wrap: wrap;
  }

  .product-detail__choice-list--frame-color .product-detail__choice--segment {
    flex: 1 1 auto;
    min-width: max-content;
  }
}

.product-detail__fieldset--finish .product-detail__legend {
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
}

.product-detail__choice-list--finish {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  width: max-content;
  max-width: 100%;
  min-height: 2rem;
  gap: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-raised-surface);
  overflow: hidden;
}

.product-detail__choice-list--finish .product-detail__choice--segment {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0 0.875rem;
  margin: 0;
  border: none;
  border-radius: 0;
  background: var(--color-raised-surface);
  color: var(--color-graphite);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.product-detail__choice-list--finish .product-detail__choice--segment + .product-detail__choice--segment {
  border-left: 1px solid var(--color-border);
}

.product-detail__choice-list--finish .product-detail__choice-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.product-detail__choice-list--finish .product-detail__choice--segment:has(.product-detail__choice-input:checked) {
  background: var(--color-commerce-action);
  color: var(--color-bright);
}

.product-detail__choice-list--finish .product-detail__choice--segment:has(.product-detail__choice-input:focus-visible) {
  outline: 2px solid var(--color-commerce-action);
  outline-offset: -2px;
  z-index: 1;
}

.product-detail__choice-list--finish .product-detail__choice--segment:has(.product-detail__choice-input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* OPRAWA and white margin are independent groups.
   Buttons inside one segmented control stay joined (gap: 0 on the lists).
   1.25rem is 20px; no spacing token lands on 20px
   (--space-md is 16px, --space-lg is 24px). */
.product-detail__finish-margin-row {
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  column-gap: 1.25rem;
  row-gap: 0.875rem;
  margin-bottom: 0.875rem;
}

.product-detail--collage-template .product-detail__finish-margin-row {
  flex-wrap: nowrap;
}

.product-detail__finish-margin-col {
  flex: 0 0 auto;
  max-width: 100%;
  min-width: min-content;
}

.collage-creator {
  --collage-slot-empty: #ede7de;
}

.product-detail--collage-template .collage-creator__preview .product-preview__paper {
  background: #ffffff;
}

.product-detail__fieldset--margin {
  margin-bottom: 0;
}

.product-detail__fieldset--margin .product-detail__legend {
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
}

.product-detail__choice-list--margin-primary,
.product-detail__choice-list--margin-width {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  width: max-content;
  max-width: 100%;
  min-height: 2rem;
  gap: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-raised-surface);
  overflow: hidden;
}

.product-detail__choice-list--margin-primary .product-detail__choice--segment,
.product-detail__choice-list--margin-width .product-detail__choice--segment {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0 0.875rem;
  margin: 0;
  border: none;
  border-radius: 0;
  background: var(--color-raised-surface);
  color: var(--color-graphite);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.product-detail__choice-list--margin-primary .product-detail__choice--segment + .product-detail__choice--segment,
.product-detail__choice-list--margin-width .product-detail__choice--segment + .product-detail__choice--segment {
  border-left: 1px solid var(--color-border);
}

.product-detail__choice-list--margin-primary .product-detail__choice-input,
.product-detail__choice-list--margin-width .product-detail__choice-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.product-detail__choice-list--margin-primary .product-detail__choice--segment:has(.product-detail__choice-input:checked) {
  background: var(--color-commerce-action);
  color: var(--color-bright);
}

.product-detail__choice-list--margin-width .product-detail__choice--segment:has(.product-detail__choice-input:checked) {
  background: var(--color-surface);
  color: var(--color-graphite);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(201, 146, 46, 0.15);
  outline: 1px solid var(--pdp-accent-gold);
  outline-offset: -1px;
  z-index: 1;
}

.product-detail__choice-list--margin-width .product-detail__choice--segment:has(.product-detail__choice-input:focus-visible) {
  outline: 2px solid var(--color-graphite);
  outline-offset: -2px;
  z-index: 1;
}

.product-detail__choice-list--margin-width .product-detail__margin-default-context {
  flex: 0 1 auto;
  align-self: center;
  margin: 0;
  padding: 0 0.375rem;
  border: none;
  background: transparent;
  font-size: 0.6875rem;
  line-height: 1.2;
  color: var(--color-muted);
  pointer-events: none;
  cursor: default;
}

.product-detail__margin-primary-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.product-detail__margin-kind-wrap {
  width: 100%;
  margin-top: 0.5rem;
}

.product-detail__margin-kind-wrap[hidden],
.product-detail__choice-list--margin-kind[hidden],
.product-detail__margin-kind-summary[hidden] {
  display: none !important;
}

.product-detail__margin-kind-label {
  margin: 0 0 0.3125rem;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--color-muted);
}

.product-detail__choice-list--margin-kind {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-height: 2rem;
  gap: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-raised-surface);
  overflow: hidden;
}

.product-detail__choice-list--margin-kind .product-detail__choice--segment {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2rem;
  padding: 0.4rem 0.75rem;
  margin: 0;
  border: none;
  border-radius: 0;
  background: var(--color-raised-surface);
  color: var(--color-graphite);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
  cursor: pointer;
}

.product-detail__choice-list--margin-kind .product-detail__choice--segment + .product-detail__choice--segment {
  border-top: 1px solid var(--color-border);
}

.product-detail__choice-list--margin-kind .product-detail__choice-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.product-detail__choice-list--margin-kind .product-detail__choice--segment:has(.product-detail__choice-input:checked) {
  background: var(--color-commerce-action);
  color: var(--color-bright);
}

.product-detail__margin-equal-note {
  margin: 0.375rem 0 0;
  max-width: 22rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--color-muted);
}

.product-detail__margin-equal-note[hidden] {
  display: none !important;
}

.product-detail__white-margin-popover {
  position: absolute;
  top: calc(100% + 0.3125rem);
  right: 0;
  z-index: 30;
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--pdp-control-radius);
  background: var(--color-surface);
  box-shadow: 0 2px 10px rgba(28, 28, 28, 0.06);
}

.product-detail__white-margin-popover[hidden] {
  display: none !important;
}

.product-detail__white-margin-popover-label {
  margin: 0 0 0.375rem;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--color-muted);
}

.product-detail__white-margin-summary {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  margin-top: 0.3125rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  line-height: 1.25;
  color: var(--color-muted);
}

.product-detail__white-margin-summary[hidden] {
  display: none !important;
}

.product-detail__white-margin-summary-text {
  color: var(--color-graphite);
  font-weight: 400;
}

.product-detail__white-margin-summary-sep {
  color: var(--color-muted);
}

.product-detail__white-margin-summary-change {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: var(--color-caramel);
  cursor: pointer;
  text-decoration: none;
}

.product-detail__white-margin-summary-change:hover {
  text-decoration: underline;
}

.product-detail__white-margin-summary-change:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.product-detail__margin-custom-compact {
  margin-top: 0.5rem;
}

.product-detail__margin-custom-compact-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.375rem;
}

.product-detail__margin-custom-input-row {
  margin: 0;
  flex: 0 0 auto;
  width: auto;
}

.product-detail__margin-custom-input-row .product-detail__text-input,
.product-detail__margin-custom-input {
  flex: 0 0 6.25rem;
  width: 6.25rem;
  max-width: 6.25rem;
  min-width: 5.625rem;
  box-sizing: border-box;
  min-height: 2rem;
  padding: 0.3125rem 0.5rem;
  font-size: 0.8125rem;
}

.product-detail__margin-custom-input-row .product-detail__dimension-unit {
  flex-shrink: 0;
}

.product-detail__margin-custom-apply {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--color-caramel);
  cursor: pointer;
  text-transform: uppercase;
}

.product-detail__margin-custom-apply:hover {
  text-decoration: underline;
}

.product-detail__margin-custom-apply:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

[data-white-margin-popover] .product-detail__choice-list--margin-width {
  gap: 0.375rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

[data-white-margin-popover] .product-detail__choice-list--margin-width .product-detail__choice--segment {
  position: relative;
  min-height: 2rem;
  padding: 0.4375rem 0.5625rem;
  border: 1px solid var(--color-border);
  border-radius: var(--pdp-control-radius);
  background: var(--color-surface);
}

[data-white-margin-popover] .product-detail__choice-list--margin-width .product-detail__choice--segment:hover:not(:has(.product-detail__choice-input:checked)) {
  border-color: rgba(201, 146, 46, 0.55);
}

[data-white-margin-popover] .product-detail__choice-list--margin-width .product-detail__choice--segment:has(.product-detail__choice-input:checked) {
  position: relative;
  z-index: 1;
  background: var(--color-surface);
  border-color: var(--pdp-accent-gold);
  color: var(--color-graphite);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(201, 146, 46, 0.15);
  outline: none;
}

[data-white-margin-popover] .product-detail__choice-list--margin-width .product-detail__choice--segment:has(.product-detail__choice-input:focus-visible) {
  outline: 2px solid var(--color-graphite);
  outline-offset: 2px;
}

[data-white-margin-popover] .product-detail__margin-default-context {
  position: static;
  display: block;
  width: auto;
  margin: 0.375rem 0 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 0.6875rem;
  line-height: 1.25;
  color: var(--color-muted);
  pointer-events: none;
}

[data-white-margin-popover] .product-detail__margin-range-helper,
[data-white-margin-popover] .product-detail__white-margin-error,
[data-white-margin-popover] .product-detail__field-note[data-white-margin-size-note] {
  margin-top: 0.375rem;
  font-size: 0.6875rem;
  line-height: 1.25;
}

.product-detail__margin-expanded {
  margin-bottom: 0.875rem;
}

.product-detail__fieldset--margin-width {
  margin-bottom: 0;
}

.product-detail__margin-hint,
.product-detail__margin-unavailable-note,
.product-detail__field-note {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--color-muted);
}

.product-detail__voucher-tiers {
  margin: 0.625rem 0 0;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--color-burgundy-soft);
  color: var(--color-burgundy);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}

.product-detail__margin-custom {
  margin-top: 0.625rem;
}

.product-detail__delivery-panel--compact {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: auto;
  min-height: 2.5rem;
  padding: 0.5rem 0.875rem;
  margin-bottom: 1rem;
}

.quantity-control + .product-detail__delivery-panel--compact {
  margin-top: 1rem;
}

.product-detail__delivery-panel--compact .product-detail__delivery-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.product-detail__delivery-panel--compact .product-detail__delivery-line--compact {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: break-word;
}

.product-detail__other-size-toggle {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--color-caramel);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.product-detail__other-size-toggle:hover,
.product-detail__other-size-toggle:focus-visible,
.product-detail__other-size-toggle:active {
  color: #8f6640;
  text-decoration: underline;
}

.product-detail__other-size-toggle[aria-expanded="true"],
.product-detail__other-size-toggle.is-active {
  color: var(--color-caramel);
}

.product-detail__other-size-toggle[aria-expanded="true"]:hover,
.product-detail__other-size-toggle[aria-expanded="true"]:focus-visible,
.product-detail__other-size-toggle[aria-expanded="true"]:active,
.product-detail__other-size-toggle.is-active:hover,
.product-detail__other-size-toggle.is-active:focus-visible,
.product-detail__other-size-toggle.is-active:active {
  color: #8f6640;
}

.product-detail__other-size-toggle:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.product-detail__other-size-panel {
  margin-top: 0.625rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--pdp-panel-radius);
  background: var(--color-cream);
}

.product-detail__other-size-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4375rem;
}

.product-detail__other-size-close {
  flex-shrink: 0;
  margin: -0.125rem -0.125rem 0 0;
  padding: 0.125rem 0.25rem;
  border: none;
  background: none;
  color: var(--color-graphite);
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity var(--duration-fast) ease, color var(--duration-fast) ease;
}

.product-detail__other-size-close:hover,
.product-detail__other-size-close:active {
  opacity: 1;
  color: var(--color-graphite);
}

.product-detail__other-size-close:focus-visible {
  opacity: 1;
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.product-detail__other-size-heading {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.product-detail__custom-size-inquiry-entry {
  margin-top: 0.75rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--color-border);
}

.product-detail__custom-size-inquiry-lead {
  margin: 0 0 0.25rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-graphite);
}

.product-detail__custom-size-inquiry-action {
  display: inline-block;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--color-caramel);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.product-detail__custom-size-inquiry-action:hover,
.product-detail__custom-size-inquiry-action:focus-visible,
.product-detail__custom-size-inquiry-action:active {
  color: #8f6640;
  text-decoration: underline;
}

.product-detail__custom-size-inquiry-action:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.product-detail__custom-size-inquiry-action[aria-expanded="true"] {
  color: var(--color-caramel);
}

.product-detail__custom-size-inquiry-action[aria-expanded="true"]:hover,
.product-detail__custom-size-inquiry-action[aria-expanded="true"]:focus-visible,
.product-detail__custom-size-inquiry-action[aria-expanded="true"]:active {
  color: #8f6640;
}

.product-detail__custom-size-inquiry-panel {
  margin-top: 0.625rem;
}

.product-detail__dimension-input-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.product-detail__dimension-input-row .product-detail__text-input {
  flex: 1 1 auto;
  min-width: 0;
}

.product-detail__dimension-unit {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: var(--text-small);
  color: var(--color-muted);
}

.product-detail__dimension-field--full {
  margin-top: 0.5rem;
}

.product-detail__size-inquiry-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.product-detail__inquiry-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.625rem;
  min-height: 2.375rem;
  padding: 0.5rem 0.875rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-burgundy);
  color: var(--color-bright);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color var(--duration-fast) ease;
}

.product-detail__inquiry-submit:hover {
  background: #6a3540;
}

.product-detail__inquiry-submit:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.product-detail__inquiry-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.product-detail__size-inquiry-success {
  margin-top: 0.625rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
}

.product-detail__size-inquiry-success-lead {
  margin: 0 0 0.25rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-graphite);
}

.product-detail__size-inquiry-success-ref {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--color-graphite);
}

@media (max-width: 480px) {
  .product-detail__custom-size-inquiry-panel .product-detail__dimension-grid {
    grid-template-columns: 1fr;
  }
}

.product-detail__choice--preset {
  border-radius: var(--pdp-control-radius);
}

.product-detail__choice-list--presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.375rem;
  width: 100%;
  align-items: stretch;
}

.product-detail__choice-list--presets .product-detail__choice--preset {
  width: 100%;
  max-width: none;
  flex: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.625rem;
  height: 100%;
  padding: 0.3125rem 0.25rem;
  box-sizing: border-box;
}

.product-detail__choice-list--presets .product-detail__choice--preset .product-detail__preset-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  min-height: 100%;
  gap: 0.0625rem;
  line-height: 1.15;
}

.product-detail__choice-list--presets .product-detail__preset-label,
.product-detail__choice-list--presets .product-detail__preset-dimensions {
  display: block;
  width: 100%;
  text-align: center;
  line-height: 1.2;
}

.product-detail__preset-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.product-detail__preset-dimensions {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-graphite);
}

.product-detail__choice-list--presets .product-detail__choice--preset:has(.product-detail__choice-input:checked) .product-detail__preset-label,
.product-detail__choice-list--presets .product-detail__choice--preset:has(.product-detail__choice-input:checked) .product-detail__preset-dimensions {
  color: var(--color-graphite);
}

.product-detail__addon-group .product-detail__choice--radio:has(.product-detail__choice-input:checked) {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-graphite);
  font-weight: 600;
}

.product-detail__addon-group .product-detail__choice--radio:has(.product-detail__choice-input:checked) span {
  color: var(--color-graphite);
}

.product-detail__choice--link {
  text-decoration: none;
}

.product-detail__choice--link:hover {
  background: var(--color-sand);
  text-decoration: none;
}

.product-detail__dimension-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.product-detail__dimension-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.product-detail__dimension-label {
  font-family: var(--font-body);
  font-size: var(--text-small);
  color: var(--color-muted);
}

.product-detail__text-input {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-graphite);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.product-detail__text-input:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 1px;
}

.product-detail__text-input--quantity {
  max-width: 3rem;
}

.product-detail__hint {
  margin: var(--space-xs) 0 0;
  font-size: var(--text-small);
  color: var(--color-muted);
}

.product-detail__field-error,
.product-detail__form-error {
  margin: var(--space-xs) 0 0;
  font-size: var(--text-small);
  color: var(--color-burgundy);
}

.product-detail__personalization {
  margin: 0 0 var(--space-lg);
}

.product-detail__personalization-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding-inline: 0.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-commerce-action);
  text-decoration: none;
}

.product-detail__personalization-link:hover {
  color: var(--color-secondary-green);
  text-decoration: underline;
}

.product-detail__purchase-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-sm);
  margin: var(--space-lg) 0 var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.product-detail__quantity {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.product-detail__add-to-cart {
  flex: 1 1 12rem;
  min-height: 2.75rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-burgundy);
  color: var(--color-bright);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--duration-fast) ease;
}

.product-detail__add-to-cart:hover {
  background: var(--color-burgundy-dark);
}

.product-detail__add-to-cart:active {
  background: var(--color-burgundy-dark);
}

.product-detail__add-to-cart:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.product-detail__eta {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-graphite);
}

.product-detail__fulfillment-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: var(--text-small);
  color: var(--color-muted);
}

.product-detail__sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: calc(var(--z-header) - 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 0.65rem var(--gutter-mobile);
  background: rgba(252, 250, 246, 0.96);
  border-top: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
}

.product-detail__sticky-price {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-graphite);
}

.product-detail__add-to-cart--compact {
  flex: 0 1 auto;
  min-width: 9.5rem;
}

@media (min-width: 768px) {
  .product-detail__sticky-bar {
    display: none;
  }
}

.product-gallery__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.product-gallery__stage {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
}

@media (min-width: 1024px) {
  .product-gallery__stage {
    min-width: 0;
    width: min(100%, var(--pdp-gallery-stage-fit-width, var(--pdp-gallery-stage-max-width)));
  }

  .product-gallery__main-wrap {
    max-width: var(--pdp-gallery-stage-fit-width, var(--pdp-gallery-stage-max-width));
    margin-inline: 0;
  }

  .product-gallery__main-trigger {
    aspect-ratio: 4 / 5;
    width: min(100%, var(--pdp-gallery-stage-fit-width, var(--pdp-gallery-stage-max-width)));
    max-height: none;
  }

  .product-gallery__body:not(.product-gallery__body--with-rail) .product-gallery__stage,
  .product-gallery__body:not(.product-gallery__body--with-rail) .product-gallery__main-wrap,
  .product-gallery__body:not(.product-gallery__body--with-rail) .product-gallery__main-trigger {
    width: var(
      --pdp-gallery-stage-fit-width-single,
      var(--pdp-gallery-stage-max-width)
    );
    max-width: var(
      --pdp-gallery-stage-fit-width-single,
      var(--pdp-gallery-stage-max-width)
    );
  }

  .product-gallery__body:not(.product-gallery__body--with-rail) .product-gallery__main-trigger {
    max-height: none;
  }

  .product-gallery__main-trigger--presentation .product-gallery__image {
    width: auto;
    height: auto;
    max-width: var(--pdp-gallery-art-max-width);
    max-height: var(--pdp-gallery-art-max-height);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .product-gallery__body--with-rail {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--pdp-gallery-gap);
  }

  .product-gallery__thumbs-viewport {
    max-height: var(--pdp-gallery-stage-max-height);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: var(--pdp-gallery-rail-width);
  }

  .product-gallery__thumbs-rail {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex-shrink: 0;
    width: var(--pdp-gallery-rail-width);
    max-height: none;
    overflow: visible;
  }

  .product-gallery__thumbs-rail .product-gallery__thumb {
    width: auto;
    height: auto;
  }

  .product-gallery__nav--mobile {
    display: none;
  }

  .product-gallery__stage {
    flex: 1 1 auto;
    min-width: 0;
    max-width: var(--pdp-gallery-stage-max-width);
  }

  .product-gallery__main-trigger {
    max-height: var(--pdp-gallery-stage-max-height);
  }

  .product-gallery__main-trigger--presentation .product-gallery__image {
    width: auto;
    height: auto;
    max-width: var(--pdp-gallery-art-max-width);
    max-height: var(--pdp-gallery-art-max-height);
  }
}

.product-gallery__main-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  align-self: flex-start;
}

.product-gallery__main-trigger {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: none;
  border-radius: var(--pdp-panel-radius);
  aspect-ratio: 4 / 5;
  width: 100%;
  max-height: min(60vh, 30rem);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.product-gallery__main-trigger--presentation {
  background: var(--color-cream);
  padding: var(--pdp-gallery-stage-padding);
}

.product-gallery__main-trigger--gallery {
  background: transparent;
  padding: 0;
}

.product-gallery__main-trigger:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.product-gallery__zoom {
  position: absolute;
  right: 0.625rem;
  bottom: 0.625rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 1.9375rem;
  padding: 0 0.625rem;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(252, 250, 246, 0.88);
  color: var(--color-graphite);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(39, 49, 38, 0.06);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition:
    background-color var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease,
    opacity var(--duration-fast) ease;
}

.product-gallery__zoom:hover {
  background: rgba(255, 253, 249, 0.96);
  box-shadow: 0 1px 4px rgba(39, 49, 38, 0.1);
}

.product-gallery__main-trigger--gallery .product-gallery__zoom {
  background: var(--color-cream);
}

.product-gallery__main-trigger--gallery .product-gallery__zoom:hover {
  background: var(--color-cream);
}

.product-gallery__zoom:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.product-gallery__zoom-icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

.product-gallery__zoom-label {
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 500;
}

.product-gallery__image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transform: scale(var(--product-image-scale, 1));
  filter: none;
}

.product-gallery__main-trigger--presentation .product-gallery__image {
  filter: var(--pdp-wall-shadow);
}

.product-gallery__main-trigger--gallery .product-gallery__image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  filter: none;
}

@media (min-width: 1024px) {
  .product-gallery__main-trigger {
    max-height: none;
  }

  .product-gallery__main-trigger--presentation .product-gallery__image {
    width: auto;
    height: auto;
    max-width: var(--pdp-gallery-art-max-width);
    max-height: var(--pdp-gallery-art-max-height);
  }

  .product-gallery__main-trigger--gallery .product-gallery__image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
  }
}

@media (max-width: 1023px) {
  .product-gallery__thumbs-nav {
    display: none;
  }

  .product-gallery__thumbs-viewport {
    max-height: none;
    overflow: visible;
    width: 100%;
  }
}

@media (max-width: 767px) {
  .product-gallery__body--with-rail {
    gap: var(--space-sm);
  }

  .product-gallery__thumbs-column {
    width: 100%;
  }

  .product-gallery__thumbs-rail {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    gap: 0.45rem;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
  }

  .product-gallery__main-trigger {
    aspect-ratio: 1 / 1;
    max-height: none;
  }
}

.product-gallery__nav {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-graphite);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  box-shadow: none;
  transition: background-color var(--duration-fast) ease;
}

.product-gallery__nav:hover {
  background: var(--color-sand);
}

.product-gallery__nav:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (max-width: 1023px) {
  .product-gallery__nav--mobile {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* PDP gallery — authoritative desktop structure (Step 1A) */
@media (min-width: 1024px) {
  .product-gallery__body--with-rail {
    display: grid;
    grid-template-columns:
      var(--pdp-gallery-rail-width)
      var(--pdp-gallery-stage-fit-width, var(--pdp-gallery-stage-max-width));
    align-items: start;
    gap: var(--pdp-gallery-gap);
    width: fit-content;
    max-width: 100%;
  }

  .product-gallery__body:not(.product-gallery__body--with-rail) {
    width: fit-content;
    max-width: 100%;
  }

  .product-gallery__thumbs-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    width: var(--pdp-gallery-rail-width);
  }

  .product-gallery__thumbs-viewport {
    width: var(--pdp-gallery-rail-width);
    max-height: calc(var(--pdp-gallery-stage-fit-width, var(--pdp-gallery-stage-max-width)) * 5 / 4);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .product-gallery__thumbs-viewport::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .product-gallery__thumbs-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--pdp-gallery-thumb-gap);
    width: var(--pdp-gallery-rail-width);
    padding: 0;
  }

  .product-gallery__thumbs-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-width: 2.75rem;
    min-height: 2rem;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    color: var(--color-caramel);
    cursor: pointer;
    line-height: 0;
    transition: color var(--duration-fast) ease, opacity var(--duration-fast) ease;
  }

  .product-gallery__thumbs-nav:hover:not(:disabled) {
    color: #8f6640;
    opacity: 0.92;
  }

  .product-gallery__thumbs-nav:disabled {
    opacity: 0.35;
    cursor: default;
  }

  .product-gallery__thumbs-nav:focus-visible {
    outline: 2px solid var(--color-caramel);
    outline-offset: 3px;
  }

  .product-gallery__thumbs-nav-icon {
    display: block;
    width: 2rem;
    height: 2rem;
  }

  .product-gallery__thumbs-rail .product-gallery__thumb {
    width: auto;
    height: auto;
    max-width: 100%;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: none;
    border-radius: 0;
  }

  .product-gallery__thumbs-rail .product-gallery__thumb img {
    display: block;
    width: auto;
    height: auto;
    max-width: var(--pdp-gallery-thumb-max-width);
    max-height: var(--pdp-gallery-thumb-max-height);
    object-fit: contain;
    object-position: center;
    border-radius: var(--pdp-gallery-image-radius);
  }

  .product-gallery__nav--mobile {
    display: none;
  }
}

.product-gallery__placeholder {
  background: var(--color-cream);
  border-radius: var(--radius-md);
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: var(--pdp-gallery-stage-max-width, 22rem);
  max-height: var(--pdp-gallery-stage-max-height, min(52vh, 26rem));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.product-gallery__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.product-gallery__thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  overflow: visible;
  flex-shrink: 0;
  line-height: 0;
}

.product-gallery__thumb.is-active img {
  box-shadow: 0 0 0 2px var(--pdp-accent-gold, #C9922E);
}

.product-gallery__thumb:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--pdp-gallery-image-radius);
}

.product-gallery__thumb img {
  display: block;
  width: auto;
  height: auto;
  max-width: var(--pdp-gallery-thumb-max-width);
  max-height: var(--pdp-gallery-thumb-max-height);
  object-fit: contain;
  object-position: center;
  border-radius: var(--pdp-gallery-image-radius);
}

.product-gallery__lightbox {
  border: none;
  padding: 0;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  background: transparent;
}

.product-gallery__lightbox::backdrop {
  background: rgba(20, 24, 20, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.product-gallery__lightbox-inner {
  position: relative;
  width: min(96vw, 1200px);
  height: min(92vh, 900px);
  margin: 4vh auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  box-sizing: border-box;
}

.product-gallery__lightbox-nav--prev,
.product-gallery__lightbox-nav--next {
  grid-row: 1;
  align-self: center;
}

.product-gallery__lightbox-stage {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 0;
  justify-self: center;
}

.product-gallery__lightbox-image {
  max-width: 100%;
  max-height: min(80vh, 820px);
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  transform: scale(var(--product-image-scale, 1));
  filter: none;
}

.product-gallery__lightbox-stage > .product-gallery__lightbox-image[hidden] {
  display: none !important;
}

.product-gallery__lightbox-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-graphite);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(20, 24, 20, 0.35);
}

.product-gallery__lightbox-close:focus-visible,
.product-gallery__lightbox-nav:focus-visible {
  outline: 2px solid var(--color-bright);
  outline-offset: 2px;
}

.product-gallery__lightbox-nav {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-graphite);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: none;
  transition: background-color var(--duration-fast) ease;
}

.product-gallery__lightbox-nav:hover {
  background: var(--color-sand);
}

@media (max-width: 767px) {
  .product-gallery__lightbox-inner {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: var(--space-lg) var(--space-sm);
  }
}

/* PRIMARY composed poster preview (frame → paper → artwork) */
.product-gallery__main-wrap--composed-primary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: var(--pdp-panel-radius);
  padding: 0;
  min-height: min(60vh, 30rem);
  width: 100%;
}

.product-gallery__main-wrap > .product-preview {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.product-gallery__main-wrap > .product-preview[hidden] {
  display: none !important;
}

.product-gallery__main-wrap--composed-primary > .product-preview {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: 100%;
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

.product-gallery__main-wrap > .product-preview .product-preview__stage {
  pointer-events: auto;
  width: 100%;
  height: 100%;
}

.product-gallery__main-wrap--composed-primary > .product-preview .product-preview__stage {
  height: auto;
  container-type: inline-size;
  container-name: preview-stage;
  width: 100%;
  max-width: 100%;
  background: transparent;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-gallery__main-trigger--composed-primary-shell {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  max-height: none;
  background: transparent;
  padding: 0;
  pointer-events: none;
}

.product-gallery__main-trigger--composed-primary-shell .product-gallery__image {
  filter: none;
}

.product-gallery__main-wrap--composed-primary .product-gallery__zoom {
  pointer-events: auto;
  z-index: 3;
}

.product-preview {
  width: 100%;
}

.product-preview__stage {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-preview__presentation {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  line-height: 0;
  --preview-wall-scale: 1.20;
  /* Fixed slot — avoid 100cqw (circular with max-content gallery → 0-width portrait). */
  --preview-paper-slot: 340px;
}

.product-preview__wall {
  display: block;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding:
    calc((var(--preview-wall-scale) - 1) / 2 * var(--preview-paper-slot) / var(--preview-paper-aspect, 0.714286))
    calc((var(--preview-wall-scale) - 1) / 2 * var(--preview-paper-slot));
  background: var(--color-cream);
  line-height: 0;
  overflow: visible;
  pointer-events: none;
  filter: none;
  box-shadow: none;
}

.product-gallery__main-wrap--composed-primary .product-preview__framed-object {
  --preview-paper-slot: 340px;
}

.product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary .product-preview__framed-object {
  --preview-paper-slot: 476px;
}

.product-preview__framed-object {
  --preview-paper-slot: 340px;
  position: relative;
  display: block;
  box-sizing: border-box;
  width: var(--preview-paper-slot);
  min-width: var(--preview-paper-slot);
  flex: 0 0 auto;
  /* Avoid max-width:100% under max-content/flex ancestors (collapses portrait slot). */
  max-width: none;
  overflow: visible;
  background: transparent;
  pointer-events: none;
  filter: none;
  padding: 0;
}

.product-preview__framed-object:not(.product-preview__framed-object--with-frame) .product-preview__paper {
  filter: none;
}

.product-preview__framed-object:not(.product-preview__framed-object--with-frame) .product-preview__paper-anchor {
  box-shadow: var(--pdp-paper-shadow);
}

.product-preview__framed-object--with-frame {
  --preview-env-left-ratio: 0.095;
  --preview-env-right-ratio: 0.094;
  --preview-env-top-ratio: 0.07142857142857142;
  --preview-env-bottom-ratio: 0.07285714285714286;
  width: calc(var(--preview-paper-slot) * (1 + var(--preview-env-left-ratio) + var(--preview-env-right-ratio)));
  filter: none;
  padding:
    calc(var(--preview-env-top-ratio) * var(--preview-paper-slot) / var(--preview-paper-aspect, 0.714286))
    calc(var(--preview-env-right-ratio) * var(--preview-paper-slot))
    calc(var(--preview-env-bottom-ratio) * var(--preview-paper-slot) / var(--preview-paper-aspect, 0.714286))
    calc(var(--preview-env-left-ratio) * var(--preview-paper-slot));
}

.product-preview__framed-object--with-frame .product-preview__frame-overlay:not([hidden]) {
  filter: var(--pdp-wall-shadow);
}

.product-preview__framed-object--with-frame .product-preview__paper {
  filter: none;
}

.product-preview__framed-object--with-frame .product-preview__paper-anchor {
  box-shadow: none;
}

.product-preview__paper-anchor {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  line-height: 0;
}

.product-preview__paper {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: min(70vh, 640px);
  aspect-ratio: var(--preview-paper-aspect, 5 / 7);
  background: var(--color-bright);
  overflow: hidden;
}

.product-preview__frame-overlay {
  position: absolute;
  z-index: 2;
  display: block;
  box-sizing: border-box;
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

.product-preview__frame-overlay[data-frame-render-mode="nine-slice"] {
  /* Corners from border-image-slice; edges stretch along length only. */
  border-image-repeat: stretch;
}

.product-preview__frame-overlay[hidden] {
  display: none !important;
}

.product-preview__artwork-inset {
  position: absolute;
  box-sizing: border-box;
  overflow: hidden;
}

.product-preview__artwork {
  display: block;
  width: 100%;
  height: 100%;
  /* Never stretch: default fill would distort when inset ≠ source aspect. */
  object-fit: contain;
  object-position: center;
}

.product-gallery__lightbox-preview {
  --preview-lightbox-paper-height: min(82vh, 860px);
  --preview-lightbox-paper-width: calc(var(--preview-lightbox-paper-height) * 5 / 7);
  --preview-paper-slot: var(--preview-lightbox-paper-width);
  flex: 0 0 auto;
  width: min(var(--preview-lightbox-paper-width), 100%);
  max-width: 100%;
  margin: 0 auto;
}

.product-gallery__lightbox-preview[hidden] {
  display: none !important;
}

.product-gallery__lightbox-preview > .product-preview[hidden] {
  display: none !important;
}

.product-gallery__lightbox-preview .product-preview,
.product-gallery__lightbox-preview .product-preview__stage,
.product-gallery__lightbox-preview .product-preview__presentation,
.product-gallery__lightbox-preview .product-preview__wall,
.product-gallery__lightbox-preview .product-preview__framed-object:not(.product-preview__framed-object--with-frame),
.product-gallery__lightbox-preview .product-preview__paper-anchor {
  width: 100%;
  max-width: 100%;
}

.product-gallery__lightbox-preview .product-preview__stage {
  background: transparent;
  padding: 0;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-gallery__lightbox-preview .product-preview__wall {
  background: transparent;
  filter: none;
  padding: 0;
}

.product-gallery__lightbox-preview .product-preview__presentation {
  --preview-wall-breathe: 0;
}

.product-gallery__lightbox-preview .product-preview__framed-object--with-frame {
  --preview-paper-slot: min(var(--preview-lightbox-paper-width), 100%);
  width: calc(
    var(--preview-paper-slot) * (1 + var(--preview-env-left-ratio) + var(--preview-env-right-ratio))
  );
  max-width: 100%;
  filter: none;
}

.product-gallery__lightbox-preview
  .product-preview__framed-object--with-frame
  .product-preview__frame-overlay:not([hidden]) {
  filter: var(--pdp-wall-shadow);
}

.product-gallery__lightbox-preview .product-preview__paper {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 7;
  max-height: var(--preview-lightbox-paper-height);
}

.product-gallery__lightbox-preview .product-preview__artwork-inset {
  padding: 0;
  margin: 0;
  border: none;
}

.product-gallery__lightbox-preview .product-preview__artwork {
  object-fit: cover;
}

@media (min-width: 1024px) {
  .product-gallery__main-wrap--composed-primary {
    max-width: var(--pdp-gallery-stage-fit-width, var(--pdp-gallery-stage-max-width));
  }

  .product-gallery__main-wrap--composed-primary .product-preview__wall {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .product-gallery__main-trigger--composed-primary-shell {
    aspect-ratio: auto;
    max-height: none;
  }
}

/* ------------------------------------------------------------------ */
/* Landscape PRIMARY composed preview — gallery layout + paper sizing   */
/* Portrait rules above remain unchanged.                             */
/* ------------------------------------------------------------------ */

.product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap .product-preview__presentation,
.product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap .product-preview__framed-object {
  --preview-paper-short-side: 340px;
  --preview-paper-slot: 476px;
}

.product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap .product-preview__framed-object {
  width: 476px;
  max-width: 100%;
}

.product-gallery[data-preview-orientation="landscape"] .product-preview__stage.product-gallery__main-trigger--presentation {
  padding: 0;
  background: transparent;
}

.product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap > .product-preview .product-preview__stage {
  height: auto;
}

.product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  min-height: 0;
}

.product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary > .product-preview {
  width: fit-content;
  max-width: 100%;
}

.product-gallery[data-preview-orientation="landscape"] .product-gallery__main-trigger--composed-primary-shell {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  aspect-ratio: auto;
  max-height: none;
}

@media (min-width: 1024px) {
  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap .product-preview__presentation,
  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap .product-preview__framed-object {
    --preview-paper-short-side: 340px;
    --preview-paper-slot: 476px;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary > .product-preview .product-preview__stage {
    width: var(--pdp-gallery-landscape-wall-width);
    max-width: 100%;
    height: auto;
    padding: 0;
    background: transparent;
  }

  /* Stable landscape gallery footprint — independent of thumb count / active media */
  .product-gallery[data-preview-orientation="landscape"] {
    --pdp-gallery-landscape-visible-thumb-count: 5;
    --pdp-gallery-landscape-thumb-width: var(--pdp-gallery-thumb-max-width);
    --pdp-gallery-landscape-thumbs-viewport-width: calc(
      var(--pdp-gallery-landscape-visible-thumb-count) * var(--pdp-gallery-landscape-thumb-width)
      + (var(--pdp-gallery-landscape-visible-thumb-count) - 1) * var(--pdp-gallery-thumb-gap)
    );
    width: var(--pdp-gallery-landscape-stage-fit-width);
    max-width: min(var(--pdp-gallery-landscape-stage-fit-width), 100%);
    min-width: 0;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__body,
  .product-gallery[data-preview-orientation="landscape"] .product-gallery__body--with-rail {
    width: var(--pdp-gallery-landscape-stage-fit-width);
    max-width: min(var(--pdp-gallery-landscape-stage-fit-width), 100%);
    min-width: 0;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__stage {
    height: auto;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary {
    flex: 0 0 auto;
    height: auto;
    align-self: flex-start;
    max-width: min(var(--pdp-gallery-landscape-stage-fit-width), 100%);
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap {
    width: 100%;
    max-width: min(var(--pdp-gallery-landscape-stage-fit-width), 100%);
    min-width: 0;
    margin-inline: 0;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap:not(.product-gallery__main-wrap--composed-primary) {
    display: flex;
    justify-content: center;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__body:not(.product-gallery__body--with-rail) .product-gallery__stage,
  .product-gallery[data-preview-orientation="landscape"] .product-gallery__body:not(.product-gallery__body--with-rail) .product-gallery__main-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__body:not(.product-gallery__body--with-rail) .product-gallery__main-trigger {
    width: 100%;
    max-width: 100%;
    aspect-ratio: auto;
    max-height: none;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-trigger {
    aspect-ratio: auto;
    width: 100%;
    max-height: none;
  }

  /* Flat landscape media — same inner slot as PRIMARY paper (476×340 in 571×408 wall) */
  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-trigger--gallery {
    --preview-paper-short-side: 340px;
    --preview-paper-slot: 476px;
    width: var(--pdp-gallery-landscape-wall-width);
    max-width: 100%;
    margin-inline: auto;
    min-height: calc(var(--preview-paper-short-side) * var(--preview-wall-scale));
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-trigger--gallery .product-gallery__image {
    width: auto;
    height: auto;
    max-width: 476px;
    max-height: 340px;
    object-fit: contain;
    object-position: center;
  }

  /* Multi-media landscape: horizontal thumb strip below preview */
  .product-gallery[data-preview-orientation="landscape"] .product-gallery__body--with-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
    gap: var(--pdp-gallery-gap);
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__body--with-rail .product-gallery__stage {
    grid-row: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__body--with-rail .product-gallery__thumbs-column {
    grid-row: 2;
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__thumbs-viewport {
    width: var(--pdp-gallery-landscape-thumbs-viewport-width);
    min-width: 0;
    max-width: min(var(--pdp-gallery-landscape-thumbs-viewport-width), 100%);
    margin-inline: auto;
    max-height: none;
    overflow-x: hidden;
    overflow-y: hidden;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    contain: paint;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__thumbs-viewport::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__thumbs-rail {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    min-width: 0;
    gap: var(--pdp-gallery-thumb-gap);
    padding: 0;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__thumbs-rail .product-gallery__thumb img {
    width: var(--pdp-gallery-landscape-thumb-width);
    max-width: var(--pdp-gallery-landscape-thumb-width);
    height: auto;
    max-height: var(--pdp-gallery-thumb-max-height);
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__thumbs-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    margin: 0;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0.125rem;
    background: rgba(252, 250, 246, 0.9);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px rgba(39, 49, 38, 0.08);
    transform: translateY(-50%);
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__thumbs-nav--prev {
    left: 0.125rem;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__thumbs-nav--next {
    right: 0.125rem;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__thumbs-nav--prev .product-gallery__thumbs-nav-icon {
    transform: rotate(-90deg);
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__thumbs-nav--next .product-gallery__thumbs-nav-icon {
    transform: rotate(-90deg);
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__thumbs-nav:disabled {
    visibility: hidden;
    pointer-events: none;
    opacity: 1;
    cursor: default;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__thumbs-nav:disabled:focus-visible {
    outline: none;
  }
}

/* Portrait desktop — thumb-nav visual parity with landscape (surface only) */
@media (min-width: 1024px) {
  .product-gallery:not([data-preview-orientation="landscape"]) .product-gallery__thumbs-nav {
    background: rgba(252, 250, 246, 0.9);
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px rgba(39, 49, 38, 0.08);
    color: var(--color-caramel);
  }

  .product-gallery:not([data-preview-orientation="landscape"]) .product-gallery__thumbs-nav:hover:not(:disabled) {
    color: #8f6640;
    opacity: 0.92;
  }

  .product-gallery:not([data-preview-orientation="landscape"]) .product-gallery__thumbs-nav:focus-visible {
    outline: 2px solid var(--color-caramel);
    outline-offset: 3px;
  }
}

/* Ready-made portrait/square preview: 340px slot × wall scale overflows a 390px viewport. */
@media (max-width: 1023px) {
  .product-detail:not(.product-detail--photo):not(.product-detail--collage):not(.product-detail--fotorolka) .product-gallery:not([data-preview-orientation="landscape"]) .product-preview__presentation,
  .product-detail:not(.product-detail--photo):not(.product-detail--collage):not(.product-detail--fotorolka) .product-gallery:not([data-preview-orientation="landscape"]) .product-preview__framed-object {
    --preview-paper-slot: min(340px, calc((100vw - (var(--gutter-mobile) * 2) - 2px) / var(--preview-wall-scale, 1.2)));
  }
}

/* Tablet + mobile: landscape thumbs stay below preview */
@media (max-width: 1023px) {
  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap .product-preview__presentation,
  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap .product-preview__framed-object {
    --preview-paper-short-side: calc((100vw - (var(--gutter-mobile) * 2)) / 1.68);
    --preview-paper-slot: calc((100vw - (var(--gutter-mobile) * 2)) / 1.68 * 7 / 5);
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap .product-preview__framed-object {
    width: min(476px, calc((100vw - (var(--gutter-mobile) * 2)) / 1.68 * 7 / 5));
    max-width: 100%;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary > .product-preview {
    width: 100%;
    display: block;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap .product-preview__presentation {
    width: 100%;
    max-width: min(
      var(--pdp-gallery-landscape-wall-width),
      calc((100vw - (var(--gutter-mobile) * 2)) * 1.2)
    );
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary .product-preview__framed-object {
    --preview-paper-slot: calc((100vw - (var(--gutter-mobile) * 2)) / 1.68 * 7 / 5);
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary > .product-preview .product-preview__stage {
    width: 100%;
    max-width: 100%;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__stage,
  .product-gallery[data-preview-orientation="landscape"] .product-gallery__body:not(.product-gallery__body--with-rail) .product-gallery__stage {
    width: 100%;
    max-width: 100%;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__body--with-rail {
    flex-direction: column;
    align-items: stretch;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__stage {
    order: 1;
    width: 100%;
    max-width: 100%;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__thumbs-column {
    order: 2;
    width: 100%;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__thumbs-viewport {
    width: 100%;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__thumbs-rail {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: max-content;
    min-width: 100%;
    gap: 0.45rem;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
  }

  .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-trigger {
    aspect-ratio: auto;
    max-height: none;
  }
}

/* ------------------------------------------------------------------ */
/* Landscape composed PRIMARY lightbox — portrait budget rotated 90°   */
/* Portrait lightbox rules above remain unchanged.                     */
/* ------------------------------------------------------------------ */

.product-gallery[data-preview-orientation="landscape"] .product-gallery__lightbox-preview {
  --preview-lightbox-portrait-budget: min(82vh, 860px);
  --preview-lightbox-paper-width: var(--preview-lightbox-portrait-budget);
  --preview-lightbox-paper-height: calc(var(--preview-lightbox-paper-width) * 5 / 7);
  --preview-paper-slot: var(--preview-lightbox-paper-width);
  width: min(var(--preview-lightbox-paper-width), 100%);
  max-width: 100%;
}

.product-gallery[data-preview-orientation="landscape"] .product-gallery__lightbox-preview .product-preview__presentation,
.product-gallery[data-preview-orientation="landscape"] .product-gallery__lightbox-preview .product-preview__framed-object,
.product-gallery[data-preview-orientation="landscape"] .product-gallery__lightbox-preview .product-preview__framed-object:not(.product-preview__framed-object--with-frame),
.product-gallery[data-preview-orientation="landscape"] .product-gallery__lightbox-preview .product-preview__paper-anchor {
  width: 100%;
  max-width: 100%;
  --preview-paper-slot: var(--preview-lightbox-paper-width);
}

.product-gallery[data-preview-orientation="landscape"] .product-gallery__lightbox-preview .product-preview__paper {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  aspect-ratio: 7 / 5;
  max-width: var(--preview-lightbox-paper-width);
  max-height: var(--preview-lightbox-paper-height);
}

.product-gallery[data-preview-orientation="landscape"] .product-gallery__lightbox-preview .product-preview__framed-object--with-frame {
  width: calc(
    var(--preview-paper-slot) * (1 + var(--preview-env-left-ratio) + var(--preview-env-right-ratio))
  );
  max-width: 100%;
}


.product-detail__size-group {
  margin-bottom: 0.75rem;
}

.product-detail__size-group-label {
  margin: 0 0 0.375rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted, #6b655c);
}

.product-preview__photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--color-muted, #6b655c);
  background: linear-gradient(180deg, #f7f4ee 0%, #efe8dc 100%);
  pointer-events: auto;
  transition:
    background-color var(--duration-fast, 150ms) ease,
    box-shadow var(--duration-fast, 150ms) ease;
}

.product-preview__photo-placeholder[hidden] {
  display: none !important;
}

.product-preview__photo-placeholder.is-dragover {
  background: linear-gradient(180deg, #f3ebe0 0%, #e7dccb 100%);
  box-shadow: inset 0 0 0 2px var(--color-caramel, #a9794f);
}

.product-preview__upload-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: clamp(0.75rem, 4cqmin, 1.5rem);
  cursor: pointer;
  color: inherit;
  text-align: center;
  outline: none;
  transition:
    background-color var(--duration-fast, 150ms) ease,
    box-shadow var(--duration-fast, 150ms) ease;
}

.product-preview__upload-empty:hover,
.product-preview__photo-placeholder:hover .product-preview__upload-empty {
  background: rgba(255, 253, 249, 0.35);
}

.product-preview__upload-empty:focus-visible {
  box-shadow: inset 0 0 0 2px var(--color-caramel, #a9794f);
}

.product-preview__upload-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.15rem;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.72);
  box-shadow: inset 0 0 0 1px rgba(201, 184, 163, 0.55);
  color: var(--color-ink, #2c2924);
}

.product-preview__upload-icon {
  display: inline-flex;
  opacity: 0.82;
}

.product-preview__upload-title {
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(1.05rem, 2.8cqmin, 1.35rem);
  line-height: 1.2;
  color: var(--color-ink, #2c2924);
}

.product-preview__upload-helper {
  max-width: 16rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--color-muted, #6b655c);
}

.product-preview__upload-cta {
  appearance: none;
  margin: 0.35rem 0 0.1rem;
  min-height: 2.5rem;
  padding: 0.55rem 1.2rem;
  border: none;
  border-radius: var(--radius-sm, 4px);
  background: var(--color-burgundy, #8a3041);
  color: var(--color-bright, #fcfaf6);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--duration-fast, 150ms) ease;
}

.product-preview__upload-cta:hover {
  background: var(--color-burgundy-dark, #742638);
}

.product-preview__upload-cta:focus-visible {
  outline: 2px solid var(--color-caramel, #a9794f);
  outline-offset: 2px;
}

.product-preview__upload-drop-hint {
  font-size: 0.8125rem;
  color: var(--color-muted, #6b655c);
}

.product-preview__upload-limits {
  margin-top: 0.15rem;
  max-width: 16rem;
  font-size: 0.7rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--color-muted, #6b655c);
  opacity: 0.9;
}

@media (max-width: 767px) {
  .product-preview__upload-drop-hint {
    display: none;
  }

  .product-preview__upload-cta {
    min-height: 2.75rem;
    padding-inline: 1.35rem;
  }
}

@media (pointer: coarse) {
  .product-preview__upload-drop-hint {
    display: none;
  }
}

.product-detail__photo-upload {
  margin: 0 0 1rem;
}

.product-detail__gallery-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: max-content;
  max-width: 100%;
  min-width: 0;
}

.product-detail__gallery-column:has([data-voucher-creator]) {
  width: 100%;
  max-width: 100%;
  align-items: stretch;
}

.product-detail [data-voucher-creator],
.product-detail [data-voucher-paper] {
  width: 100%;
  max-width: 100%;
}

.product-detail [data-voucher-creator] .product-preview__wall {
  width: 100%;
  max-width: 100%;
  margin: 0;
  pointer-events: auto;
  overflow: visible;
  padding: var(--space-md);
  background: color-mix(in srgb, var(--color-bright) 94%, var(--color-deep-green) 6%);
  border-radius: var(--radius-sm);
  filter: none;
  box-shadow: none;
}

@media (min-width: 1024px) {
  .product-detail [data-voucher-creator] .product-preview__wall {
    padding: var(--space-lg);
  }
}

.product-detail [data-voucher-paper] {
  max-height: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: var(--pdp-paper-shadow);
}

.product-detail [data-voucher-paper]:not(:has([data-voucher-ready])) {
  box-shadow: none;
}

.product-detail [data-voucher-wrap] {
  opacity: 0;
}

.product-detail [data-voucher-wrap][data-voucher-ready] {
  opacity: 1;
}

.product-detail [data-voucher-custom][hidden] {
  display: none;
}

.product-detail [data-voucher-preview] {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.product-detail [data-voucher-canvas] {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

[data-voucher-creator].is-enlarged .collage-creator__view-tools {
  visibility: hidden;
}

.product-gallery__lightbox[data-voucher-enlarge-dialog] .product-gallery__lightbox-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  box-sizing: border-box;
  width: min(96vw, 1400px);
  height: min(94vh, 980px);
  max-height: 94vh;
  margin: 3vh auto;
  overflow: hidden;
  padding: 3.25rem 1.25rem 1.25rem;
}

.product-gallery__lightbox[data-voucher-enlarge-dialog] .product-gallery__lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.product-gallery__lightbox[data-voucher-enlarge-dialog] [data-voucher-paper] {
  width: min(100%, calc(min(78vh, 760px) * 1.4));
  max-height: min(78vh, 760px);
  margin-inline: auto;
}

@media (max-width: 767px) {
  .product-gallery__lightbox[data-voucher-enlarge-dialog] .product-gallery__lightbox-inner {
    width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    padding: 3.25rem 0.75rem 0.75rem;
  }

  .product-gallery__lightbox[data-voucher-enlarge-dialog] [data-voucher-paper] {
    width: min(100%, calc((100vh - 6.5rem) * 1.4));
    max-height: calc(100vh - 6.5rem);
  }
}

.product-detail [data-voucher-fields] .product-detail__fieldset {
  margin-bottom: var(--space-md);
}

.product-detail [data-voucher-fields] .collage-creator__text-toolbar {
  width: 100%;
  margin-top: var(--space-xs);
  overflow: visible;
}

.product-detail [data-voucher-fields] .collage-creator__text-toolbar-field {
  flex: 0 0 auto;
}

.product-detail [data-voucher-fields] .collage-creator__text-toolbar-size {
  flex: 1 1 11rem;
  min-width: min(100%, 11rem);
}

.product-detail [data-voucher-fields] .collage-creator__text-toolbar .collage-creator__zoom {
  width: 100%;
}

.product-detail [data-voucher-fields] .collage-creator__text-toolbar .collage-creator__zoom input[type="range"] {
  flex: 1 1 auto;
  width: auto;
  min-width: 4.5rem;
  max-width: none;
}

.product-detail [data-voucher-fulfillment] {
  align-items: flex-start;
}

.product-detail [data-voucher-fulfillment] .product-detail__delivery-copy {
  width: 100%;
}

.product-detail [data-voucher-fulfillment] .product-detail__delivery-line {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.product-detail [data-voucher-fulfillment] .product-detail__delivery-line[hidden] {
  display: none;
}

.product-detail [data-voucher-fulfillment] .product-detail__delivery-icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.05rem;
}

@media (max-width: 479px) {
  .product-detail [data-voucher-form-list] {
    flex-wrap: wrap;
    width: 100%;
  }

  .product-detail [data-voucher-form-list] .product-detail__choice--segment {
    flex: 1 1 auto;
    white-space: normal;
    text-align: center;
  }
}

@media (min-width: 1024px) {
  .product-detail__layout:has([data-voucher-creator]) {
    grid-template-columns: minmax(0, 1fr) 460px;
  }

  .product-detail__gallery-column:has([data-voucher-creator]) {
    width: 100%;
    max-width: 64rem;
  }
}

.product-detail__gallery-column .product-gallery,
.product-detail__gallery-column .product-gallery__stage,
.product-detail__gallery-column .product-gallery__main-wrap--composed-primary {
  width: max-content;
  max-width: 100%;
}

.product-detail__gallery-column .product-gallery__main-wrap--composed-primary > .product-preview,
.product-detail__gallery-column .product-gallery__main-wrap--composed-primary > .product-preview .product-preview__stage,
.product-detail__gallery-column .product-preview__presentation,
.product-detail__gallery-column .product-preview__wall {
  width: max-content;
  max-width: none;
}

/* container-type:inline-size on the stage collapses width when slot uses content sizing */
.product-detail__gallery-column .product-gallery__main-wrap--composed-primary > .product-preview .product-preview__stage {
  container-type: normal;
}

/* ------------------------------------------------------------------ */
/* Shared two-column preview PDP (PHOTO + template collage)           */
/* Tokens live on both families so collage reuses PHOTO geometry.     */
/*   --pdp-photo-purchase-col-width: 25.5rem   right column max       */
/*   --pdp-photo-purchase-col-min: 300px       right column min       */
/*   --pdp-photo-layout-gap: clamp(1.5rem, 2.2vw, 2.5rem) desktop gap */
/*   left column: minmax(0, 1fr)                                      */
/*   preview shell: 100% of left column; container photo-preview-shell */
/*   page max: --container-content 85rem; desktop bp --bp-desktop 1024px */
/* Frame fit: outer frame (paper + envelope) uniformly uses 100cqi of */
/* the shell. Overlay pixels are recomputed on resize in JS.          */
/* ------------------------------------------------------------------ */

.product-detail--photo,
.product-detail--collage-template {
  --pdp-photo-purchase-col-width: 25.5rem;
  --pdp-photo-purchase-col-min: 300px;
  --pdp-photo-layout-gap: var(--space-lg);
  --photo-preview-max-paper-height: min(52vh, 24rem);
  --photo-preview-max-paper-width: 48rem;
  /* Modest wall on small screens; poster-like breathe from tablet up. */
  --preview-wall-scale: 1.08;
}

/* Beat base .product-preview__presentation { --preview-wall-scale: 1.20 } on mobile only. */
.product-detail--photo .product-preview__presentation,
.product-detail--collage-template .collage-creator__preview .product-preview__presentation {
  --preview-wall-scale: 1.08;
}

.product-detail--photo .product-detail__gallery-column--photo,
.product-detail--collage-template .product-detail__gallery-column--collage {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-items: center;
}

.product-detail--photo .product-detail__gallery-column--photo .product-gallery,
.product-detail--photo .product-detail__gallery-column--photo .product-gallery__stage,
.product-detail--photo .product-detail__gallery-column--photo .product-gallery__main-wrap--composed-primary,
.product-detail--collage-template [data-wanted-creator],
.product-detail--collage-template .collage-creator-stack,
.product-detail--collage-template .collage-creator,
.product-detail--collage-template .collage-creator__stage,
.product-detail--collage-template .collage-creator__preview {
  width: 100%;
  max-width: 100%;
}

.product-detail--photo .product-detail__gallery-column--photo .product-gallery__main-wrap--composed-primary,
.product-detail--collage-template .collage-creator__preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  box-sizing: border-box;
  padding: 0.55rem 0.4rem;
  container-type: inline-size;
  container-name: photo-preview-shell;
}

.product-detail--photo .product-detail__gallery-column--photo .product-gallery__main-wrap--composed-primary > .product-preview,
.product-detail--photo .product-detail__gallery-column--photo .product-gallery__main-wrap--composed-primary > .product-preview .product-preview__stage,
.product-detail--photo .product-detail__gallery-column--photo .product-preview__presentation,
.product-detail--photo .product-detail__gallery-column--photo .product-preview__wall,
.product-detail--collage-template .collage-creator__preview .product-preview__stage,
.product-detail--collage-template .collage-creator__preview .product-preview__presentation,
.product-detail--collage-template .collage-creator__preview .product-preview__wall {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
}

.product-detail--photo .product-detail__gallery-column--photo .product-preview__wall,
.product-detail--collage-template .collage-creator__preview .product-preview__wall {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/*
  Resolve paper slot on nodes that carry --preview-paper-aspect.
  Do not compute slot on .product-preview__paper (it is a container; 100cqi would cycle).
  Outer frame (paper + envelope) must fit the preview shell: 100cqi / wall-scale / envelope.
*/
.product-detail--photo .product-preview__presentation,
.product-detail--photo .product-preview__framed-object,
.product-detail--photo .product-gallery__main-wrap--composed-primary .product-preview__framed-object,
.product-detail--collage-template .collage-creator__preview .product-preview__presentation,
.product-detail--collage-template .collage-creator__preview .product-preview__framed-object {
  --preview-outer-width-factor: 1;
  --preview-paper-slot: min(
    var(--photo-preview-max-paper-width),
    calc(var(--photo-preview-max-paper-height) * var(--preview-paper-aspect, 0.714286)),
    calc(100cqi / var(--preview-wall-scale) / var(--preview-outer-width-factor))
  );
}

.product-detail--photo .product-preview__framed-object,
.product-detail--collage-template .collage-creator__preview .product-preview__framed-object {
  width: var(--preview-paper-slot);
  min-width: 0;
  max-width: 100%;
}

.product-detail--photo .product-preview__framed-object--with-frame,
.product-detail--collage-template .collage-creator__preview .product-preview__framed-object--with-frame {
  --preview-outer-width-factor: calc(
    1 + var(--preview-env-left-ratio) + var(--preview-env-right-ratio)
  );
  width: calc(var(--preview-paper-slot) * (1 + var(--preview-env-left-ratio) + var(--preview-env-right-ratio)));
  min-width: 0;
  max-width: 100%;
}

.product-detail--photo .product-preview__paper,
.product-detail--collage-template .collage-creator__preview .product-preview__paper {
  max-height: var(--photo-preview-max-paper-height);
  container-type: inline-size;
  container-name: photo-paper;
  background: #fff;
}

/* Landscape PHOTO: beat poster 476px hardcodes; keep envelope in the box */
.product-detail--photo .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap .product-preview__presentation,
.product-detail--photo .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap .product-preview__framed-object,
.product-detail--photo .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary .product-preview__framed-object {
  --preview-paper-short-side: auto;
  --preview-paper-slot: min(
    var(--photo-preview-max-paper-width),
    calc(var(--photo-preview-max-paper-height) * var(--preview-paper-aspect, 1.4)),
    calc(100cqi / var(--preview-wall-scale) / var(--preview-outer-width-factor, 1))
  );
}

.product-detail--photo .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap .product-preview__framed-object,
.product-detail--photo .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary .product-preview__framed-object {
  width: var(--preview-paper-slot);
  min-width: 0;
  max-width: 100%;
}

.product-detail--photo .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap .product-preview__framed-object--with-frame,
.product-detail--photo .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary .product-preview__framed-object--with-frame {
  width: calc(var(--preview-paper-slot) * (1 + var(--preview-env-left-ratio) + var(--preview-env-right-ratio)));
  min-width: 0;
  max-width: 100%;
}

.product-detail--photo .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary > .product-preview .product-preview__stage {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.product-detail--photo .product-gallery[data-preview-orientation="landscape"] {
  width: 100%;
  max-width: 100%;
}

.product-detail--photo .product-gallery[data-preview-orientation="landscape"] .product-gallery__body,
.product-detail--photo .product-gallery[data-preview-orientation="landscape"] .product-gallery__body--with-rail,
.product-detail--photo .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary,
.product-detail--photo .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap {
  width: 100%;
  max-width: 100%;
}

/* Empty upload: stay compact inside the larger paper */
.product-detail--photo .product-preview__upload-empty {
  gap: 0.4rem;
  padding: clamp(0.65rem, 3.5cqi, 1.25rem);
}

.product-detail--photo .product-preview__upload-helper {
  max-width: 15.5rem;
}

@media (min-width: 1024px) {
  .product-detail--photo,
  .product-detail--collage-template {
    --pdp-photo-layout-gap: clamp(1.5rem, 2.2vw, 2.5rem);
    /* ~416–700px paper height; width from the left-column shell (100cqi). */
    --photo-preview-max-paper-height: clamp(26rem, 72vh, 43.75rem);
    --photo-preview-max-paper-width: 48rem;
    --photo-preview-stage-min-height: clamp(30rem, 78vh, 48rem);
    /* Match poster wall breathe; paper max still ratio-aware. */
    --preview-wall-scale: 1.20;
  }

  .product-detail--photo .product-preview__presentation {
    --preview-wall-scale: 1.20;
  }

  /* Normal in-page collage only. 1.11 ≈ 90% of the wall (~8% larger than 1.20). */
  .product-detail--collage-template .collage-creator__preview .product-preview__presentation {
    --preview-wall-scale: 1.11;
  }

  .product-detail--photo .product-detail__layout,
  .product-detail--collage-template .product-detail__layout {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(var(--pdp-photo-purchase-col-min), var(--pdp-photo-purchase-col-width));
    gap: var(--pdp-photo-layout-gap);
  }

  .product-detail--photo .product-detail__gallery-column--photo {
    position: sticky;
    top: calc(var(--header-height) + var(--space-md));
    align-self: start;
  }

  .product-detail--photo .product-detail__gallery-column--photo .product-gallery__main-wrap--composed-primary,
  .product-detail--collage-template .collage-creator__preview {
    min-height: var(--photo-preview-stage-min-height);
    max-width: 100%;
  }

  /* Landscape: keep tall stage and center the framed paper composition */
  .product-detail--photo .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary {
    min-height: var(--photo-preview-stage-min-height);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  /* Poster: shorter stage so personalization starts under the preview. */
  .product-detail--custom-poster {
    --photo-preview-max-paper-height: clamp(22rem, 56vh, 34rem);
    --photo-preview-stage-min-height: 0px;
    --preview-wall-scale: 1.06;
  }

  .product-detail--custom-poster .product-preview__presentation {
    --preview-wall-scale: 1.06;
  }

  .product-detail--custom-poster .product-detail__gallery-column--photo {
    position: static;
  }

  .product-detail--custom-poster .product-detail__gallery-column--photo .product-gallery__main-wrap--composed-primary,
  .product-detail--custom-poster .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary {
    min-height: 0;
  }

  .product-detail--photo .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary > .product-preview,
  .product-detail--photo .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-wrap--composed-primary > .product-preview .product-preview__stage {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Poster landscape uses absolute shell; PHOTO must stay in-flow to center. */
  .product-detail--photo .product-gallery[data-preview-orientation="landscape"] .product-gallery__main-trigger--composed-primary-shell {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    max-height: none;
  }
}

.product-detail--custom-poster .collage-creator__personalize {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-self: stretch;
}

@media (max-width: 1023px) {
  .product-detail--photo .product-detail__gallery-column--photo {
    position: static;
  }

  .product-detail--photo .product-detail__gallery-column--photo .product-gallery__main-wrap--composed-primary,
  .product-detail--collage-template .collage-creator__preview {
    min-height: 0;
  }
}

.product-detail__photo-editor {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-self: stretch;
}

.product-detail__photo-preview-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 0.85rem;
  max-width: 100%;
}

.product-detail__photo-preview-actions[hidden] {
  display: none !important;
}

.product-detail__photo-upload-action {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid transparent;
  border-radius: var(--pdp-control-radius, var(--radius-sm));
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-graphite);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) ease,
    border-color var(--duration-fast) ease,
    color var(--duration-fast) ease;
}

.product-detail__photo-upload-action:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.product-detail__photo-upload-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.product-detail__photo-upload-action-icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  color: inherit;
}

.product-detail__photo-upload-action-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Primary — solid caramel / gold (same family as Inny rozmiar) */
.product-detail__photo-upload-action--primary {
  background: var(--color-caramel);
  border-color: var(--color-caramel);
  color: var(--color-bright);
  min-height: 2.4rem;
  padding-inline: 0.95rem;
}

.product-detail__photo-upload-action--primary:hover:not(:disabled),
.product-detail__photo-upload-action--primary:focus-visible:not(:disabled) {
  background: #8f6640;
  border-color: #8f6640;
  color: var(--color-bright);
}

/* Secondary — ivory + caramel border/text (editing family with primary) */
.product-detail__photo-upload-action--secondary {
  background: var(--color-bright);
  border-color: var(--color-caramel);
  color: var(--color-caramel);
}

.product-detail__photo-upload-action--secondary:hover:not(:disabled),
.product-detail__photo-upload-action--secondary:focus-visible:not(:disabled) {
  background: var(--color-cream);
  border-color: var(--color-caramel);
  color: #8f6640;
}

/* Delete — quiet tertiary; burgundy only on hover/focus */
.product-detail__photo-upload-action--danger {
  min-height: 2.1rem;
  padding: 0.35rem 0.7rem;
  border-color: transparent;
  background: transparent;
  color: var(--color-muted);
  font-weight: 500;
}

.product-detail__photo-upload-action--danger:hover:not(:disabled),
.product-detail__photo-upload-action--danger:focus-visible:not(:disabled) {
  color: var(--color-burgundy);
  background: var(--color-burgundy-soft);
  border-color: transparent;
}

@media (max-width: 640px) {
  .product-detail__photo-preview-actions {
    gap: 0.5rem;
  }

  .product-detail__photo-upload-action--primary,
  .product-detail__photo-upload-action--secondary {
    flex: 1 1 calc(50% - 0.35rem);
  }

  .product-detail__photo-upload-action--danger {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* PHOTO and designer-collage main size row — five equal chips that wrap */
.product-detail--photo [data-photo-main-sizes],
.product-detail--collage [data-photo-main-sizes] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  width: 100%;
  align-items: stretch;
}

.product-detail--photo [data-photo-main-sizes] .product-detail__choice--radio,
.product-detail--collage [data-photo-main-sizes] .product-detail__choice--radio {
  flex: 1 1 calc((100% - 1.5rem) / 5);
  min-width: 3.75rem;
  max-width: 100%;
  justify-content: center;
  box-sizing: border-box;
  min-height: 2.75rem;
  height: auto;
  padding: 0.375rem 0.4rem;
}

.product-detail--photo [data-photo-main-sizes] .product-detail__preset-chip,
.product-detail--collage [data-photo-main-sizes] .product-detail__preset-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.0625rem;
  line-height: 1.1;
  text-align: center;
  width: 100%;
  white-space: normal;
}

.product-detail--photo [data-photo-main-sizes] .product-detail__choice--preset:not(:has(.product-detail__preset-label)) .product-detail__preset-chip,
.product-detail--collage [data-photo-main-sizes] .product-detail__choice--preset:not(:has(.product-detail__preset-label)) .product-detail__preset-chip {
  flex-direction: row;
  line-height: 1.2;
}

.product-detail--photo [data-photo-main-sizes] .product-detail__preset-label,
.product-detail--photo [data-photo-main-sizes] .product-detail__preset-dimensions,
.product-detail--collage [data-photo-main-sizes] .product-detail__preset-label,
.product-detail--collage [data-photo-main-sizes] .product-detail__preset-dimensions {
  display: block;
  white-space: nowrap;
}

.product-detail--photo [data-photo-main-sizes] .product-detail__preset-label,
.product-detail--collage [data-photo-main-sizes] .product-detail__preset-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  line-height: 1.1;
}

.product-detail--photo [data-photo-main-sizes] .product-detail__preset-dimensions,
.product-detail--collage [data-photo-main-sizes] .product-detail__preset-dimensions {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-graphite);
  line-height: 1.15;
}

.product-detail--photo [data-photo-main-sizes] .product-detail__choice--preset:has(.product-detail__choice-input:checked) .product-detail__preset-label,
.product-detail--photo [data-photo-main-sizes] .product-detail__choice--preset:has(.product-detail__choice-input:checked) .product-detail__preset-dimensions,
.product-detail--collage [data-photo-main-sizes] .product-detail__choice--preset:has(.product-detail__choice-input:checked) .product-detail__preset-label,
.product-detail--collage [data-photo-main-sizes] .product-detail__choice--preset:has(.product-detail__choice-input:checked) .product-detail__preset-dimensions {
  color: var(--color-graphite);
}

.product-detail--photo [data-photo-other-sizes] .product-detail__preset-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  min-height: 100%;
  gap: 0.0625rem;
  line-height: 1.15;
}

.product-detail--photo [data-photo-custom-panel] .product-detail__margin-custom-apply {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
}

.product-detail--photo .product-detail__photo-custom-draft-price {
  margin-top: 0.35rem;
  font-weight: 500;
  color: var(--color-graphite);
}

.product-detail--photo .product-detail__photo-custom-draft-price.is-draft {
  font-style: italic;
  opacity: 0.85;
}

.product-detail--photo .product-detail__other-size-toggle.is-active:has([data-photo-custom-selected-label]:not([hidden])) [data-photo-other-size-toggle-default] {
  display: none;
}

.product-detail__photo-upload-status,
.product-detail__photo-upload-hint {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--color-muted, #6b655c);
}

.product-detail__add-to-cart:disabled,
.product-detail__add-to-cart[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.product-detail__photo-crop-note {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--color-burgundy, #7a2e2e);
}

.product-detail__photo-filters {
  margin: 0.6rem 0 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  container-type: inline-size;
  container-name: photo-filters;
}

.product-detail__photo-filters[hidden] {
  display: none !important;
}

.product-detail__photo-filters-label {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.product-detail__photo-filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
}

.product-detail__photo-filter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0.35rem 0.25rem 0.4rem;
  border: 2px solid var(--color-border, #d4cfc4);
  border-radius: 0.55rem;
  background: #fff;
  cursor: pointer;
  min-width: 0;
  min-height: 4.5rem;
  color: inherit;
  font: inherit;
}

.product-detail__photo-filter:hover {
  border-color: var(--color-muted, #6b655c);
}

.product-detail__photo-filter.is-selected,
.product-detail__photo-filter[aria-checked="true"] {
  border-color: var(--color-commerce-action, #8a3b2b);
  box-shadow: 0 0 0 1px var(--color-commerce-action, #8a3b2b);
}

.product-detail__photo-filter:focus-visible {
  outline: 2px solid var(--color-caramel, #c4a574);
  outline-offset: 2px;
}

.product-detail__photo-filter-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  max-width: 4.5rem;
  border-radius: 0.3rem;
  overflow: hidden;
  background: #ece7df;
}

.product-detail__photo-filter-thumb canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.product-detail__photo-filter-name {
  display: block;
  width: 100%;
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: center;
  color: var(--color-ink, #1c1916);
  overflow-wrap: anywhere;
}

@media (max-width: 420px) {
  .product-detail__photo-filters-grid {
    gap: 0.35rem;
  }

  .product-detail__photo-filter {
    padding: 0.28rem 0.15rem 0.35rem;
  }

  .product-detail__photo-filter-name {
    font-size: 0.68rem;
  }
}

@container photo-filters (max-width: 20rem) {
  .product-detail__photo-filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container photo-filters (min-width: 44rem) {
  .product-detail__photo-filters-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    max-width: 46rem;
    justify-content: start;
  }

  .product-detail__photo-filter {
    padding: 0.28rem 0.12rem 0.32rem;
  }

  .product-detail__photo-filter-thumb {
    max-width: 3.75rem;
  }

  .product-detail__photo-filter-name {
    font-size: 0.68rem;
  }
}

.product-detail__photo-quality {
  margin: 0.5rem 0 0;
  padding: 0.55rem 0.7rem;
  border-left: 3px solid var(--color-muted, #6b655c);
  background: transparent;
}

.product-detail__photo-quality[hidden] {
  display: none !important;
}

.product-detail__photo-quality[data-quality-status="excellent"],
.product-detail__photo-quality[data-quality-status="good"] {
  border-left-color: var(--color-deep-green, #3d5c4a);
}

.product-detail__photo-quality[data-quality-status="acceptable"] {
  border-left-color: var(--color-muted, #6b655c);
}

.product-detail__photo-quality[data-quality-status="low"],
.product-detail__photo-quality[data-quality-status="pending"] {
  border-left-color: var(--color-burgundy, #7a2e2e);
}

.product-detail__photo-quality-headline {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-ink, #1c1916);
}

.product-detail__photo-quality-message,
.product-detail__photo-quality-detail {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-muted, #6b655c);
  line-height: 1.4;
}

.product-detail__photo-quality-details {
  margin-top: 0.35rem;
}

.product-detail__photo-quality-details summary {
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--color-muted, #6b655c);
}

.product-detail__photo-enhancement-selected {
  margin: 0.45rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-deep-green, #3d5c4a);
}

.product-detail__photo-enhancement {
  margin: 0.65rem 0 0;
}

.product-detail__photo-enhancement[data-enhancement-status="eligible"] .product-detail__photo-enhancement-card {
  border-color: var(--color-border, #d4cfc4);
}

.product-detail__photo-enhancement[data-enhancement-status="eligible"][data-enhancement-emphasis="true"]
  .product-detail__photo-enhancement-card {
  border-color: var(--color-muted, #6b655c);
  background: rgba(61, 92, 74, 0.04);
}

.product-detail__photo-enhancement-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  margin: 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--color-border, #d4cfc4);
  background: var(--color-surface, #fff);
  cursor: pointer;
}

.product-detail__photo-enhancement.is-selected .product-detail__photo-enhancement-card {
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
}

.product-detail__photo-enhancement.is-selected .product-detail__photo-enhancement-check {
  margin-top: 0;
}

.product-detail__photo-enhancement.is-selected .product-detail__photo-enhancement-body {
  display: block;
  line-height: 1.35;
}

.product-detail__photo-enhancement.is-selected .product-detail__photo-enhancement-title,
.product-detail__photo-enhancement.is-selected .product-detail__photo-enhancement-price {
  display: inline;
}

.product-detail__photo-enhancement.is-selected .product-detail__photo-enhancement-desc,
.product-detail__photo-enhancement.is-selected .product-detail__photo-enhancement-disclaimer,
.product-detail__photo-enhancement.is-selected .product-detail__photo-enhancement-disclaimer--extra {
  display: none;
}

.product-detail__photo-enhancement.is-selected .product-detail__photo-enhancement-price::before {
  content: "·\00a0";
}

.product-detail__photo-enhancement-check {
  margin-top: 0.15rem;
}

.product-detail__photo-enhancement-body {
  display: grid;
  gap: 0.25rem;
}

.product-detail__photo-enhancement-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-ink, #1c1916);
}

.product-detail__photo-enhancement-desc,
.product-detail__photo-enhancement-disclaimer,
.product-detail__photo-enhancement-note,
.product-detail__photo-enhancement-blocked,
.product-detail__photo-enhancement-blocked-secondary {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--color-muted, #6b655c);
}

.product-detail__photo-enhancement-price {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-graphite, #2c2825);
}

.product-detail__photo-enhancement-disclaimer--extra {
  margin-top: 0.15rem;
}

.product-detail__photo-enhancement-blocked {
  margin: 0.35rem 0 0;
  color: var(--color-burgundy, #7a2e2e);
}

.product-detail__photo-enhancement-blocked-secondary,
.product-detail__photo-enhancement-note {
  margin: 0.2rem 0 0;
}

.product-preview__artwork--cropped {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.product-preview__artwork--cropped img,
.product-preview__artwork.product-preview__artwork--crop-fill {
  position: absolute;
  max-width: none;
  max-height: none;
  object-fit: fill;
  pointer-events: none;
}

.product-photo-crop {
  border: 0;
  padding: 0;
  margin: auto;
  /* Wider desktop shell so the crop stage can dominate (~900px). */
  width: min(56rem, calc(100vw - 1.5rem));
  max-height: calc(100vh - 1.25rem);
  background: transparent;
  color: var(--color-ink, #2c2924);
}

.product-photo-crop::backdrop {
  background: rgba(44, 41, 36, 0.45);
}

.product-photo-crop__panel {
  background: var(--color-cream, #f6f2ea);
  border: 1px solid rgba(44, 41, 36, 0.12);
  border-radius: var(--pdp-panel-radius, 0.75rem);
  padding: 1rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: inherit;
  overflow: auto;
  box-sizing: border-box;
}

.product-photo-crop__header {
  display: grid;
  gap: 0.2rem;
  flex: 0 0 auto;
}

.product-photo-crop__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 650;
}

.product-photo-crop__instruction {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-graphite, #24231f);
  line-height: 1.35;
}

.product-photo-crop__helper {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-muted, #5a5a5a);
  line-height: 1.35;
}

.product-photo-crop__stage {
  background: #ebe4d8;
  border-radius: 0.5rem;
  padding: 0.65rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 1 auto;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  box-sizing: border-box;
}

.product-photo-crop__viewport {
  /* Width/height are set by JS to the print aspect ratio. */
  position: relative;
  width: auto;
  height: auto;
  max-width: 100%;
  overflow: hidden;
  background: #d9d0c2;
  box-shadow: 0 0 0 2px rgba(44, 41, 36, 0.55);
  touch-action: none;
  cursor: grab;
  user-select: none;
  flex: 0 0 auto;
}

.product-photo-crop__viewport.is-dragging {
  cursor: grabbing;
}

.product-photo-crop__viewport.is-dragging .product-photo-crop__drag-hint,
.product-photo-crop__viewport.is-drag-hint-done .product-photo-crop__drag-hint {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.product-photo-crop__image {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.product-photo-crop__drag-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(36, 35, 31, 0.55);
  color: var(--color-bright, #fcfaf6);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
  transition: opacity var(--duration-normal) ease, visibility var(--duration-normal) ease;
}

.product-photo-crop__drag-hint[hidden] {
  display: none !important;
}

.product-photo-crop__controls {
  display: grid;
  gap: 0.65rem;
}

.product-photo-crop__zoom-label {
  font-size: 0.875rem;
  font-weight: 600;
}

.product-photo-crop__zoom-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.product-photo-crop__zoom {
  width: 100%;
  accent-color: var(--color-burgundy, #7a2e2e);
}

.product-photo-crop__zoom-btn {
  appearance: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(44, 41, 36, 0.2);
  border-radius: 0.4rem;
  background: #fff;
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-ink, #2c2924);
}

.product-photo-crop__zoom-btn:hover {
  background: #f0ebe3;
}

.product-photo-crop__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.product-photo-crop__btn {
  appearance: none;
  border: 1px solid rgba(44, 41, 36, 0.2);
  border-radius: 0.4rem;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  background: #fff;
  color: var(--color-ink, #2c2924);
}

.product-photo-crop__btn--ghost {
  background: transparent;
}

.product-photo-crop__btn--primary {
  background: var(--color-burgundy, #7a2e2e);
  border-color: var(--color-burgundy, #7a2e2e);
  color: #fff;
}

.product-photo-crop__btn--primary:hover {
  background: var(--color-burgundy-dark, #5f2323);
}

@media (max-width: 640px) {
  .product-photo-crop {
    width: calc(100vw - 0.75rem);
    max-height: calc(100vh - 0.75rem);
  }

  .product-photo-crop__panel {
    padding: 0.75rem;
    gap: 0.65rem;
  }

  .product-photo-crop__stage {
    padding: 0.5rem;
    max-width: 100%;
  }

  .product-photo-crop__actions {
    justify-content: stretch;
  }

  .product-photo-crop__actions .product-photo-crop__btn {
    flex: 1 1 auto;
  }

  .product-photo-crop__btn--primary {
    order: 3;
    flex-basis: 100%;
  }
}

.product-detail__photo-format {
  display: grid;
  gap: 0.85rem;
}

.product-detail__photo-orientation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.product-detail__photo-orientation-tab {
  appearance: none;
  border: 1px solid rgba(44, 41, 36, 0.18);
  background: #fff;
  color: var(--color-ink, #2c2924);
  border-radius: 0.4rem;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) ease,
    border-color var(--duration-fast) ease,
    color var(--duration-fast) ease;
}

.product-detail__photo-orientation-tab.is-active,
.product-detail__photo-orientation-tab:has(.product-detail__choice-input:checked) {
  background: var(--color-burgundy, #7a2e2e);
  border-color: var(--color-burgundy, #7a2e2e);
  color: #fff;
}

.product-detail__photo-orientation-tab.is-active:hover,
.product-detail__photo-orientation-tab:has(.product-detail__choice-input:checked):hover {
  background: var(--color-burgundy, #7a2e2e);
  border-color: var(--color-burgundy, #7a2e2e);
  color: #fff;
}

.product-detail--custom-poster .product-detail__photo-orientation-tab.is-active,
.product-detail--custom-poster .product-detail__photo-orientation-tab:has(.product-detail__choice-input:checked),
.product-detail--custom-poster .product-detail__photo-orientation-tab.is-active:hover,
.product-detail--custom-poster .product-detail__photo-orientation-tab:has(.product-detail__choice-input:checked):hover {
  background: var(--color-commerce-action);
  border-color: var(--color-commerce-action);
  color: var(--color-bright);
}

label.product-detail__photo-orientation-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.product-detail__photo-orientation-tab:has(.product-detail__choice-input:focus-visible) {
  outline: 2px solid var(--color-caramel, #c4a574);
  outline-offset: 2px;
}

.product-detail__photo-presets-label,
.product-detail__photo-custom-lead {
  margin: 0 0 0.45rem;
  font-size: 0.875rem;
  color: var(--color-muted, #6b655c);
}

.product-detail__photo-orientation-panel > .product-detail__legend {
  margin: 0.15rem 0 0.45rem;
}

.product-detail__photo-orientation-panel .product-detail__other-size-toggle {
  margin-top: 0.65rem;
}

.product-detail__photo-orientation-panel .product-detail__other-size-panel {
  margin-top: 0.625rem;
}

.product-detail__photo-orientation-panel .product-detail__other-size-panel[hidden] {
  display: none !important;
}

.product-detail__photo-orientation-panel .product-detail__other-size-heading + .product-detail__choice-list {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
}

.product-detail__photo-orientation-panel .product-detail__custom-size-inquiry-entry {
  margin-top: 0.75rem;
}

.product-detail__photo-custom {
  margin-top: 0.85rem;
}

.product-detail__photo-custom-panel {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.65rem;
}

.product-detail__fotorolka {
  display: grid;
  gap: var(--space-md);
  min-width: 0;
}

.product-detail__choice-list--fotorolka-lengths {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: 0.5rem;
}

.product-detail__choice-list--fotorolka-lengths .product-detail__choice--radio {
  min-width: 0;
}

.product-detail__fotorolka-summary {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  background: var(--color-cream);
}

.product-detail__fotorolka-summary-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.product-detail__fotorolka-summary-dims {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-graphite);
}

.product-detail__fotorolka-summary-meta {
  margin: 0.2rem 0 0;
  color: var(--color-graphite);
}

.product-detail__fotorolka-summary-help {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--color-muted);
}

.product-detail__fotorolka-handoff-url {
  margin: 0.55rem 0 0;
}

.product-detail__fotorolka-handoff-url[hidden],
.product-detail__fotorolka-handoff-after[hidden] {
  display: none;
}

.product-detail__fotorolka-handoff-url-label {
  display: block;
  margin: 0 0 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-graphite);
}

.product-detail__fotorolka-handoff-url .product-detail__text-input {
  width: 100%;
}

.product-detail__fotorolka-quote {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0;
}

.product-detail__fotorolka-quote-total {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-graphite);
}

.pdp-lower__fotorolka-guide {
  margin: 0 0 2.25rem;
}

.pdp-lower__fotorolka-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

.pdp-lower__fotorolka-steps li {
  margin: 0;
  padding: 0 0 0 2.1rem;
  position: relative;
}

.pdp-lower__fotorolka-steps li::before {
  counter-increment: fotorolka-step;
  content: counter(fotorolka-step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--pdp-accent-gold);
  color: var(--pdp-accent-gold);
  font-size: 0.75rem;
  font-weight: 600;
}

.pdp-lower__fotorolka-steps {
  counter-reset: fotorolka-step;
}

@media (min-width: 768px) {
  .pdp-lower__fotorolka-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

.product-detail--fotorolka .product-detail__fieldset--size {
  border: 0;
  margin: 0;
  padding: 0;
}

/* FotoRolka purchase-column density — scoped, other PDPs unchanged */
.product-detail--fotorolka .product-detail__description {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.product-detail--fotorolka .product-detail__description br + br {
  display: none;
}

.product-detail--fotorolka .product-detail__header-divider {
  margin-bottom: 0.55rem;
}

.product-detail--fotorolka .product-detail__price--core {
  margin-bottom: 0.85rem;
}

.product-detail--fotorolka .product-detail__fotorolka {
  gap: 1.125rem;
}

.product-detail--fotorolka .product-detail__fotorolka .product-detail__fieldset,
.product-detail--fotorolka .product-detail__fotorolka .product-detail__fieldset--type {
  margin: 0;
}

.product-detail--fotorolka .product-detail__fotorolka .product-detail__legend,
.product-detail--fotorolka .product-detail__fotorolka .product-detail__fieldset--type .product-detail__legend {
  margin-bottom: 0.45rem;
}

.product-detail--fotorolka [data-fotorolka-lengths] > .product-detail__other-size-toggle {
  margin-top: 0.45rem;
}

.product-detail--fotorolka [data-fotorolka-other-size-panel] {
  margin-top: 0.5rem;
}

.product-detail--fotorolka .product-detail__fotorolka-summary {
  margin: 0;
  padding: 0.15rem 0 0;
  border: 0;
  background: transparent;
}

.product-detail--fotorolka .product-detail__fotorolka-summary-kicker {
  display: none;
}

.product-detail--fotorolka .product-detail__fotorolka-summary-primary {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-graphite);
}

.product-detail--fotorolka .product-detail__fotorolka-summary-help {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--color-muted);
}

.product-detail--fotorolka .product-detail__fieldset--fotorolka-handoff {
  margin-top: 0.15rem;
}

.product-detail--fotorolka [data-fotorolka-handoff] .product-detail__photo-orientation-tab.is-active,
.product-detail--fotorolka [data-fotorolka-handoff] .product-detail__photo-orientation-tab:has(.product-detail__choice-input:checked),
.product-detail--fotorolka [data-fotorolka-handoff] .product-detail__photo-orientation-tab.is-active:hover,
.product-detail--fotorolka [data-fotorolka-handoff] .product-detail__photo-orientation-tab:has(.product-detail__choice-input:checked):hover {
  background: var(--pdp-action-green);
  border-color: var(--pdp-action-green);
  color: var(--color-bright);
}

.product-detail--fotorolka .product-detail__fotorolka-handoff-url {
  margin-top: 0.5rem;
}

.product-detail--fotorolka .product-detail__fotorolka-handoff-after {
  margin: 0.4rem 0 0;
}

.product-detail--fotorolka .product-detail__price--core {
  margin-top: 0.85rem;
  margin-bottom: 0.65rem;
}

.product-detail--fotorolka .product-detail__delivery-panel--compact {
  margin: 0.7rem 0 0.65rem;
}

.product-detail--fotorolka .product-detail__trust-row {
  margin-top: 0.85rem;
}


/* ------------------------------------------------------------------ */
/* FotoRolka PDP gallery — main landscape image + horizontal thumbs   */
/* Scoped to .product-detail--fotorolka / .product-gallery--fotorolka  */
/* Poster, canvas, and PHOTO galleries keep the shared rail layout.   */
/* ------------------------------------------------------------------ */

.product-detail--fotorolka {
  --pdp-gallery-fotorolka-stage-max-width: 42rem;
  --pdp-gallery-fotorolka-image-max-height: min(70vh, 34rem);
}

.product-detail--fotorolka .product-detail__gallery-column,
.product-detail--fotorolka .product-detail__gallery-column--fotorolka,
.product-detail--fotorolka .product-detail__gallery,
.product-detail--fotorolka .product-detail__gallery-column .product-gallery,
.product-detail--fotorolka .product-detail__gallery-column .product-gallery__stage {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.product-gallery--fotorolka .product-gallery__body--with-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  gap: var(--pdp-gallery-gap);
}

.product-gallery--fotorolka .product-gallery__body--with-rail .product-gallery__stage {
  grid-row: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.product-gallery--fotorolka .product-gallery__body--with-rail .product-gallery__thumbs-column {
  grid-row: 2;
  position: relative;
  width: 100%;
  min-width: 0;
}

@media (min-width: 1024px) {
  .product-detail--fotorolka {
    --pdp-gallery-stage-fit-width: min(
      var(--pdp-gallery-fotorolka-stage-max-width),
      calc(
        100vw - (var(--gutter-desktop) * 2)
        - 460px
        - var(--pdp-gallery-layout-gap)
      )
    );
    --pdp-gallery-stage-fit-width-single: var(--pdp-gallery-stage-fit-width);
  }

  .product-detail--fotorolka .product-detail__layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  }

  .product-detail--fotorolka .product-detail__gallery-column,
  .product-detail--fotorolka .product-detail__gallery-column--fotorolka {
    width: 100%;
    max-width: var(--pdp-gallery-stage-fit-width);
    align-items: stretch;
  }

  .product-detail--fotorolka .product-detail__gallery,
  .product-detail--fotorolka .product-detail__gallery-column .product-gallery,
  .product-detail--fotorolka .product-detail__gallery-column .product-gallery__stage {
    width: 100%;
    max-width: 100%;
  }
}

.product-gallery--fotorolka .product-gallery__main-trigger,
.product-gallery--fotorolka .product-gallery__main-trigger--presentation,
.product-gallery--fotorolka .product-gallery__main-trigger--gallery {
  aspect-ratio: auto;
  width: 100%;
  max-width: 100%;
  max-height: none;
  min-height: 0;
  background: var(--color-cream);
}

.product-gallery--fotorolka .product-gallery__image,
.product-gallery--fotorolka .product-gallery__main-trigger--presentation .product-gallery__image,
.product-gallery--fotorolka .product-gallery__main-trigger--gallery .product-gallery__image {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: var(--pdp-gallery-fotorolka-image-max-height);
  object-fit: contain;
  object-position: center;
}

@media (min-width: 768px) {
  .product-gallery--fotorolka .product-gallery__body--with-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    gap: var(--pdp-gallery-gap);
  }

  .product-gallery--fotorolka .product-gallery__body--with-rail .product-gallery__stage {
    grid-row: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .product-gallery--fotorolka .product-gallery__body--with-rail .product-gallery__thumbs-column {
    grid-row: 2;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    min-width: 0;
  }

  .product-gallery--fotorolka .product-gallery__thumbs-viewport {
    width: 100%;
    max-width: 100%;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .product-gallery--fotorolka .product-gallery__thumbs-viewport::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .product-gallery--fotorolka .product-gallery__thumbs-rail {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    max-height: none;
    overflow: visible;
    gap: var(--pdp-gallery-thumb-gap);
  }

  .product-gallery--fotorolka .product-gallery__thumbs-rail .product-gallery__thumb img {
    width: auto;
    height: auto;
    max-width: var(--pdp-gallery-thumb-max-width);
    max-height: var(--pdp-gallery-thumb-max-height);
    object-fit: contain;
  }
}

@media (min-width: 1024px) {
  .product-gallery--fotorolka .product-gallery__body--with-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .product-gallery--fotorolka .product-gallery__thumbs-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    margin: 0;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0.125rem;
    background: rgba(252, 250, 246, 0.9);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px rgba(39, 49, 38, 0.08);
    transform: translateY(-50%);
  }

  .product-gallery--fotorolka .product-gallery__thumbs-nav--prev {
    left: 0.125rem;
  }

  .product-gallery--fotorolka .product-gallery__thumbs-nav--next {
    right: 0.125rem;
  }

  .product-gallery--fotorolka .product-gallery__thumbs-nav--prev .product-gallery__thumbs-nav-icon,
  .product-gallery--fotorolka .product-gallery__thumbs-nav--next .product-gallery__thumbs-nav-icon {
    transform: rotate(-90deg);
  }

  .product-gallery--fotorolka .product-gallery__thumbs-nav:disabled {
    visibility: hidden;
    pointer-events: none;
    opacity: 1;
    cursor: default;
  }
}

@media (max-width: 767px) {
  .product-gallery--fotorolka .product-gallery__main-trigger {
    aspect-ratio: auto;
    max-height: none;
  }
}

/* ------------------------------------------------------------------ */
/* Collage designer PDP — PHOTO density + compact extras               */
/* ------------------------------------------------------------------ */

.product-detail--collage .product-detail__header-divider {
  margin-bottom: 0.55rem;
}

.product-detail--collage:not(.product-detail--collage-template) .product-detail__purchase-config .product-detail__fieldset--size,
.product-detail--collage:not(.product-detail--collage-template) .product-detail__purchase-config .product-detail__fieldset--type,
.product-detail--collage:not(.product-detail--collage-template) .product-detail__purchase-config .product-detail__fieldset--collage-count,
.product-detail--collage:not(.product-detail--collage-template) .product-detail__purchase-config .product-detail__fieldset--collage-brief,
.product-detail--collage:not(.product-detail--collage-template) .product-detail__purchase-config [data-fotorolka-handoff],
.product-detail--collage:not(.product-detail--collage-template) .product-detail__purchase-config .product-detail__finish-margin-row {
  margin: 0 0 1.5rem;
}

.product-detail--collage:not(.product-detail--collage-template) .product-detail__purchase-config .product-detail__fieldset--finish {
  margin: 0;
}

.product-detail--collage:not(.product-detail--collage-template) .product-detail__finish-margin-row {
  display: block;
}

.product-detail--collage:not(.product-detail--collage-template) .product-detail__finish-margin-col--finish {
  width: 100%;
}

.product-detail--collage:not(.product-detail--collage-template) .product-detail__purchase-config .product-detail__legend {
  margin-bottom: 0.5rem;
}

.product-detail--collage:not(.product-detail--collage-template) .product-detail__purchase-config .product-detail__field-note,
.product-detail--collage:not(.product-detail--collage-template) .product-detail__purchase-config .product-detail__brief-saved {
  margin: 0.5rem 0 0;
}

.product-detail--collage:not(.product-detail--collage-template) .product-detail__photo-format {
  gap: 0.5rem;
}

.product-detail--collage:not(.product-detail--collage-template) [data-photo-main-sizes] .product-detail__choice--radio {
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  max-width: none;
  padding-inline: 0.55rem;
}

@media (max-width: 520px) {
  .product-detail--collage:not(.product-detail--collage-template) [data-photo-main-sizes] .product-detail__choice--radio {
    flex: 1 1 calc((100% - 0.75rem) / 3);
    min-width: 0;
    max-width: calc((100% - 0.75rem) / 3);
  }
}

.product-detail__collage-range-select {
  appearance: none;
  display: block;
  width: min(100%, 22rem);
  min-height: 2.75rem;
  margin: 0;
  padding: 0 2.4rem 0 0.9rem;
  border: 1px solid rgba(44, 41, 36, 0.18);
  border-radius: var(--pdp-control-radius);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%232c2924' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 0.7rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--color-graphite);
  cursor: pointer;
}

.product-detail__collage-range-select:has(option[value=""]:checked) {
  color: var(--color-muted);
}

.product-detail__collage-range-select:focus-visible {
  outline: 2px solid var(--pdp-action-green);
  outline-offset: 2px;
}

.product-detail__brief-saved {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--color-muted);
}

.product-detail__brief-saved[hidden],
[data-collage-brief-lead][hidden],
[data-collage-brief-later-note][hidden] {
  display: none;
}

html.is-collage-brief-open,
html.is-collage-brief-open body {
  overflow: hidden;
}

.collage-brief {
  width: min(40rem, calc(100vw - 2rem));
  max-height: min(90vh, 48rem);
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: inherit;
}

.collage-brief::backdrop {
  background: rgba(20, 16, 12, 0.45);
}

.collage-brief__form {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 48rem);
}

.collage-brief__header,
.collage-brief__footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
}

.collage-brief__header {
  border-bottom: 1px solid var(--color-border);
}

.collage-brief__footer {
  position: sticky;
  bottom: 0;
  justify-content: flex-end;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.collage-brief__progress {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.collage-brief__title {
  margin: 0;
  font-size: 1.05rem;
}

.collage-brief__close {
  margin-left: auto;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.collage-brief__body {
  overflow: auto;
  padding: 0.5rem 1rem 1rem;
}

.collage-brief__question {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
}

.collage-brief__question legend {
  font-weight: 650;
  margin-bottom: 0.45rem;
}

.collage-brief__options {
  display: grid;
  gap: 0.35rem;
}

.collage-brief__options label,
.collage-brief__confirm {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  min-height: 2.5rem;
  padding: 0.45rem 0.2rem;
}

.collage-brief__options small {
  display: block;
  font-weight: 400;
  color: var(--color-muted);
}

.collage-brief__extra,
.collage-brief__notice {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.collage-brief__extra[hidden],
.collage-brief__notice[hidden] {
  display: none;
}

.collage-brief__notice {
  padding: 0.75rem;
  background: #f6f1ea;
}

.collage-brief__extra input,
.collage-brief__extra textarea,
.collage-brief__question textarea {
  width: 100%;
  font: inherit;
}

@media (max-width: 480px) {
  .collage-brief {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .collage-brief__form {
    max-height: 100vh;
    height: 100vh;
  }
}

.product-detail--collage .product-detail__photo-format > .product-detail__legend {
  margin: 0 0 0.4rem;
}

.product-detail--collage .product-detail__photo-orientation-panel > .product-detail__legend {
  margin: 0.7rem 0 0.4rem;
}

.product-detail--collage .product-detail__collage-count {
  margin: 0;
}

.product-detail--collage .product-detail__collage-guidance {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--color-muted);
}

.product-detail__purchase-breakdown {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--color-muted);
}

.product-detail__purchase-breakdown[hidden] {
  display: none;
}

.product-detail__purchase-breakdown-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0;
}

.product-detail__purchase-breakdown-line + .product-detail__purchase-breakdown-line {
  margin-top: 0.15rem;
}

.product-detail__purchase-breakdown-amount {
  flex: 0 0 auto;
}

.quantity-control {
  --quantity-stepper-size: 1.99rem;
  --quantity-stepper-gap: 0.26rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.34rem;
  margin: 0.72rem 0 0;
  max-width: 100%;
}

.quantity-control__label {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--color-muted);
}

.quantity-control__stepper {
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: 100%;
  gap: var(--quantity-stepper-gap);
}

.quantity-control__button,
.quantity-control__value {
  box-sizing: border-box;
  flex: 0 0 var(--quantity-stepper-size, 1.99rem);
  width: var(--quantity-stepper-size, 1.99rem);
  min-width: var(--quantity-stepper-size, 1.99rem);
  max-width: var(--quantity-stepper-size, 1.99rem);
  height: var(--quantity-stepper-size, 1.99rem);
  min-height: var(--quantity-stepper-size, 1.99rem);
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface, #fff);
  box-shadow: none;
  color: var(--color-graphite);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  text-transform: none;
}

.quantity-control__button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.quantity-control__helper {
  margin: 0;
  max-width: 28rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--color-muted);
}

.product-detail__purchase-row .quantity-control {
  flex: 1 0 100%;
  margin: 0;
}

.quantity-control__icon {
  display: block;
  width: 0.81rem;
  height: 0.81rem;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
  pointer-events: none;
}

.quantity-control__value {
  appearance: none;
  line-height: calc(var(--quantity-stepper-size) - 2px);
}

.quantity-control__button:hover:not(:disabled),
.quantity-control__button:focus-visible:not(:disabled) {
  background: var(--color-cream);
}

.quantity-control__button:focus-visible,
.quantity-control__value:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.quantity-control__button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.quantity-control + .additional-prints {
  margin: 0.45rem 0 0.85rem;
}

.additional-prints {
  margin: 0.15rem 0 0.85rem;
}

.additional-prints__projects {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
  overflow-x: auto;
}

.additional-prints__project {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: transparent;
  color: var(--color-graphite);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 1.2;
  cursor: pointer;
}

.additional-prints__project[aria-selected="true"] {
  border-color: var(--color-graphite);
  background: var(--color-graphite);
  color: #fff;
}

.additional-prints__line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.85rem;
}

.additional-prints__summary {
  display: none;
}

.additional-prints__trigger {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-caramel);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.additional-prints__trigger:hover,
.additional-prints__trigger:focus-visible,
.additional-prints__trigger:active {
  color: #8f6640;
  text-decoration: underline;
}

.additional-prints__trigger:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.additional-prints__note,
.additional-prints__empty,
.additional-prints__fit {
  color: var(--color-muted);
}

.additional-prints__note {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
}

.additional-prints [hidden],
.additional-prints__dialog [hidden] {
  display: none;
}

.additional-prints__dialog {
  display: none;
  flex-direction: column;
  width: min(32rem, calc(100vw - 2rem));
  max-height: min(85vh, 40rem);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: inherit;
}

.additional-prints__dialog[open] {
  display: flex;
}

.additional-prints__dialog::backdrop {
  background: rgba(20, 16, 12, 0.45);
}

.additional-prints__sheet {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(85vh, 40rem);
}

.additional-prints__header,
.additional-prints__footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--color-surface);
}

.additional-prints__header {
  border-bottom: 1px solid var(--color-border);
}

.additional-prints__footer {
  position: sticky;
  bottom: 0;
  justify-content: flex-end;
  border-top: 1px solid var(--color-border);
}

.additional-prints__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
}

.additional-prints__close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--color-graphite);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.additional-prints__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.85rem 1rem 1rem;
}

.additional-prints__helper,
.additional-prints__fit {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

.additional-prints__empty {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
}

.additional-prints__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0;
  padding: 0.85rem 0;
  border-top: 1px solid var(--color-border);
}

.additional-prints__label {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.additional-prints__hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.additional-prints__prices {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  font-size: 0.9375rem;
}

.additional-prints__price--base {
  color: var(--color-muted);
  text-decoration: line-through;
}

.additional-prints__price--discount {
  font-weight: 600;
}

.additional-prints__discount {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.additional-prints__stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.additional-prints__step {
  appearance: none;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface, #fff);
  color: var(--color-graphite);
  font: inherit;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
}

.additional-prints__step:focus-visible,
.additional-prints__count:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.additional-prints__count {
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface, #fff);
  color: var(--color-graphite);
  font: inherit;
  font-size: 1rem;
  text-align: center;
}

.additional-prints__cancel,
.additional-prints__confirm {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.additional-prints__cancel {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-graphite);
}

.additional-prints__cancel:hover,
.additional-prints__cancel:focus-visible {
  background: var(--color-cream);
}

.additional-prints__confirm {
  width: auto;
  border: none;
  background: var(--color-burgundy);
  color: var(--color-bright);
}

.additional-prints__confirm:hover,
.additional-prints__confirm:focus-visible {
  background: var(--color-burgundy-dark);
  color: var(--color-bright);
}

.additional-prints__cancel:focus-visible,
.additional-prints__confirm:focus-visible,
.additional-prints__close:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .additional-prints__dialog {
    width: 100%;
    max-width: 100%;
    max-height: 88vh;
    margin: auto 0 0;
    border-bottom: 0;
    border-radius: 0.75rem 0.75rem 0 0;
  }

  .additional-prints__sheet {
    max-height: 88vh;
  }
}

.product-detail--collage:not(.product-detail--collage-template) .product-detail__price--core {
  margin: 0;
  line-height: 1.3;
}

.product-detail--collage:not(.product-detail--collage-template) .product-detail__sticky-price {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}

.product-detail--collage:not(.product-detail--collage-template) .product-detail__delivery-panel--compact {
  margin: 1.5rem 0 1rem;
}

.product-detail--collage .product-detail__trust-row {
  margin-top: 0.85rem;
}

.product-detail--collage [data-fotorolka-handoff] .product-detail__photo-orientation-tab.is-active,
.product-detail--collage [data-fotorolka-handoff] .product-detail__photo-orientation-tab:has(.product-detail__choice-input:checked),
.product-detail--collage [data-fotorolka-handoff] .product-detail__photo-orientation-tab.is-active:hover,
.product-detail--collage [data-fotorolka-handoff] .product-detail__photo-orientation-tab:has(.product-detail__choice-input:checked):hover,
.product-detail--collage [data-collage-brief] .product-detail__photo-orientation-tab.is-active,
.product-detail--collage [data-collage-brief] .product-detail__photo-orientation-tab:has(.product-detail__choice-input:checked),
.product-detail--collage [data-collage-brief] .product-detail__photo-orientation-tab.is-active:hover,
.product-detail--collage [data-collage-brief] .product-detail__photo-orientation-tab:has(.product-detail__choice-input:checked):hover {
  background: var(--pdp-action-green);
  border-color: var(--pdp-action-green);
  color: var(--color-bright);
}

.product-detail--collage:not(.product-detail--collage-template) [data-paper-finish-options],
.product-detail--collage:not(.product-detail--collage-template) [data-production-finish-control],
.product-detail--collage:not(.product-detail--collage-template) [data-fotorolka-handoff] .product-detail__photo-orientation,
.product-detail--collage:not(.product-detail--collage-template) [data-collage-brief-actions] {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: max-content;
  max-width: 100%;
  min-height: 2.5rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--pdp-control-radius);
  background: var(--color-surface);
  overflow: hidden;
}

.product-detail--collage:not(.product-detail--collage-template) [data-paper-finish-options] .product-detail__choice,
.product-detail--collage:not(.product-detail--collage-template) [data-production-finish-control] .product-detail__choice--segment,
.product-detail--collage:not(.product-detail--collage-template) [data-fotorolka-handoff] .product-detail__photo-orientation-tab,
.product-detail--collage:not(.product-detail--collage-template) [data-collage-brief-actions] .product-detail__photo-orientation-tab {
  flex: 1 1 auto;
  min-height: 2.5rem;
  margin: 0;
  padding: 0 1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-graphite);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.product-detail--collage:not(.product-detail--collage-template) [data-paper-finish-options] .product-detail__choice + .product-detail__choice,
.product-detail--collage:not(.product-detail--collage-template) [data-production-finish-control] .product-detail__choice--segment + .product-detail__choice--segment,
.product-detail--collage:not(.product-detail--collage-template) [data-fotorolka-handoff] .product-detail__photo-orientation-tab + .product-detail__photo-orientation-tab,
.product-detail--collage:not(.product-detail--collage-template) [data-collage-brief-actions] .product-detail__photo-orientation-tab + .product-detail__photo-orientation-tab {
  border-left: 1px solid var(--color-border);
}

.product-detail--collage:not(.product-detail--collage-template) [data-paper-finish-options] .product-detail__choice:has(.product-detail__choice-input:checked),
.product-detail--collage:not(.product-detail--collage-template) [data-production-finish-control] .product-detail__choice--segment:has(.product-detail__choice-input:checked),
.product-detail--collage:not(.product-detail--collage-template) [data-fotorolka-handoff] .product-detail__photo-orientation-tab:has(.product-detail__choice-input:checked),
.product-detail--collage:not(.product-detail--collage-template) [data-fotorolka-handoff] .product-detail__photo-orientation-tab.is-active,
.product-detail--collage:not(.product-detail--collage-template) [data-collage-brief-actions] .product-detail__photo-orientation-tab:has(.product-detail__choice-input:checked) {
  background: var(--pdp-action-green);
  border-color: transparent;
  color: var(--color-bright);
}

.product-detail--collage:not(.product-detail--collage-template) [data-paper-finish-options] .product-detail__choice:has(.product-detail__choice-input:focus-visible),
.product-detail--collage:not(.product-detail--collage-template) [data-production-finish-control] .product-detail__choice--segment:has(.product-detail__choice-input:focus-visible),
.product-detail--collage:not(.product-detail--collage-template) [data-fotorolka-handoff] .product-detail__photo-orientation-tab:has(.product-detail__choice-input:focus-visible),
.product-detail--collage:not(.product-detail--collage-template) [data-collage-brief-actions] .product-detail__photo-orientation-tab:has(.product-detail__choice-input:focus-visible) {
  outline: 2px solid var(--pdp-action-green);
  outline-offset: -2px;
  z-index: 1;
}

.product-detail--collage .product-detail__choice.is-unavailable {
  opacity: 0.42;
  pointer-events: none;
}

.product-detail--collage-template .product-detail__choice.is-unavailable {
  display: none;
}

.product-detail--collage-template [data-collage-orientation-tabs-hidden] {
  display: none !important;
}

.product-detail--collage-template .collage-creator__preview .product-preview__wall,
.product-detail--collage-template .collage-creator__preview .product-preview__framed-object,
.product-detail--collage-template .collage-creator__preview .product-preview__paper-anchor,
.product-detail--collage-template .collage-creator__preview .product-preview__paper,
.product-detail--collage-template .collage-creator__canvas-wrap,
.product-detail--collage-template .collage-creator__hit-layer,
.product-detail--collage-template .collage-creator__slot-hit,
.product-detail--collage-template .collage-creator__text-hit,
.product-detail--collage-template .collage-creator__text-input {
  pointer-events: auto;
}

.product-detail--collage-template .collage-creator__deco-layer {
  pointer-events: none;
  z-index: 4;
}

.product-detail--collage-template .collage-creator__deco-hit,
.product-detail--collage-template .collage-creator__deco-handle {
  pointer-events: auto;
}

.product-detail--collage-template .collage-creator__hit-layer {
  z-index: 3;
}

.product-detail--collage .product-detail__choice.is-unavailable .product-detail__preset-chip {
  cursor: not-allowed;
}

.product-detail--collage .product-detail__collage-digital-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.65rem;
  margin: 0;
  cursor: pointer;
}

.product-detail--collage .product-detail__collage-digital-check {
  margin: 0;
  flex: 0 0 auto;
}

.product-detail--collage .product-detail__collage-digital-copy {
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--color-ink, #1c1916);
}

.product-detail--collage .product-detail__collage-digital-price {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-muted);
}

.product-detail--collage .product-detail__description {
  max-width: 36rem;
}

/* ------------------------------------------------------------------ */
/* Collage template creator                                            */
/* Page geometry is shared with PHOTO (tokens + grid + preview shell). */
/* This block is creator internals + template-mode purchase order.     */
/* ------------------------------------------------------------------ */

.product-detail--collage-template .product-detail__layout {
  align-items: start;
}

/* Collage-only: do not inherit PHOTO's tall preview min-height / centering gap. */
@media (min-width: 1024px) {
  .product-detail--collage-template .collage-creator__preview {
    min-height: 0;
    justify-content: flex-start;
  }
}

.collage-creator {
  width: 100%;
  max-width: 100%;
}

.collage-creator-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
}

.collage-creator-stack .collage-creator {
  width: 100%;
  max-width: 100%;
}

.collage-creator__workspace-host {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.collage-creator__stage {
  width: 100%;
  max-width: 100%;
}

.collage-creator__preview {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.collage-creator__preview-shell {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.collage-creator__view-tools {
  position: absolute;
  right: 0.625rem;
  bottom: 0.625rem;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  max-width: calc(100% - 1.25rem);
  pointer-events: auto;
}

@media (max-width: 480px) {
  .collage-creator__view-tools {
    position: static;
    right: auto;
    bottom: auto;
    z-index: auto;
    max-width: 100%;
    margin-top: 0.5rem;
  }
}

.collage-creator__view-tools .product-gallery__zoom {
  position: static;
  border: 1px solid var(--color-border, #d4cfc4);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

.collage-creator__view-tool[aria-pressed="true"] {
  color: var(--color-commerce-action, #455747);
  background: rgba(69, 87, 71, 0.1);
}

.collage-creator.is-enlarged .collage-creator__view-tools {
  visibility: hidden;
}

.collage-creator__artwork-placeholder {
  width: 100%;
  max-width: 100%;
  pointer-events: none;
}

.collage-creator__preview.is-enlarge-settling {
  visibility: hidden;
}

.product-gallery__lightbox[data-collage-enlarge-dialog] .collage-creator__preview > .product-gallery__zoom {
  display: none;
}

.product-gallery__lightbox[data-collage-enlarge-dialog] .product-gallery__lightbox-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  box-sizing: border-box;
  width: min(96vw, 1400px);
  height: min(94vh, 980px);
  max-height: 94vh;
  margin: 3vh auto;
  overflow: hidden;
  padding: 3.25rem 1.25rem 1.25rem;
}

.product-gallery__lightbox[data-collage-enlarge-dialog] .product-gallery__lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.product-gallery__lightbox[data-collage-enlarge-dialog] .collage-creator__preview {
  --preview-lightbox-paper-height: min(78vh, 800px);
  --preview-lightbox-paper-width: min(90vw, 1240px);
  --photo-preview-max-paper-height: var(--preview-lightbox-paper-height);
  --photo-preview-max-paper-width: var(--preview-lightbox-paper-width);
  --preview-wall-scale: 1.06;
  flex: 0 1 auto;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  max-height: 100%;
  justify-content: center;
  box-sizing: border-box;
  padding: 0.25rem;
}

.product-gallery__lightbox[data-collage-enlarge-dialog] .collage-creator__preview .product-preview__presentation,
.product-gallery__lightbox[data-collage-enlarge-dialog] .collage-creator__preview .product-preview__framed-object {
  --photo-preview-max-paper-height: var(--preview-lightbox-paper-height);
  --photo-preview-max-paper-width: var(--preview-lightbox-paper-width);
  --preview-wall-scale: 1.06;
  min-width: 0;
  max-width: 100%;
}

.product-gallery__lightbox[data-collage-enlarge-dialog] .collage-creator__preview .product-preview__wall {
  pointer-events: none;
}

@media (max-width: 767px) {
  .product-gallery__lightbox[data-collage-enlarge-dialog] .product-gallery__lightbox-inner {
    width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    padding: 3.25rem 0.75rem 0.75rem;
  }

  .product-gallery__lightbox[data-collage-enlarge-dialog] .collage-creator__preview {
    --preview-lightbox-paper-height: calc(100vh - 6.5rem);
    --preview-lightbox-paper-width: calc(100vw - 2.25rem);
    --photo-preview-max-paper-height: var(--preview-lightbox-paper-height);
    --photo-preview-max-paper-width: var(--preview-lightbox-paper-width);
  }
}

.collage-creator__preview .product-preview__stage {
  width: 100%;
}

.collage-creator__print-fit {
  position: absolute;
  inset: auto;
  left: 0;
  top: 0;
  right: auto;
  bottom: auto;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--collage-slot-empty, #ede7de);
}

.collage-creator__canvas-wrap {
  position: absolute;
  inset: 0;
  left: 0;
  top: 0;
  flex: 0 0 auto;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  background: var(--collage-slot-empty, #ede7de);
  overflow: hidden;
}

.collage-creator__fit-note {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #666;
}

.collage-creator__fit-note[hidden] {
  display: none;
}

.collage-creator__canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.collage-creator__hit-layer,
.collage-creator__deco-layer {
  position: absolute;
  inset: 0;
}

.collage-creator__deco-hit {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  box-shadow: none;
  outline: none;
  cursor: pointer;
  touch-action: pan-y;
  transform-origin: center center;
  z-index: 2;
}

.collage-creator__deco-hit.is-selected {
  cursor: grab;
  touch-action: none;
}

.collage-creator__deco-hit.is-dragging {
  cursor: grabbing;
}

.collage-creator__deco-hit.is-selected::after {
  content: "";
  position: absolute;
  inset: 3px;
  pointer-events: none;
  background:
    linear-gradient(var(--color-caramel), var(--color-caramel)) top left / 7px 1.5px no-repeat,
    linear-gradient(var(--color-caramel), var(--color-caramel)) top left / 1.5px 7px no-repeat,
    linear-gradient(var(--color-caramel), var(--color-caramel)) top right / 7px 1.5px no-repeat,
    linear-gradient(var(--color-caramel), var(--color-caramel)) top right / 1.5px 7px no-repeat,
    linear-gradient(var(--color-caramel), var(--color-caramel)) bottom left / 7px 1.5px no-repeat,
    linear-gradient(var(--color-caramel), var(--color-caramel)) bottom left / 1.5px 7px no-repeat,
    linear-gradient(var(--color-caramel), var(--color-caramel)) bottom right / 7px 1.5px no-repeat,
    linear-gradient(var(--color-caramel), var(--color-caramel)) bottom right / 1.5px 7px no-repeat;
}

.collage-creator__deco-handle {
  position: absolute;
  width: 0.72rem;
  height: 0.72rem;
  padding: 0;
  border-radius: 999px;
  border: 1.5px solid var(--color-commerce-action);
  background: var(--color-bright);
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  z-index: 2;
}

.collage-creator__deco-handle--resize {
  right: -0.2rem;
  bottom: -0.2rem;
  cursor: nwse-resize;
  touch-action: none;
}

.collage-creator__deco-handle--rotate {
  left: 50%;
  top: -1.05rem;
  transform: translateX(-50%);
  border-color: var(--color-caramel);
  cursor: grab;
  touch-action: none;
}

.collage-creator__hit-layer {
  touch-action: pan-y;
}

.collage-creator__slot-hit {
  position: absolute;
  cursor: pointer;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  outline: none;
  box-shadow: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y;
}

.collage-creator__slot-hit.is-empty:hover .collage-creator__slot-plus,
.collage-creator__slot-hit.is-empty:focus-visible .collage-creator__slot-plus {
  background: var(--color-bright);
  box-shadow: 0 0 0 2px rgba(69, 87, 71, 0.28);
}

.collage-creator__slot-hit.is-filled {
  cursor: grab;
}

.collage-creator__slot-hit.is-filled.is-selected {
  touch-action: none;
}

.collage-creator__slot-hit.is-filled.is-dragging {
  cursor: grabbing;
}

.collage-creator__hit-layer.is-swap-mode .collage-creator__slot-hit,
.collage-creator__hit-layer.is-swap-mode .collage-creator__slot-hit.is-filled {
  cursor: pointer;
}

.collage-creator__slot-hit.is-filled:focus-visible::after {
  content: "";
  position: absolute;
  inset: 4px;
  pointer-events: none;
  background:
    linear-gradient(var(--color-caramel), var(--color-caramel)) top left / 8px 1.5px no-repeat,
    linear-gradient(var(--color-caramel), var(--color-caramel)) top left / 1.5px 8px no-repeat,
    linear-gradient(var(--color-caramel), var(--color-caramel)) top right / 8px 1.5px no-repeat,
    linear-gradient(var(--color-caramel), var(--color-caramel)) top right / 1.5px 8px no-repeat,
    linear-gradient(var(--color-caramel), var(--color-caramel)) bottom left / 8px 1.5px no-repeat,
    linear-gradient(var(--color-caramel), var(--color-caramel)) bottom left / 1.5px 8px no-repeat,
    linear-gradient(var(--color-caramel), var(--color-caramel)) bottom right / 8px 1.5px no-repeat,
    linear-gradient(var(--color-caramel), var(--color-caramel)) bottom right / 1.5px 8px no-repeat;
}

.collage-creator__slot-hit.is-swap-source::after,
.collage-creator__slot-hit.is-swap-target::after {
  content: "";
  position: absolute;
  inset: 4px;
  pointer-events: none;
  background:
    linear-gradient(var(--collage-swap-tick), var(--collage-swap-tick)) top left / 8px 1.5px no-repeat,
    linear-gradient(var(--collage-swap-tick), var(--collage-swap-tick)) top left / 1.5px 8px no-repeat,
    linear-gradient(var(--collage-swap-tick), var(--collage-swap-tick)) top right / 8px 1.5px no-repeat,
    linear-gradient(var(--collage-swap-tick), var(--collage-swap-tick)) top right / 1.5px 8px no-repeat,
    linear-gradient(var(--collage-swap-tick), var(--collage-swap-tick)) bottom left / 8px 1.5px no-repeat,
    linear-gradient(var(--collage-swap-tick), var(--collage-swap-tick)) bottom left / 1.5px 8px no-repeat,
    linear-gradient(var(--collage-swap-tick), var(--collage-swap-tick)) bottom right / 8px 1.5px no-repeat,
    linear-gradient(var(--collage-swap-tick), var(--collage-swap-tick)) bottom right / 1.5px 8px no-repeat;
}

.collage-creator__slot-hit.is-swap-source {
  --collage-swap-tick: var(--color-caramel);
}

.collage-creator__slot-hit.is-swap-target {
  --collage-swap-tick: var(--color-commerce-action);
}

.collage-creator__slot-hit.is-swap-target.is-empty .collage-creator__slot-plus {
  background: var(--color-bright);
  box-shadow: 0 0 0 2px rgba(69, 87, 71, 0.32);
}

.collage-creator__slot-plus {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: var(--color-bright);
  color: var(--color-commerce-action);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 500;
  pointer-events: none;
}

.collage-creator__text-hit {
  position: absolute;
  display: flex;
  align-items: center;
  cursor: text;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  box-shadow: none;
  outline: none;
}

.collage-creator__text-hit:hover,
.collage-creator__text-hit:focus {
  outline: none;
  box-shadow: none;
  background: transparent;
}

.collage-creator__text-hit:focus-visible:not(.is-editing) {
  outline: 1px dashed rgba(39, 49, 38, 0.28);
  outline-offset: -2px;
}

.collage-creator__text-hit.is-selected:not(.is-editing) {
  cursor: grab;
}

.collage-creator__text-hit.is-editing {
  z-index: 5;
  overflow: visible;
}

.collage-creator__text-hit.is-dragging {
  cursor: grabbing;
}

.collage-creator__text-toolbar-marks {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.collage-creator__text-toolbar-marks button {
  min-width: 2rem;
  min-height: 2rem;
  border: 1px solid rgba(39, 49, 38, 0.28);
  background: transparent;
  color: inherit;
  border-radius: 0.35rem;
  cursor: pointer;
}

.collage-creator__text-toolbar-marks button[data-collage-text-mark="bold"] {
  font-weight: 700;
}

.collage-creator__text-toolbar-marks button[data-collage-text-mark="italic"] {
  font-style: italic;
}

.collage-creator__text-toolbar-marks button[data-collage-text-mark="underline"] {
  text-decoration: underline;
}

.collage-creator__text-toolbar-marks button[aria-pressed="true"] {
  background: rgba(39, 49, 38, 0.12);
}

.collage-creator__text-toolbar-marks button[aria-pressed="mixed"] {
  background: transparent;
  border-style: dashed;
}

.collage-creator__text-input {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  align-self: center;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  padding: 0;
  color: inherit;
  caret-color: inherit;
  line-height: 1;
  overflow: visible;
  resize: none;
  white-space: pre-wrap;
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

.collage-creator__text-input:focus,
.collage-creator__text-input:focus-visible {
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: none;
}

.collage-creator__slot-tools {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.55rem;
  min-height: 0;
}

.collage-creator__filters {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0.15rem 0 0;
}

.collage-creator__filter-standalone {
  align-self: flex-start;
  margin: 0.1rem 0 0;
}

.collage-creator__filter-scope {
  margin: 0 0 0.55rem;
  width: 100%;
  min-width: 0;
}

.collage-creator__filter-scope-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
}

.collage-creator__filter-scope-option {
  appearance: none;
  margin: 0;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--color-border, #d4cfc4);
  border-radius: 999px;
  background: #fff;
  color: var(--color-ink, #1c1916);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
}

.collage-creator__filter-scope-option.is-selected,
.collage-creator__filter-scope-option[aria-checked="true"] {
  border-color: var(--color-commerce-action, #8a3b2b);
  color: var(--color-commerce-action, #8a3b2b);
  box-shadow: 0 0 0 1px var(--color-commerce-action, #8a3b2b);
}

.collage-creator__filter-scope-option:disabled,
.collage-creator__filter-scope-option[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.collage-creator__filter-scope-option:focus-visible {
  outline: 2px solid var(--color-caramel, #c4a574);
  outline-offset: 2px;
}

.collage-creator__filter-mixed,
.collage-creator__filter-hint {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  color: var(--color-muted);
}

.collage-creator__photo-toolbar button[data-collage-filter-toggle][aria-pressed="true"],
.collage-creator__filter-standalone[aria-pressed="true"] {
  border-color: var(--color-commerce-action, #8a3b2b);
  color: var(--color-commerce-action, #8a3b2b);
}

.collage-creator__photo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.collage-creator__photo-toolbar {
  padding: 0.15rem 0 0.1rem;
}

.collage-creator__zoom {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.collage-creator__zoom button:not(.quantity-control__button) {
  min-width: 2.1rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
}

.collage-creator__zoom input[type="range"] {
  width: 7.5rem;
  max-width: 36vw;
  margin: 0;
  accent-color: var(--color-commerce-action);
  cursor: pointer;
}

.collage-creator__toolbar-sep {
  width: 1px;
  height: 1.1rem;
  background: var(--color-taupe, #c9b8a3);
  opacity: 0.75;
}

.collage-creator__text-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.45rem 0.7rem;
  padding: 0.15rem 0 0.1rem;
  max-width: 100%;
  overflow-x: auto;
}

.collage-creator__text-toolbar-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  margin: 0;
}

.collage-creator__text-toolbar-size,
.collage-creator__text-toolbar-align {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}

.collage-creator__text-toolbar .product-detail__margin-kind-label {
  margin: 0;
}

.collage-creator__text-toolbar [data-collage-text-color],
.collage-creator__text-toolbar [data-poster-band-color] {
  display: block;
  width: 2.1rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 0.35rem;
  background: #fff;
  cursor: pointer;
}

.collage-creator__text-toolbar [data-collage-text-align],
.collage-creator__text-toolbar [data-poster-text-position] {
  max-width: 100%;
  flex-wrap: wrap;
  overflow: visible;
}

.collage-creator__text-toolbar [data-collage-text-align] .collage-creator__btn.is-active,
.collage-creator__text-toolbar [data-collage-text-align] .product-detail__choice--segment.is-active {
  background: var(--color-commerce-action);
  color: var(--color-bright);
  border-color: var(--color-commerce-action);
}

.collage-creator__text-toolbar [data-collage-text-align] .product-detail__choice--segment:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
  z-index: 1;
}

.collage-creator__photo-toolbar button:not(.collage-creator__btn):not(.quantity-control__button),
.collage-creator__deco-toolbar button:not(.collage-creator__btn):not(.quantity-control__button),
.collage-creator__text-toolbar button:not(.collage-creator__btn):not(.quantity-control__button),
.collage-creator__chooser button:not(.collage-creator__btn):not(.quantity-control__button),
.collage-creator__library-upload,
.collage-creator__upload-action:not(.collage-creator__btn) {
  border: 1px solid #ccc;
  background: #fff;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
}

.collage-creator__photo-toolbar button:focus-visible,
.collage-creator__photo-toolbar input:focus-visible,
.collage-creator__deco-toolbar button:focus-visible,
.collage-creator__deco-toolbar input:focus-visible,
.collage-creator__text-toolbar button:focus-visible,
.collage-creator__text-toolbar input:focus-visible,
.collage-creator__text-toolbar select:focus-visible,
.collage-creator__chooser button:focus-visible,
.collage-creator__library-upload:focus-visible,
.collage-creator__upload-action:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.collage-creator__font-field {
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.collage-creator__font-toggle {
  display: flex;
  align-items: center;
  min-width: 9.5rem;
  max-width: 14rem;
  min-height: 2rem;
  border-radius: 0.35rem;
  text-align: left;
}

.collage-creator__font-toggle span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collage-creator__font-backdrop[hidden] {
  display: none !important;
}

.collage-creator__font-backdrop.is-sheet {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(43, 43, 43, 0.35);
  z-index: calc(var(--z-header) + 1);
}

.collage-creator__font-panel {
  position: fixed;
  z-index: 71;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-sizing: border-box;
  width: min(20rem, calc(100vw - 1rem));
  max-height: min(22rem, 70vh);
  padding: 0.7rem;
  border: 1px solid var(--color-taupe, #c9b8a3);
  border-radius: 0.75rem;
  background: var(--color-bright, #fff);
  box-shadow: 0 0.75rem 1.5rem rgba(43, 43, 43, 0.12);
  overflow: hidden;
}

.collage-creator__font-panel[hidden] {
  display: none !important;
}

.collage-creator__font-search {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.4rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 0.45rem;
  font: inherit;
  font-size: 0.9rem;
}

.collage-creator__font-chips {
  display: flex;
  gap: 0.35rem;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 0.1rem;
}

.collage-creator__font-chip {
  flex: 0 0 auto;
  white-space: nowrap;
}

.collage-creator__font-chip[aria-selected="true"] {
  background: var(--color-commerce-action);
  color: var(--color-bright);
  border-color: var(--color-commerce-action);
}

.collage-creator__font-search,
.collage-creator__font-chips,
.collage-creator__font-empty,
.collage-creator__font-close {
  flex-shrink: 0;
}

.collage-creator__font-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.collage-creator__font-group {
  margin: 0.35rem 0 0.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-ink-soft, #6d645b);
}

.collage-creator__font-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  width: 100%;
  min-height: 2.75rem;
  border-radius: 0.45rem;
  text-align: left;
}

.collage-creator__font-option-name {
  font-size: 1.05rem;
  line-height: 1.2;
}

.collage-creator__font-option-phrase {
  font-size: 0.82rem;
  line-height: 1.2;
  color: var(--color-ink-soft, #6d645b);
}

.collage-creator__font-option[aria-selected="true"],
.collage-creator__font-option.is-active {
  border-color: var(--color-caramel);
  background: var(--color-page, #f7f3ee);
}

.collage-creator__font-empty {
  margin: 0;
  font-size: 0.85rem;
}

.collage-creator__font-close {
  align-self: flex-end;
}

.collage-creator__font-panel.is-sheet {
  left: 0 !important;
  right: 0 !important;
  top: auto !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100vw;
  max-height: min(72vh, 32rem);
  z-index: calc(var(--z-header) + 2);
  border-radius: 1rem 1rem 0 0;
  padding-bottom: max(0.7rem, env(safe-area-inset-bottom));
}

.collage-creator__photo-toolbar button[aria-pressed="true"] {
  border-color: var(--color-commerce-action);
  color: var(--color-commerce-action);
}

.collage-creator__quality {
  margin: 0;
  font-size: 0.8rem;
  color: #666;
}

.collage-creator__swap-hint {
  margin: 0;
  width: 100%;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--color-commerce-action);
}

@media (max-width: 767px) {
  .collage-creator__photo-toolbar button:not(.quantity-control__button) {
    padding: 0.3rem 0.55rem;
    font-size: 0.78rem;
  }

  .collage-creator__swap-hint {
    font-size: 0.78rem;
  }
}

.collage-creator__deco-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0 0.1rem;
}

.collage-creator__deco-toolbar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.collage-creator__deco-label {
  margin: 0;
  font-size: 0.82rem;
  color: #555;
}

.collage-creator__deco-toolbar input[type="range"] {
  width: 6.5rem;
  max-width: 32vw;
  margin: 0;
  accent-color: var(--color-commerce-action);
  cursor: pointer;
}

.collage-creator__deco-toolbar input[type="color"] {
  width: 2.1rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 0.35rem;
  cursor: pointer;
}

.collage-creator__deco-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

.collage-creator__deco-custom {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.collage-creator__deco-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 2.8rem;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border: 1.5px dashed var(--color-commerce-action);
  border-radius: var(--pdp-control-radius, var(--radius-sm));
  background: var(--color-raised-surface, #fff);
  color: var(--color-commerce-action);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  box-sizing: border-box;
}

.collage-creator__deco-upload:hover:not(:disabled) {
  background: #fff7f4;
}

.collage-creator__deco-upload:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.collage-creator__deco-custom-note,
.collage-creator__deco-custom-limit {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #666;
  overflow-wrap: anywhere;
}

.collage-creator__deco-custom-heading {
  margin: 0.1rem 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.collage-creator__deco-custom-grid {
  max-height: 9rem;
}

.collage-creator__deco-custom-tile {
  position: relative;
  min-width: 0;
}

.collage-creator__deco-custom-tile .collage-creator__deco-custom-option {
  width: 100%;
}

.collage-creator__deco-custom-remove {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #6b6560;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.collage-creator__deco-custom-remove:hover {
  background: #fff;
  color: #3a3633;
}

.collage-creator__deco-custom-option img {
  width: 1.85rem;
  height: 1.85rem;
  object-fit: contain;
  background-color: #f6f3ef;
  background-image:
    linear-gradient(45deg, #e6e0d8 25%, transparent 25%),
    linear-gradient(-45deg, #e6e0d8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e6e0d8 75%),
    linear-gradient(-45deg, transparent 75%, #e6e0d8 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
}

[data-collage-custom-icon-library][hidden],
[data-collage-custom-icon-limit][hidden] {
  display: none !important;
}

.collage-creator__deco-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.collage-creator__deco-cat {
  flex: 0 0 auto;
  min-height: 2rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.collage-creator__deco-cats .collage-creator__deco-cat.is-active,
.collage-creator__deco-cats .collage-creator__deco-cat[aria-selected="true"] {
  border-color: var(--color-commerce-action);
  background: var(--color-commerce-action);
  color: var(--color-bright);
}

.collage-creator__deco-cat:focus-visible,
.collage-creator__deco-option:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.collage-creator__deco-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  max-height: 16.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  min-width: 0;
}

.collage-creator__deco-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 0;
  min-height: 4.4rem;
  margin: 0;
  padding: 0.35rem 0.2rem 0.3rem;
  border: 1px solid var(--color-border);
  border-radius: var(--pdp-control-radius, var(--radius-sm));
  background: var(--color-raised-surface, #fff);
  color: var(--color-graphite);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-body);
}

.collage-creator__deco-option[hidden] {
  display: none !important;
}

.collage-creator__deco-option:hover {
  border-color: var(--color-commerce-action);
}

.collage-creator__deco-option svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--color-commerce-action);
  flex-shrink: 0;
}

.collage-creator__deco-option-label {
  display: -webkit-box;
  width: 100%;
  font-size: 0.62rem;
  line-height: 1.2;
  text-align: center;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (max-width: 767px) {
  .collage-creator__deco-cats {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .collage-creator__deco-grid,
  .collage-creator__deco-custom-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .collage-creator-panel,
  .collage-creator-panel .product-detail__fieldset {
    min-width: 0;
    max-width: 100%;
  }
}

.collage-creator__slot-chooser-backdrop {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(20, 20, 20, 0.28);
  pointer-events: none;
}

.collage-creator__slot-chooser {
  position: fixed;
  z-index: 130;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0.45rem;
  width: min(17rem, calc(100vw - 1rem));
  max-height: min(16.5rem, calc(100vh - 1rem));
  margin: 0;
  padding: 0.7rem 0.75rem 0.75rem;
  overflow: auto;
  background: var(--color-bright, #fff);
  color: var(--color-graphite, #2b2b2b);
  border: 1px solid var(--color-border, #e4ddd4);
  border-radius: var(--radius-sm, 0.4rem);
  box-shadow: 0 10px 28px rgba(43, 43, 43, 0.14);
  box-sizing: border-box;
}

.collage-creator__slot-chooser-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
}

.collage-creator__slot-chooser [data-collage-chooser-upload] {
  width: 100%;
  text-align: center;
}

.collage-creator__slot-chooser-section {
  margin: 0.1rem 0 0;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-graphite, #2b2b2b);
}

.collage-creator__chooser-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 8.4rem;
  overflow: auto;
}

.collage-creator__chooser-thumbs button {
  width: 3.15rem;
  height: auto;
  min-height: 3rem;
  padding: 0;
  border-radius: 0.3rem;
  overflow: visible;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.12rem;
  opacity: 1;
}

.collage-creator__chooser-thumb {
  position: relative;
  display: block;
  width: 100%;
  height: 3rem;
  border-radius: 0.25rem;
  overflow: hidden;
}

.collage-creator__chooser-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.collage-creator__chooser-usage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-height: 0.7rem;
  font-size: 0.56rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-deep-green, #245c38);
}

.collage-creator__chooser-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: var(--color-deep-green, #245c38);
  color: var(--color-bright, #fff);
  font-size: 0.42rem;
  line-height: 1;
  flex: 0 0 auto;
}

.collage-creator-panel {
  width: 100%;
  max-width: none;
  align-self: stretch;
  box-sizing: border-box;
  margin: 0 0 0.85rem;
  padding: 0;
  min-width: 0;
}

.collage-creator__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
}

.collage-creator__header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-top: 0.35rem;
  max-width: 100%;
}

.collage-creator__header .product-detail__other-size-toggle {
  margin-top: 0;
}

.collage-creator__catalog-back {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: inherit;
  text-decoration: none;
}

.collage-creator__catalog-back:hover,
.collage-creator__catalog-back:focus-visible {
  text-decoration: underline;
}

.collage-creator__nav-tab[hidden],
.collage-creator__layout[hidden],
.collage-creator__layout-merge[hidden],
.collage-creator__layout-presets[hidden],
.collage-creator__layout-confirm[hidden],
[data-collage-layout-format][hidden],
[data-collage-layout-problem][hidden] {
  display: none;
}

.collage-creator__layout {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
  min-width: 0;
}

.collage-creator__layout-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  min-width: 0;
}

.collage-creator__layout-heading .collage-creator__personalize-title {
  margin: 0;
}

.collage-layout__measure {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-muted);
  cursor: pointer;
}

.collage-layout__measure input {
  margin: 0;
}

.collage-measure__ruler[hidden],
.collage-measure__slot[hidden] {
  display: none !important;
}

.collage-measure__chrome {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}

.collage-creator.is-enlarged .collage-measure__chrome {
  visibility: hidden;
}

.collage-measure__ruler {
  position: absolute;
  min-width: 0;
  overflow: visible;
  color: var(--color-muted);
  font-size: 0.62rem;
  line-height: 1;
  pointer-events: none;
}

.collage-measure__tick {
  position: absolute;
  color: var(--color-muted);
}

.collage-measure__tick::before {
  content: "";
  position: absolute;
  background: currentColor;
  opacity: 0.55;
}

.collage-measure__ruler--x .collage-measure__tick {
  top: 0.1rem;
  transform: translateX(-50%);
}

.collage-measure__ruler--x .collage-measure__tick:first-child {
  transform: none;
}

.collage-measure__ruler--x .collage-measure__tick:last-child {
  transform: translateX(-100%);
}

.collage-measure__ruler--x .collage-measure__tick::before {
  left: 0;
  top: 0.75rem;
  width: 1px;
  height: 0.28rem;
}

.collage-measure__ruler--y .collage-measure__tick {
  left: 0;
  transform: translateY(-50%);
}

.collage-measure__ruler--y .collage-measure__tick:first-child {
  transform: none;
}

.collage-measure__ruler--y .collage-measure__tick:last-child {
  transform: translateY(-100%);
}

.collage-measure__ruler--y .collage-measure__tick::before {
  left: 0.85rem;
  top: 0;
  width: 0.28rem;
  height: 1px;
}

.collage-measure__slot {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  box-sizing: border-box;
}

.collage-measure__line {
  position: absolute;
  color: var(--color-graphite, #2b2b2b);
  font-size: 0.68rem;
  line-height: 1;
  background: rgba(252, 250, 246, 0.88);
}

.collage-measure__line--x {
  left: 8%;
  right: 8%;
  bottom: 0.2rem;
  height: 0;
  border-top: 1px solid currentColor;
  text-align: center;
}

.collage-measure__line--x span,
.collage-measure__line--y span {
  position: relative;
  top: -0.55rem;
  padding: 0 0.15rem;
}

.collage-measure__line--y {
  top: 12%;
  bottom: 18%;
  left: 0.15rem;
  width: 0;
  border-left: 1px solid currentColor;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
}

.collage-measure__badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 0.3rem);
  padding: 0.08rem 0.28rem;
  background: rgba(252, 250, 246, 0.92);
  color: var(--color-graphite, #2b2b2b);
  font-size: 0.68rem;
  line-height: 1.2;
  text-align: center;
}

.collage-layout-preset__size {
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  color: var(--color-muted);
}

.collage-creator__layout-actions,
.collage-creator__layout-merge,
.collage-creator__layout-confirm {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.collage-creator__layout-note,
.collage-creator__layout-merge p,
.collage-creator__layout-confirm p,
.collage-creator__layout-autosave {
  margin: 0;
  min-width: 0;
}

.collage-creator__layout-merge p {
  flex: 1 0 100%;
}

.collage-creator__layout-finish {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 1rem;
  margin-top: 0.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border);
}

.collage-creator__layout-autosave {
  max-width: 16rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  text-align: right;
  color: var(--color-muted);
}

.collage-layout__label-short {
  display: none;
}

.collage-creator__layout-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.collage-layout-preset {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  min-width: 5.5rem;
  min-height: 4.5rem;
  padding: 0.55rem 0.7rem;
}

.collage-layout-preset__icon {
  display: grid;
  width: 42px;
  height: 32px;
  gap: 3px;
  background: #fff;
}

.collage-layout-preset__icon i {
  display: block;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  border: 2px solid var(--color-commerce-action, #455747);
  background: rgba(69, 87, 71, 0.16);
  border-radius: 2px;
}

.collage-layout-preset__icon--columns-2,
.collage-layout-preset__icon--columns-3 {
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}

.collage-layout-preset__icon--rows-2,
.collage-layout-preset__icon--rows-3 {
  grid-auto-flow: row;
  grid-auto-rows: 1fr;
}

.collage-layout-preset__icon--grid-4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.collage-creator__hit-layer.is-layout-mode .collage-creator__slot-plus {
  display: none;
}

.collage-creator__slot-hit.is-layout-selected {
  outline: 2px solid var(--color-bright, #455747);
  outline-offset: -3px;
}

.collage-creator__slot-hit.is-layout-partner {
  outline: 2px dashed var(--color-bright, #455747);
  outline-offset: -3px;
}

.collage-creator__slot-hit.is-layout-dimmed {
  box-shadow: inset 0 0 0 999px rgba(252, 250, 246, 0.28);
}

.collage-layout-slot-badge {
  position: absolute;
  left: 0.2rem;
  right: 0.2rem;
  bottom: 0.2rem;
  padding: 0.05rem 0.25rem;
  background: rgba(252, 250, 246, 0.92);
  color: var(--color-graphite, #2b2b2b);
  font-size: 0.68rem;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
}

@media (min-width: 768px) {
  .collage-measure__badge {
    display: none;
  }
}

.collage-creator.is-measure .product-gallery__lightbox .collage-creator__print-fit,
.product-gallery__lightbox .collage-creator__print-fit {
  display: block;
}

.product-gallery__lightbox .collage-measure__ruler,
.product-gallery__lightbox .collage-measure__slot {
  display: none !important;
}

.collage-creator.is-measure .product-gallery__lightbox .collage-creator__canvas-wrap,
.product-gallery__lightbox .collage-creator__canvas-wrap {
  position: absolute;
  inset: 0;
  grid-column: auto;
  grid-row: auto;
  width: 100%;
  height: 100%;
}

@media (max-width: 767px) {
  .collage-measure__ruler,
  .collage-measure__line {
    display: none !important;
  }

  .collage-layout__label-full {
    display: none;
  }

  .collage-layout__label-short {
    display: inline;
  }

  .collage-creator.is-layout-mode {
    padding-bottom: 1rem;
  }

  .collage-creator__layout-finish {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .collage-creator__layout-autosave {
    max-width: none;
    text-align: left;
  }

  .collage-creator__layout-finish [data-collage-layout-done] {
    width: 100%;
  }

  .collage-creator__layout-actions,
  .collage-creator__layout-merge,
  .collage-creator__layout-presets,
  .collage-creator__layout-confirm,
  .collage-creator__layout-finish {
    scroll-margin-bottom: 5.75rem;
  }
}

.collage-creator__title {
  margin: 0;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-graphite, #2b2b2b);
}

.collage-creator__status {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--color-graphite, #2b2b2b);
}

.collage-creator__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.collage-creator__actions.is-reserved {
  visibility: hidden;
  pointer-events: none;
}

.collage-creator__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.collage-creator__btn[hidden] {
  display: none !important;
}

.collage-creator__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.collage-creator__btn:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.collage-creator__btn--primary {
  min-height: 2.4rem;
  padding: 0.45rem 0.95rem;
  border: none;
  background: var(--color-burgundy);
  color: var(--color-bright);
}

.collage-creator__btn--primary:hover:not(:disabled),
.collage-creator__btn--primary:focus-visible:not(:disabled) {
  background: var(--color-burgundy-dark);
  color: var(--color-bright);
}

.collage-creator__btn--secondary {
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--color-caramel);
  background: var(--color-bright);
  color: var(--color-caramel);
}

.collage-creator__btn--secondary:hover:not(:disabled),
.collage-creator__btn--secondary:focus-visible:not(:disabled) {
  background: var(--color-cream);
  border-color: var(--color-caramel);
  color: #8f6640;
}

.collage-creator__btn--tertiary {
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--color-border, #d4cfc4);
  background: #fff;
  color: var(--color-graphite, #2b2b2b);
  font-weight: 500;
}

.collage-creator__btn--destructive {
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-muted);
  font-weight: 500;
}

.collage-creator__btn--destructive:hover:not(:disabled),
.collage-creator__btn--destructive:focus-visible:not(:disabled) {
  color: var(--color-burgundy);
  background: var(--color-burgundy-soft);
  border-color: transparent;
}

.collage-creator__library-remove.collage-creator__btn--destructive,
.collage-creator__deco-custom-remove.collage-creator__btn--destructive {
  width: 1.35rem;
  height: 1.35rem;
  min-height: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
}

.collage-creator__view-tools .product-gallery__zoom.collage-creator__btn--tertiary {
  border: 1px solid var(--color-border, #d4cfc4);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-graphite, #2b2b2b);
  box-shadow: none;
}

.collage-creator__deco-size {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.75rem;
  color: var(--color-muted);
}

.collage-creator__deco-picker .collage-creator__btn--secondary {
  width: 100%;
}

@media (max-width: 767px) {
  .collage-creator__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .collage-creator__actions .collage-creator__btn--primary {
    grid-column: 1 / -1;
  }

  .collage-creator__actions--pair {
    display: flex;
  }

  .collage-creator__actions--pair .collage-creator__btn--primary {
    grid-column: auto;
    flex: 1 1 0;
  }

  .collage-creator__actions--pair .collage-creator__btn--tertiary {
    flex: 1 1 0;
  }
}

.collage-creator__font-option.collage-creator__btn--tertiary,
.collage-creator__deco-option.collage-creator__btn--tertiary,
.collage-template-browser__card.collage-creator__btn--tertiary {
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  font-weight: 500;
}

.collage-creator__font-option.collage-creator__btn--tertiary {
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-height: 2.75rem;
  border-radius: 0.45rem;
}

.collage-creator__deco-option.collage-creator__btn--tertiary {
  flex-direction: column;
  align-items: center;
  min-height: 4.4rem;
  padding: 0.35rem 0.2rem 0.3rem;
}

.collage-creator__deco-cat.collage-creator__btn--tertiary,
.collage-creator__font-chip.collage-creator__btn--tertiary {
  flex: 0 0 auto;
  white-space: nowrap;
}

.collage-template-browser__card.collage-creator__btn--tertiary {
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.45rem;
}

.collage-creator-panel__template {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  width: 100%;
}

.collage-creator__personalize {
  margin-top: 0.85rem;
}

.collage-creator__personalize-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--color-graphite, #2b2b2b);
}

.collage-creator__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  width: 100%;
  min-width: 0;
  margin: 0 0 0.65rem;
}

.collage-creator__nav-tab {
  appearance: none;
  flex: 1 1 calc(33.333% - 0.3rem);
  max-width: calc(33.333% - 0.15rem);
  min-width: 0;
  height: 40px;
  min-height: 38px;
  max-height: 42px;
  margin: 0;
  padding: 0 0.35rem;
  border: 1px solid var(--color-border, #d4cfc4);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-graphite, #2b2b2b);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

@media (min-width: 768px) {
  .collage-creator__nav {
    flex-wrap: nowrap;
  }

  .collage-creator__nav-tab {
    flex: 1 1 0;
    max-width: none;
  }
}

.collage-creator__nav-tab[aria-selected="true"] {
  background: var(--color-cream, #f6f2ea);
  border-color: var(--color-caramel, #a9794f);
  font-weight: 600;
}

.collage-creator__nav-tab:focus-visible {
  outline: 2px solid var(--color-caramel, #a9794f);
  outline-offset: 2px;
}

.collage-creator__category-panel {
  min-width: 0;
  max-width: 100%;
}

.collage-creator__category-note {
  margin: 0.55rem 0 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--color-muted, #6b645c);
}

.collage-creator__section-label {
  margin: 0 0 0.45rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--color-graphite, #2b2b2b);
}

.collage-creator__text-region-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
}

.collage-creator__text-region[aria-pressed="true"] {
  border-color: var(--color-caramel, #a9794f);
  background: var(--color-cream, #f6f2ea);
  font-weight: 600;
}

.collage-creator__deco-section + .collage-creator__deco-section {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border, #d4cfc4);
}

@media (max-width: 520px) {
  .collage-creator__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.collage-creator__actions--pair {
  margin-top: 0;
}

.collage-creator-panel__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-sm);
  width: max-content;
  max-width: 100%;
  margin-top: var(--space-sm);
}

.collage-creator-panel__tools > label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.collage-creator-panel > .product-detail__fieldset > .product-detail__margin-kind-label {
  margin-top: var(--space-sm);
}

.collage-template-browser {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.45);
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.collage-template-browser[hidden],
[data-collage-deco-picker][hidden],
.collage-creator__photo-toolbar[hidden],
.collage-creator__deco-toolbar[hidden],
.collage-creator__text-toolbar[hidden],
.collage-creator__category-panel[hidden],
.collage-creator__deco-section[hidden],
.collage-creator__text-regions[hidden],
[data-collage-photo-guidance][hidden],
[data-collage-text-empty][hidden],
[data-collage-filter-empty][hidden],
.collage-creator__swap-hint[hidden],
[data-collage-deco-limit][hidden],
.collage-creator__chooser[hidden],
.collage-creator__slot-chooser-backdrop[hidden],
[data-collage-chooser-library][hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .collage-creator__slot-chooser {
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100%;
    max-height: min(46vh, 22rem);
    border-radius: 0.85rem 0.85rem 0 0;
    padding-bottom: calc(0.85rem + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 28px rgba(43, 43, 43, 0.16);
  }
}

@media (min-width: 768px) {
  .collage-creator__slot-chooser-backdrop {
    display: none !important;
  }
}

.collage-template-browser__dialog {
  background: #fff;
  width: min(52rem, 100%);
  max-height: 88vh;
  overflow: auto;
  border-radius: 0.8rem 0.8rem 0 0;
  padding: 1rem;
}

.collage-template-browser__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.collage-template-browser__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.8rem;
}

.collage-template-browser__card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: left;
  border: 1px solid #ddd;
  background: #fff;
  padding: 0.45rem;
  cursor: pointer;
}

.collage-template-browser__card img {
  width: 100%;
  aspect-ratio: 7 / 5;
  object-fit: cover;
}

@media (min-width: 900px) {
  .collage-template-browser {
    align-items: center;
  }

  .collage-template-browser__dialog {
    border-radius: 0.8rem;
  }
}

@media (min-width: 1024px) {
  .product-detail--collage-template [data-standard-size-options] {
    flex-wrap: nowrap;
  }

  .product-detail--collage-template .product-detail__info {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
    position: sticky;
    top: calc(var(--header-height) + var(--space-md));
  }
}

@media (max-width: 1023px) {
  .product-detail--collage-template .product-detail__layout {
    display: flex;
    flex-direction: column;
  }

  .product-detail--collage-template .product-detail__gallery-column,
  .product-detail--collage-template .product-detail__gallery-column--collage,
  .product-detail--collage-template .product-detail__info,
  .product-detail--collage-template .product-detail__purchase-form {
    display: contents;
  }

  .product-detail--collage-template .product-detail__header {
    order: 1;
  }

  .product-detail--collage-template .collage-creator-stack {
    order: 2;
    width: 100%;
    max-width: 100%;
  }

  .product-detail--collage-template [data-wanted-examples],
  .product-detail--collage-template [data-wanted-creator] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .product-detail--collage-template .product-detail__purchase-config {
    order: 3;
  }

  .product-detail--collage-template .product-detail__gallery-column,
  .product-detail--collage-template .product-detail__gallery-column--collage,
  .product-detail--collage-template .collage-creator,
  .product-detail--collage-template .collage-creator__stage,
  .product-detail--collage-template .collage-creator__preview {
    width: 100%;
    max-width: 100%;
  }
}

.collage-creator__library {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 0;
  min-width: 100%;
  max-width: 100%;
  margin-top: 0.75rem;
}

.collage-creator__library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.collage-creator__library-title {
  margin: 0;
  font-size: var(--text-small, 0.9rem);
  font-weight: 600;
  color: var(--color-graphite, #2b2b2b);
}

.collage-creator__library-upload,
.collage-creator__slot-chooser [data-collage-chooser-upload] {
  flex: 0 0 auto;
}

.collage-creator__library-upload:disabled,
.collage-creator__slot-chooser [data-collage-chooser-upload]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.collage-creator__library-full {
  margin: 0;
  font-size: var(--text-small, 0.9rem);
  color: var(--color-graphite, #2b2b2b);
}

.collage-creator__library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.6rem, 1fr));
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
}

.collage-creator__library-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.collage-creator__library-thumb {
  display: block;
  aspect-ratio: 1;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--color-border, #e4ddd4);
  border-radius: 0.35rem;
  background: #f6f3ee;
}

.collage-creator__library-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collage-creator__library-usage {
  font-size: 0.72rem;
  line-height: 1.2;
  color: var(--color-muted, #6d655c);
}

.collage-creator__library-remove {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-graphite, #2b2b2b);
  font-size: 0.9rem;
  line-height: 1;
}

.collage-creator__upload-panel[hidden] {
  display: none !important;
}

.collage-creator__upload-panel {
  position: fixed;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 120;
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(24rem, calc(100vh - 6rem));
  overflow: auto;
  padding: 0.75rem 0.85rem;
  background: var(--color-bright, #fff);
  color: var(--color-graphite, #2b2b2b);
  border: 1px solid var(--color-border, #e4ddd4);
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(43, 43, 43, 0.12);
}

.collage-creator__upload-panel.is-minimized {
  width: min(18rem, calc(100vw - 1.5rem));
  max-height: none;
  overflow: hidden;
  padding: 0;
}

.collage-creator__upload-head,
.collage-creator__upload-collapsed {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.collage-creator__upload-mini {
  display: block;
  height: 0.28rem;
  overflow: hidden;
  border-radius: 999px;
  background: #efeae3;
}

.collage-creator__upload-mini > span {
  display: block;
  height: 100%;
  background: var(--color-graphite, #2b2b2b);
}

.collage-creator__upload-collapsed {
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.collage-creator__upload-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.collage-creator__upload-summary,
.collage-creator__upload-note,
.collage-creator__upload-file {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.collage-creator__upload-track {
  height: 0.4rem;
  margin-top: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: #efeae3;
}

.collage-creator__upload-track > span {
  display: block;
  height: 100%;
  background: var(--color-graphite, #2b2b2b);
}

.collage-creator__upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.collage-creator__upload-file strong {
  font-weight: 600;
}

@media (max-width: 767px) {
  .collage-creator__upload-panel {
    right: 0.5rem;
    left: 0.5rem;
    bottom: 4.75rem;
    width: auto;
  }
}


.product-detail--custom-poster .product-preview__photo-placeholder {
  z-index: 3;
}

.product-detail--custom-poster .product-preview__upload-empty {
  cursor: default;
}

.product-detail--custom-poster .product-preview__upload-empty:hover,
.product-detail--custom-poster .product-preview__photo-placeholder:hover .product-preview__upload-empty {
  background: transparent;
}

.product-preview__poster-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: auto;
  cursor: default;
  touch-action: pan-y;
  user-select: none;
}

.product-preview__poster-overlay.is-over-upload {
  cursor: pointer;
}

.product-preview__poster-overlay.is-grab {
  cursor: grab;
}

.product-preview__poster-overlay.is-grabbing {
  cursor: grabbing;
}
