/* Product page purchase interface (Round 20 continuation). Uses the Market 1924 tokens (dark green, gold, warm ivory). */
.pdp-box { padding: 18px; }
.opt-group { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.opt-group > legend { font-size: 13px; font-weight: 700; padding: 0; margin-bottom: 8px; color: var(--ink); }
.opt-group > legend .opt-value { font-weight: 500; color: var(--ink-soft); }
.opt-list { display: flex; flex-wrap: wrap; gap: 10px; }

/* Color swatches: a visible circle (or the seller's own photo) plus the color name, so color is never the only cue. */
.swatch-btn { display: inline-flex; flex-direction: column; align-items: center; gap: 5px; width: 64px; padding: 6px 4px 5px; background: #fff; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font: inherit; color: var(--ink); position: relative; }
.swatch-btn:hover { border-color: var(--canopy); }
.swatch-btn:focus-visible, .size-btn:focus-visible, .qty-btn:focus-visible, .pdp-add:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.swatch { display: inline-block; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); flex: none; }
.swatch--light { border-color: rgba(0,0,0,.35); }
.swatch--img { object-fit: cover; }
.swatch--none { background: repeating-linear-gradient(45deg, #eee, #eee 4px, #fff 4px, #fff 8px); }
.swatch-btn .swatch { width: 34px; height: 34px; }
.swatch-name { font-size: 11.5px; line-height: 1.15; text-align: center; overflow-wrap: anywhere; max-width: 100%; }
.swatch-btn[aria-checked="true"] { border-color: var(--canopy); box-shadow: 0 0 0 2px var(--canopy); background: var(--canopy-tint); }
.swatch-btn[aria-checked="true"]::after { content: "\2713"; position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; background: var(--canopy); color: #fff; font-size: 12px; line-height: 20px; text-align: center; font-weight: 700; }
.swatch-btn[aria-disabled="true"], .size-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.swatch-btn[aria-disabled="true"] .swatch-name, .size-btn[aria-disabled="true"] { text-decoration: line-through; }

.size-btn { min-width: 48px; min-height: 44px; padding: 0 14px; background: #fff; border: 2px solid var(--line); border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); position: relative; }
.size-btn:hover { border-color: var(--canopy); }
.size-btn[aria-checked="true"] { border-color: var(--canopy); background: var(--canopy); color: #fff; }

.sel-summary { font-size: 13.5px; margin: 0 0 6px; color: var(--ink); min-height: 1.4em; }
.sel-summary strong { font-weight: 700; }
.stock-line { margin-bottom: 12px; }

/* Quantity stepper and Add to cart: compact, rectangular, same height. */
.buy-row { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; margin-top: 6px; }
.qty-stepper { display: inline-flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; height: 48px; }
.qty-btn { width: 44px; border: 0; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: var(--canopy-dark); font-family: inherit; }
.qty-btn:hover:not(:disabled) { background: var(--canopy-tint); }
.qty-btn:disabled { color: #b9b9b9; cursor: not-allowed; }
.qty-stepper input { width: 52px; border: 0; border-left: 1.5px solid var(--line); border-right: 1.5px solid var(--line); text-align: center; font: inherit; font-weight: 600; font-size: 15px; padding: 0; min-height: 0; height: auto; background: #fff; border-radius: 0; -moz-appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-add { flex: 1 1 180px; min-width: 150px; height: 48px; min-height: 48px; border-radius: 10px; padding: 0 22px; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.pdp-add:disabled, .pdp-add[aria-disabled="true"] { background: #c9cfc9; border-color: #c9cfc9; color: #fff; cursor: not-allowed; }
.pdp-msg { margin-top: 10px; padding: 10px 14px; border-radius: 8px; font-size: 13.5px; }
.pdp-msg--ok { background: var(--canopy-tint); color: var(--canopy-dark); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pdp-msg--err { background: #fdecea; color: #B14B32; }

.pdp-facts { margin-top: 16px; display: grid; gap: 10px; font-size: 13px; color: var(--ink-soft); }
.pdp-facts p { margin: 0; }
.pdp-facts strong { color: var(--ink); }

/* Gallery additions: thumbnails under the photo, click-to-zoom */
.gallery-main { cursor: zoom-in; }
.gallery-main:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.gallery-thumbs { flex-wrap: wrap; }
.gallery-thumb { padding: 0; }
.zoom-dialog { border: 0; padding: 0; max-width: min(96vw, 900px); width: 100%; background: transparent; }
.zoom-dialog::backdrop { background: rgba(0,0,0,.78); }
.zoom-dialog img { width: 100%; height: auto; max-height: 90vh; object-fit: contain; display: block; background: #fff; border-radius: 10px; }
.zoom-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; font-size: 22px; cursor: pointer; }

@media (max-width: 860px) {
  .swatch-btn { width: 60px; }
  .buy-row { flex-direction: row; }
  .pdp-add { flex-basis: 100%; }
  .qty-stepper { width: 100%; justify-content: space-between; }
  .qty-stepper input { flex: 1; }
}
@media (min-width: 861px) { .buy-row { flex-wrap: nowrap; } }
@media (prefers-reduced-motion: no-preference) { .swatch-btn, .size-btn { transition: border-color .12s, box-shadow .12s, background .12s; } }

/* Round 31: calmer product page */
.pdp-actions { display: flex; align-items: center; gap: 8px; flex: none; position: relative; }
.share-ctl { position: relative; }
.share-menu > summary { list-style: none; }
.share-menu > summary::-webkit-details-marker { display: none; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.share-btn:hover { border-color: var(--canopy); }
.share-btn:focus-visible, .share-item:focus-visible, .pdp-acc > summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.share-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 240px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: grid; gap: 2px; }
.share-item { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 14px; color: var(--ink); text-align: left; cursor: pointer; text-decoration: none; }
.share-item:hover { background: var(--canopy-tint); }
.share-manual { font-size: 11.5px; color: var(--ink-soft); padding: 4px 12px 0; }
.share-manual-input { margin: 0 8px 8px; width: calc(100% - 16px); font-size: 12px; }
.share-status.visible { position: static; width: auto; height: auto; clip: auto; display: block; font-size: 12.5px; color: var(--canopy-dark); padding: 4px 4px 0; }
@media (max-width: 520px) { .share-btn-text { display: none; } .share-btn { width: 40px; padding: 0; justify-content: center; } }

.pdp-delivery { margin-top: 16px; padding: 14px 16px; background: var(--canopy-tint); border-radius: 12px; font-size: 14px; }
.pdp-delivery-h { font-size: 14.5px; margin: 0 0 6px; display: flex; align-items: center; gap: 6px; }
.pdp-delivery-main { margin: 0 0 8px; color: var(--ink); }
.pdp-delivery-no { color: var(--clay); font-weight: 600; }
.pdp-delivery-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 4px 0 8px; }
.pdp-delivery-form label { display: block; font-size: 12.5px; color: var(--ink-soft); }
.pdp-delivery-form input { min-height: 40px; }
.pdp-delivery-note { margin: 0; font-size: 12.5px; color: var(--ink-soft); }

.pdp-about { margin: 8px 0 18px; max-width: 72ch; }
.pdp-sec-h { font-size: 18px; margin: 0 0 8px; }
.pdp-desc { font-size: 15px; line-height: 1.7; color: var(--ink); white-space: pre-line; }
.pdp-accs { max-width: 860px; margin: 8px 0 32px; border-top: 1px solid var(--line); }
.pdp-acc { border-bottom: 1px solid var(--line); }
.pdp-acc > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 12px 4px; font-weight: 700; font-size: 15px; cursor: pointer; }
.pdp-acc > summary::-webkit-details-marker { display: none; }
.pdp-acc > summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--ink-soft); line-height: 1; }
.pdp-acc[open] > summary::after { content: "\2212"; }
.pdp-acc-body { padding: 0 4px 16px; font-size: 14px; color: var(--ink-soft); line-height: 1.65; }
.pdp-acc-body p { margin: 0 0 10px; }
.pdp-acc-body .seller-trust { margin-top: 6px; }
.pdp-delivery-more { margin: 0 0 8px; font-size: 13px; color: var(--ink-soft); }
.pdp-delivery-more > summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.pdp-delivery-more p { margin: 4px 0; }
