/* The product page on phones, one view (owner, 16 Nov 2026, from his reference picture; Member 1's brief the same day).
   product.css is the frozen S3 port, pinned byte for byte by scripts/css-check.mjs, so the change lives here, loaded after it
   and after wishlist.css. Palette tokens only.

   Under 720 px only; nothing here reaches a wider screen, which stays as it was. The first view holds the photo, the title,
   the price, the colours, the heart and the buttons together: the photo takes the height that is left (product-view.tsx
   fitPhoto sets --pp-photo-h from the page's real heights; the estimate below is the first paint's), never taller than 4:5.
   Crop to fill, as the cards do. The heart and Share sit on the photo, the pair moves to the pinned bar, the facts sit
   above the colours, and "About this saree" is the first accordion row. The trail moves below the product. */
.pp-stagekeep, .pp-acc-about { display: none; }
/* Icons inside elements both widths share (owner, 17 Nov 2026): drawn on phones only. */
svg.pp-phi { display: none; }
@media (max-width: 719px) {
  .pp > .sc-wrap { display: flex; flex-direction: column; }
  .pp > .sc-wrap > .pp-grid { order: -1; }
  .pp-grid { gap: var(--ui-space-3); }

  /* The photo */
  .pp-gallery { position: relative; gap: 0; }
  .pp-track {
    aspect-ratio: auto;
    height: var(--pp-photo-h, calc(100svh - 430px));
    min-height: 200px;
    max-height: 125vw;
  }
  .pp-dots { display: none; }
  .pp-arrow { display: grid; opacity: 1; width: 44px; height: 44px; }
  .pp-arrow--prev { left: calc(var(--ui-space-3) - 4px); }
  .pp-arrow--next { right: calc(var(--ui-space-3) - 4px); }
  .pp-badges { max-width: calc(100% - 2 * var(--ui-space-3) - 52px); }
  .pp-stagekeep {
    display: grid; gap: 0; position: absolute; z-index: 2;
    top: calc(var(--ui-space-3) - 4px); right: calc(var(--ui-space-3) - 4px);
  }
  .pp-stagekeep .pp-heart { position: relative; border: 0; }
  .pp-stagekeep .sc-share__btn {
    position: relative; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: var(--ui-radius-round);
    color: var(--ui-text);
  }
  /* The buttons on the photo (owner, 17 Nov 2026: "slightly big … decrease size"): a 36 px circle with an 18 px drawing,
     inside the same 44 px tap target. The circle is the button's ::before, so the target never shrinks. */
  .pp-stagekeep .pp-heart, .pp-stagekeep .sc-share__btn, .pp-zoombtn, .pp-arrow {
    background: transparent; box-shadow: none; isolation: isolate;
  }
  .pp-stagekeep .pp-heart:hover, .pp-stagekeep .sc-share__btn:hover, .pp-zoombtn:hover, .pp-arrow:hover { background: transparent; }
  .pp-stagekeep .pp-heart::before, .pp-stagekeep .sc-share__btn::before, .pp-zoombtn::before, .pp-arrow::before {
    content: ''; position: absolute; inset: 4px; z-index: -1; border-radius: var(--ui-radius-round);
    background: var(--ui-surface); box-shadow: var(--ui-shadow-sm);
  }
  .pp-stagekeep .pp-heart .sc-icon, .pp-stagekeep .sc-share__btn .sc-icon, .pp-zoombtn .sc-icon, .pp-arrow .sc-icon {
    width: 18px; height: 18px;
  }
  .pp-stagekeep .sc-share__btn > span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .pp-stagekeep .sc-share__menu { left: auto; right: 0; }
  .pp-head .pp-keep { display: none; }
  /* The zoom under Share, the count at the bottom right; the view's name is still announced, not drawn. */
  .pp-stage__over { display: contents; }
  .pp-zoombtn {
    position: absolute; z-index: 2; right: calc(var(--ui-space-3) - 4px); top: calc(var(--ui-space-3) - 4px + 2 * 44px);
    width: 44px; height: 44px; border-radius: var(--ui-radius-round);
  }
  .pp-role {
    position: absolute; z-index: 2; right: var(--ui-space-3); bottom: calc(10px + 15px);
    padding: 4px 10px; border-radius: var(--ui-radius-round); background: var(--ui-surface);
    font-variant-numeric: tabular-nums;
  }
  .pp-role [data-role-name] {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .pp-role small { margin: 0; color: var(--ui-text); font-size: var(--ui-text-xs); font-weight: var(--ui-weight-strong); }
  /* The thumbnails: a strip over the photo's bottom edge, beside the count. */
  .pp-thumbs {
    display: flex; position: absolute; z-index: 2; left: var(--ui-space-3); bottom: 10px; gap: 6px; padding: 2px;
    max-width: calc(100% - 2 * var(--ui-space-3) - 64px); overflow-x: auto; scrollbar-width: none;
  }
  .pp-thumbs::-webkit-scrollbar { display: none; }
  .pp-thumb {
    flex: 0 0 44px; height: 55px; aspect-ratio: auto; opacity: 1; border: 2px solid var(--ui-surface);
    border-radius: var(--ui-radius-sm); box-shadow: var(--ui-shadow-sm);
  }
  .pp-thumb[aria-current='true'] { border-color: var(--ui-accent); box-shadow: var(--ui-shadow-sm); }

  /* Under the photo (owner, 17 Nov 2026): title and code, the colour, the price, then the facts in one row */
  .pp-info { gap: var(--ui-space-2); }
  .pp-info > [data-avail] { margin-top: var(--ui-space-2); }
  .pp-head { gap: 2px; }
  .pp-title { font-size: var(--ui-text-lg); line-height: 1.2; }
  .pp-head { order: -4; }
  .pp-swatches { order: -3; }
  .pp-pricerow { order: -2; }
  .pp-facts { order: -1; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; }
  .pp-facts::-webkit-scrollbar { display: none; }
  .pp-fact {
    flex: none; white-space: nowrap; border-radius: var(--ui-radius-sm);
    display: inline-flex; align-items: center; gap: 6px;
  }
  svg.pp-phi { display: block; flex: none; }
  .pp-fact { padding-inline: 8px; }
  .pp-fact svg.pp-phi { width: 16px; height: 16px; color: var(--ui-accent); }
  .pp-badge svg.pp-phi { width: 14px; height: 14px; }
  .pp-badges .pp-badge { display: inline-flex; align-items: center; gap: 6px; }
  .pp-swatches { gap: var(--ui-space-2); }
  .pp-swatches__row {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: var(--ui-space-2);
    padding: 3px; margin: -3px;
  }
  .pp-swatches__row::-webkit-scrollbar { display: none; }
  .pp-sw { flex: none; }

  /* The pair lives in the bar; the in-page "in your cart" line and the WhatsApp enquiry stay. */
  .pp-actions [data-buy], .pp-actions [data-add], .pp-actions [data-resume] { display: none; }

  /* "About this saree": the first accordion row, closed. */
  .pp-info > .pp-about { display: none; }
  .pp-acc-about { display: block; margin-bottom: calc(-1 * var(--ui-space-2)); }
  /* Each row leads with its icon; the chevron keeps the far end, and only the chevron turns when a row opens. */
  .pp-acc .ui-acc__trigger { justify-content: flex-start; gap: var(--ui-space-3); }
  .pp-acc .ui-acc__trigger > svg:last-child { margin-inline-start: auto; }
  .pp-acc .ui-acc__trigger[aria-expanded] svg.pp-phi { transform: none; color: var(--ui-accent); }

  /* The bar: WhatsApp, Add to cart, Buy now, from the first paint. */
  .pp-bar { gap: var(--ui-space-2); }
  .pp-bar > .ui-btn {
    flex: 1 1 0; min-width: 0; min-height: 44px; padding-inline: var(--ui-space-2);
    white-space: normal; text-align: center; line-height: 1.2;
  }
  .pp-bar > .pp-bar__wa { flex: 0 0 44px; width: 44px; padding: 0; }
  .pp-bar--sold > .ui-btn { flex: 0 1 auto; padding-inline: var(--ui-space-3); }
}
/* A short phone screen (the browser bar showing): the heart, Share and zoom go side by side across the top, so the arrows at
   the photo's middle never meet them. */
@media (max-width: 719px) and (max-height: 760px) {
  .pp-stagekeep { display: flex; right: calc(var(--ui-space-3) - 4px + 44px); }
  .pp-zoombtn { top: calc(var(--ui-space-3) - 4px); }
  /* No photograph: no zoom, so the pair takes the corner. */
  .pp-stage:not(:has(.pp-zoombtn)) .pp-stagekeep { right: calc(var(--ui-space-3) - 4px); }
  .pp-badges { max-width: calc(100% - 2 * var(--ui-space-3) - 3 * 44px - var(--ui-space-2)); }
}
@media (prefers-reduced-motion: reduce) and (max-width: 719px) { .pp-bar { transition: none; } }
