/* JAMAIS VU catalog visual system
   One editorial rhythm for every product surface. Product pixels remain untouched;
   only the stage, scale, spacing and interaction framing are normalized. */
:root {
  --jv-photo-ivory: #F4F0E8;
  --jv-photo-ivory-deep: #EEE6DC;
  --jv-product-shadow: rgba(76, 45, 32, .16);
  --jv-grid-line: rgba(55, 15, 19, .10);
}

/* In-stock catalogue cards */
.product-grid {
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  outline-offset: 5px;
}

.product-image {
  flex: 0 0 auto;
  aspect-ratio: 4 / 5;
  min-height: 0;
  background: linear-gradient(145deg, var(--jv-photo-ivory) 0%, var(--jv-photo-ivory-deep) 100%) !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* The catalog SVGs already clip the original product photo. A restrained drop
   shadow gives the same grounded studio feeling as the Rare Beauty references. */
.product-image > .catalog-preview {
  transform: scale(.94);
  transform-origin: center center;
  filter: drop-shadow(0 8px 11px var(--jv-product-shadow)) !important;
}

/* Benefit's primary image is a transparent, hand-cut official product shot
   with its own very soft grounding shadow; do not stack another shadow or
   multiply the silver packaging against the stage. */
.product-card[data-id="80"] .product-image > .catalog-preview {
  transform: scale(.96);
  filter: none !important;
}

.product-meta {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  padding: 15px 3px 0;
}

.product-brand {
  min-height: 1.25em;
  margin-bottom: 7px;
}

.product-title {
  min-height: calc(1.18em * 2);
  margin-bottom: 8px;
  line-height: 1.18;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.product-kind {
  min-height: calc(1.35em * 2);
  margin-bottom: 7px;
  line-height: 1.35;
  display: flex;
  align-items: flex-start;
}

.product-sub {
  min-height: 30px;
  margin-bottom: 0;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

.product-price {
  min-height: 1.35em;
  margin-top: auto;
  padding-top: 12px;
}

.product-cart-button {
  flex: 0 0 auto;
  margin-top: 12px;
  min-height: 42px;
}

/* All request/discover/holiday/gift/limited/advent cards use the same rhythm. */
.order-grid {
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.order-card {
  height: 100%;
  min-width: 0;
}

.order-card-cover {
  flex: 0 0 auto;
  aspect-ratio: 4 / 5;
  background: linear-gradient(145deg, var(--jv-photo-ivory) 0%, var(--jv-photo-ivory-deep) 100%) !important;
  border: 0 !important;
  box-shadow: none !important;
}

.order-card-cover img {
  object-fit: contain;
  padding: 24px;
  mix-blend-mode: normal;
  filter: drop-shadow(0 8px 11px var(--jv-product-shadow));
}

.order-card-copy {
  min-height: 0;
  padding-top: 17px;
}

.order-card-brand {
  min-height: 1.25em;
  margin-bottom: 8px;
}

.order-card-title {
  min-height: calc(1.2em * 2);
  margin-bottom: 10px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.order-card-type {
  min-height: calc(1.5em * 2);
  margin-bottom: 0;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
}

/* The catalogue grid stays concise; full descriptions remain in the open card. */
.order-card-summary {
  display: none !important;
}

.order-card-purchase {
  flex: 1 1 auto;
  min-height: 112px;
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.order-card-status {
  min-height: 1.35em;
  margin-bottom: 7px;
}

.order-card-price {
  min-height: 1.35em;
  margin-bottom: 14px;
}

.order-card-price-note {
  min-height: 1.45em;
  margin-bottom: 12px;
}

.order-card-purchase .button {
  flex: 0 0 auto;
  min-height: 44px;
  margin-top: auto;
}

/* Keep image stages coherent in the open product card without recolouring the
   source photograph. Secondary images remain informational and natural. */
.product-modal .modal-gallery,
.product-modal .modal-image-wrap,
.order-modal .modal-gallery,
.order-modal .modal-image-wrap {
  background: linear-gradient(145deg, var(--jv-photo-ivory) 0%, var(--jv-photo-ivory-deep) 100%) !important;
}

.product-modal .modal-image-wrap > img,
.order-modal .modal-image-wrap > img {
  background: transparent !important;
  box-shadow: none !important;
}

.product-modal[data-product-id="80"] #modal-image {
  mix-blend-mode: normal !important;
  object-fit: contain;
  padding: 30px 48px;
}

@media (max-width: 900px) {
  .product-grid,
  .order-grid,
  .luxury-grid {
    grid-auto-rows: 1fr;
  }
}

@media (max-width: 600px) {
  .product-grid {
    gap: 28px 9px;
  }

  .product-meta {
    padding-top: 12px;
  }

  .product-image > .catalog-preview {
    transform: scale(.92);
  }

  .product-title {
    min-height: calc(1.18em * 2);
    font-size: 17px;
  }

  .product-kind,
  .product-sub {
    font-size: 9px;
  }

  .product-cart-button {
    min-height: 44px;
    padding-inline: 7px;
    font-size: 10px;
  }

  .order-card-cover img {
    padding: 12px;
  }

  .order-card-copy {
    padding-top: 13px;
  }

  .order-card-title {
    min-height: calc(1.2em * 2);
    font-size: 23px;
  }

  .order-card-type {
    min-height: calc(1.5em * 2);
    font-size: 12px;
  }

  .order-card-purchase {
    min-height: 106px;
  }

  .order-card-purchase .button {
    min-height: 44px;
    padding: 10px 7px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-image > .catalog-preview,
  .order-card-cover img {
    transition: none;
  }
}
