/* =========================================================
   Luxivai shop & product extras
   Loaded only when at least one extra is switched on.
   Styles follow the existing sale badge, filter list and
   button designs.
========================================================= */

/* ---------------------------------------------------------
   Product labels (same shape as the sale badge)
--------------------------------------------------------- */

.luxivai-labels {
	position: absolute;
	z-index: 11;
	top: 15px;
	left: 15px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	pointer-events: none;
}

.luxivai-labels.has-sale {
	top: 58px;
}

.luxivai-label {
	display: inline-block;
	padding: 6px 10px;
	color: #111;
	background: #fff;
	border: 1px solid #111;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1;
	text-transform: uppercase;
}

.luxivai-label--hot {
	color: #111;
	background: var(--wp--preset--color--dusty-rose, #dca8a6);
	border-color: var(--wp--preset--color--dusty-rose, #dca8a6);
}

.luxivai-label--soldout {
	color: #fff;
	background: #111;
}

.luxivai-label--custom {
	color: #fff;
	background: var(--wp--preset--color--charcoal, #3f3f3f);
	border-color: var(--wp--preset--color--charcoal, #3f3f3f);
}

@media (max-width: 767px) {
	.luxivai-labels {
		top: 10px;
		left: 10px;
	}

	.luxivai-labels.has-sale {
		top: 46px;
	}
}

/* ---------------------------------------------------------
   Second image on hover
--------------------------------------------------------- */

/* The photo sits beside the image link, over it (below the badges, heart and Add to cart, z-index
   10+), and lets clicks through to the link underneath. */
.luxivai-product-card .luxivai-loop-product-media > img.luxivai-hover-image {
	position: absolute !important;
	inset: 0;
	z-index: 1;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: cover !important;
	object-position: center !important;
	background: #fff !important;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease, transform 0.35s ease !important;
}

.luxivai-product-card .luxivai-loop-product-media:hover .luxivai-hover-image {
	opacity: 1 !important;
}

@media (hover: none) {
	.luxivai-product-card .luxivai-loop-product-media > img.luxivai-hover-image {
		display: none !important;
	}
}

/* ---------------------------------------------------------
   Swatches
--------------------------------------------------------- */

.luxivai-swatches-select {
	display: none !important;
}

.luxivai-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 4px 0 8px;
}

.luxivai-swatch {
	position: relative;
	min-width: 34px;
	min-height: 34px;
	padding: 0;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.luxivai-swatch.is-colour {
	width: 34px;
	height: 34px;
	background-position: center;
	background-size: cover;
	border: 1px solid #d5d5d5;
	border-radius: 50%;
	box-shadow: inset 0 0 0 3px #fff;
}

.luxivai-swatch.is-label {
	padding: 7px 14px;
	color: #111;
	background: #fff;
	border: 1px solid #d5d5d5;
	font-size: 13px;
	font-weight: 600;
}

.luxivai-swatch:hover,
.luxivai-swatch:focus-visible {
	border-color: #111;
}

.luxivai-swatch.is-selected {
	border-color: #111;
	box-shadow: inset 0 0 0 3px #fff, 0 0 0 1px #111;
}

.luxivai-swatch.is-label.is-selected {
	color: #fff;
	background: #111;
	box-shadow: none;
}

.luxivai-swatch:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.luxivai-swatch.is-colour:disabled::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 4px;
	right: 4px;
	height: 1px;
	background: #111;
	transform: rotate(-45deg);
}

/* Colour dots on product cards (after the price row in the card's flex column) */
.luxivai-card-swatches {
	order: 20;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.luxivai-card-swatch {
	display: block;
	width: 16px;
	height: 16px;
	background-position: center;
	background-size: cover;
	border: 1px solid #d5d5d5;
	border-radius: 50%;
	cursor: pointer;
}

.luxivai-card-swatch:hover {
	border-color: #111;
}

.luxivai-card-swatches__more {
	color: #999;
	font-size: 12px;
}

/* ---------------------------------------------------------
   Attribute filters and active chips
--------------------------------------------------------- */

.luxivai-attr-filters .luxivai-filter-group {
	padding-top: 30px;
	border-bottom: 1px solid #dedede;
}

.luxivai-attr-filters .luxivai-filter-group a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.luxivai-filter-swatch {
	display: inline-block;
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	background-position: center;
	background-size: cover;
	border: 1px solid #d5d5d5;
	border-radius: 50%;
}

.luxivai-active-filters:empty {
	display: none;
}

.luxivai-active-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
}

.luxivai-active-filters__chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	color: #24272a;
	background: var(--wp--preset--color--soft-grey, #f4f4f4);
	font-size: 13px;
	text-decoration: none;
}

.luxivai-active-filters__chip:hover,
.luxivai-active-filters__chip:focus-visible {
	background: var(--wp--preset--color--pale-blush, #f3e3e1);
}

.luxivai-active-filters__clear {
	margin-left: 4px;
	color: #777;
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------------------------------------------------------
   Filtering without reload / load more
--------------------------------------------------------- */

.luxivai-shop-products.is-loading {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.luxivai-shop-pagination.is-enhanced {
	display: none;
}

.luxivai-load-more {
	display: flex;
	justify-content: center;
	margin: 40px 0 10px;
}

.luxivai-load-more__button {
	min-height: 50px;
	padding: 12px 40px;
	color: #fff;
	background: #111;
	border: 1px solid #111;
	border-radius: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
}

.luxivai-load-more__button:hover,
.luxivai-load-more__button:focus-visible {
	color: #111;
	background: var(--wp--preset--color--dusty-rose, #dca8a6);
	border-color: var(--wp--preset--color--dusty-rose, #dca8a6);
}

.luxivai-load-more__button:disabled {
	opacity: 0.6;
	cursor: wait;
}

/* ---------------------------------------------------------
   Category banner
--------------------------------------------------------- */

.luxivai-category-banner {
	position: relative;
	margin: 0 0 30px;
	overflow: hidden;
}

.luxivai-category-banner .luxivai-category-banner__image {
	display: block;
	width: 100% !important;
	max-width: none !important;
	height: clamp(180px, 22vw, 340px) !important;
	object-fit: cover !important;
}

.luxivai-category-banner__title {
	position: absolute;
	bottom: 24px;
	left: 28px;
	margin: 0;
	padding: 10px 18px;
	color: #111;
	background: rgb(255 255 255 / 92%);
	font-size: clamp(18px, 2vw, 26px);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* ---------------------------------------------------------
   Product page: zoom trigger, video, size guide, delivery, trust
--------------------------------------------------------- */

/* Zoom/lightbox trigger: a round button like the favourite heart, directly under it. */
html body.single-product .luxivai-product-detail__gallery .woocommerce-product-gallery__trigger {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 46px !important;
	height: 46px !important;
	padding: 0 !important;
	overflow: hidden;
	color: #111 !important;
	background: #fff !important;
	border: 1px solid #e2e2e2 !important;
	border-radius: 50% !important;
	font-size: 0 !important;
	text-indent: 0 !important;
	text-decoration: none !important;
	box-shadow: none !important;
}

html body.single-product .luxivai-product-detail__gallery .woocommerce-product-gallery__trigger::before {
	content: "";
	display: block;
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-radius: 50%;
	transform: translate(-1px, -1px);
}

html body.single-product .luxivai-product-detail__gallery .woocommerce-product-gallery__trigger::after {
	content: "";
	position: absolute;
	top: 26px;
	left: 25px;
	width: 7px;
	height: 2px;
	background: currentColor;
	border: 0;
	transform: rotate(45deg);
}

html body.single-product .luxivai-product-detail__gallery .woocommerce-product-gallery__trigger > * {
	display: none !important;
}

html body.single-product .luxivai-product-detail__gallery .woocommerce-product-gallery__trigger {
	top: calc(var(--luxivai-gallery-badge-offset, 18px) + 58px) !important;
	right: var(--luxivai-gallery-badge-offset, 18px) !important;
	bottom: auto !important;
	left: auto !important;
	z-index: 32 !important;
}

.luxivai-product-detail__gallery {
	position: relative;
}

.luxivai-video-button {
	position: absolute;
	z-index: 31;
	top: var(--luxivai-gallery-badge-offset, 18px);
	left: var(--luxivai-gallery-badge-offset, 18px);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	color: #111;
	background: #fff;
	border: 1px solid #111;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
}

.luxivai-product-gallery-discount ~ .luxivai-video-button {
	top: calc(var(--luxivai-gallery-badge-offset, 18px) + 52px);
}

.luxivai-video-button svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
}

.luxivai-video-button:hover,
.luxivai-video-button:focus-visible {
	background: var(--wp--preset--color--pale-blush, #f3e3e1);
}

.luxivai-size-guide-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 4px 0 14px;
	padding: 0;
	color: #111;
	background: none;
	border: 0;
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 4px;
	cursor: pointer;
}

.luxivai-size-guide-link svg,
.luxivai-delivery svg,
.luxivai-trust svg {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.luxivai-delivery {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 6px 0 14px;
	color: var(--wp--preset--color--charcoal, #3f3f3f);
	font-size: 14px;
	line-height: 1.5;
}

.luxivai-delivery[hidden] {
	display: none;
}

.luxivai-delivery strong {
	color: #111;
}

.luxivai-trust {
	display: grid;
	gap: 8px;
	margin: 6px 0 18px;
	padding: 16px 0 0;
	border-top: 1px solid #e5e5e5;
	list-style: none;
}

.luxivai-trust li {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--wp--preset--color--charcoal, #3f3f3f);
	font-size: 14px;
}

.luxivai-trust svg {
	color: var(--wp--preset--color--dusty-rose, #dca8a6);
	stroke-width: 2;
}

.luxivai-catalog-enquire {
	margin: 0 0 16px;
}

/* Catalog mode hides cart icons (buying is switched off). */
.luxivai-catalog-mode .luxivai-header__cart,
.luxivai-catalog-mode .luxivai-mobile-nav__item[data-luxivai-cart-link] {
	display: none !important;
}

/* ---------------------------------------------------------
   Dialog (size guide, video)
--------------------------------------------------------- */

body.luxivai-dialog-open {
	overflow: hidden;
}

.luxivai-dialog {
	position: fixed;
	z-index: 100030;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.luxivai-dialog[hidden] {
	display: none;
}

.luxivai-dialog__overlay {
	position: absolute;
	inset: 0;
	background: rgb(15 14 14 / 38%);
}

.luxivai-dialog__box {
	position: relative;
	width: min(760px, 100%);
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 36px 36px 30px;
	background: var(--wp--preset--color--white, #fff);
	box-shadow: 0 14px 45px rgb(0 0 0 / 16%);
}

.luxivai-dialog.is-wide .luxivai-dialog__box {
	width: min(1000px, 100%);
}

.luxivai-dialog__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	padding: 0;
	color: #777;
	background: none;
	border: 0;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.luxivai-dialog__title {
	margin: 0 0 18px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.luxivai-dialog__content table {
	width: 100%;
	border-collapse: collapse;
}

.luxivai-dialog__content th,
.luxivai-dialog__content td {
	padding: 8px 10px;
	text-align: left;
	border-bottom: 1px solid #e5e5e5;
}

.luxivai-video-embed iframe,
.luxivai-video-embed video {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border: 0;
}

@media (max-width: 767px) {
	.luxivai-dialog__box {
		padding: 30px 18px 22px;
	}
}
