/* ============================================================
   ▶ START: COMPARISON PAGE (MASTER BLOCK)
   ============================================================
   SUMMARY: Styles for the comparison page (product.html) only, so
   no other page can change by accident. The shop's sand background
   and the save heart come from category.css (.cp-main, .cp-save).
   Here: the champagne page with gutter vines, the espresso damask
   panel with a gold foil ring all round, the photo,
   the words, the ivory store card and the buttons.
   Laptops (1025px+): photo left, words right.
   Tablets (768–1024px): same two columns, store rows put their
   button full width under the name.
   Phones (≤767px): photo on top, words under it.
   Buttons are slim (40px) with an invisible 44px tap zone.
   INSIDE: COMPARISON > Frame · COMPARISON > Photo + words ·
           COMPARISON > Store rows ·
           COMPARISON > Buttons · COMPARISON > Tablet ·
           COMPARISON > Phone
   ============================================================ */

/* ------------------------------------------------------------
   ▶ START: COMPARISON > Frame
   ------------------------------------------------------------
   SUMMARY: "Champagne Silk" page (Red Pill, 2026-11-22): soft
   champagne at the top fading to ivory at the bottom, so the page
   bridges the brown header and the white damask section below.
   The shop's damask (from .cp-main) is kept but fainter (7%).
   Bronze vines climb the left and right gutters (big on laptops,
   slim and softer on tablets and phones, like the Saved page).
   The dark panel is as wide as the shop's content can get,
   centered, with faint gold damask inside and a polished gold
   foil RING all the way round (it follows the rounded corners)
   plus a soft gold glow. The breadcrumb sits inside it.
   HOW THE RING WORKS: a 2px see-through border, then three
   background layers: damask + espresso fill only the inside
   (padding-box), the gold gradient fills under the border
   (border-box), so the gold shows only in the 2px edge.
   ------------------------------------------------------------ */
.pp-main {
  --cp-sand: linear-gradient(180deg, #efdfc2 0%, #f5ead6 55%, #faf4ea 100%);
  overflow: hidden; /* keeps the gutter vines from causing sideways scroll */
}
.pp-main::before {
  opacity: 0.07; /* the shop's damask, made fainter for this page */
}
.pp-main::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* --v = how wide the empty side gutter is (panel is 72rem wide) */
  --v: min(12rem, calc(max(var(--edge, 1.5rem), 50vw - 36rem) - 0.25rem));
  background:
    url(./images/patterns/vine-tall-bronze.webp) left calc(var(--v) - 13rem) top 1rem /
      13rem auto repeat-y,
    url(./images/patterns/vine-tall-bronze-mirror.webp) right calc(var(--v) - 13rem)
      top 6rem / 13rem auto repeat-y;
  opacity: 0.8;
}
/* Tablets and phones: thinner, softer vines in the slim side margin */
@media (max-width: 64em) {
  .pp-main::after {
    background:
      url(./images/patterns/vine-tall-bronze.webp) left calc(var(--edge, 1rem) - 6rem)
        top 2rem / 6rem auto repeat-y,
      url(./images/patterns/vine-tall-bronze-mirror.webp) right
        calc(var(--edge, 1rem) - 6rem) top 18rem / 6rem auto repeat-y;
    opacity: 0.55;
  }
}
.pp-wrap {
  padding: clamp(1.5rem, 1rem + 2vw, 3rem) var(--edge, 1.5rem) clamp(3rem, 2rem + 3vw, 4rem);
}
.pp {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(1.25rem, 0.75rem + 2vw, 2.5rem);
  border-radius: 1.5rem;
  color: var(--ivory-text);
  border: 2px solid transparent; /* the gold ring shows through here */
  background:
    url(./images/patterns/damask-gold.webp) repeat center top / 16rem auto padding-box,
    linear-gradient(180deg, #24170c, #140d07) padding-box,
    linear-gradient(
        135deg,
        #8a5a18,
        #f6d891 22%,
        #fff3cf 40%,
        #c9a15e 60%,
        #f6d891 80%,
        #8a5a18
      )
      border-box;
  background-blend-mode: soft-light, normal, normal;
  box-shadow:
    0 0 0 1px rgba(138, 90, 24, 0.35),
    0 0 2.5rem -0.5rem rgba(201, 161, 94, 0.45),
    0 1.75rem 3.5rem -1.75rem rgba(60, 36, 12, 0.55);
}
.pp[aria-busy="true"] {
  min-height: 30rem; /* holds the space while the product loads */
}
.pp--empty {
  max-width: 40rem;
  text-align: center;
}
.pp--empty .pp-desc {
  margin: 0 auto 1.5rem;
}
.pp-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s5);
  font: 500 var(--t-sm) var(--font-body);
  color: #cdbb9c;
}
.pp-crumbs a {
  color: inherit;
  text-decoration: none;
}
.pp-crumbs a:hover {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* ------------------------------------------------------------
   ■ END: COMPARISON > Frame
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   ▶ START: COMPARISON > Photo + words
   ------------------------------------------------------------
   SUMMARY: Photo left (a cream square tile; it scrolls away
   normally), words right. A product's own photo is shown whole
   (pp-photo--own); the "coming soon" category photo fills the
   square. Brand in small gold capitals, name in the site's
   Playfair headline, short line in Playfair italic, then the gold
   "Share this find" pill (its look is in style.css SHARE PANEL).
   ------------------------------------------------------------ */
.pp-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  align-items: start;
}
.pp-photo {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fcf3e2, #f0dfc0);
  box-shadow: 0 0 0 1px rgba(240, 207, 138, 0.35);
}
.pp-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pp-photo--own img {
  box-sizing: border-box;
  padding: 7%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.pp-brand {
  margin: 0;
  font: 600 var(--t-xs) / 1 var(--font-body);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e3bf7a;
}
.pp-name {
  margin: var(--s2) 0 var(--s3);
  font: 600 clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem) / 1.15 var(--font-head);
  letter-spacing: -0.01em;
  color: #fbf6ec;
}
.pp-desc {
  max-width: 34rem;
  margin: 0;
  font: italic 500 var(--t-body) / 1.6 var(--font-head);
  color: #e6d9c3;
}
.pp-share {
  margin-top: var(--s4);
}
.pp-h {
  margin: var(--s6) 0 var(--s3);
  font: 600 var(--t-lg) var(--font-head);
  color: #fbf6ec;
}
.pp-note {
  max-width: 40rem;
  margin: var(--s5) 0 0;
  font: 400 var(--t-sm) / 1.6 var(--font-body);
  color: #cdbb9c;
}
/* ------------------------------------------------------------
   ■ END: COMPARISON > Photo + words
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   ▶ START: COMPARISON > Store rows
   ------------------------------------------------------------
   SUMMARY: All stores sit in ONE calm ivory card, split by thin
   sand lines. Each row: round espresso bubble with the store's
   letter (or its logo), store name with "Checked …" under it, the
   price, and the "Buy at retailer" button on the right.
   Red Pill "price as the headline" (Zaid 2026-11-23): the price
   (.pp-price) is big, in the heading font (Playfair). Named grid
   areas keep the button in the last column even when a store has
   no price yet. The lowest-price row is lighter, has a thin gold
   bar on its left, a bronze price, and (2+ stores) a small
   "LOWEST PRICE" label in spaced capitals over the name.
   Logo bubble (pp-mark--logo): an ivory circle; the picture is
   shrunk to fit inside it whole (object-fit: contain), so a huge
   or odd-shaped logo is never cut off or squashed.
   ------------------------------------------------------------ */
.pp-offers {
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(180deg, #f8f0e1, #efe2c9);
  box-shadow: 0 0.875rem 2.125rem -1.375rem rgba(0, 0, 0, 0.9);
}
.pp-offer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "mark who price btn";
  align-items: center;
  gap: var(--s3) var(--s4); /* 16px between name, price and button */
  padding: 0.875rem 1.25rem;
  border-top: 1px solid #ddcdb2;
}
.pp-offer:first-child {
  border-top: 0;
}
.pp-offer.is-low {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.35));
  box-shadow: inset 3px 0 0 #c9a15e; /* thin gold bar on the left */
}
.pp-mark { grid-area: mark; }
.pp-o-who { grid-area: who; }
.pp-price {
  grid-area: price;
  font: 600 1.5rem / 1 var(--font-head);
  font-variant-numeric: lining-nums;
  color: var(--espresso);
  white-space: nowrap;
}
.pp-offer.is-low .pp-price {
  color: #7a5526;
}
.pp-mark {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  overflow: hidden;
  font: 600 1rem / 1 var(--font-body);
  font-style: normal;
  background: var(--espresso);
  color: #f3e6cf;
}
.pp-mark--logo {
  background: #fffaf1;
  box-shadow: inset 0 0 0 1px #ddcdb2;
}
.pp-mark--logo img {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 0.375rem; /* keeps the logo clear of the round edge */
  object-fit: contain;
}
.pp-o-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem var(--s2);
  min-width: 0;
}
.pp-o-who b {
  font: 600 1.0625rem var(--font-body);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.pp-o-who small {
  flex-basis: 100%;
  font: 500 var(--t-sm) var(--font-body);
  color: #5f5244;
}
.pp-low {
  flex-basis: 100%;
  font: 600 0.75rem var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #8a6430;
}
/* ------------------------------------------------------------
   ■ END: COMPARISON > Store rows
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   ▶ START: COMPARISON > Buttons
   ------------------------------------------------------------
   SUMMARY: Slim (40px) buttons with clean words, no arrows (Zaid
   2026-11-19). Plain = gold outline on espresso; pp-btn--gold =
   solid gold foil ("Browse Shop All" on the not-found message).
   Store buttons (.pp-offer .pp-btn): rounded espresso pills in the
   ivory card, all saying "Buy at retailer" and only as wide as
   those words (so the store name keeps room to stay on one line
   on laptops, Zaid 2026-11-23); same words = same width, so the
   rows line up. Full width on tablet and phone. The lowest-price
   store's pill is gold.
   An invisible zone (::after) makes each one a 44px tap target.
   ------------------------------------------------------------ */
.pp-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15rem; /* every store's button the same width */
  min-height: 2.5rem;
  padding: 0 var(--s4);
  border-radius: var(--s2);
  font: 600 var(--t-xs) var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  line-height: 1.25; /* a very long store name wraps to 2 lines */
  color: var(--gold-light);
  box-shadow: inset 0 0 0 1px rgba(227, 191, 122, 0.7);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.pp-btn::after {
  content: "";
  position: absolute;
  inset: -0.125rem 0; /* 40px tall + 2px each side = 44px tap zone */
}
.pp-btn:hover {
  background: rgba(240, 207, 138, 0.12);
}
.pp-btn--gold,
.pp-btn--gold:hover {
  background: linear-gradient(135deg, #f6d891, #c9a15e 55%, #a87a32);
  color: #140d07;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.pp-btn--gold:hover {
  filter: brightness(1.05);
}
.pp-offer .pp-btn {
  grid-area: btn;
  width: auto;
  padding-inline: 1.5rem;
  border-radius: 99rem;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
  font: 600 var(--t-md) var(--font-body);
  background: var(--espresso);
  color: #f3e6cf;
  box-shadow: none;
}
.pp-offer .pp-btn:hover {
  background: #3a2614;
}
.pp-offer .pp-btn--gold,
.pp-offer .pp-btn--gold:hover {
  background: linear-gradient(135deg, #f6d891, #c9a15e 55%, #a87a32);
  color: #140d07;
}
.pp-offer .pp-btn:focus-visible {
  outline-color: var(--espresso);
}
.pp-btn:focus-visible {
  outline: 2px solid #f6d891;
  outline-offset: 2px;
}
/* ------------------------------------------------------------
   ■ END: COMPARISON > Buttons
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   ▶ START: COMPARISON > Tablet
   ------------------------------------------------------------
   SUMMARY: 768–1024px (and phones). The words column is narrow,
   so each store row puts bubble · name · price on one line and the
   button full width under them. Small laptops up to 1120px (70em)
   stack the store rows the same way, so a store name like "Cedar
   Emporium" never breaks onto 2 lines beside a big price.
   pp-offers--stack: a product with a very long store name or a
   big price (product.js decides) stacks this way on EVERY screen,
   so a long name gets the room and nothing is squeezed.
   ------------------------------------------------------------ */
@media (max-width: 64em) {
  .pp-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
}
@media (max-width: 70em) {
  .pp-offer {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "mark who price" "btn btn btn";
  }
  .pp-offer .pp-btn {
    width: 100%;
  }
}
/* long store name or big price (product.js adds --stack): stack on every screen */
.pp-offers--stack .pp-offer {
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "mark who price" "btn btn btn";
}
.pp-offers--stack .pp-offer .pp-btn {
  width: 100%;
}
/* ------------------------------------------------------------
   ■ END: COMPARISON > Tablet
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   ▶ START: COMPARISON > Phone
   ------------------------------------------------------------
   SUMMARY: ≤767px. One column: photo on top (up to 24rem wide,
   centered), words under it. Tighter panel and store-row padding,
   and the price (1.25rem) moves onto its own line under the store
   name, so the name gets the full width and never breaks. Store
   names are 16px on phones so even a very long name stays short.
   ------------------------------------------------------------ */
@media (max-width: 47.9375em) {
  .pp-wrap {
    padding-inline: var(--s4);
  }
  .pp {
    border-radius: 1.25rem;
  }
  .pp-grid {
    grid-template-columns: 1fr;
  }
  .pp-photo {
    width: 100%;
    max-width: 24rem;
    margin-inline: auto;
  }
  .pp-desc {
    font-size: 1rem;
  }
  .pp-offers .pp-offer {
    gap: var(--s3);
    padding: var(--s3) var(--s4);
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "mark who" "mark price" "btn btn";
  }
  .pp-o-who b {
    font-size: 1rem;
  }
  .pp-price {
    font-size: 1.25rem;
  }
}
/* ------------------------------------------------------------
   ■ END: COMPARISON > Phone
   ------------------------------------------------------------ */

/* ============================================================
   ■ END: COMPARISON PAGE (MASTER BLOCK)
   ============================================================ */
