/* Packs is intentionally a focused browse page: one clear choice of pack
   type, followed by the relevant live catalogue selection. */
.packs-page {
  background: #f7f5f0;
  min-height: 70vh;
  padding-top: clamp(2.5rem, 5vw, 4.75rem);
}

.packs-page-heading {
  margin: 0 auto;
  max-width: 92rem;
  padding: 0 clamp(1rem, 6vw, 7rem) clamp(2rem, 4vw, 3.5rem);
}

.packs-page-heading h1,
.gift-collection h2 {
  color: #211c18;
  font-family: Arial, sans-serif;
  font-size: clamp(1.7rem, 2.9vw, 3.1rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1;
  margin: 0;
  max-width: none;
}

.packs-page-tabs {
  display: grid;
  gap: clamp(.65rem, 1.2vw, 1rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(1.5rem, 2.7vw, 2.4rem);
  max-width: 70rem;
}

.packs-page-tabs button {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(33, 28, 24, .42);
  color: #211c18;
  cursor: pointer;
  display: flex;
  font: 700 clamp(.82rem, 1vw, .95rem)/1 Arial, sans-serif;
  justify-content: center;
  letter-spacing: .08em;
  min-height: clamp(4rem, 6vw, 5.25rem);
  padding: 1rem 1.15rem;
  text-transform: uppercase;
  transition: background 220ms ease, border-color 220ms ease, color 220ms ease, transform 220ms ease;
}

.packs-page-tabs button:hover,
.packs-page-tabs button:focus-visible {
  background: #e8e2d9;
  border-color: #211c18;
  outline: none;
}

.packs-page-tabs button[aria-selected="true"] {
  background: #211c18;
  border-color: #211c18;
  color: #faf7f1;
}

.packs-page .pack-collection,
.packs-page .simcha-collection,
.gift-collection {
  margin: 0;
}

.packs-page .pack-page-panel.is-revealing {
  animation: pack-panel-reveal 360ms cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes pack-panel-reveal {
  from { opacity: 0; transform: translateY(.65rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .packs-page .pack-page-panel.is-revealing { animation: none; }
  .packs-page-tabs button { transition: none; }
}

.packs-page .pack-collection {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.gift-collection {
  background: #f2eadc;
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 6vw, 7rem) clamp(4rem, 7vw, 6.5rem);
}

.gift-collection-heading {
  margin: 0 auto;
  max-width: 92rem;
}

.gift-collection-heading > div { max-width: 45rem; }

.gift-collection-heading > div > p:last-child {
  color: #665950;
  font-size: 1rem;
  line-height: 1.55;
  margin: 1rem 0 0;
  max-width: 34rem;
}

.gift-size-picker {
  align-items: center;
  border-bottom: 1px solid rgba(47, 36, 31, .18);
  border-top: 1px solid rgba(47, 36, 31, .18);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin: 0 auto;
  max-width: 92rem;
  padding: .85rem 0;
}

.gift-size-picker > span {
  color: #62564e;
  font-size: .69rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.gift-size-picker > div { display: flex; gap: .4rem; }

.gift-size-picker button {
  background: transparent;
  border: 1px solid rgba(47, 36, 31, .28);
  border-radius: 999px;
  color: #2f2521;
  cursor: pointer;
  font: 900 .76rem/1 Arial, sans-serif;
  min-height: 2.4rem;
  min-width: 2.6rem;
  padding: .55rem .8rem;
}

.gift-size-picker button:hover,
.gift-size-picker button:focus-visible,
.gift-size-picker button.is-active {
  background: var(--plum);
  border-color: var(--plum);
  color: #fff;
  outline: none;
}

.gift-pack-result {
  margin: clamp(1.5rem, 3vw, 2.5rem) auto 0;
  max-width: 92rem;
}

.gift-pack-card {
  background: #fffaf3;
  border: 1px solid rgba(47, 36, 31, .16);
  display: grid;
  gap: clamp(1.25rem, 3vw, 3rem);
  grid-template-columns: minmax(14rem, .8fr) minmax(0, 1.2fr);
  padding: clamp(1rem, 2.4vw, 2rem);
}

.gift-pack-art {
  align-items: end;
  background: radial-gradient(circle at 50% 28%, #fffdf7 0, #ece1ce 62%, #dfd1bb 100%);
  display: flex;
  gap: 0;
  justify-content: center;
  min-height: 16rem;
  overflow: hidden;
  padding: 1.25rem 1rem 0;
}

.gift-pack-art .product-image,
.gift-pack-art .product-bottle {
  filter: drop-shadow(0 .65rem .55rem rgba(44, 28, 18, .2));
  height: min(14rem, 78%);
  margin-left: clamp(-1.4rem, -2.1vw, -.25rem);
  max-width: 32%;
  object-fit: contain;
  transform: translateY(var(--gift-lift, 0));
  width: auto;
}

/* Keep the preview a bottle lineup even where a supplier image is delivered
   with a white studio canvas. Multiply removes that canvas against the warm
   stage without changing any catalogue card outside this preview. */
.gift-pack-art .product-image { mix-blend-mode: multiply; }

/* A small number of legacy generated scenes cannot be safely pixel-isolated.
   Fade their outer canvas inside the preview rather than exposing a hard
   rectangle behind the bottle. */
.gift-pack-art .product-image.gift-pack-opaque-source {
  -webkit-mask-image: radial-gradient(ellipse 38% 54% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 38% 54% at 50% 50%, #000 62%, transparent 100%);
}

.gift-pack-art .product-image.is-unavailable + .product-image-fallback {
  display: block;
  height: min(14rem, 78%);
  margin-left: clamp(-1.4rem, -2.1vw, -.25rem);
  max-width: 32%;
  width: 3rem;
}

.gift-pack-art .product-image-fallback::before {
  background: color-mix(in srgb, var(--bottle) 84%, #1f1814);
  border-radius: .18rem .18rem 0 0;
  content: "";
  height: 16%;
  left: 34%;
  position: absolute;
  top: -13%;
  width: 32%;
}

.gift-pack-art[data-gift-preview-count="12"] .product-image.is-unavailable + .product-image-fallback {
  height: min(8.8rem, 100%);
  margin: 0;
  width: 1.8rem;
}

.gift-pack-art .product-image:first-child,
.gift-pack-art .product-bottle:first-child { margin-left: 0; }
.gift-pack-art .product-image:nth-child(2n),
.gift-pack-art .product-bottle:nth-child(2n) { --gift-lift: -.75rem; }

/* A twelve-bottle gift needs a proper presentation case, not twelve squeezed
   thumbnails. Six bottle silhouettes per row keep the art square balanced and
   leave the accompanying copy unchanged. */
.gift-pack-art[data-gift-preview-count="12"] {
  align-content: end;
  display: grid;
  gap: .15rem .1rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  padding: .6rem .75rem .25rem;
}

.gift-pack-art[data-gift-preview-count="12"] .product-image,
.gift-pack-art[data-gift-preview-count="12"] .product-bottle {
  align-self: end;
  height: min(8.8rem, 100%);
  justify-self: center;
  margin: 0;
  max-width: 100%;
  transform: none;
  width: auto;
}

.gift-pack-copy { align-self: center; }
.gift-pack-copy .pack-hero-kicker { margin-bottom: .55rem; }
.gift-pack-copy h3 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 3.4vw, 3.6rem); font-weight: 500; letter-spacing: -.06em; line-height: .92; margin: 0; }
.gift-pack-copy > p { color: #65584f; font-size: .96rem; line-height: 1.5; margin: .9rem 0 1.3rem; max-width: 36rem; }
.gift-drink-type { align-items: center; display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 0; }
.gift-drink-type > span { color: #786b62; font: 900 .62rem/1 Arial, sans-serif; letter-spacing: .11em; margin-right: .2rem; text-transform: uppercase; }
.gift-drink-type button { background: transparent; border: 1px solid rgba(47, 36, 31, .26); color: #2f2521; cursor: pointer; font: 850 .65rem/1 Arial, sans-serif; letter-spacing: .06em; min-height: 2rem; padding: .45rem .65rem; text-transform: uppercase; }
.gift-drink-type button:hover, .gift-drink-type button:focus-visible, .gift-drink-type button.is-active { background: var(--plum); border-color: var(--plum); color: #fff; outline: none; }
.gift-pack-copy > .gift-pack-note { border-left: 2px solid #b28a42; color: #4f443d; font-size: .82rem; margin: .8rem 0 1.3rem; padding-left: .65rem; }
.gift-pack-note strong { color: #211c18; }
.gift-pack-meta { align-items: center; border-top: 1px solid rgba(47, 36, 31, .16); display: flex; gap: 1rem; justify-content: space-between; padding-top: .9rem; }
.gift-pack-meta strong { font-size: 1.25rem; }
.gift-pack-meta button { background: var(--ink); border: 1px solid var(--ink); color: #fff; cursor: pointer; font: 900 .68rem/1 Arial, sans-serif; letter-spacing: .09em; padding: .85rem 1rem; text-transform: uppercase; }
.gift-pack-meta button:hover, .gift-pack-meta button:focus-visible { background: var(--plum); border-color: var(--plum); outline: none; }

@media (max-width: 680px) {
  .packs-page { padding-top: 2rem; }
  .packs-page-heading { padding-left: 1rem; padding-right: 1rem; }
  .packs-page-heading h1 { font-size: clamp(1.8rem, 9vw, 2.6rem); }
  .packs-page-tabs { gap: .45rem; }
  .packs-page-tabs button { font-size: .64rem; letter-spacing: .055em; min-height: 3.75rem; padding-left: .3rem; padding-right: .3rem; }
  .gift-size-picker { align-items: flex-start; flex-direction: column; }
  .gift-pack-card { grid-template-columns: 1fr; }
  .gift-pack-art { min-height: 13rem; }
  .gift-pack-copy h3 { font-size: 2.35rem; }
  /* Keep the new pack tiles comfortably readable once the viewport no
     longer has room for the desktop three-column composition. */
  .packs-page .pack-page-grid { grid-template-columns: 1fr; }
}
