/* PepPaws v16.170 — Phase 4 mobile product detail polish.
   Final mobile layer only; desktop product layout is intentionally preserved. */

@media (max-width: 900px) {
  body[data-page="product"] .mobile-purchase-bar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 18px));
    transition: opacity 180ms ease, transform 220ms ease;
  }

  body[data-page="product"] .mobile-purchase-bar.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

@media (max-width: 620px) {
  body[data-page="product"] .product-page {
    width: min(100% - 16px, 560px);
  }

  body[data-page="product"] .breadcrumb {
    margin: 10px 2px 9px;
    min-height: 24px;
    gap: 6px;
    font-size: 0.69rem;
  }

  body[data-page="product"] .product-detail__top {
    gap: 13px;
    border-radius: 18px;
    padding: 8px;
  }

  body[data-page="product"] .product-gallery {
    gap: 8px;
  }

  body[data-page="product"] .main-image {
    aspect-ratio: 1.18 / 1;
    max-height: 315px;
    border-radius: 16px;
    touch-action: pan-y;
  }

  body[data-page="product"] .gallery-arrow {
    width: 42px;
    height: 42px;
  }

  body[data-page="product"] .gallery-counter {
    right: 10px;
    bottom: 10px;
    min-height: 29px;
    padding: 5px 9px;
    font-size: 0.7rem;
  }

  body[data-page="product"] .hero-image-badges {
    top: 10px;
    left: 10px;
  }

  body[data-page="product"] .hero-image-badge--popular {
    display: none;
  }

  body[data-page="product"] .thumbnail-row {
    gap: 7px;
  }

  body[data-page="product"] .thumbnail {
    min-height: 64px;
    border-radius: 11px;
  }

  body[data-page="product"] .image-reference-note {
    display: none;
  }

  body[data-page="product"] .product-info {
    gap: 7px;
  }

  body[data-page="product"] .product-kicker-row { order: 1; }
  body[data-page="product"] .product-social-proof { order: 2; }
  body[data-page="product"] .product-info > h1 { order: 3; }
  body[data-page="product"] .product-primary-outcome { order: 4; }
  body[data-page="product"] .product-detail-price { order: 5; }
  body[data-page="product"] .product-price-support { order: 6; }
  body[data-page="product"] .product-hero-description { order: 7; }
  body[data-page="product"] .product-quick-benefits { order: 8; }
  body[data-page="product"] .purchase-box { order: 9; }
  body[data-page="product"] .product-hero-trust { order: 10; }
  body[data-page="product"] .mobile-purchase-bar { order: 11; }

  body[data-page="product"] .product-kicker-row .eyebrow {
    font-size: 0.66rem;
  }

  body[data-page="product"] .product-social-proof {
    min-height: 24px;
    gap: 7px;
    font-size: 0.73rem;
  }

  body[data-page="product"] .product-social-proof--empty {
    justify-content: flex-start;
  }

  body[data-page="product"] .product-social-proof__new {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    background: #fff7df;
    color: #8a6500;
    padding: 4px 8px;
    font-size: 0.68rem;
    font-weight: 900;
  }

  body[data-page="product"] .product-social-proof--empty a {
    color: #7f8796;
    text-decoration: none;
  }

  body[data-page="product"] .product-info h1 {
    font-size: clamp(1.64rem, 7.5vw, 1.9rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
  }

  body[data-page="product"] .product-primary-outcome strong {
    font-size: 0.96rem;
  }

  body[data-page="product"] .product-detail-price {
    margin-top: 2px;
  }

  body[data-page="product"] .product-detail-price strong {
    font-size: 1.82rem;
  }

  body[data-page="product"] .product-detail-price del,
  body[data-page="product"] .product-detail-price .price-discount {
    font-size: 0.72rem;
  }

  body[data-page="product"] .price-savings {
    margin-top: -2px;
    font-size: 0.68rem;
  }

  body[data-page="product"] .product-price-support {
    margin-top: 0;
    gap: 8px;
    font-size: 0.68rem;
  }

  body[data-page="product"] .product-hero-description {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.8rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  body[data-page="product"] .product-quick-benefits {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    margin-top: 2px;
    padding: 0;
  }

  body[data-page="product"] .product-quick-benefit {
    grid-template-columns: 23px minmax(0, 1fr);
    gap: 5px;
    align-items: center;
    min-width: 0;
    min-height: 48px;
    border-radius: 11px;
    padding: 7px 6px;
  }

  body[data-page="product"] .product-quick-benefit__icon {
    width: 23px;
    height: 23px;
    border-radius: 8px;
    font-size: 0.72rem;
  }

  body[data-page="product"] .product-quick-benefit strong {
    font-size: 0.68rem;
    line-height: 1.2;
  }

  body[data-page="product"] .product-quick-benefit small {
    display: none;
  }

  body[data-page="product"] .purchase-box {
    margin-top: 3px;
    border-radius: 14px;
    padding: 11px 10px;
  }

  body[data-page="product"] .purchase-availability-row {
    margin-bottom: 6px;
  }

  body[data-page="product"] .variant-fieldset {
    margin-top: 8px;
  }

  body[data-page="product"] .variant-fieldset legend {
    margin-bottom: 6px;
    font-size: 0.75rem;
  }

  body[data-page="product"] .variant-option__surface {
    min-height: 42px;
  }

  body[data-page="product"] .purchase-action-row {
    grid-template-columns: minmax(118px, 0.72fr) minmax(150px, 1.28fr);
    gap: 8px;
    align-items: end;
  }

  body[data-page="product"] .purchase-quantity-line {
    min-width: 0;
  }

  body[data-page="product"] .purchase-stock-note {
    grid-column: 1 / -1;
    order: 3;
    min-height: 24px;
    margin-top: -1px;
    font-size: 0.68rem;
  }

  body[data-page="product"] .detail-actions {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
  }

  body[data-page="product"] .purchase-submit {
    min-height: 48px;
    border-radius: 11px;
    font-size: 0.8rem;
  }

  body[data-page="product"] .shipping-motivation {
    margin-top: 7px;
    padding: 8px 9px;
  }

  body[data-page="product"] .product-hero-trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: visible;
    margin-top: 3px;
    padding: 9px 0 0;
  }

  body[data-page="product"] .product-hero-trust__item,
  body[data-page="product"] .product-hero-trust__item:nth-child(3) {
    min-width: 0;
    min-height: 51px;
    grid-template-columns: 27px minmax(0, 1fr);
    gap: 7px;
    border-left: 0;
    padding: 5px 8px;
  }

  body[data-page="product"] .product-hero-trust__item:nth-child(even) {
    border-left: 1px solid rgba(35, 49, 72, 0.08);
  }

  body[data-page="product"] .product-hero-trust__item:nth-child(n+3) {
    border-top: 1px solid rgba(35, 49, 72, 0.08);
  }

  body[data-page="product"] .product-hero-trust__item > i {
    width: 27px;
    height: 27px;
    font-size: 0.85rem;
  }

  body[data-page="product"] .product-hero-trust__item strong {
    font-size: 0.67rem;
  }

  body[data-page="product"] .product-hero-trust__item small {
    font-size: 0.57rem;
  }

  body[data-page="product"] .product-lower-content {
    gap: 27px;
    margin-top: 30px;
  }

  body[data-page="product"] .product-lower-section .detail-section-heading {
    margin-bottom: 15px;
  }

  body[data-page="product"] .product-lower-section .detail-section-heading h2,
  body[data-page="product"] .product-bundle-section .section-heading h2 {
    font-size: clamp(1.45rem, 7vw, 1.68rem);
    line-height: 1.06;
  }

  body[data-page="product"] .product-need-section,
  body[data-page="product"] .product-feature-evidence,
  body[data-page="product"] .product-decision-close {
    padding: 16px;
  }

  body[data-page="product"] .product-choice-guide,
  body[data-page="product"] .product-faq,
  body[data-page="product"] .product-feature-evidence,
  body[data-page="product"] .product-bundle-section {
    border-radius: 19px;
  }

  body[data-page="product"] .product-reviews--empty {
    display: block;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff 0%, #fff8fb 100%);
    padding: 22px 16px;
  }

  body[data-page="product"] .product-reviews-empty {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 8px;
    max-width: 440px;
    margin: 0 auto;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: center;
  }

  body[data-page="product"] .product-reviews-empty .eyebrow {
    justify-self: center;
  }

  body[data-page="product"] .product-reviews-empty__icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 16px;
    background: #fff0f5;
    color: #f24f6d;
    font-size: 1.25rem;
  }

  body[data-page="product"] .product-reviews-empty h2 {
    margin: 2px 0 0;
    color: var(--pd-ink, var(--text));
    font-size: 1.42rem;
    line-height: 1.08;
  }

  body[data-page="product"] .product-reviews-empty p {
    max-width: 330px;
    margin: 0;
    color: #697386;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.5;
  }

  body[data-page="product"] .mobile-purchase-bar {
    grid-template-columns: minmax(92px, 0.78fr) minmax(174px, 1.22fr);
    min-height: 66px;
    gap: 8px;
    padding: 7px 9px calc(7px + env(safe-area-inset-bottom));
  }

  body[data-page="product"] .mobile-purchase-summary strong {
    font-size: 0.92rem;
  }

  body[data-page="product"] .mobile-purchase-summary small {
    font-size: 0.67rem;
  }

  body[data-page="product"] .mobile-purchase-bar .btn {
    min-height: 46px;
    border-radius: 11px;
    padding-inline: 11px;
    font-size: 0.8rem;
  }
}

@media (max-width: 370px) {
  body[data-page="product"] .product-page {
    width: min(100% - 12px, 560px);
  }

  body[data-page="product"] .main-image {
    max-height: 292px;
  }

  body[data-page="product"] .product-quick-benefits {
    grid-template-columns: repeat(3, minmax(94px, 1fr));
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 4px;
  }

  body[data-page="product"] .product-quick-benefit {
    scroll-snap-align: start;
  }

  body[data-page="product"] .purchase-action-row {
    grid-template-columns: 116px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="product"] .mobile-purchase-bar {
    transition: none;
  }
}
