/* Paper Boy Biz theme: single product. Source: handoff css/pages/product-3-1-8-thermal-paper-rolls-220-ft.css
   Breakpoints (mobile-first, min-width): mobile < 768px, tablet 768-1023px,
   desktop >= 1024px. Tokens that change per breakpoint live in tokens.css.

   Shared template: these rules are identical for 8 other page(s)
   that use the same WordPress template:
     product-2-1-4-thermal-paper-rolls-74-ft.html
     product-3-inch-165-ft-bond-paper-rolls.html
     product-3-x-95-carbonless-paper-rolls-white-canary-2-ply.html
     product-cr80-card-reader-cleaning-cards-40-pack.html
     product-epson-erc-printer-ribbon.html
     product-monthly-subscription-2-1-4-thermal-paper-rolls.html
     product-monthly-subscription-3-1-8-thermal-paper-rolls.html
     product-monthly-subscription-3-x-95-carbonless-paper-rolls.html
   In the theme, enqueue ONE stylesheet per template (not per page) so the
   rules are maintained in one place.
   ========================================================================== */

/* ==========================================================================
   Page: Single product (product-*.html → woocommerce/single-product.php)
   Gallery · summary (badge, title, price, short description, pack-size
   options, quantity, Add to Cart, assurance, meta) · tabs · related.
   Breakpoints: mobile < 768 · tablet 768–1023 · desktop >= 1024
   ========================================================================== */

.product-top { padding-block: var(--space-4); }
.product-layout { display: grid; gap: var(--space-6); }

/* Gallery */
.gallery { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.gallery__main {
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  border: var(--border-width) solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg);
}
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumbs { display: flex; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.gallery__thumb {
  width: 72px; height: 72px; padding: var(--space-1);
  border: var(--border-width) solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-bg);
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumb[aria-current="true"] { border: 2px solid var(--color-primary); }

/* Summary */
.product-summary { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.product-summary .badge { align-self: flex-start; }
.product-summary__title { font-size: var(--fs-h2); margin: 0; }
.product-form { display: flex; flex-direction: column; gap: var(--space-4); padding-block: var(--space-4); border-block: var(--border-width) solid var(--color-border); }
.product-summary__range { margin: calc(var(--space-3) * -1) 0 0; font-size: var(--fs-small); color: var(--color-text-muted); }
.product-summary__short { margin: 0; color: var(--color-text-muted); }
.option-pill__note { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--color-success); margin-left: var(--space-1); }
.product-form__buy { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.product-form__add { flex: 1 1 220px; }

.product-assurance { display: flex; flex-direction: column; gap: var(--space-2); list-style: none; margin: 0; padding: 0; font-size: var(--fs-small); }
.product-assurance li { display: flex; align-items: center; gap: var(--space-2); }
.product-assurance .icon { color: var(--color-primary); }
.product-meta { list-style: none; margin: 0; padding: var(--space-3) 0 0; border-top: var(--border-width) solid var(--color-border); font-size: var(--fs-small); color: var(--color-text-muted); }
.product-meta span { font-weight: var(--fw-semibold); color: var(--color-text); }

/* Tabs */
.product-tabs { margin-top: var(--space-9); }
.product-tabs .prose h3 { font-size: var(--fs-h5); margin-top: var(--space-6); }
.product-info-table { max-width: 640px; }
.product-info-table th { width: 40%; }

/* Review form */
.review-form { max-width: 640px; margin-top: var(--space-5); }
.rating-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: var(--space-1); }
.rating-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-input label { cursor: pointer; color: var(--color-border-strong); width: var(--tap-target); height: var(--tap-target); display: inline-flex; align-items: center; justify-content: center; }
.rating-input label .icon { fill: currentColor; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: #B38600; }
.rating-input input:focus-visible + label { box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

/* Related */
.related { margin-top: var(--space-9); }
.related h2 { font-size: var(--fs-h3); }

/* Mobile: sticky add-to-cart bar keeps the action in reach */
@media (max-width: 767px) {
  .product-form__buy {
    position: sticky; bottom: 0; z-index: 10;
    margin-inline: calc(var(--gutter) * -1); padding: var(--space-3) var(--gutter);
    background: var(--color-bg); border-top: var(--border-width) solid var(--color-border);
    box-shadow: 0 -4px 12px rgba(17, 19, 24, 0.06);
  }
  .product-form__buy .qty { height: 52px; }
}

/* Tablet */
@media (min-width: 768px) {
  .product-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-7); align-items: start; }
  .gallery__thumb { width: 84px; height: 84px; }
}

/* Desktop */
@media (min-width: 1024px) {
  .product-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--space-10); }
  .gallery { position: sticky; top: var(--space-4); }
  .product-summary__title { font-size: var(--fs-h1); }
}

/* Purchase option: one-time vs monthly subscription */
.purchase-type { display: flex; flex-direction: column; gap: var(--space-2); }
.purchase-type__opt {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-3) var(--space-4); border: var(--border-width) solid var(--color-border-strong); border-radius: var(--radius-sm);
  cursor: pointer; background: var(--color-bg);
}
.purchase-type__opt input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--color-primary); flex: none; }
.purchase-type__opt:has(input:checked) { border: 2px solid var(--color-primary); padding: calc(var(--space-3) - 1px) calc(var(--space-4) - 1px); background: var(--color-badge-bg); }
.purchase-type__body { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); flex: 1; font-size: 0.9375rem; }
.purchase-type__tag { display: inline-flex; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--color-action); border: 1px solid var(--color-action-border); font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.purchase-type__price { margin-left: auto; font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.price__unit { font-family: var(--font-body); font-size: 0.875rem; font-weight: var(--fw-semibold); color: var(--color-text-muted); margin-left: var(--space-1); }
.product-sub-note { display: flex; gap: var(--space-2); align-items: center; margin: 0; font-size: var(--fs-small); }
