/* WooCommerce overrides — modern card-style product grid */

.woocommerce-main {
	max-width: 1200px;
	margin: 0 auto;
	padding: 3rem 1rem;
}

/* Shop/category archive banner — smaller echo of the homepage hero */

.shop-banner {
	position: relative;
	overflow: hidden;
	background: var(--pl-navy, #0b1120);
	color: #fff;
	margin: -3rem -1rem 2rem;
	padding: 2.5rem 1.5rem;
}

.shop-banner::before,
.shop-banner::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	filter: blur(10px);
	z-index: 0;
	pointer-events: none;
}

.shop-banner::before {
	width: 320px;
	height: 320px;
	top: -140px;
	left: 6%;
	background: radial-gradient(circle at 35% 35%, rgba(59, 91, 219, 0.5), transparent 70%);
}

.shop-banner::after {
	width: 220px;
	height: 220px;
	top: 20%;
	right: 8%;
	background: radial-gradient(circle at 60% 40%, rgba(168, 85, 247, 0.22), transparent 70%);
}

.shop-banner .container {
	position: relative;
	z-index: 2;
}

.shop-banner__title {
	font-family: var(--pl-font-heading, 'Poppins', sans-serif);
	font-weight: 700;
	font-size: clamp(1.6rem, 3vw, 2.25rem);
	margin: 0;
}

/* Two-column layout: product grid + shop-sidebar filters */

.woocommerce-layout {
	display: block;
}

.has-shop-sidebar .woocommerce-layout {
	display: flex;
	align-items: flex-start;
	gap: 2.5rem;
}

.woocommerce-layout__primary {
	flex: 1 1 0;
	min-width: 0;
}

.woocommerce-main #secondary.widget-area {
	flex: 0 0 280px;
}

.woocommerce-main #secondary.widget-area .widget {
	background: var(--pl-surface, #f8fafc);
	border: 1px solid var(--pl-border, #e2e8f0);
	border-radius: var(--pl-radius-sm, 8px);
	padding: 1.25rem;
	margin-bottom: 1.5rem;
}

.woocommerce-main #secondary.widget-area .widget-title {
	font-family: var(--pl-font-heading, 'Poppins', sans-serif);
	font-size: 1rem;
	margin-bottom: 0.75rem;
}

@media (max-width: 992px) {
	.has-shop-sidebar .woocommerce-layout {
		flex-direction: column;
	}

	.woocommerce-main #secondary.widget-area {
		flex-basis: auto;
		width: 100%;
	}
}

@media (min-width: 993px) {
	.woocommerce-main.has-shop-sidebar ul.products li.product {
		width: calc(33.333% - 1.1666rem);
	}
}

.woocommerce ul.products {
	display: flex;
	flex-wrap: wrap;
	gap: 1.75rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.woocommerce ul.products li.product {
	width: calc(25% - 1.3125rem);
	text-align: left;
	background: transparent;
	transition: opacity 0.2s ease;
}

.woocommerce ul.products li.product:hover {
	opacity: 0.92;
}

.woocommerce ul.products li.product a {
	text-decoration: none;
	color: inherit;
	display: block;
}

.woocommerce ul.products li.product img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	background: var(--pl-navy, #0b1120);
	margin-bottom: 1rem;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--pl-font-body, 'Inter', sans-serif);
	font-size: 0.95rem;
	font-weight: 500;
	margin-bottom: 0.25rem;
}

.woocommerce ul.products li.product .price {
	font-weight: 600;
	color: var(--pl-ink, #0f172a);
}

.woocommerce ul.products li.product .star-rating {
	margin: 0.35rem 0 0;
}

/* Single product page */

.woocommerce div.product {
	padding: 1rem 0 2rem;
}

.woocommerce div.product .woocommerce-product-gallery {
	border-radius: var(--pl-radius, 14px);
	overflow: hidden;
	box-shadow: var(--pl-shadow, 0 4px 16px rgba(15, 23, 42, 0.06));
}

.woocommerce div.product .woocommerce-product-gallery img {
	border-radius: var(--pl-radius, 14px);
}

.woocommerce div.product .flex-control-thumbs li img {
	border-radius: var(--pl-radius-sm, 8px);
	opacity: 0.6;
	transition: opacity 0.15s ease;
}

.woocommerce div.product .flex-control-thumbs li img.flex-active,
.woocommerce div.product .flex-control-thumbs li img:hover {
	opacity: 1;
}

.woocommerce div.product .summary {
	padding-left: 1rem;
}

.woocommerce div.product .summary .product_title {
	font-family: var(--pl-font-heading, 'Poppins', sans-serif);
	font-weight: 700;
	margin-bottom: 0.5rem;
}

.woocommerce div.product .summary p.price,
.woocommerce div.product .summary .price {
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--bs-primary, #2563eb);
	margin: 0.75rem 0 1.25rem;
}

.woocommerce div.product .summary .woocommerce-product-details__short-description {
	color: var(--pl-muted, #64748b);
	margin-bottom: 1.5rem;
}

/* Variation swatches (replaces the default <select> dropdown) */

.woocommerce div.product table.variations {
	width: 100%;
	border: none;
	margin-bottom: 0.5rem;
}

.woocommerce div.product table.variations tbody,
.woocommerce div.product table.variations tr {
	display: block;
}

.woocommerce div.product table.variations tr {
	margin-bottom: 1.1rem;
}

.woocommerce div.product table.variations td.label {
	display: block;
	font-weight: 600;
	padding-bottom: 0.5rem;
}

.woocommerce div.product table.variations td.value {
	display: block;
}

.variation-select-hidden {
	display: none !important;
}

.variation-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.variation-swatch {
	position: relative;
	overflow: hidden;
	min-width: 3.25rem;
	border: 1.5px solid var(--pl-border, #e2e8f0);
	background: #fff;
	border-radius: var(--pl-radius-sm, 8px);
	padding: 0.6rem 1.25rem;
	font-weight: 600;
	font-size: 0.9rem;
	letter-spacing: 0.01em;
	color: var(--pl-ink, #0f172a);
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.variation-swatch:hover:not(:disabled) {
	border-color: var(--bs-primary, #2563eb);
	color: var(--bs-primary, #2563eb);
	transform: translateY(-2px);
	box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
}

.variation-swatch.selected {
	border-color: var(--bs-primary, #2563eb);
	background: var(--bs-primary, #2563eb);
	color: #fff;
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
}

.variation-swatch.selected:hover:not(:disabled) {
	color: #fff;
	transform: none;
}

.variation-swatch:disabled {
	background: var(--pl-surface, #f8fafc);
	border-color: var(--pl-border, #e2e8f0);
	color: var(--pl-muted, #64748b);
	opacity: 0.6;
	cursor: not-allowed;
	box-shadow: none;
}

/*
 * Two distinct "unavailable" states:
 * - :disabled  → WooCommerce says this attribute combination doesn't exist at all.
 * - .out-of-stock → the combination is real but that specific variation has no stock;
 *   WooCommerce leaves the option enabled, so we flag it ourselves from the
 *   variation data and keep it clickable (selecting it still reveals WooCommerce's
 *   own "out of stock" message and disables Add to Cart).
 */
.variation-swatch.out-of-stock {
	background: var(--pl-surface, #f8fafc);
	border-color: var(--pl-border, #e2e8f0);
	color: var(--pl-muted, #64748b);
}

.variation-swatch.out-of-stock:hover:not(:disabled) {
	transform: none;
	box-shadow: none;
	border-color: var(--pl-border, #e2e8f0);
	color: var(--pl-muted, #64748b);
}

/* Diagonal "out of stock" strike, corner to corner, scales with box size */
.variation-swatch:disabled::after,
.variation-swatch.out-of-stock::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top right,
		transparent calc(50% - 1px),
		rgba(100, 116, 139, 0.65) 50%,
		transparent calc(50% + 1px)
	);
}

/* Selected-but-out-of-stock (shopper clicked it anyway): keep the blue fill,
   switch the strike to white so it still reads against the dark background. */
.variation-swatch.selected.out-of-stock {
	background: var(--bs-primary, #2563eb);
	color: #fff;
}

.variation-swatch.selected.out-of-stock::after {
	background: linear-gradient(
		to top right,
		transparent calc(50% - 1px),
		rgba(255, 255, 255, 0.85) 50%,
		transparent calc(50% + 1px)
	);
}

.woocommerce div.product form.cart {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.5rem;
}

.woocommerce div.product form.cart .quantity {
	margin: 0;
}

.woocommerce div.product form.cart .qty {
	border: 1px solid var(--pl-border, #e2e8f0);
	border-radius: var(--pl-radius-sm, 8px);
	padding: 0.6rem 0.75rem;
	width: 4.5rem;
	text-align: center;
}

.woocommerce div.product form.cart .single_add_to_cart_button {
	background: var(--bs-primary, #2563eb);
	border: none;
	border-radius: var(--pl-radius-sm, 8px);
	color: #fff;
	font-weight: 600;
	padding: 0.75rem 2rem;
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.woocommerce div.product form.cart .single_add_to_cart_button:hover {
	background: var(--pl-primary-dark, #1e40af);
	transform: translateY(-2px);
	box-shadow: 0 10px 22px rgba(37, 99, 235, 0.35);
}

.woocommerce div.product .product_meta {
	font-size: 0.85rem;
	color: var(--pl-muted, #64748b);
	border-top: 1px solid var(--pl-border, #e2e8f0);
	padding-top: 1rem;
}

.woocommerce div.product .woocommerce-tabs {
	margin-top: 3rem;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
	border-bottom: 1px solid var(--pl-border, #e2e8f0);
	padding-left: 0;
	list-style: none;
	display: flex;
	gap: 0.5rem;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
	margin: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
	display: inline-block;
	padding: 0.75rem 1.25rem;
	font-weight: 600;
	color: var(--pl-muted, #64748b);
	text-decoration: none;
	border-radius: var(--pl-radius-sm, 8px) var(--pl-radius-sm, 8px) 0 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
	color: var(--bs-primary, #2563eb);
	background: var(--pl-surface, #f8fafc);
}

.woocommerce div.product .woocommerce-tabs .panel {
	padding: 2rem 0;
}

.woocommerce div.product .related.products {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--pl-border, #e2e8f0);
}

.woocommerce div.product .related.products > h2 {
	font-weight: 700;
	text-align: center;
	margin-bottom: 2rem;
}

@media (max-width: 992px) {
	.woocommerce div.product .summary {
		padding-left: 0;
		margin-top: 1.5rem;
	}
}

@media (max-width: 992px) {
	.woocommerce ul.products li.product {
		width: calc(50% - 0.875rem);
	}
}

@media (max-width: 576px) {
	.woocommerce ul.products li.product {
		width: 100%;
	}
}

/* Stock quantity line in the product loop (shop, category archives, homepage grid) */

.woocommerce ul.products li.product .stock {
	font-size: 0.8rem;
	margin: 0.35rem 0 0;
}

.woocommerce ul.products li.product .stock.low-stock {
	color: #b45309;
	font-weight: 600;
}

.woocommerce ul.products li.product .stock.out-of-stock {
	color: var(--pl-muted, #64748b);
}

/*
 * Card treatment for shop/category archives + single-product related
 * products (both render inside .woocommerce-main). The homepage uses a
 * separate .front-page .shop-grid wrapper and keeps the flat style above —
 * this rule has equal selector specificity to it, so it must stay declared
 * after it to win the cascade (not relying on !important).
 */
.woocommerce-main ul.products li.product {
	background: #fff;
	border-radius: var(--pl-radius, 14px);
	box-shadow: var(--pl-shadow, 0 4px 16px rgba(15, 23, 42, 0.06));
	padding: 1rem;
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.woocommerce-main ul.products li.product:hover {
	transform: translateY(-4px);
	box-shadow: var(--pl-shadow-hover, 0 12px 28px rgba(15, 23, 42, 0.12));
	opacity: 1;
}

.woocommerce-main ul.products li.product img {
	border-radius: var(--pl-radius-sm, 8px);
}
