/* Layout of the first product illustrations in the archived Drink theme. */
.hero-gallery:has(.thumb:first-child[aria-current="true"]) .gallery-main::before,
.hero-gallery:has(.thumb:first-child[aria-current="true"]) .gallery-main::after {
  position: absolute;
  top: 7%;
  z-index: 1;
  display: grid;
  place-content: center;
  width: 20%;
  aspect-ratio: 1;
  border-radius: 50%;
  box-sizing: border-box;
  text-align: center;
  white-space: pre-line;
  pointer-events: none;
  font: 800 clamp(12px, 2.8vw, 19px)/1.05 'Libre Franklin', sans-serif;
}
.hero-gallery:has(.thumb:first-child[aria-current="true"]) .gallery-main::before {
  content: "WHOLE\a LEAF";
  left: 13%;
  color: #402845;
  border: 3px double #402845;
  background: #fff;
}
.hero-gallery:has(.thumb:first-child[aria-current="true"]) .gallery-main::after {
  content: "20 TEA\a BAGS";
  right: 13%;
  color: #fff;
  background: #422a49;
}
.pt-hib-card {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  container-type: inline-size;
  line-height: 1;
  color: #fff7e4;
  overflow: hidden;
  text-align: center;
}
.pt-hib-cover, .pt-hib-board {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.pt-hib-cover { background: #fbf8f8; }
.pt-hib-card .pt-hib-cover img.pt-hib-pouch {
  position: absolute; width: 73%; height: 90%; min-height: 0;
  left: -1%; bottom: 0; object-fit: contain; mix-blend-mode: multiply;
  transform: scale(1.22); transform-origin: 52% 70%;
}
.pt-hib-seal, .pt-hib-count {
  position: absolute; left: 5%; top: 8%; width: 19%; aspect-ratio: 1;
  display: grid; place-content: center; border-radius: 50%; color: #780b16;
  background: white; border: .7cqw double #780b16; font: 800 3.1cqw/1.05 Arial,sans-serif;
}
.pt-hib-count { left: 43%; color: #fff; border: none; background: #7e101e; font-size: 3.3cqw; }
.pt-hib-panels { position: absolute; inset: .7% .8% .7% 65.4%; display: grid; grid-template-rows: repeat(3,1fr); gap: 1.5%; }
.pt-hib-panels > span { border-radius: 1cqw; background: #801725; color: #fff6e9; display: grid; align-content: center; justify-items: center; font: 500 3.4cqw/1.15 'Libre Franklin',sans-serif; }
.pt-hib-panels i, .pt-hib-serve i { display: block; font: 500 8cqw/1 Georgia,serif; margin-bottom: 2cqw; }
.pt-hib-board {
  display: flex; flex-direction: column; align-items: center; justify-content: space-evenly;
  padding: 5%; background: #650914; color: #fff3d9; font: 500 4cqw/1.3 'Libre Franklin',sans-serif;
}
.pt-hib-board > b { font: 500 7cqw/1.08 Georgia,serif; }
.pt-hib-card .pt-hib-board img.pt-hib-pouch { width: 40%; height: 47%; min-height: 0; object-fit:contain; mix-blend-mode: normal; }
.pt-hib-board .pt-hib-detail { width: 48%; aspect-ratio: 1; border-radius: 50%; border: .65cqw solid #d4a775; background: #490812 url('/wp-content/uploads/pipitea-import/a6c77ed302caf75c307db91d.png') 50% 55% / 285% no-repeat; }
.pt-tea-thumbs .pt-hib-detail { background-image: none; background-color: #b54d53; }
.pt-hib-brew > span, .pt-hib-notes > span, .pt-hib-serve > span { padding: 3% 4%; border: .35cqw solid #d4a775; width: 88%; }
.pt-hib-notes > span { display: flex; justify-content: space-between; }
.pt-hib-serve { background: #e9a5b5; color: #450b19; }
.pt-hib-serve > span { border-color: currentColor; }
.pt-tea-thumbs .pt-hib-card { aspect-ratio: 1; width: 100%; }
@media (min-width: 768px) {
  .pt-tea-slide > .pt-hib-card { max-width: min(52svh,580px); margin: auto; }
}

/* Desktop purchase layout: give the physical pack more room while keeping the
   thumbnail strip within a laptop screen. The gallery remains sticky as the offer scrolls. */
@media (min-width: 1000px) {
  #MainContent .hero .hero-grid,
  #MainContent .pt-tea-hero {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    column-gap: clamp(32px, 3.6vw, 54px);
  }

  #MainContent .hero-gallery,
  #MainContent .pt-tea-gallery {
    container-type: inline-size;
    --pt-desktop-photo: min(calc(100cqi - 2px), clamp(360px, 100svh - 254px, 720px));
  }

  #MainContent .hero-gallery .gallery-main > img,
  #MainContent .pt-tea-gallery .pt-tea-slide > img {
    width: 100%;
    height: var(--pt-desktop-photo);
    min-height: 0;
    object-fit: contain;
  }

  #MainContent .pt-tea-stage .pt-tea-slide > .pt-hib-card {
    max-width: var(--pt-desktop-photo);
    height: var(--pt-desktop-photo);
  }

  #MainContent .pt-tea-stage .pt-hib-card:has(.pt-hib-cover) {
    max-width: none;
    aspect-ratio: auto;
  }

  #MainContent .pt-tea-stage .pt-hib-cover .pt-hib-pouch {
    width: min(91%, calc(var(--pt-desktop-photo) * 1.06));
    height: 106%;
    left: 32.5%;
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
  }

  #MainContent .hero-gallery:has(.thumb:first-child[aria-current="true"]) .gallery-main::before,
  #MainContent .hero-gallery:has(.thumb:first-child[aria-current="true"]) .gallery-main::after {
    width: calc(var(--pt-desktop-photo) * .2);
  }
  #MainContent .hero-gallery:has(.thumb:first-child[aria-current="true"]) .gallery-main::before {
    left: calc((100% - var(--pt-desktop-photo)) / 2 + var(--pt-desktop-photo) * .13);
  }
  #MainContent .hero-gallery:has(.thumb:first-child[aria-current="true"]) .gallery-main::after {
    right: calc((100% - var(--pt-desktop-photo)) / 2 + var(--pt-desktop-photo) * .13);
  }
}
