/* =========================================================================
   Evermed — product page
   ====================================================================== */

/* ---------- Layout: [gallery | summary] box, then tabs / related full width ---------- */
.single-product div.product { display: block; max-width: 1240px; margin-inline: auto; overflow: visible !important; }
.ev-single-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 36px; align-items: start; margin-bottom: 28px; }
.ev-single-top > * { min-width: 0; }
@media (min-width: 900px) {
	.ev-single-top { grid-template-columns: minmax(0, 520px) minmax(0, 1fr); }
	.ev-single-top > .summary { position: sticky; top: calc(var(--evh-sticky-h, 64px) + 16px); }
}
.single-product div.product > .woocommerce-tabs, .single-product div.product > .related, .single-product div.product > .upsells { margin-top: 0; }
/* WooCommerce's float layout off */
.woocommerce div.product div.images, .woocommerce div.product div.summary { float: none; width: auto; margin: 0; }

/* ---------- Gallery ---------- */
.ev-gallery { position: relative; }
.ev-gallery__track {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	overscroll-behavior-x: contain; scrollbar-width: none;
	background: #fff; border: 1px solid var(--ev-line); border-radius: var(--ev-radius);
}
.ev-gallery__track::-webkit-scrollbar { display: none; }
.ev-gallery__slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1 / 1; }
.ev-gallery__zoom { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.ev-gallery__slide img { width: 100%; height: 100%; object-fit: contain; }
.ev-gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ev-gallery__thumb {
	flex: 0 0 72px; width: 72px; height: 72px; padding: 2px;
	background: #fff; border: 2px solid var(--ev-line); border-radius: var(--ev-radius-sm); cursor: pointer;
}
.ev-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.ev-gallery__thumb.is-active, .ev-gallery__thumb:hover { border-color: var(--ev-primary); }
.ev-gallery .onsale { z-index: 3; }

/* Large-image viewer */
.ev-lightbox { width: min(96vw, 1100px); max-height: 94vh; padding: 0; border: 0; border-radius: var(--ev-radius); background: #fff; }
.ev-lightbox::backdrop { background: rgb(10 15 13 / 75%); }
.ev-lightbox__img { display: block; width: 100%; height: auto; max-height: 90vh; object-fit: contain; }
.ev-lightbox__close {
	position: absolute; top: 10px; right: 10px; width: 44px; height: 44px;
	display: grid; place-items: center; border: 0; border-radius: 50%;
	background: rgb(255 255 255 / 92%); box-shadow: 0 2px 8px rgb(0 0 0 / 20%); cursor: pointer;
}
.ev-lightbox__close .ev-icon { width: 22px; height: 22px; }

/* ---------- Summary ---------- */
.single-product .summary .product_title { font-size: clamp(1.2rem, 1rem + .7vw, 1.6rem); line-height: 1.35; margin: 0 0 6px; }
.ev-brand { margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--ev-line); font-weight: 600; }
.ev-brand span { color: var(--ev-primary); }
.ev-brand a { color: var(--ev-secondary); text-decoration: none; }
.ev-brand a:hover { text-decoration: underline; }
.single-product .summary .woocommerce-product-rating { margin-bottom: 8px; }
.woocommerce div.product .summary p.price, .woocommerce div.product .summary span.price,
.single-product .summary p.price, .single-product .summary span.price {
	color: var(--ev-primary); font-size: clamp(1.25rem, 1.1rem + .5vw, 1.55rem); font-weight: 700; margin: 4px 14px 4px 0;
	display: inline-block; vertical-align: middle;
}
.woocommerce div.product .summary .price del { color: var(--ev-muted); font-size: .6em; font-weight: 400; opacity: 1; }
.single-product .summary .price ins { text-decoration: none; }
.single-product .summary .ev-save { display: inline-block; vertical-align: middle; margin: 4px 0; color: #2e7d32; font-weight: 600; }
.ev-save__pct { color: #d6282e; }
.single-product .woocommerce-product-details__short-description { color: var(--ev-ink); margin: 10px 0 14px; font-size: .95rem; }
.single-product .woocommerce-product-details__short-description ul { margin: 0 0 .5em; padding-left: 1.2em; }
.single-product .woocommerce-product-details__short-description li { margin: 0 0 2px; }

/* Add to cart + ShopBooster Buy Now */
.single-product form.cart { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin: 10px 0 8px; }
.single-product form.cart .quantity .qty { width: 64px; min-height: 44px; text-align: center; }
.single-product form.cart .single_add_to_cart_button, .single-product .summary .sb-cod-btn {
	flex: 0 1 auto; min-height: 44px; padding: 0 22px !important; border-radius: var(--ev-radius-sm) !important;
	font-weight: 700; font-size: .95rem;
	background: var(--ev-primary) !important; color: #fff !important;
}
.single-product form.cart .buy_now_button { background: var(--ev-buy-now-bg) !important; color: var(--ev-buy-now-text) !important; }
.single-product form.variations_form { display: block; }
.single-product .variations { margin-bottom: 10px; }
.single-product .variations td, .single-product .variations th { padding: 4px 0; }
.single-product .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 10px; }

/* WhatsApp + Call */
.ev-contact { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.ev-contact__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 18px; border-radius: var(--ev-radius-sm); font-size: .95rem;
	font-weight: 700; text-decoration: none;
}
.ev-contact__btn .ev-icon { width: 20px; height: 20px; }
.ev-contact__btn--wa { background: #25d366; color: #fff; }
.ev-contact__btn--wa:hover { background: #1ebe5a; color: #fff; }
.ev-contact__btn--call { background: var(--ev-call-now-bg); color: var(--ev-call-now-text); }
.ev-contact__btn--call:hover { filter: brightness(.93); color: var(--ev-call-now-text); }

/* Trust points */
.ev-trust { list-style: none; margin: 4px 0 12px; padding: 10px 0; display: flex; flex-wrap: wrap; gap: 6px 18px; border-top: 1px solid var(--ev-line); border-bottom: 1px solid var(--ev-line); }
.ev-trust li { display: flex; gap: 7px; align-items: center; font-size: .88rem; }
.ev-trust .ev-icon { width: 18px; height: 18px; color: var(--ev-primary); }

.single-product .product_meta { font-size: .86rem; color: var(--ev-muted); display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 10px; }

/* Share */
.ev-share { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .86rem; color: var(--ev-muted); }
.ev-share__link { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ev-share); color: #fff; transition: transform .15s, opacity .15s; }
.ev-share__link:hover { transform: translateY(-2px); opacity: .9; }
.ev-share__link svg { width: 17px; height: 17px; fill: currentColor; }
.single-product .product_meta a { color: var(--ev-muted); }

/* ---------- Tabs ---------- */
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0; margin: 0 0 -1px; display: flex; flex-wrap: wrap; gap: 4px; overflow: visible; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { margin: 0; padding: 0; border: 1px solid var(--ev-line); border-radius: var(--ev-radius-sm) var(--ev-radius-sm) 0 0; background: var(--ev-page); }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { padding: 10px 16px; font-weight: 600; color: var(--ev-muted); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--ev-surface); border-bottom-color: var(--ev-surface); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--ev-ink); }
.woocommerce div.product .woocommerce-tabs .panel {
	padding: clamp(14px, 2.5vw, 22px); background: var(--ev-surface);
	border: 1px solid var(--ev-line); border-radius: 0 var(--ev-radius) var(--ev-radius) var(--ev-radius);
}
.woocommerce-Tabs-panel { max-width: 100%; overflow-x: auto; }
.woocommerce-Tabs-panel table { width: 100%; border-collapse: collapse; }
.woocommerce-Tabs-panel th, .woocommerce-Tabs-panel td { padding: .55em .7em; border: 1px solid var(--ev-line); text-align: left; }

/* Accordion */
.ev-accordion { display: grid; gap: 10px; }
.ev-accordion__item { background: var(--ev-surface); border: 1px solid var(--ev-line); border-radius: var(--ev-radius); overflow: hidden; }
.ev-accordion__title {
	display: flex; align-items: center; justify-content: space-between;
	padding: 14px 18px; font-weight: 700; cursor: pointer; list-style: none;
}
.ev-accordion__title::-webkit-details-marker { display: none; }
.ev-accordion__title::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--ev-primary); }
.ev-accordion__item[open] > .ev-accordion__title::after { content: "−"; }
.ev-accordion__panel { padding: 0 18px 18px; }

/* Related / up-sells */
.single-product .related > h2, .single-product .up-sells > h2 { font-size: clamp(1.2rem, 1rem + .8vw, 1.6rem); margin: 18px 0 14px; }

/* ---------- Sticky buy bar ---------- */
.ev-buybar { display: none; }
.ev-buybar:not([hidden]) {
	display: block; position: fixed; inset: auto 0 0 0; z-index: 9990;
	padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
	background: var(--ev-surface); border-top: 1px solid var(--ev-line);
	box-shadow: 0 -4px 16px rgb(16 24 20 / 10%);
	animation: ev-buybar-in .2s ease-out;
}
@keyframes ev-buybar-in { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .ev-buybar:not([hidden]) { animation: none; } }
.ev-buybar__in { display: flex; align-items: center; gap: 10px; }
.ev-buybar__info { display: none; }
.ev-buybar__price { flex: 1; min-width: 0; color: var(--ev-primary); font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.ev-buybar__price del { display: block; color: var(--ev-muted); font-weight: 400; font-size: .75em; }
.ev-buybar__price ins { text-decoration: none; }
.ev-buybar__actions { display: flex; gap: 8px; align-items: center; }
.ev-buybar__icon { min-width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: var(--ev-radius-sm); color: #fff; text-decoration: none; font-weight: 700; }
.ev-buybar__icon:hover { color: #fff; filter: brightness(.95); }
.ev-buybar__icon .ev-icon { width: 22px; height: 22px; }
.ev-buybar__icon--wa { background: #25d366; }
.ev-buybar__icon--call { background: var(--ev-call-now-bg); }
.ev-buybar__txt { display: none; }
.ev-buybar__icon, .ev-buybar__buy { white-space: nowrap; }
.ev-buybar__buy {
	min-height: 46px; padding: 0 16px; border: 0; border-radius: var(--ev-radius-sm);
	background: var(--ev-buy-now-bg); color: var(--ev-buy-now-text); font: inherit; font-weight: 700; cursor: pointer;
}
.ev-buybar__buy:hover { filter: brightness(.95); }
.ev-single-product.ev-buybar-on { padding-bottom: 72px; }
.ev-single-product.ev-buybar-on .ev-top { bottom: 84px; }

/* Computers: photo + name + price on the left, labelled buttons on the right */
@media (min-width: 1025px) {
	.ev-buybar--mobile { display: none !important; }
	.ev-buybar:not([hidden]) { padding: 10px 24px; }
	.ev-buybar__in { max-width: 1240px; margin-inline: auto; gap: 18px; }
	.ev-buybar__info { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; }
	.ev-buybar__img { width: 48px; height: 48px; object-fit: contain; background: #fff; border: 1px solid var(--ev-line); border-radius: var(--ev-radius-sm); }
	.ev-buybar__name { font-weight: 600; color: var(--ev-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.ev-buybar__price { flex: 0 0 auto; }
	.ev-buybar__price del { display: inline; margin-right: 6px; }
	.ev-buybar__icon { padding: 0 18px; height: 44px; }
	.ev-buybar__txt { display: inline; }
	.ev-buybar__buy { min-height: 44px; padding: 0 22px; }
	/* The floating call button would sit on the bar */
	.ev-buybar-on .ev-float-call { bottom: 84px; }
}

/* ---------- Sliders: related, up-sells, recently viewed ---------- */
.ev-slider { position: relative; margin-top: 28px; }
.ev-slider > h2 { padding-right: 100px; }
.ev-slider__nav { position: absolute; top: 0; right: 0; display: flex; gap: 6px; }
.ev-slider__btn {
	width: 40px; height: 40px; display: grid; place-items: center;
	border: 1px solid var(--ev-line); border-radius: 50%; background: var(--ev-surface);
	font-size: 1.5rem; line-height: 1; color: var(--ev-ink); cursor: pointer;
}
.ev-slider__btn:hover:not(:disabled) { border-color: var(--ev-primary); color: var(--ev-primary); }
.ev-slider__btn:disabled { opacity: .35; cursor: default; }
.ev-related-slider .ev-slider ul.products.ev-slider__track,
.ev-slider__track {
	display: flex !important; gap: 14px !important;
	overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	overscroll-behavior-x: contain; scrollbar-width: none;
	padding: 2px 2px 8px !important; margin: 0 !important; list-style: none;
}
.ev-slider__track::-webkit-scrollbar { display: none; }
.ev-related-slider .ev-slider ul.products.ev-slider__track > li.product {
	flex: 0 0 calc((100% - 14px * (var(--ev-cols-d, 4) - 1)) / var(--ev-cols-d, 4)) !important;
	scroll-snap-align: start;
}
@media (max-width: 1024px) {
	.ev-related-slider .ev-slider ul.products.ev-slider__track > li.product { flex-basis: calc((100% - 28px) / 3) !important; }
}
@media (max-width: 767px) {
	.ev-related-slider .ev-slider ul.products.ev-slider__track > li.product { flex-basis: 44% !important; } /* the next card peeks out */
	.ev-slider__nav { display: none; } /* phones: swipe */
}

/* Recently viewed: compact cards */
.ev-mini { flex: 0 0 160px; scroll-snap-align: start; list-style: none; }
.ev-mini__link {
	display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 8px;
	background: var(--ev-surface); border: 1px solid var(--ev-line); border-radius: var(--ev-radius);
	color: var(--ev-ink); text-decoration: none;
}
.ev-mini__link:hover { border-color: var(--ev-primary); }
.ev-mini__link img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; border-radius: var(--ev-radius-sm); }
.ev-mini__name { font-size: .85rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev-mini__price { margin-top: auto; color: var(--ev-primary); font-weight: 700; font-size: .9rem; }

/* Quick COD button on the product page: same row as Add to cart, like the live site */
.single-product form.cart .sb-cod-btn--single {
	flex: 0 1 auto; min-height: 44px; padding: 0 22px !important; border-radius: var(--ev-radius-sm) !important;
	background: var(--ev-buy-now-bg) !important; color: var(--ev-buy-now-text) !important;
	font-weight: 700; font-size: .95rem;
}
.single-product .summary > .product_title { margin-top: 0; }
.single-product .ev-single-top > .summary { padding-top: 2px; }
/* Wishlist heart sits at the end of the WhatsApp / Call row (moved there by single.js) */
.ev-contact .bdm-wishlist-button-single, .ev-contact .ev-contact__wish {
	display: inline-grid !important; place-items: center; width: 44px; height: 44px; padding: 0 !important;
	border: 1.5px solid var(--ev-line) !important; border-radius: var(--ev-radius-sm) !important; background: #fff !important;
}
.ev-contact .bdm-wishlist-button-single svg { width: 22px; height: 22px; }

/* Tabs: the panel's own "Description" heading repeats the tab name */
.woocommerce div.product .woocommerce-tabs .panel > h2:first-child { font-size: 1.15rem; margin-top: 0; }
.single-product .related > h2, .single-product .upsells > h2, .ev-slider__title { font-size: 1.25rem; }
/* Breadcrumb lines up with the narrower product area */
.single-product .ev-breadcrumbs, .single-product .woocommerce-breadcrumb { max-width: 1240px; margin-inline: auto; }

/* ---------- Hover zoom on the main image (desktop, mouse only) ---------- */
.ev-zoom { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .15s;
	background-repeat: no-repeat; background-color: #fff; background-size: 220%; border-radius: var(--ev-radius); }
.ev-gallery.is-zooming .ev-zoom { opacity: 1; }
.ev-gallery[data-ev-zoom] .ev-gallery__zoom { cursor: zoom-in; }
@media (hover: none), (pointer: coarse) { .ev-zoom { display: none; } }

/* Short description in a box, like the current site (colours in Settings → Product page) */
.ev-short-box .summary .woocommerce-product-details__short-description {
	padding: 12px 16px; margin: 12px 0 14px;
	background: var(--ev-short-bg); border: 1px solid var(--ev-short-border); border-radius: var(--ev-radius-sm);
}
.ev-short-box .summary .woocommerce-product-details__short-description > :last-child { margin-bottom: 0; }
.ev-short-box .summary .woocommerce-product-details__short-description > :first-child { margin-top: 0; }
.single-product .woocommerce-product-details__short-description h2,
.single-product .woocommerce-product-details__short-description h3 { font-size: 1.05rem; margin: 0 0 .4em; }

/* ---------- Button combinations (all sizes) ----------
   Row 1: [qty] [Add to cart] [Order] — whatever is there shares the row equally.
   Row 2: [WhatsApp] [Call] [♥] — same; the heart stays a small square.
   Phones: the order button gets its own full-width row on top. */
.single-product form.cart:not(.variations_form), .single-product .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
.single-product form.cart .single_add_to_cart_button, .single-product form.cart .sb-cod-btn--single { flex: 1 1 0 !important; min-width: 0; max-width: none !important; width: auto !important; white-space: nowrap; }
.single-product form.cart .quantity { flex: 0 0 auto; margin: 0 !important; }
.single-product form.cart .quantity .qty { margin: 0 !important; }
.ev-contact > .ev-contact__btn { flex: 1 1 0; min-width: 0; white-space: nowrap; }
.ev-contact > .bdm-wishlist-button-single { flex: 0 0 44px; }
@media (max-width: 600px) {
	.single-product form.cart .sb-cod-btn--single { order: -1; flex-basis: 100% !important; min-height: 50px; font-size: 1rem; }
	.single-product form.cart .single_add_to_cart_button { min-height: 46px; }
	.ev-contact__num, .ev-contact__more { display: none; } /* short labels on phones: "WhatsApp", "কল করুন" */
	.ev-contact__btn { padding: 0 10px; min-height: 46px; }
}
/* WooCommerce's clearfix pseudo-elements become invisible flex items (+ gaps) — drop them */
.single-product form.cart::before, .single-product form.cart::after,
.single-product .woocommerce-variation-add-to-cart::before, .single-product .woocommerce-variation-add-to-cart::after { content: none !important; display: none !important; }

/* Spacing around the buttons: a clear gap after the description, and the
   order button close to the WhatsApp / Call row (they read as one group) */
.single-product .summary .woocommerce-product-details__short-description { margin-bottom: 0; }
.woocommerce div.product .summary form.cart, .single-product .summary form.cart { margin: 22px 0 10px !important; }
.single-product .summary .ev-contact { margin-top: 0; }

/* Gallery thumbnails left of the photo (Settings → Product page → Gallery thumbnails) — computers only */
@media (min-width: 900px) {
	.ev-thumbs-left .ev-gallery { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; align-items: start; }
	.ev-thumbs-left .ev-gallery__track { grid-column: 2; grid-row: 1; }
	.ev-thumbs-left .ev-gallery__thumbs {
		grid-column: 1; grid-row: 1; flex-direction: column; margin-top: 0;
		overflow-x: hidden; overflow-y: auto; max-height: 520px; padding: 0 2px 0 0;
	}
	.ev-thumbs-left .ev-gallery__thumb { flex: 0 0 auto; width: 70px; }
}
