/* ==========================================================================
   Product detail page: editorial mosaic gallery + sticky info.
   ========================================================================== */

.pdp-wrap { padding-top: 18px; }
.pdp {
	display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
	gap: clamp(28px, 4vw, 64px); align-items: start; padding-bottom: clamp(40px, 6vw, 80px);
}

/* ---------- gallery ---------- */
.gallery { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; }
.gallery__thumbs {
	position: sticky; top: calc(var(--header-h) + 18px); align-self: start;
	display: grid; gap: 10px; max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; scrollbar-width: none;
}
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumb {
	position: relative; width: 64px; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: 8px; overflow: hidden;
	background: var(--paper-2); opacity: .55; transition: opacity .25s, box-shadow .25s;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb:hover { opacity: .9; }
.gallery__thumb.is-active { opacity: 1; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
.gallery__thumb-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(36, 20, 16, .35); }

/* Desktop mosaic: hero image full width, the rest in pairs, like a lookbook spread. */
.gallery__track { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; outline: none; }
.gallery__slide { position: relative; margin: 0; overflow: hidden; border-radius: var(--r); background: var(--paper-2); aspect-ratio: 4 / 5; cursor: zoom-in; }
.gallery__slide:first-child { grid-column: 1 / -1; }
.gallery[data-count="2"] .gallery__slide, .gallery[data-count="1"] .gallery__slide { grid-column: 1 / -1; }
.gallery__slide img, .gallery__slide video { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.gallery__slide--video { cursor: default; }

/* Zoom lens: a magnified circle that follows the cursor (positioned in JS). */
.gallery__lens {
	position: absolute; left: 0; top: 0; width: 230px; height: 230px; border-radius: 50%;
	pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.6);
	border: 3px solid var(--paper); box-shadow: 0 18px 40px -10px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .08);
	background-repeat: no-repeat; background-color: var(--paper-2);
	transition: opacity .2s, transform .25s var(--ease);
}
.gallery__slide.is-zooming .gallery__lens { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.gallery__slide.is-zooming { cursor: none; }

.gallery__sound {
	position: absolute; right: 14px; bottom: 14px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0;
	display: grid; place-items: center; background: rgba(251, 246, 239, .9); color: var(--ink);
}
.gallery__sound .when-sound { display: none; }
.gallery__sound[aria-pressed="true"] .when-sound { display: block; }
.gallery__sound[aria-pressed="true"] .when-muted { display: none; }
.gallery__video-tag {
	position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 12px; border-radius: 999px; background: var(--gulaal); color: #fff; font: 400 .95rem/1 var(--f-stamp);
}
.gallery__dots, .gallery__count { display: none; }
.gallery__hint {
	position: absolute; left: calc(64px + 28px); top: 14px; z-index: 2;
	display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
	background: rgba(251, 246, 239, .88); backdrop-filter: blur(6px); font-size: .8rem; font-weight: 600;
	pointer-events: none; transition: opacity .4s;
}
.gallery.is-touched .gallery__hint { opacity: 0; }
.gallery:not(:has(.gallery__thumbs)) { grid-template-columns: 1fr; }
.gallery:not(:has(.gallery__thumbs)) .gallery__hint { left: 14px; }

/* ---------- info column ---------- */
.pdp__sticky { position: sticky; top: calc(var(--header-h) + 18px); }
.pdp__kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pdp__kicker .eyebrow { text-decoration: none; }
.pdp .product_title { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.05; margin-bottom: 10px; }
.pdp .woocommerce-product-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: .9rem; }
.pdp .woocommerce-product-rating a { color: var(--ink-2); }
.star-rating { position: relative; display: inline-block; width: 5.6em; height: 1.1em; font-size: 1rem; line-height: 1.1; overflow: hidden; }
.star-rating::before, .star-rating span::before { content: "★★★★★"; position: absolute; inset: 0; letter-spacing: .1em; font-family: system-ui, sans-serif; }
.star-rating::before { color: var(--chandan); }
.star-rating span { position: absolute; inset: 0 auto 0 0; overflow: hidden; padding-top: 1.2em; }
.star-rating span::before { color: var(--haldi); }

.pdp .price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 0; font: 400 clamp(1.7rem, 2.6vw, 2.1rem)/1 var(--f-display); color: var(--ink); }
.pdp .price del { font: 400 1.1rem var(--f-body); color: var(--ink-3); }
.pdp .price ins { text-decoration: none; }
.pdp__tax { margin: 8px 0 18px; font-size: .86rem; color: var(--ink-3); }
.pdp__save { color: var(--gulaal); }
.pdp .woocommerce-product-details__short-description { color: var(--ink-2); margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px dashed var(--line); }
.pdp .woocommerce-product-details__short-description p:last-child { margin: 0; }

.pdp__size-guide {
	display: inline-flex; align-items: center; gap: 6px; float: right; margin-top: 14px; position: relative; z-index: 1;
	border: 0; background: none; padding: 0; font-weight: 600; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px;
}

/* Variations become pills: JS hides each <select> and builds .pills from its options. */
.pdp table.variations { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.pdp table.variations tr { display: block; }
.pdp table.variations th, .pdp table.variations td { display: block; text-align: left; padding: 0; }
.pdp table.variations th label { display: block; font-weight: 700; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin: 14px 0 10px; }
.pdp table.variations .chosen { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-2); margin-left: 6px; }
.pdp table.variations select.is-enhanced { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
	min-width: 54px; height: 46px; padding: 0 16px; border-radius: 999px;
	border: 1.5px solid var(--line); background: var(--paper); font-weight: 600;
	transition: border-color .2s, background .2s, color .2s, transform .2s var(--ease-bounce);
}
.pill:hover { border-color: var(--ink); }
.pill.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: scale(1.04); }
.pill.is-unavailable { opacity: .35; text-decoration: line-through; }
.pill--swatch { min-width: 0; width: 46px; padding: 0; border-radius: 50%; position: relative; }
.pill--swatch span { position: absolute; inset: 4px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.pill--swatch.is-active { background: var(--paper); box-shadow: 0 0 0 2px var(--ink); }
.reset_variations { font-size: .85rem; color: var(--ink-3); margin-top: 8px; display: inline-block; }
.woocommerce-variation-price { margin: 12px 0; }
.woocommerce-variation-price .price { font-size: 1.5rem; }
.woocommerce-variation-availability p { margin: 0 0 10px; font-size: .9rem; color: var(--mehendi); font-weight: 600; }
.pdp .stock { font-weight: 600; color: var(--mehendi); font-size: .92rem; }
.pdp .stock.out-of-stock { color: var(--gulaal); }
.pdp.is-shake .pills { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* cart row */
.pdp form.cart { margin: 18px 0 0; clear: both; }
.pdp form.cart:not(.variations_form), .pdp .woocommerce-variation-add-to-cart { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.pdp .single_add_to_cart_button {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
	min-height: 54px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper);
	font: 600 1.02rem/1 var(--f-body); position: relative; overflow: hidden; isolation: isolate; transition: transform .2s var(--ease);
}
.pdp .single_add_to_cart_button::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--rose-deep); transform: translateY(101%); transition: transform .35s var(--ease); }
.pdp .single_add_to_cart_button:hover::after { transform: none; }
.pdp .single_add_to_cart_button.disabled { opacity: .5; }
.pdp .single_add_to_cart_button.is-loading { pointer-events: none; }
.pdp .single_add_to_cart_button.is-loading::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pdp__buy { grid-column: 1 / -1; width: 100%; min-height: 54px; }
.pdp .quantity { display: inline-flex; align-items: center; height: 54px; border: 1.5px solid var(--line); border-radius: 999px; padding: 0 4px; }
.pdp .quantity .qty { width: 38px; border: 0; background: none; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.pdp .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty__btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; display: grid; place-items: center; }
.qty__btn:hover { background: var(--rose-50); }

.pdp__trust { list-style: none; display: grid; margin: 24px 0 10px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.pdp__trust li { display: flex; align-items: center; gap: 14px; padding: 13px 16px; font-size: .88rem; color: var(--ink-2); }
.pdp__trust li + li { border-top: 1px solid var(--line); }
.pdp__trust .icon { color: var(--rose-deep); flex: none; }
.pdp__trust strong { display: block; color: var(--ink); font-size: .95rem; }
.pdp__wa { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 4px; font-weight: 600; font-size: .92rem; color: var(--mehendi); text-decoration: none; }

.pdp__accordions { margin-top: 18px; border-top: 1px solid var(--line); }
.acc { border-bottom: 1px solid var(--line); }
.acc summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; font: 400 1.25rem/1.2 var(--f-display); cursor: pointer; list-style: none; }
.acc summary::-webkit-details-marker { display: none; }
.acc__icon { position: relative; width: 14px; height: 14px; flex: none; }
.acc__icon::before, .acc__icon::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
.acc__icon::after { transform: rotate(90deg); }
.acc[open] .acc__icon::after { transform: rotate(0); }
.acc__body { padding: 0 0 20px; color: var(--ink-2); font-size: .97rem; }
.acc__body ul { padding-left: 18px; }
.acc__body li { margin: 4px 0; }
.acc[open] .acc__body { animation: rise .45s var(--ease); }
.pdp__sku { font-size: .8rem; color: var(--ink-3); margin: 14px 0 0; }

/* ---------- reviews ---------- */
.pdp-reviews { border-top: 1px solid var(--line); }
#reviews .woocommerce-Reviews-title { font-size: clamp(1.8rem, 3vw, 2.6rem); }
#reviews .commentlist { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin: 24px 0; }
#reviews .commentlist li .comment_container { padding: 22px; border-radius: var(--r); background: var(--paper-2); }
#reviews .commentlist img.avatar { display: none; }
#reviews .meta { color: var(--ink-3); font-size: .85rem; }
#reviews .woocommerce-review__author { color: var(--ink); font-weight: 700; }
#review_form_wrapper { max-width: 720px; }
#review_form .comment-reply-title { display: block; font: 400 1.8rem var(--f-display); margin: 12px 0; }
#review_form input[type="text"], #review_form input[type="email"], #review_form textarea { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }
#review_form label { display: block; font-weight: 600; margin: 12px 0 6px; }
#review_form .stars a { color: var(--haldi); font-size: 1.4rem; text-decoration: none; }
#review_form .submit { margin-top: 14px; min-height: 50px; padding: 0 28px; border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); font-weight: 600; }
.woocommerce-noreviews { color: var(--ink-3); }

/* ---------- lightbox ---------- */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #1a0f0c; color: var(--paper); overflow: hidden; }
.lightbox::backdrop { background: #1a0f0c; }
.lightbox[open] { animation: fade .3s; }
.lightbox__stage { position: absolute; inset: 0; display: grid; place-items: center; touch-action: none; cursor: grab; overflow: hidden; }
.lightbox__stage.is-dragging { cursor: grabbing; }
.lightbox__img { max-width: 100vw; max-height: 100dvh; object-fit: contain; will-change: transform; user-select: none; -webkit-user-drag: none; transition: transform .25s var(--ease); }
.lightbox__stage.is-dragging .lightbox__img { transition: none; }
.lightbox .icon-btn { position: absolute; color: var(--paper); background: rgba(251, 246, 239, .12); width: 52px; height: 52px; }
.lightbox .icon-btn:hover { background: rgba(251, 246, 239, .25); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev { left: 18px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 18px; top: 50%; translate: 0 -50%; }
.lightbox__hint { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: .82rem; opacity: .6; margin: 0; pointer-events: none; }

/* ---------- size guide modal ---------- */
.modal { width: min(680px, 94vw); max-height: 88dvh; padding: 28px; border: 0; border-radius: var(--r-lg); background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(36, 20, 16, .5); backdrop-filter: blur(3px); }
.modal[open] { animation: rise .4s var(--ease); }
.modal__head { display: flex; align-items: center; justify-content: space-between; }
.modal__head .mix-heading { font-size: 2.2rem; margin: 0; }
.modal__lede { color: var(--ink-2); }
.table-scroll { overflow-x: auto; }
.size-table { width: 100%; border-collapse: collapse; text-align: center; font-size: .95rem; }
.size-table th { background: var(--ink); color: var(--paper); font-weight: 600; padding: 12px 8px; }
.size-table th:first-child { border-radius: 10px 0 0 0; }
.size-table th:last-child { border-radius: 0 10px 0 0; }
.size-table td { padding: 12px 8px; border-bottom: 1px solid var(--line); }
.size-table tr:nth-child(even) td { background: var(--rose-50); }
.size-table td:first-child { font-weight: 700; }
.modal__how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; font-size: .86rem; color: var(--ink-2); }
.modal__how strong { display: block; color: var(--ink); }

/* ---------- mobile sticky buy bar ---------- */
.pdp-bar { display: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
	.pdp { grid-template-columns: minmax(0, 1.1fr) minmax(320px, 1fr); }
}

@media (max-width: 900px) {
	.pdp-wrap { padding-top: 8px; }
	.pdp-wrap > .breadcrumbs { display: none; }
	.pdp { grid-template-columns: 1fr; gap: 22px; }
	.pdp__media { margin-inline: calc(-1 * var(--gutter)); }
	.pdp__sticky { position: static; }

	/* Mobile: full-bleed swipe carousel. */
	.gallery { display: block; }
	.gallery__thumbs { display: none; }
	.gallery__track {
		grid-auto-flow: column; grid-auto-columns: 100%; grid-template-columns: none; gap: 0;
		overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
	}
	.gallery__track::-webkit-scrollbar { display: none; }
	.gallery__slide, .gallery__slide:first-child, .gallery[data-count="2"] .gallery__slide { grid-column: auto; border-radius: 0; scroll-snap-align: start; scroll-snap-stop: always; }
	.gallery__lens { display: none; }
	.gallery__dots { display: flex; justify-content: center; gap: 6px; position: absolute; left: 0; right: 0; bottom: 14px; }
	.gallery__dots span { width: 6px; height: 6px; border-radius: 9px; background: rgba(251, 246, 239, .7); transition: width .3s var(--ease), background .3s; }
	.gallery__dots span.is-active { width: 22px; background: var(--paper); }
	.gallery__count { display: block; position: absolute; right: 14px; top: 14px; padding: 5px 10px; border-radius: 999px; background: rgba(36, 20, 16, .55); color: #fff; font-size: .78rem; font-weight: 700; }
	.gallery__hint { left: 14px; top: auto; bottom: 36px; }

	.pdp-bar {
		position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 55;
		display: flex; align-items: center; gap: 12px; padding: 10px var(--gutter);
		background: rgba(251, 246, 239, .97); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
		transform: translateY(140%); transition: transform .4s var(--ease);
	}
	.pdp-bar.is-on { transform: none; }
	.pdp-bar img { width: 44px; height: 55px; object-fit: cover; border-radius: 6px; }
	.pdp-bar__info { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
	.pdp-bar__info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9rem; }
	.pdp-bar__info span { font-weight: 700; font-size: .92rem; }
	.pdp-bar__info del { font-weight: 400; color: var(--ink-3); }
	.pdp-bar__info ins { text-decoration: none; }
	.pills { gap: 6px; }
	.pill { min-width: 0; flex: 1 1 0; padding: 0 6px; }
	.pill--swatch { flex: 0 0 46px; }
	.lightbox__prev, .lightbox__next { display: none; }
	.modal { padding: 20px; }
	.modal__how { grid-template-columns: 1fr; }
}
