/* ==========================================================
   EcoBen Store: single product page. Loaded only on is_product().
   ========================================================== */

.single-product .woocommerce-breadcrumb{ font-size:13px; color:var(--eb-ink-faint); margin:20px 0 18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.single-product .woocommerce-breadcrumb a{ color:var(--eb-ink-soft); }
.single-product .woocommerce-breadcrumb a:hover{ color:var(--eb-primary); }
.single-product .woocommerce-notices-wrapper:empty{ display:none; }

/* ---------- Top: gallery + summary ---------- */
.eb-product-top{ display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); gap:48px; align-items:start; margin-bottom:var(--eb-section); }
.single-product div.product .eb-product-top .woocommerce-product-gallery,
.single-product div.product .eb-product-top .summary{ float:none; width:auto; margin:0; }
.single-product div.product .onsale{ display:none; }

/* Gallery: a scroll-snap track (swipe on touch), thumbnails below */
.eb-gallery{ position:sticky; top:110px; display:flex; flex-direction:column; gap:12px; min-width:0; }
.eb-gallery__stage{ position:relative; background:var(--eb-paper); border:1px solid var(--eb-line); border-radius:var(--eb-radius-card); overflow:hidden; }
.eb-gallery__track{ display:flex; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory; scrollbar-width:none; overscroll-behavior-x:contain; aspect-ratio:1/1; }
.eb-gallery__track::-webkit-scrollbar{ display:none; }
.eb-gallery__slide{ flex:0 0 100%; margin:0; scroll-snap-align:start; scroll-snap-stop:always; cursor:zoom-in; }
.eb-gallery__slide img{ width:100%; height:100%; object-fit:contain; display:block; }
.eb-gallery__badge{ position:absolute; top:16px; left:16px; z-index:2; background:var(--eb-accent); color:#fff; font-size:12px; font-weight:600; padding:5px 12px; border-radius:999px; }
.eb-gallery__zoom{ position:absolute; bottom:14px; left:14px; z-index:2; width:40px; height:40px; border:0; border-radius:50%; background:rgb(255 255 255 / .92); box-shadow:0 1px 6px rgb(0 0 0 / .08); color:var(--eb-ink); display:inline-flex; align-items:center; justify-content:center; }
.eb-gallery__dots{ position:absolute; left:0; right:0; bottom:16px; display:none; justify-content:center; gap:6px; pointer-events:none; }
.eb-gallery__dot{ width:7px; height:7px; border-radius:50%; background:rgb(0 0 0 / .18); transition:width .2s,background .2s; }
.eb-gallery__dot.is-active{ width:20px; border-radius:99px; background:var(--eb-accent); }
.eb-gallery__thumbs{ display:flex; gap:10px; overflow-x:auto; scrollbar-width:none; }
.eb-gallery__thumb{ flex:0 0 76px; height:76px; padding:0; border:2px solid var(--eb-line); border-radius:var(--eb-radius); background:var(--eb-paper); overflow:hidden; transition:border-color .15s; }
.eb-gallery__thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.eb-gallery__thumb:hover{ border-color:var(--eb-ink-faint); }
.eb-gallery__thumb.is-active{ border-color:var(--eb-accent); }

/* Lightbox */
.eb-lightbox{ border:0; padding:0; width:100vw; height:100dvh; max-width:none; max-height:none; background:transparent; }
.eb-lightbox::backdrop{ background:rgb(0 0 0 / .88); }
.eb-lightbox[open]{ display:flex; align-items:center; justify-content:center; }
.eb-lightbox__img{ max-width:94vw; max-height:88dvh; object-fit:contain; }
.eb-lightbox .eb-iconbtn{ position:fixed; color:#fff; background:rgb(255 255 255 / .14); }
.eb-lightbox .eb-iconbtn:hover{ background:rgb(255 255 255 / .26); color:#fff; }
.eb-lightbox__close{ top:16px; right:16px; }
.eb-lightbox__nav--prev{ left:16px; top:50%; }
.eb-lightbox__nav--next{ right:16px; top:50%; }

/* ---------- Summary ---------- */
.single-product .summary .product_title{ font-weight:700; font-size:clamp(26px,2.6vw,34px); line-height:1.18; color:var(--eb-ink-strong); margin:0 0 10px; }
.eb-rating{ display:inline-flex; align-items:center; gap:8px; margin:0 0 14px; font-size:14px; color:var(--eb-ink-soft); }
.eb-rating:hover{ color:var(--eb-primary); }
.eb-rating .star-rating{ margin:0; font-size:14px; }
.eb-rating__num{ font-weight:700; color:var(--eb-ink-strong); }
.eb-rating__link{ text-decoration:underline; text-underline-offset:3px; text-decoration-color:var(--eb-line); }
.single-product .summary .woocommerce-product-details__short-description{ font-size:15.5px; line-height:1.65; color:var(--eb-ink-soft); }
.single-product .summary .woocommerce-product-details__short-description p{ margin:0 0 12px; }
.single-product .summary .woocommerce-product-details__short-description ul{ list-style:none; padding:0; margin:0 0 4px; display:grid; gap:8px; }
.single-product .summary .woocommerce-product-details__short-description li{ position:relative; padding-left:28px; }
.single-product .summary .woocommerce-product-details__short-description li::before{ content:""; position:absolute; left:0; top:3px; width:18px; height:18px; border-radius:50%; background:var(--eb-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23008000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat; }
.single-product .summary .woocommerce-product-details__short-description strong{ color:var(--eb-ink-strong); }

/* Benefits: compact two-column list under the buy box */
.eb-benefits{ display:grid; grid-template-columns:1fr 1fr; gap:4px 18px; list-style:none; margin:18px 0 0; padding:16px 18px; border-radius:var(--eb-radius-card); background:var(--eb-tint); }
.eb-benefit{ display:grid; grid-template-columns:30px 1fr; gap:0 10px; align-items:start; padding:6px 0; }
.eb-benefit__icon{ grid-row:span 2; width:30px; height:30px; border-radius:50%; background:var(--eb-paper); color:var(--eb-primary); display:inline-flex; align-items:center; justify-content:center; }
.eb-benefit__icon svg{ width:17px; height:17px; }
.eb-benefit__title{ font-size:14px; font-weight:700; color:var(--eb-ink-strong); line-height:1.3; }
.eb-benefit__text{ font-size:12.5px; line-height:1.4; color:var(--eb-ink-faint); }

/* Price card */
.eb-price-card{ border:1px solid var(--eb-line); border-radius:var(--eb-radius-card); padding:22px; margin:20px 0 14px; background:var(--eb-paper); box-shadow:var(--eb-shadow); }
.eb-price-row{ display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.single-product .eb-price-card .price{ margin:0; font-size:32px; font-weight:700; line-height:1; color:var(--eb-primary); }
.single-product .eb-price-card .price del{ font-size:16px; color:var(--eb-ink-faint); opacity:1; margin-right:6px; }
.single-product .eb-price-card .price ins{ text-decoration:none; }
.eb-save{ background:var(--eb-accent); color:#fff; font-size:12px; font-weight:600; padding:5px 10px; border-radius:999px; }
.eb-price-note{ margin:8px 0 0; font-size:13px; color:var(--eb-ink-faint); }

.single-product .eb-price-card form.cart{ margin:18px 0 0; display:flex; flex-wrap:wrap; gap:10px; }
.single-product .eb-price-card form.variations_form{ display:block; }
.single-product .eb-price-card .woocommerce-variation-add-to-cart{ display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }
.single-product .eb-price-card .quantity{ display:inline-flex; align-items:center; border:1px solid var(--eb-line); border-radius:var(--eb-radius); height:52px; margin:0; }
.single-product .eb-price-card .quantity .qty{ width:44px; min-height:0; height:100%; padding:0; border:0; box-shadow:none; text-align:center; font-weight:600; font-size:16px; background:none; -moz-appearance:textfield; appearance:textfield; }
.single-product .eb-price-card .quantity .qty::-webkit-inner-spin-button,
.single-product .eb-price-card .quantity .qty::-webkit-outer-spin-button{ -webkit-appearance:none; margin:0; }
.eb-qty__btn{ width:42px; height:100%; border:0; background:none; color:var(--eb-ink); display:inline-flex; align-items:center; justify-content:center; padding:0; }
.eb-qty__btn:hover{ color:var(--eb-primary); }
.single-product .eb-price-card button.single_add_to_cart_button.button{ flex:1; min-width:170px; height:52px; padding:0 18px; border-radius:var(--eb-radius); background:var(--eb-primary); color:#fff; font-weight:700; font-size:17px; border:0; transition:background .2s; }
.single-product .eb-price-card button.single_add_to_cart_button.button:hover{ background:var(--eb-primary-soft); }
.single-product .eb-price-card button.single_add_to_cart_button.button.disabled{ opacity:.55; }
.single-product .eb-price-card button.single_add_to_cart_button.loading{ opacity:.7; }
.eb-buy-now{ flex:1 0 100%; height:50px; border-radius:var(--eb-radius); border:0; background:var(--eb-accent); color:#fff; font-weight:600; font-size:16px; transition:background .2s; }
.eb-buy-now:hover:not(:disabled){ background:var(--eb-accent-deep); }
.eb-buy-now:disabled{ opacity:.5; }

/* Variations: label + button swatches (native select kept hidden for WooCommerce) */
.single-product .variations{ margin:0; border:0; }
.single-product .variations tr, .single-product .variations th, .single-product .variations td, .single-product .variations tbody{ display:block; background:none !important; border:0; padding:0; }
.single-product .variations th.label{ padding:0 0 8px; text-align:left; }
.single-product .variations th.label label{ font-size:14px; font-weight:600; color:var(--eb-ink-strong); }
.single-product .variations td.value select{ position:absolute; opacity:0; pointer-events:none; width:1px; height:1px; min-height:0; padding:0; }
.single-product .variations .reset_variations{ display:none !important; }
.eb-swatches{ display:flex; flex-wrap:wrap; gap:8px; }
.eb-swatch{ display:flex; flex-direction:column; align-items:flex-start; gap:2px; min-width:104px; padding:10px 14px; border:1.5px solid var(--eb-line); border-radius:var(--eb-radius); background:var(--eb-paper); color:var(--eb-ink-strong); font-size:15px; font-weight:600; line-height:1.25; text-align:left; transition:border-color .15s,background .15s; }
.eb-swatch:hover{ border-color:var(--eb-ink-faint); }
.eb-swatch.is-active{ border-color:var(--eb-accent); box-shadow:0 0 0 1px var(--eb-accent); background:var(--eb-tint); color:var(--eb-ink-strong); }
.eb-swatch__price{ font-size:13px; color:var(--eb-ink-faint); font-weight:400; }
.eb-swatch.is-active .eb-swatch__price{ color:var(--eb-primary); }
.single-product .single_variation .woocommerce-variation-price .price{ display:block; font-size:32px; font-weight:700; line-height:1; color:var(--eb-primary); margin:16px 0 0; }
.single-product .single_variation .price del{ font-size:16px; color:var(--eb-ink-faint); }
.single-product .single_variation .price ins{ text-decoration:none; }
.single-product .woocommerce-variation-availability:empty,
.single-product .woocommerce-variation-description:empty{ display:none; }
.single-product .single_variation_wrap .eb-save:not([hidden]){ display:inline-block; margin:8px 0 0; }

/* Delivery + trust */
.eb-delivery{ display:flex; align-items:center; gap:10px; margin-top:16px; padding-top:16px; border-top:1px solid var(--eb-line); font-size:14px; color:var(--eb-ink-soft); }
.eb-delivery__dot{ width:9px; height:9px; border-radius:50%; background:var(--eb-success); box-shadow:0 0 0 4px rgb(46 125 50 / .14); flex:0 0 auto; }
.eb-delivery.is-out .eb-delivery__dot{ background:var(--eb-danger); box-shadow:0 0 0 4px rgb(198 40 40 / .12); }
.eb-delivery strong{ color:var(--eb-ink-strong); }
.eb-trust{ display:flex; flex-wrap:wrap; gap:8px 18px; list-style:none; margin:0; padding:2px 4px; }
.eb-trust li{ display:inline-flex; align-items:center; gap:8px; font-size:13.5px; font-weight:500; color:var(--eb-ink-soft); }
.eb-trust svg{ color:var(--eb-primary); flex:0 0 auto; }

/* ---------- Below the fold ---------- */
.eb-product-desc{ margin:0 0 var(--eb-section); }
.eb-product-desc > :first-child{ margin-top:0; }
.single-product .related > h2,
.single-product .upsells > h2{ font-size:clamp(24px,2.6vw,30px); text-align:center; margin-bottom:24px; }
.single-product .related{ margin-bottom:var(--eb-section); }

/* ---------- Bought together ---------- */
.eb-together{ margin:0 0 var(--eb-section); }
.eb-together__title{ text-align:center; font-size:clamp(24px,2.6vw,30px); margin:0 0 20px; }
.eb-together__card{ display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:20px; background:var(--eb-paper); border:1px solid var(--eb-line); border-radius:var(--eb-radius-card); box-shadow:var(--eb-shadow); padding:20px; align-items:center; }
.eb-together__list{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:12px; }
.eb-together__item label{ display:grid; grid-template-columns:auto 64px 1fr; gap:10px; align-items:center; padding:10px; border:2px solid var(--eb-accent); border-radius:var(--eb-radius); height:100%; transition:opacity .2s,border-color .2s; }
.eb-together__item.is-off label{ border-color:var(--eb-line); opacity:.6; }
.eb-together__item input{ width:20px; height:20px; accent-color:var(--eb-accent); }
.eb-together__item img{ width:64px; height:64px; object-fit:contain; }
.eb-together__info{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.eb-together__name{ font-size:13.5px; font-weight:600; color:var(--eb-ink-strong); line-height:1.3; }
.eb-together__name em{ font-style:normal; font-weight:400; color:var(--eb-ink-faint); }
.eb-together__var{ font-size:12px; color:var(--eb-ink-faint); }
.eb-together__price{ font-size:14.5px; font-weight:700; color:var(--eb-primary); }
.eb-together__summary{ display:flex; flex-direction:column; gap:8px; text-align:center; }
.eb-together__summary > span{ font-size:13px; color:var(--eb-ink-faint); }
.eb-together__summary strong{ font-size:26px; font-weight:700; color:var(--eb-primary); }

/* ---------- Reviews ---------- */
.eb-reviews{ margin:0 auto var(--eb-section); max-width:1040px; scroll-margin-top:110px; }
.eb-reviews__head{ text-align:center; margin-bottom:24px; }
.eb-reviews__head h2{ margin:0 0 6px; }
.eb-reviews__summary{ display:grid; grid-template-columns:260px minmax(0,1fr); gap:28px; align-items:center; background:var(--eb-paper); border:1px solid var(--eb-line); border-radius:var(--eb-radius-card); box-shadow:var(--eb-shadow); padding:24px 28px; margin-bottom:22px; }
.eb-reviews__score{ text-align:center; }
.eb-reviews__avg{ display:block; font-size:52px; font-weight:700; line-height:1; color:var(--eb-ink-strong); }
.eb-reviews__score .eb-stars{ margin:8px 0 4px; }
.eb-reviews__count{ display:block; font-size:13.5px; color:var(--eb-ink-faint); }
.eb-reviews__bars{ list-style:none; margin:0; padding:0; display:grid; gap:7px; }
.eb-reviews__bar{ display:grid; grid-template-columns:28px 1fr 40px; gap:10px; align-items:center; font-size:13px; color:var(--eb-ink-soft); }
.eb-reviews__bar span:first-child{ display:inline-flex; align-items:center; gap:3px; }
.eb-reviews__bar svg{ color:var(--eb-gold); }
.eb-reviews__track{ height:8px; border-radius:99px; background:var(--eb-cream); overflow:hidden; }
.eb-reviews__track i{ display:block; height:100%; border-radius:99px; background:var(--eb-gold); }
.eb-reviews__bar span:last-child{ text-align:right; }
.eb-reviews__list{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.eb-review{ background:var(--eb-paper); border:1px solid var(--eb-line); border-radius:var(--eb-radius-card); padding:18px 20px; }
.eb-review[hidden]{ display:none; }
.eb-review__top{ display:flex; align-items:center; gap:12px; margin-bottom:10px; }
.eb-review__avatar{ flex:0 0 auto; width:38px; height:38px; border-radius:50%; background:var(--eb-tint); color:var(--eb-primary); font-weight:700; display:inline-flex; align-items:center; justify-content:center; }
.eb-review__who{ display:flex; flex-direction:column; line-height:1.3; min-width:0; }
.eb-review__name{ font-weight:700; color:var(--eb-ink-strong); font-size:15px; }
.eb-review__date{ font-size:12.5px; color:var(--eb-ink-faint); }
.eb-review__top .eb-stars{ margin-left:auto; }
.eb-review__text{ margin:0; font-size:14.5px; line-height:1.6; color:var(--eb-ink); }
.eb-reviews__more{ display:flex; justify-content:center; margin-top:20px; }
.eb-reviews__more button{ min-height:46px; padding:0 26px; border:1.5px solid var(--eb-accent); border-radius:var(--eb-radius); background:var(--eb-paper); color:var(--eb-primary); font-weight:600; font-size:15px; transition:background .15s; }
.eb-reviews__more button:hover{ background:var(--eb-tint); }
.eb-reviews__note{ margin:16px 0 0; text-align:center; font-size:12.5px; color:var(--eb-ink-faint); }

/* ---------- Responsive ---------- */
@media (max-width:900px){
	.eb-product-top{ grid-template-columns:1fr; gap:22px; }
	.eb-gallery{ position:static; }
	.eb-gallery__thumbs{ display:none; }
	.eb-gallery__dots{ display:flex; }
	.eb-gallery__stage{ border:0; border-radius:0; background:var(--eb-paper); margin-inline:calc(var(--eb-gutter) * -1); }
	.eb-gallery__zoom{ display:none; }
	.eb-price-card{ padding:18px; }
	.eb-together__card{ grid-template-columns:1fr; }
	.eb-reviews__summary{ grid-template-columns:1fr; gap:18px; padding:20px; }
	.eb-reviews__list{ grid-template-columns:1fr; }
}
@media (max-width:560px){
	.single-product .woocommerce-breadcrumb{ margin:12px 0; font-size:12.5px; }
	.eb-benefits{ grid-template-columns:1fr; padding:12px 14px; }
	.single-product .eb-price-card button.single_add_to_cart_button.button{ min-width:0; font-size:16px; }
	.eb-together__list{ grid-template-columns:1fr; }
}

/* Catalogue mode (Commerce\CatalogMode): B2B inquiry box instead of price and cart. */
.eb-b2b-box__title{ margin:0 0 6px; font-size:20px; font-weight:700; color:var(--eb-ink); }
.eb-b2b-box__text{ margin:0 0 16px; color:var(--eb-ink-soft); }
.single-product .eb-price-card a.button.eb-b2b-box__cta{ display:flex; align-items:center; justify-content:center; gap:10px; width:100%; min-height:52px; padding:0 18px; border-radius:var(--eb-radius); background:var(--eb-primary); color:#fff; font-weight:700; font-size:17px; line-height:1.2; text-align:center; text-decoration:none; }
.single-product .eb-price-card a.button.eb-b2b-box__cta:hover{ background:var(--eb-primary-soft); color:#fff; }
.single-product .eb-price-card a.button.eb-b2b-box__cta svg{ flex:none; width:20px; height:20px; }
