/* ============================================================
   Khyati Label — Watch & Buy shoppable feed
   Brand tokens: maroon #4B0F1F / gold #C9A24A / cream #FBF6EC
   ============================================================ */

.kh-wab {
	--kh-maroon: #4B0F1F;
	--kh-maroon-deep: #3D0A13;
	--kh-gold: #C9A24A;
	--kh-cream: #FBF6EC;
	--kh-brown: #2C1A14;
	--kh-muted: #6B5B4A;
	background: var(--kh-cream);
	padding: 64px 16px 72px;
	position: relative;
	overflow: hidden;
}

.kh-wab__head {
	text-align: center;
	max-width: 760px;
	margin: 0 auto 40px;
}
.kh-wab__title {
	font-family: 'Playfair Display', 'Cormorant Garamond', serif;
	font-size: clamp(1.9rem, 4vw, 2.6rem);
	font-weight: 500;
	color: var(--kh-brown);
	margin: 0 0 12px;
}
.kh-wab__subtitle {
	font-family: 'Manrope', 'Inter', sans-serif;
	font-size: 0.98rem;
	line-height: 1.7;
	color: var(--kh-muted);
	margin: 0;
}

/* ── Viewport + track ───────────────────────────────────── */
.kh-wab__viewport {
	position: relative;
	max-width: 1280px;
	margin: 0 auto;
}
.kh-wab__track {
	display: flex;
	gap: var(--kh-wab-gap, 16px);
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	-ms-overflow-style: none;
	scrollbar-width: none;
	padding: 4px;
}
.kh-wab__track::-webkit-scrollbar { display: none; }

/* Grid layout (Instagram showcase) wraps instead of scrolling */
.kh-wab--grid .kh-wab__track {
	flex-wrap: wrap;
	justify-content: center;
	overflow: visible;
}

/* ── Card ───────────────────────────────────────────────────
   Cards-per-row is controlled by --kh-wab-cols (gap is 16px):
   5 across on desktop, scaling down to 2 on mobile. The same
   formula drives both the scrolling carousel and the wrapping grid. */
.kh-wab {
	--kh-wab-cols: 5;
	--kh-wab-gap: 16px;
}
.kh-wab__card {
	position: relative;
	flex: 0 0 calc((100% - (var(--kh-wab-cols) - 1) * var(--kh-wab-gap)) / var(--kh-wab-cols));
	width: calc((100% - (var(--kh-wab-cols) - 1) * var(--kh-wab-gap)) / var(--kh-wab-cols));
	aspect-ratio: 9 / 14;
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	background: #ece1cd;
	border-radius: 4px;
	overflow: hidden;
	scroll-snap-align: start;
	box-shadow: 0 12px 30px -18px rgba(61, 10, 19, 0.45);
	transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.kh-wab__card:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 44px -20px rgba(61, 10, 19, 0.55);
}
.kh-wab__cover,
.kh-wab__video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
	transition: transform 0.7s ease;
}
.kh-wab__video { pointer-events: none; background: #1c0c08; }
.kh-wab__card:hover .kh-wab__cover,
.kh-wab__card:hover .kh-wab__video { transform: scale(1.05); }

.kh-wab__reel-icon {
	position: absolute;
	top: 12px;
	right: 12px;
	color: #fff;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
	pointer-events: none;
}
.kh-wab__card-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 28px 12px 12px;
	font-family: 'Manrope', 'Inter', sans-serif;
	font-size: 0.8rem;
	line-height: 1.4;
	color: #fff;
	text-align: left;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ── Arrows ─────────────────────────────────────────────── */
.kh-wab__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(201, 162, 74, 0.5);
	background: rgba(255, 255, 255, 0.92);
	color: var(--kh-maroon);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 18px -8px rgba(61, 10, 19, 0.4);
	transition: background 0.3s ease, color 0.3s ease;
}
.kh-wab__arrow:hover { background: var(--kh-maroon); color: var(--kh-cream); }
.kh-wab__arrow--prev { left: -8px; }
.kh-wab__arrow--next { right: -8px; }
.kh-wab__arrow[disabled] { opacity: 0; pointer-events: none; }

/* ── CTA ────────────────────────────────────────────────── */
.kh-wab__cta { text-align: center; margin-top: 40px; }
.kh-wab__cta-btn,
.kh-wab__cta-btn:link,
.kh-wab__cta-btn:visited {
	display: inline-block;
	background: #3D0A13 !important;
	background-color: #3D0A13 !important;
	background-image: none !important;
	color: #FBF6EC !important;
	border: 1px solid #C9A24A !important;
	padding: 15px 42px;
	font-family: 'Manrope', 'Inter', sans-serif;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none !important;
	border-radius: 2px;
	transition: all 0.4s ease;
}
.kh-wab__cta-btn:hover,
.kh-wab__cta-btn:focus {
	background: #5E1525 !important;
	background-color: #5E1525 !important;
	color: #C9A24A !important;
	border-color: #C9A24A !important;
	box-shadow: 0 10px 26px -12px rgba(61, 10, 19, 0.55);
}

/* ============================================================
   Lightbox overlay
   ============================================================ */
.kh-wab-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(28, 12, 8, 0.78);
	backdrop-filter: blur(4px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}
.kh-wab-overlay.is-open { opacity: 1; visibility: visible; }

.kh-wab-modal {
	position: relative;
	display: flex;
	width: min(900px, 100%);
	height: min(620px, 88vh);
	max-height: 88vh;
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.6);
	transform: translateY(12px) scale(0.98);
	transition: transform 0.35s ease;
}
.kh-wab-overlay.is-open .kh-wab-modal { transform: translateY(0) scale(1); }

/* Body holds the actual media|info flex row (desktop) / stack (mobile) */
.kh-wab-modal__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: row;
	width: 100%;
	min-height: 0;
}

.kh-wab-modal__media {
	flex: 0 0 44%;
	background: #1c0c08;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.kh-wab-modal__media-link { display: block; width: 100%; height: 100%; }
.kh-wab-modal__video,
.kh-wab-modal__poster {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.kh-wab-modal__info {
	flex: 1 1 0;
	min-width: 0;
	padding: 26px 30px 30px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}
.kh-wab-modal__viewpost {
	flex: 0 0 auto;
	font-family: 'Manrope', 'Inter', sans-serif;
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--kh-gold, #C9A24A);
	text-decoration: none !important;
	font-weight: 600;
	padding-right: 36px; /* clear the close button */
}
.kh-wab-modal__viewpost:hover { color: #A8853A; }

/* The caption + product group is vertically centered to fill the panel nicely */
.kh-wab-modal__detail {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 20px;
	padding: 22px 0;
}
.kh-wab-modal__caption {
	font-family: 'Cormorant Garamond', 'Playfair Display', serif;
	font-size: 1.45rem;
	line-height: 1.45;
	color: #2C1A14;
	margin: 0;
}

/* Product card inside lightbox — bordered block */
.kh-wab-product {
	display: flex;
	gap: 16px;
	align-items: center;
	padding: 16px;
	border: 1px solid #eadfca;
	border-radius: 8px;
	background: #fbf7ef;
}
.kh-wab-product__img { flex: 0 0 78px; }
.kh-wab-product__img img {
	width: 78px;
	height: 96px;
	object-fit: cover;
	border-radius: 5px;
	display: block;
}
.kh-wab-product__body { flex: 1; min-width: 0; }
.kh-wab-product__title {
	display: block;
	font-family: 'Bodoni Moda', 'Playfair Display', serif;
	font-size: 1.05rem;
	line-height: 1.25;
	font-weight: 500;
	color: #1A1A1A;
	text-decoration: none !important;
	margin-bottom: 5px;
}
.kh-wab-product__price {
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	font-size: 1.05rem;
	color: #4B0F1F;
	margin-bottom: 12px;
}
.kh-wab-product__price del { opacity: 0.55; margin-right: 6px; }
.kh-wab-product__price ins { text-decoration: none; font-weight: 600; }

/* Clean text button — override theme's icon-only loop button styling */
.kh-wab-product__actions { line-height: 1; }
.kh-wab-product__actions .kh-wab-add {
	display: block;
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	background: #3D0A13 !important;
	color: #F2E1C9 !important;
	border: 1px solid #C9A24A !important;
	padding: 12px 20px !important;
	margin: 0 !important;
	font-family: 'Manrope', 'Inter', sans-serif !important;
	font-size: 12px !important;
	line-height: 1.2 !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase !important;
	font-weight: 600 !important;
	text-indent: 0 !important;
	border-radius: 3px !important;
	text-decoration: none !important;
	transition: all 0.35s ease !important;
	cursor: pointer;
	min-height: 0 !important;
	white-space: nowrap;
}
/* Kill any icon pseudo-elements / font-icons the theme injects */
.kh-wab-product__actions .kh-wab-add::before,
.kh-wab-product__actions .kh-wab-add::after { content: none !important; display: none !important; }
.kh-wab-product__actions .kh-wab-add svg,
.kh-wab-product__actions .kh-wab-add i { display: none !important; }
.kh-wab-product__actions .kh-wab-add:hover {
	background: #C9A24A !important;
	color: #3D0A13 !important;
}
.kh-wab-product__actions .kh-wab-add.loading,
.kh-wab-product__actions .kh-wab-add.added { opacity: 0.75; }
.kh-wab-product__actions .added_to_cart {
	display: inline-block;
	margin-top: 10px;
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #4B0F1F;
	text-decoration: underline;
}

.kh-wab-modal__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 4;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.9);
	color: #3D0A13;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s ease;
}
.kh-wab-modal__close:hover { background: #fff; }

/* ── Tablet: 3 across ───────────────────────────────────── */
@media (max-width: 1024px) {
	.kh-wab { --kh-wab-cols: 3; }
}

/* ── Mobile: 2 across ───────────────────────────────────── */
@media (max-width: 768px) {
	.kh-wab { --kh-wab-cols: 2; padding: 48px 12px 56px; }
	.kh-wab__arrow { display: none; }
	.kh-wab__card-caption { font-size: 0.72rem; padding: 22px 8px 8px; }

	.kh-wab-modal {
		width: min(420px, 100%);
		height: auto;
		max-height: 90vh;
	}
	.kh-wab-modal__body { flex-direction: column; }
	.kh-wab-modal__media {
		flex: 0 0 auto;
		width: 100%;
		height: 48vh;
		max-height: 48vh;
	}
	.kh-wab-modal__video, .kh-wab-modal__poster { height: 100%; }
	.kh-wab-modal__info { padding: 18px 18px 22px; overflow-y: visible; }
	.kh-wab-modal__detail { justify-content: flex-start; gap: 16px; padding: 16px 0 4px; }
	.kh-wab-modal__caption { font-size: 1.2rem; }
}
