/* ==========================================================================
   enflowers.com — Product detail page module, version 2
   Variant: media hero with overlapping buy card (catalog-spread composition).
   Page-specific styles only (media hero, overlapping buy card, order form,
   info band, reviews, related products). Tokens, chrome, breadcrumb,
   active nav state, product-card, assurance-list and reviews components
   live in base.css.
   Load after base.css.
   ========================================================================== */

/* ---------- Media hero with overlapping buy card ---------- */

/* Mobile first: media and buy card stack, no overlap. From 56rem up the
   composition goes asymmetric — media zone ~7/12, buy card ~5/12 shifted
   left over the media zone's right edge. */
.pdp-hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md) var(--space-xxl);
  display: grid;
  /* minmax(0, …) so large thumbnail sources can't force the track wider
     than the viewport on small screens */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: start;
}

.pdp-hero-media {
  margin: 0;
  min-width: 0;
}

.pdp-hero-main {
  margin: 0;
}

/* Square frame on a paper-deep matte. Catalog images are ~750×818 portrait
   (aspect ~0.92), close to square, so object-fit: cover fills the frame
   with only a minor top/bottom crop; object-position favors the
   upper-middle where bouquet heads sit. */
.pdp-hero-frame {
  aspect-ratio: 1 / 1;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.pdp-hero-main figcaption {
  margin-top: 0.55rem;
  padding-left: 0.7rem;
  border-left: 2px solid var(--accent);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* More views — plain images in a horizontal row, no JS switching */
.pdp-hero-thumbs {
  list-style: none;
  margin: var(--space-md) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
}

.pdp-hero-thumbs li {
  aspect-ratio: 4 / 3;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xs);
}

.pdp-hero-thumbs img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Buy card — elevated, floats over the media zone's right edge on desktop */
.pdp-buy-card {
  position: relative;
  z-index: 2;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(28, 43, 35, 0.12);
  padding: var(--space-lg);
}

@media (min-width: 56rem) {
  .pdp-hero {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 0;
  }

  /* Keep the caption and thumbnail row clear of the overlapping card */
  .pdp-hero-main figcaption,
  .pdp-hero-thumbs {
    padding-right: 3.5rem;
  }

  .pdp-buy-card {
    margin-left: -3.5rem;
    margin-top: var(--space-lg);
  }
}

/* ---------- Buy card contents ---------- */

.product-tag {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin: 0 0 var(--space-sm);
}

.pdp-buy-card h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  margin: -0.25rem 0 var(--space-sm);
}

.product-meta .product-sku {
  margin: 0;
}

.product-cat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-cat-links a {
  display: inline-block;
  background: var(--paper-deep);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.26rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.product-cat-links a:hover {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent-deep);
}

.product-sku {
  margin: -0.25rem 0 var(--space-sm);
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.product-rating {
  font-size: 0.92rem;
  margin-bottom: var(--space-md);
}

.product-rating .stars {
  color: var(--accent);
  letter-spacing: 0.06em;
}

.product-rating strong {
  font-weight: 600;
}

.product-rating a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.product-rating a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem var(--space-sm);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-md);
}

.price-line .price {
  font-size: 1.9rem;
}

.price-currency {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

.price-note {
  flex-basis: 100%;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- Variant picker (hua.com-style vertical option list) ---------- */

.variant-picker {
  margin-bottom: var(--space-md);
}

.variant-picker-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.variant-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.variant-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.75rem 0.45rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  background: var(--card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.variant-option:hover {
  border-color: var(--ink);
  box-shadow: 0 2px 10px rgba(28, 43, 35, 0.1);
}

.variant-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 4px);
  flex-shrink: 0;
}

.variant-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.variant-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.variant-price {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.variant-option.is-current {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.variant-option.is-current .variant-price {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Order form (plain POST, no JS; card chrome comes from .pdp-buy-card) ---------- */

.order-form {
  margin-top: var(--space-md);
}

.form-field {
  margin-bottom: var(--space-md);
}

.form-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  transition: border-color 0.2s ease;
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--ink-soft); }

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-field textarea { resize: vertical; }

.field-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0.35rem 0 0;
}

.form-field-qty input { max-width: 7rem; }

.addon-picker {
  border: 1px solid var(--line);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-md) 0;
}

.addon-picker legend {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.addon-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.5rem 0;
  cursor: pointer;
}

.addon-option img {
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  border-radius: var(--radius);
}

.addon-option strong { margin-left: auto; white-space: nowrap; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--line);
  padding-top: var(--space-md);
}

.form-actions .btn-primary {
  border: 1px solid var(--accent);
  cursor: pointer;
}

.form-actions button.btn-text {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 0 0 2px;
  font-family: inherit;
  cursor: pointer;
}

.form-actions button.btn-text:hover {
  border-bottom-color: var(--accent);
}

/* Compact assurance list under the form (hairline-separated, ✓ marks) */
.product-assurance {
  margin: var(--space-lg) 0 0;
}

/* ---------- Info band: About · Delivery · Why enflowers ---------- */

.info-band {
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--space-xxl) 0;
}

.info-band-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  /* minmax(0, …) keeps tracks from growing past the container when
     content (e.g. brand slices) has a large intrinsic width */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl);
}

.info-col + .info-col {
  border-top: 1px solid var(--line-strong);
  padding-top: var(--space-xl);
}

@media (min-width: 56rem) {
  .info-band-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-lg);
  }

  .info-col + .info-col {
    border-top: none;
    padding-top: 0;
    border-left: 1px solid var(--line-strong);
    padding-left: var(--space-lg);
  }
}

.info-col h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  margin-bottom: var(--space-md);
}

.info-col p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.info-col strong { color: var(--ink); }

.delivery-more {
  margin-top: var(--space-md);
}

/* Spec list */
.spec-list {
  margin: var(--space-lg) 0 0;
  border-top: 1px solid var(--line-strong);
}

.spec-row {
  display: grid;
  gap: 0.2rem var(--space-lg);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 40rem) {
  .spec-row { grid-template-columns: 9rem 1fr; }
}

.spec-row dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.spec-row dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* Brand details — icon row from the ui/7.png brand board,
   shown at the end of the About column on every product. */
.brand-details {
  list-style: none;
  margin: var(--space-lg) 0 0;
  padding: var(--space-md) 0 0;
  border-top: 1px solid var(--line-strong);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm) var(--space-lg);
}

.brand-details li {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
}

.brand-details svg {
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
  color: var(--gold);
  margin-top: 0.1rem;
}

.brand-details span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--ink-soft);
}

@media (max-width: 32rem) {
  .brand-details {
    grid-template-columns: 1fr;
  }
}

/* Brand slices — panels cropped from the ui/11.png + ui/8.png brand boards.
   Designer layout: ONE band per page reassembling slices of the SAME
   original height (they were one row on the source board), then a
   connector line, then slice #6 as a full-bleed closing strip.
   Original pixel size only — the template keeps the band's natural width
   <= 1150 so nothing scales on desktop; #6 (1530px) breaks out to 100vw
   instead of scaling down. (max-width: 100% below is only a last-resort
   guard for narrow phones.) */
.brand-slices {
  grid-column: 1 / -1;
  min-width: 0; /* let the grid item shrink below the slices' intrinsic width */
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line);
  display: grid;
  gap: var(--space-md);
}

.brand-slices-title {
  margin: 0;
  text-align: center;
}

.bs-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  min-width: 0;
}

/* Connector line between the band and the full-bleed strip */
.bs-connector {
  margin: 0;
  font-family: Fraunces, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  text-align: center;
  color: var(--ink-soft);
}
.bs-connector::before,
.bs-connector::after {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 3rem;
  height: 1px;
  background: currentColor;
  opacity: .45;
  margin: 0 .9rem;
}

/* Full-bleed row: slice #6 (1530px) breaks out of the 1176px content
   column to full viewport width. At >= 1536px viewport it renders at its
   exact original size (max-width: none); below that it scales down to fit
   — the only alternative would be cropping, which is worse. */
.bs-row-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
/* 100vw includes the scrollbar width; keep it from creating a
   horizontal scrollbar when the bleed row is present. */
body {
  overflow-x: hidden;
}
.brand-slices .bs-row-bleed img {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}
@media (min-width: 96rem) {
  .brand-slices .bs-row-bleed img {
    max-width: none;
  }
}

.brand-slices img {
  max-width: 100%; /* narrow-phone guard only; never engages on desktop */
  min-width: 0; /* flex item: allow shrinking below intrinsic width */
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* Why order from enflowers — assurance themes as headed hairline items */
.why-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
}

.why-list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--line);
}

.why-list strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.why-list span {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- Reviews ---------- */

.product-reviews {
  padding: var(--space-xxl) 0 0;
}

.product-reviews .section-head {
  margin-bottom: var(--space-lg);
}

.product-reviews .reviews {
  border-top: none;
  padding-top: 0;
}

/* ---------- Related products ---------- */

.related-products {
  padding: var(--space-xxl) 0;
}

.related-products .section-head {
  margin-bottom: var(--space-lg);
}

.related-products .product-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 34rem) {
  .related-products .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 64rem) {
  .related-products .product-grid { grid-template-columns: repeat(4, 1fr); }
}
