.product-selection {
  padding: 7rem 0 8rem;
  background: var(--lux-paper, #faf8f4);
}

.product-selection-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.52fr);
  gap: 5rem;
  align-items: end;
}

.product-selection-heading h2 {
  margin-top: 0.8rem;
  color: var(--lux-ink, #211d1c);
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: 0.94;
}

.product-selection-heading p {
  max-width: 32rem;
  padding-bottom: 0.35rem;
  color: var(--lux-muted, rgba(33, 29, 28, 0.64));
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.9;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
  margin-top: 4.5rem;
}

.product-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--lux-line, rgba(33, 29, 28, 0.15));
  background: var(--lux-ivory, #f1ede6);
}

.product-card-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #ebe6de;
  cursor: zoom-in;
}

.product-card-media::before {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 1;
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid rgba(250, 248, 244, 0.62);
  border-radius: 50%;
  color: var(--lux-ivory, #f1ede6);
  background: rgba(29, 27, 26, 0.48);
  content: '\2197';
  font-size: 1rem;
  opacity: 0;
  transform: translateY(0.35rem);
  transition: opacity 0.35s var(--lux-ease, cubic-bezier(0.19, 1, 0.22, 1)),
    transform 0.35s var(--lux-ease, cubic-bezier(0.19, 1, 0.22, 1));
}

.product-card-media::after {
  position: absolute;
  inset: 0.65rem;
  border: 1px solid rgba(250, 248, 244, 0.26);
  content: '';
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.product-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #ebe6de;
  transition: transform 0.7s var(--lux-ease, cubic-bezier(0.19, 1, 0.22, 1));
}

.product-card:hover .product-card-media img,
.product-card:focus-within .product-card-media img {
  transform: scale(1.025);
}

.product-card:hover .product-card-media::before,
.product-card:focus-within .product-card-media::before,
.product-card:hover .product-card-media::after,
.product-card:focus-within .product-card-media::after {
  opacity: 1;
}

.product-card:hover .product-card-media::before,
.product-card:focus-within .product-card-media::before {
  transform: translateY(0);
}

.product-card-body {
  display: flex;
  min-height: 10.5rem;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem 1.25rem 1.35rem;
}

.product-card-kicker {
  color: var(--lux-burgundy, #743f4c);
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.5;
  text-transform: uppercase;
}

.product-card h3 {
  margin: 0.45rem 0 0;
  color: var(--lux-ink, #211d1c);
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
  font-weight: 400;
  line-height: 1.05;
}

.product-card-link {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  gap: 0.7rem;
  margin-top: auto;
  padding: 0.6rem 0 0.25rem;
  border-bottom: 1px solid currentColor;
  color: var(--lux-ink, #211d1c);
  font-size: 0.64rem;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
  transition: gap 0.3s var(--lux-ease, cubic-bezier(0.19, 1, 0.22, 1)), color 0.3s ease;
}

.product-card-link:hover,
.product-card-link:focus-visible {
  gap: 1rem;
  color: var(--lux-burgundy, #743f4c);
}

.product-card-link:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 6px;
}

.luxury-gallery-dialog {
  width: min(94vw, 1180px);
  height: min(94svh, 920px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid rgba(241, 237, 230, 0.18);
  border-radius: 0;
  color: var(--lux-ivory, #f1ede6);
  background: #171314;
  box-shadow: 0 2rem 7rem rgba(14, 11, 10, 0.62);
  overflow: hidden;
}

.luxury-gallery-dialog::backdrop {
  background: rgba(14, 11, 10, 0.88);
  backdrop-filter: blur(8px);
}

.luxury-gallery-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  gap: clamp(1rem, 2vw, 1.5rem);
  padding: clamp(1.15rem, 3vw, 2.25rem);
}

.luxury-gallery-header,
.luxury-gallery-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

.luxury-gallery-stage {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
  min-height: 0;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
}

.luxury-gallery-kicker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.5rem;
  color: var(--lux-brass, #a78452);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.luxury-gallery-kicker::before {
  width: 1.7rem;
  height: 1px;
  background: currentColor;
  content: '';
}

.luxury-gallery-header h2 {
  margin: 0;
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 400;
  line-height: 1.1;
}

.luxury-gallery-header-side {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 1.15rem;
}

.luxury-gallery-header-copy {
  min-width: 0;
}

.luxury-gallery-header-meta {
  display: grid;
  justify-items: end;
  gap: 0.35rem;
  color: rgba(241, 237, 230, 0.58);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.luxury-gallery-header-meta strong {
  color: var(--lux-ivory, #f1ede6);
  font-size: 0.75rem;
  font-weight: 500;
}

.luxury-gallery-close,
.luxury-gallery-control {
  display: inline-grid;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(241, 237, 230, 0.32);
  border-radius: 50%;
  color: inherit;
  background: transparent;
  font-size: 1.15rem;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s var(--lux-ease, cubic-bezier(0.19, 1, 0.22, 1));
}

.luxury-gallery-close:hover,
.luxury-gallery-close:focus-visible,
.luxury-gallery-control:hover:not(:disabled),
.luxury-gallery-control:focus-visible:not(:disabled) {
  border-color: var(--lux-ivory, #f1ede6);
  background: rgba(241, 237, 230, 0.1);
}

.luxury-gallery-close:focus-visible,
.luxury-gallery-control:focus-visible,
.luxury-gallery-thumbnail:focus-visible {
  outline: 2px solid var(--lux-brass, #a78452);
  outline-offset: 4px;
}

.luxury-gallery-close:hover,
.luxury-gallery-control:hover:not(:disabled) {
  transform: translateY(-0.1rem);
}

.luxury-gallery-control:disabled {
  cursor: default;
  opacity: 0.32;
}

.luxury-gallery-figure {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: none;
  min-width: 0;
  min-height: 0;
  justify-self: stretch;
  gap: 0.75rem;
  margin: 0;
}

.luxury-gallery-image-frame {
  position: relative;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  width: auto;
  height: 100%;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  flex: none;
  place-items: center;
  justify-self: center;
  border: 1px solid rgba(241, 237, 230, 0.15);
  background: #ebe6de;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.luxury-gallery-image {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: none;
  object-fit: contain;
  background: #ebe6de;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.luxury-gallery-image.is-loaded {
  opacity: 1;
}

.luxury-gallery-image-status {
  position: absolute;
  inset: auto 1rem 1rem;
  color: rgba(29, 27, 26, 0.66);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.luxury-gallery-image-status[hidden] {
  display: none;
}

.luxury-gallery-count {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  color: rgba(241, 237, 230, 0.62);
  font-size: 0.72rem;
}

.luxury-gallery-caption {
  min-width: 0;
  overflow: hidden;
  color: rgba(241, 237, 230, 0.8);
  font-size: 0.72rem;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.luxury-gallery-footer {
  align-items: end;
  gap: 1.25rem;
}

.luxury-gallery-thumbnails {
  display: flex;
  flex: 1;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.25rem 0.15rem 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(241, 237, 230, 0.38) transparent;
}

.luxury-gallery-progress {
  position: relative;
  flex: 0 0 min(18vw, 10rem);
  height: 2px;
  margin-bottom: 0.55rem;
  background: rgba(241, 237, 230, 0.2);
}

.luxury-gallery-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--lux-brass, #a78452);
  transition: width 0.45s var(--lux-ease, cubic-bezier(0.19, 1, 0.22, 1));
}

.luxury-gallery-thumbnail {
  position: relative;
  flex: 0 0 5.6rem;
  height: 4.35rem;
  padding: 0;
  border: 1px solid rgba(241, 237, 230, 0.22);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0.58;
  overflow: hidden;
  transition: border-color 0.3s ease, opacity 0.3s ease, transform 0.3s var(--lux-ease, cubic-bezier(0.19, 1, 0.22, 1));
}

.luxury-gallery-thumbnail[aria-current='true'] {
  border-color: var(--lux-brass, #a78452);
  opacity: 1;
  transform: translateY(-0.2rem);
}

.luxury-gallery-thumbnail:hover {
  border-color: rgba(241, 237, 230, 0.82);
  opacity: 1;
}

.luxury-gallery-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.luxury-gallery-thumbnail-index {
  position: absolute;
  right: 0.35rem;
  bottom: 0.25rem;
  color: #fff;
  font-size: 0.57rem;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.product-selection-compact {
  padding-top: 6rem;
  padding-bottom: 7rem;
}

.product-selection-compact .product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1080px) {
  .product-grid,
  .product-selection-compact .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .product-selection {
    padding: 5.5rem 0 6rem;
  }

  .product-selection-heading {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .product-selection-heading h2 {
    font-size: 3.6rem;
  }

  .product-grid,
  .product-selection-compact .product-grid {
    margin-top: 3.2rem;
  }
}

@media (max-width: 620px) {
  .product-selection {
    padding: 5rem 0 5.5rem;
  }

  .product-selection-heading h2 {
    font-size: 3rem;
  }

  .product-grid,
  .product-selection-compact .product-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .product-card-body {
    min-height: 8.5rem;
  }

  .luxury-gallery-dialog {
    width: 100vw;
    height: 100svh;
    max-width: none;
    margin: 0;
    border-right: 0;
    border-left: 0;
  }

  .luxury-gallery-shell {
    grid-template-rows: auto auto auto;
    align-content: start;
    gap: 0.9rem;
    padding: 1rem;
  }

  .luxury-gallery-header {
    min-width: 0;
    overflow: hidden;
    align-items: flex-start;
  }

  .luxury-gallery-header h2 {
    max-width: 12rem;
    font-size: 1.65rem;
  }

  .luxury-gallery-header-side {
    gap: 0.35rem;
  }

  .luxury-gallery-header-meta {
    display: none;
  }

  .luxury-gallery-stage {
    height: auto;
    align-items: start;
    gap: 0.5rem;
  }

  .luxury-gallery-figure {
    grid-template-rows: auto auto;
    height: auto;
    gap: 0.55rem;
  }

  .luxury-gallery-image-frame {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .luxury-gallery-footer {
    display: block;
  }

  .luxury-gallery-thumbnails {
    margin-top: 0.4rem;
  }

  .luxury-gallery-progress {
    width: 100%;
    margin: 0.55rem 0 0;
  }

  .luxury-gallery-control {
    width: 2.35rem;
    height: 2.35rem;
    align-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card-media img,
  .product-card-link,
  .product-card-media::before,
  .product-card-media::after,
  .luxury-gallery-image,
  .luxury-gallery-thumbnail,
  .luxury-gallery-close,
  .luxury-gallery-control,
  .luxury-gallery-progress span {
    transition: none;
  }
}
