/**
 * WooCommerce Quick View – Modal Styling
 *
 * Framework-free: pure CSS with CSS Variables, Grid & Flexbox.
 * Desktop: two-column layout with a sticky summary column.
 * Mobile: single-column stacked layout.
 *
 * @package larson-child
 */

:root {
	--lcs-qv-zindex: 999;
	--lcs-qv-radius: 10px;
	--lcs-qv-accent: #154963;
	--lcs-qv-accent-hover: #ef7800;
	--lcs-qv-bg: #ffffff;
	--lcs-qv-text: #1a1a1a;
	--lcs-qv-muted: #6b6b6b;
	--lcs-qv-border: rgba(21, 73, 99, 0.15);
	--lcs-qv-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
	--lcs-qv-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Scroll lock ── */
body.lcs-quick-view-open {
	overflow: hidden;
}

/* ── Overlay ── */
.lcs-quick-view-overlay {
	position: fixed;
	inset: 0;
	z-index: var(--lcs-qv-zindex);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(10, 20, 30, 0.55);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s var(--lcs-qv-ease), visibility 0.3s var(--lcs-qv-ease);
}

.lcs-quick-view-overlay[hidden] {
	display: flex;
}

.lcs-quick-view-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

/* ── Modal shell ── */
.lcs-quick-view-modal {
	position: relative;
	width: min(560px, 100%);
	max-height: calc(100vh - 48px);
	background: var(--lcs-qv-bg);
	color: var(--lcs-qv-text);
	border-radius: var(--lcs-qv-radius);
	box-shadow: var(--lcs-qv-shadow);
	overflow: hidden;
	opacity: 0;
	transform: translateY(24px) scale(0.98);
	transition: opacity 0.35s var(--lcs-qv-ease), transform 0.35s var(--lcs-qv-ease);
}

.lcs-quick-view-modal[hidden] {
	display: block;
}

.lcs-quick-view-modal.is-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
}

/* ── Inner content ── */
.lcs-quick-view {
	display: block;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* ── Summary (single column, no gallery) ── */
.lcs-quick-view__summary {
	padding: 32px 36px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/*
 * Summary styles use !important on properties that wc-custom.css overrides
 * via high-specificity selectors like `.woocommerce div.product .product_title`
 * (font-size:48px, margin-bottom:40px) and `.woocommerce .quantity .qty`
 * (height:46px, padding:0 10px, margin-right:10px). Without !important those
 * parent-theme rules win because the modal root carries the `product` class,
 * so `div.product` matches it inside a `.woocommerce` body context.
 */

.lcs-quick-view__summary .product_title,
.woocommerce .lcs-quick-view__summary .product_title,
.woocommerce div.product .lcs-quick-view__summary .product_title {
	margin: 0 !important;
	margin-bottom: 0 !important;
	font-size: clamp(24px, 3vw, 34px) !important;
	line-height: 1.15 !important;
	font-weight: 700 !important;
	color: #000 !important;
}

.lcs-quick-view__summary .price,
.woocommerce .lcs-quick-view__summary .price,
.woocommerce div.product .lcs-quick-view__summary .price {
	margin: 0 !important;
	margin-bottom: 0 !important;
	font-size: 22px !important;
	color: var(--lcs-qv-accent) !important;
}

.lcs-quick-view__summary .woocommerce-product-rating,
.woocommerce .lcs-quick-view__summary .woocommerce-product-rating {
	margin: 0 !important;
}

.lcs-quick-view__summary .woocommerce-product-details__short-description,
.lcs-quick-view__description,
.woocommerce .lcs-quick-view__summary .woocommerce-product-details__short-description,
.woocommerce .lcs-quick-view__description {
	margin: 0 !important;
	margin-bottom: 0 !important;
	color: var(--lcs-qv-text) !important;
	font-size: 15px !important;
	line-height: 1.7 !important;
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

.lcs-quick-view__description p:first-child {
	margin-top: 0;
	margin-block-start: 0 !important;
}

.lcs-quick-view__description p:last-child {
	margin-bottom: 0;
	margin-block-end: 0 !important;
}

.lcs-quick-view__description h1,
.lcs-quick-view__description h2,
.lcs-quick-view__description h3,
.lcs-quick-view__description h4 {
	margin: 18px 0 8px;
	line-height: 1.2;
}

.lcs-quick-view__description ul,
.lcs-quick-view__description ol {
	margin: 8px 0;
	padding-left: 20px;
}

.lcs-quick-view__description img {
	max-width: 100%;
	height: auto;
}

/* Variation form / swatches */
.lcs-quick-view__summary form.cart,
.woocommerce .lcs-quick-view__summary form.cart,
.woocommerce div.product .lcs-quick-view__summary form.cart {
	margin: 8px 0 0 !important;
}

.lcs-quick-view__summary .variations,
.woocommerce .lcs-quick-view__summary .variations,
.woocommerce div.product .lcs-quick-view__summary .variations {
	margin: 0 0 16px !important;
	margin-bottom: 16px !important;
}

.lcs-quick-view__summary .variations td,
.lcs-quick-view__summary .variations th,
.woocommerce .lcs-quick-view__summary .variations td,
.woocommerce .lcs-quick-view__summary .variations th {
	padding: 0 !important;
	padding-bottom: 6px !important;
	vertical-align: middle !important;
	text-align: left !important;
}

.lcs-quick-view__summary .cart.variations_form .tawcvs-swatches .swatch-item-wrapper {
    margin: 0 5px !important;;
}

.lcs-quick-view__summary .variations label {
	font-weight: 400 !important;
	color: #000 !important;
}

.lcs-quick-view__summary .variations select {
	width: 100%;
	max-width: 240px;
}

.lcs-quick-view__summary .single_variation_wrap,
.woocommerce .lcs-quick-view__summary .single_variation_wrap {
	margin-top: 12px;
}

/* Override wc-custom.css .woocommerce-variation.single_variation { margin-bottom: 40px } */
.lcs-quick-view__summary .woocommerce-variation.single_variation,
.woocommerce .lcs-quick-view__summary .woocommerce-variation.single_variation {
	margin-bottom: 0 !important;
}

.lcs-quick-view__summary .lcs-variable-product-stock {
	margin: 0;
	font-size: 14px;
}
.lcs-quick-view__summary .lcs-variable-product-stock > p{
	margin: 0 !important;
}

/* Quantity + add to cart row */
.lcs-quick-view__summary .quantity,
.woocommerce .lcs-quick-view__summary .quantity {
	display: inline-flex !important;
	align-items: stretch;
	border: 1px solid var(--lcs-qv-accent);
	overflow: hidden;
	margin: 0 !important;
	visibility: visible !important;
}

.lcs-quick-view__summary .quantity .qty,
.woocommerce .lcs-quick-view__summary .quantity .qty {
	width: 64px !important;
	text-align: center;
	border: 0;
	border-left: 1px solid var(--lcs-qv-accent);
	border-right: 1px solid var(--lcs-qv-accent);
	margin: 0 !important;
	margin-right: 0 !important;
	padding: 0 !important;
	min-height: 48px !important;
	height: 48px !important;
	box-shadow: none;
}

.lcs-quick-view__summary .quantity .lcs-qty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	border: 0;
	background: transparent;
	color: var(--lcs-qv-accent);
	font-size: 13px;
	cursor: pointer;
}

.lcs-quick-view__summary .quantity .lcs-qty-btn:hover {
	background: rgba(21, 73, 99, 0.08);
}

.lcs-quick-view__summary .single_add_to_cart_button,
.lcs-quick-view__summary button.button.alt,
.woocommerce .lcs-quick-view__summary .single_add_to_cart_button,
.woocommerce .lcs-quick-view__summary button.button.alt {
	min-height: 50px !important;
	padding: 0 28px !important;
	margin-left: 5px !important;
	border-radius: 0 !important;
	color: #fff !important;
	font-weight: 600 !important;
	cursor: pointer;
}

.lcs-quick-view__summary .single_add_to_cart_button:hover,
.lcs-quick-view__summary button.button.alt:hover {
	background: var(--lcs-qv-accent-hover) !important;
}

/* View full details link */
.lcs-quick-view__actions {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid var(--lcs-qv-border);
}

.lcs-quick-view__details-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--lcs-qv-accent);
	font-weight: 600;
	text-decoration: none;
	transition: color 0.2s var(--lcs-qv-ease);
}

.lcs-quick-view__details-link:hover {
	color: var(--lcs-qv-accent-hover);
}

/* ── Close button ── */
.lcs-quick-view__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: var(--lcs-qv-accent);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
	transition: background 0.2s var(--lcs-qv-ease), transform 0.2s var(--lcs-qv-ease);
}

.lcs-quick-view__close:hover {
	background: var(--lcs-qv-accent);
	color: #fff;
	transform: rotate(90deg);
}

/* ── Spinner ── */
.lcs-quick-view-spinner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	min-height: 320px;
	padding: 60px 24px;
	color: var(--lcs-qv-accent);
}

.lcs-quick-view-spinner__dot {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(21, 73, 99, 0.18);
	border-top-color: var(--lcs-qv-accent);
	border-radius: 50%;
	animation: lcs-qv-spin 0.8s linear infinite;
}

.lcs-quick-view-spinner__text {
	font-size: 14px;
	color: var(--lcs-qv-muted);
}

@keyframes lcs-qv-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ── Error state ── */
.lcs-quick-view-error {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	min-height: 320px;
	padding: 48px 24px;
	text-align: center;
}

.lcs-quick-view-error__message {
	margin: 0;
	font-size: 16px;
	color: var(--lcs-qv-text);
}

.lcs-quick-view-error__close {
	padding: 10px 24px;
	border: 0;
	border-radius: 4px;
	background: var(--lcs-qv-accent);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.lcs-quick-view-error__close:hover {
	background: var(--lcs-qv-accent-hover);
}

/* ── Trigger button (loop) ── */
a.lcs-quick-view-trigger,
a.product_type_variable.lcs-quick-view-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 4px;
	background: var(--lcs-qv-accent);
	color: #fff !important;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s var(--lcs-qv-ease);
}

a.lcs-quick-view-trigger:hover {
	background: var(--lcs-qv-accent-hover);
}

/* ── Mobile: full-screen modal ── */
@media ( max-width: 767px ) {
	.lcs-quick-view-overlay {
		padding: 0;
	}

	.lcs-quick-view-modal {
		max-height: 100vh;
		border-radius: 0;
		transform: translateY(100%);
	}

	.lcs-quick-view-modal.is-visible {
		transform: translateY(0);
	}

	.lcs-quick-view {
		max-height: 100vh;
	}

	.lcs-quick-view__summary {
		position: static;
		max-height: none;
		padding: 24px 20px 40px;
		overflow: visible;
	}
}
