/* Single product page additions: swatches, savings line, delivery estimate, payment methods. */

/* Variation swatches (the native select stays in the DOM for WooCommerce) */
.variations--swatches tbody { grid-template-columns: minmax(0, 1fr); }
.swatches__select { display: none !important; }
.swatches { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.swatches__chosen { margin-left: 0.4rem; font-weight: 500; color: var(--color-muted); }
.swatches__chosen:not(:empty)::before { content: "\2013\00a0"; }
.swatch { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; min-width: 2.75rem; min-height: 2.75rem; padding: 0.35rem 1rem; border: 2px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); font: inherit; font-weight: 600; cursor: pointer; }
.swatch:hover:not(:disabled) { border-color: var(--color-primary); }
.swatch.is-selected { border-color: var(--color-primary); background: var(--color-primary-soft); color: var(--color-primary-dark); }
.swatch:disabled { color: var(--color-muted); background: var(--color-bg); cursor: not-allowed; overflow: hidden; }
.swatch:disabled::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1px), var(--color-muted) 50%, transparent calc(50% + 1px)); }
.swatch__dot { width: 1.1rem; height: 1.1rem; border: 1px solid rgba(0, 0, 0, 0.25); border-radius: 50%; }

/* Savings line */
.price-save { margin: calc(var(--space-2) * -1) 0 var(--space-3); color: var(--color-sale); font-weight: 700; font-size: var(--text-sm); }
.price-save[hidden] { display: none; }

/* Delivery estimate */
.product-delivery { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0 0 var(--space-3); font-size: var(--text-sm); }
.product-delivery .icon { flex: none; margin-top: 0.1rem; color: var(--color-accent); }
.product-delivery__body p { margin: 0; }
.product-delivery__ship, .product-delivery__from { color: var(--color-muted); }
.product-delivery__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.9rem; margin-top: 0.15rem !important; }
.product-delivery__meta a, .product-delivery__change { padding: 0; border: 0; background: none; font: inherit; color: var(--color-muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.product-delivery__country { max-width: 14rem; padding: 0.3rem 0.5rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); font: inherit; color: var(--color-text); }

/* Payment methods */
.product-payments { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 var(--space-3); padding: 0; }
.product-payments li { padding: 0.2rem 0.65rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-muted); font-size: 0.78rem; }

/* Rating prompt and sticky bar rating */
.product-rating-empty a { color: var(--color-muted); text-decoration: underline; }
.sticky-atc__rating { display: flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--color-muted); }
.sticky-atc__rating .star-rating { font-size: 0.8rem; }

/* Product sections: accordion in the summary column (native details) */
.product-sections { margin-top: var(--space-4); border-top: 1px solid var(--color-border); }
.product-section { border-bottom: 1px solid var(--color-border); }
.product-section__title { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 56px; padding: 0.75rem 0; font-family: var(--font-heading); font-weight: 800; font-size: var(--text-lg); cursor: pointer; list-style: none; }
.product-section__title::-webkit-details-marker { display: none; }
.product-section__title::after { content: "+"; flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--color-primary-soft); color: var(--color-primary-dark); font-size: 1.25rem; line-height: 1; }
.product-section[open] > .product-section__title::after { content: "\2013"; background: var(--color-primary); color: #fff; }
.product-section__title:hover { color: var(--color-primary-dark); }
.product-section > .woocommerce-Tabs-panel { max-width: none; padding-bottom: var(--space-4); }
.policy-list { margin: 0 0 var(--space-3); padding-left: 1.2rem; display: grid; gap: var(--space-2); }
.policy-links { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: 0; font-weight: 600; }

/* Reviews section (below the tabs) */
.single-product div.product > .product-reviews { grid-column: 1 / -1; }
.product-reviews { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--color-border); }
.product-reviews__title { margin: 0 0 var(--space-4); font-size: var(--text-xl); }
.product-reviews__total { color: var(--color-muted); font-weight: 600; }
.product-reviews__layout { display: grid; gap: var(--space-4); align-items: start; }
.product-reviews .woocommerce-Reviews-title { display: none; }
.product-reviews #reviews { gap: var(--space-3); }
.product-reviews #reviews ol.commentlist { max-width: 46rem; }
#review_form_wrapper.is-collapsed { display: none; }
#review_form_wrapper { max-width: 46rem; padding: var(--space-4); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); }
@media (min-width: 860px) { .product-reviews.has-reviews .product-reviews__layout { grid-template-columns: 20rem minmax(0, 1fr); gap: var(--space-5); } }

/* Review summary */
.review-summary { display: grid; gap: var(--space-4); padding: var(--space-4); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); }
.review-summary__avg { margin: 0; font-family: var(--font-heading); font-weight: 900; font-size: 3rem; line-height: 1; }
.review-summary__count { margin: var(--space-1) 0 0; color: var(--color-muted); font-size: var(--text-sm); }
.review-summary__bars { list-style: none; display: grid; gap: 0.4rem; margin: 0; padding: 0; }
.review-summary__bars li { display: grid; grid-template-columns: 3.5rem 1fr 2rem; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.review-summary__bar { height: 0.6rem; border-radius: var(--radius-pill); background: var(--color-border); overflow: hidden; }
.review-summary__fill { display: block; height: 100%; width: 0; border-radius: inherit; background: #e0a100; }
.review-summary__n { color: var(--color-muted); text-align: right; }
.review-summary__cta { width: 100%; }

/* Quantity stepper */
.qty-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-surface); overflow: hidden; }
.qty-stepper .qty { width: 3rem; min-height: 46px; padding: 0; border: 0; border-radius: 0; text-align: center; background: transparent; appearance: textfield; -moz-appearance: textfield; }
.qty-stepper .qty::-webkit-outer-spin-button, .qty-stepper .qty::-webkit-inner-spin-button { appearance: none; margin: 0; }
.qty-stepper__btn { width: 2.75rem; border: 0; background: transparent; color: var(--color-text); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.qty-stepper__btn:hover { background: var(--color-primary-soft); }
.qty-stepper__btn:disabled { color: var(--color-muted); cursor: not-allowed; background: transparent; }

/* Title: smaller than the global h1 so price and button sit higher */
.summary .product_title { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); line-height: 1.15; }
.product-section, #review_form_wrapper, #reviews, .product-reviews { scroll-margin-top: 6rem; }

/* Option thumbnails on swatches */
.swatch--image { flex-direction: column; gap: 0.3rem; padding: 0.35rem 0.5rem 0.5rem; min-width: 4.25rem; font-size: var(--text-sm); }
.swatch__img { display: block; width: 3.25rem; height: 3.25rem; border-radius: var(--radius-sm); object-fit: cover; background: var(--color-tint); }

/* Size guide link */
.size-guide-link { margin: 0 0 var(--space-3); }
.size-guide-link__btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0; border: 0; background: none; color: var(--color-primary-dark); font: 600 var(--text-sm)/1.2 var(--font-body); text-decoration: underline; cursor: pointer; }
.size-guide-link__btn .icon { width: 1.1rem; height: 1.1rem; }
.variations--swatches th { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.75rem; margin-bottom: var(--space-1); }
.variations--swatches th label { margin-bottom: 0; }

/* Reviews: the button that doubles as the infinite-scroll trigger. */
.reviews-more { display: block; margin: var(--space-4) auto 0; }

/* Message shown in place of the browser alert when adding without a valid selection. */
.variation-notice { margin: 0 0 var(--space-3); padding: 0.65rem 0.9rem; background: var(--color-primary-soft); color: var(--color-primary-dark); border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 600; }
.variation-notice[hidden] { display: none; }

/* Delivery, trust badges and payment methods share one quiet box under the buy buttons. */
.product-assurance { display: grid; gap: var(--space-3); margin: 0 0 var(--space-3); padding: var(--space-3); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); }
.product-assurance .product-delivery { margin: 0; padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-border); }
.product-assurance .product-trust { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; }
.product-assurance .product-trust li { gap: 0.4rem; }
.product-assurance .product-trust .icon { width: 1.1rem; height: 1.1rem; }
.product-assurance .product-payments { margin: 0; }
.product-assurance > :last-child:not(:only-child) { margin-bottom: 0; }
