/**
 * Child-only Shop grid and hover styles.
 *
 * Everything is scoped to the child card classes or the child_premium archive
 * wrapper. Stockie's Classic, Minimal, Scattered and Carousel CSS is untouched.
 */

.clb-shop-card {
	--clb-card-surface: #f3f1ed;
	--clb-card-ink: #171717;
	--clb-card-muted: #7b746c;
	--clb-card-radius: 2px;
	position: relative;
	overflow: hidden;
	background: #fff;
	border-radius: var(--clb-card-radius);
	transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.clb-shop-card:hover,
.clb-shop-card:focus-within {
	box-shadow: 0 18px 42px rgba(24, 20, 15, 0.16);
	transform: translateY(-4px);
}

.clb-shop-card--layout-premium .clb-shop-card__media {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--clb-card-surface);
	border-radius: var(--clb-card-radius);
	transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.clb-shop-card--layout-premium .slider,
.clb-shop-card--layout-premium .slider > a,
.clb-shop-card--layout-premium .slider .owl-stage-outer,
.clb-shop-card--layout-premium .slider .owl-stage,
.clb-shop-card--layout-premium .slider .owl-item,
.clb-shop-card--layout-premium .slider .owl-item > a {
	height: 100%;
}

.clb-shop-card--layout-premium .slider > a,
.clb-shop-card--layout-premium .slider .owl-item > a {
	display: flex;
	align-items: center;
	justify-content: center;
}

.woo_c-products .clb-shop-card--layout-premium .slider img,
.products .clb-shop-card--layout-premium .slider img {
	display: block;
	width: 100%;
	height: 100%;
	padding: clamp(22px, 7%, 42px);
	object-fit: contain;
	transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.2, 0.75, 0.25, 1);
}

.clb-shop-card--layout-premium .clb-shop-card__content {
	padding: 18px 2px 34px;
	background: transparent;
}

.clb-shop-card--layout-premium .clb-shop-card__category {
	margin-bottom: 7px;
	color: var(--clb-card-muted);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.13em;
	line-height: 1.45;
	text-transform: uppercase;
}

.clb-shop-card--layout-premium .clb-shop-card__category a {
	color: inherit;
}

.woo_c-products .clb-shop-card--layout-premium .clb-shop-card__title,
.products .clb-shop-card--layout-premium .clb-shop-card__title {
	display: -webkit-box;
	min-height: 2.8em;
	overflow: hidden;
	color: var(--clb-card-ink);
	font-size: clamp(15px, 1.15vw, 18px);
	font-weight: 500;
	letter-spacing: -0.015em;
	line-height: 1.4;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.clb-shop-card--layout-premium .clb-shop-card__purchase {
	display: flex;
	min-height: 18px;
	margin-top: 7px;
	flex-direction: column;
}

.woo_c-products .clb-shop-card--layout-premium .price,
.products .clb-shop-card--layout-premium .price {
	position: relative;
	width: 100%;
	min-height: 18px;
	color: var(--clb-card-ink);
	font-size: 13px;
	font-weight: 600;
	transform: none;
	opacity: 1;
}

.woo_c-products .clb-shop-card:hover .clb-shop-card__purchase .price,
.products .clb-shop-card:hover .clb-shop-card__purchase .price {
	transform: none;
	opacity: 1;
}

/* Quickview is intentionally removed: every product image links to its page. */
.clb-shop-card .quickview-link {
	display: none !important;
}

.clb-shop-card__hover-overlay {
	position: absolute;
	inset: 0;
	z-index: 20;
	display: flex;
	padding: 24px;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.clb-shop-card:hover .clb-shop-card__hover-overlay,
.clb-shop-card__hover-overlay:focus-within {
	opacity: 1;
	pointer-events: auto;
}

.clb-shop-card__hover-action {
	width: min(240px, 100%);
	transform: translateY(10px);
	transition: transform 0.3s ease;
}

.clb-shop-card:hover .clb-shop-card__hover-action,
.clb-shop-card__hover-overlay:focus-within .clb-shop-card__hover-action {
	transform: translateY(0);
}

.woo_c-products .clb-shop-card .clb-shop-card__hover-action a,
.products .clb-shop-card .clb-shop-card__hover-action a {
	display: flex;
	width: 100%;
	min-height: 40px;
	padding: 8px 16px;
	align-items: center;
	justify-content: center;
	background: #171717;
	border: 1px solid rgba(255, 255, 255, 0.8);
	border-radius: 999px;
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 600;
	line-height: 1.2;
	text-indent: 0;
	text-align: center;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.25s ease, transform 0.25s ease;
}

.woo_c-products .clb-shop-card .clb-shop-card__cart-label,
.products .clb-shop-card .clb-shop-card__cart-label {
	display: block;
	color: #fff !important;
	font: inherit !important;
	line-height: inherit !important;
	opacity: 1 !important;
	visibility: visible !important;
}

.woo_c-products .clb-shop-card .clb-shop-card__hover-action a:hover,
.woo_c-products .clb-shop-card .clb-shop-card__hover-action a:focus-visible,
.products .clb-shop-card .clb-shop-card__hover-action a:hover,
.products .clb-shop-card .clb-shop-card__hover-action a:focus-visible {
	background: #fff;
	border-color: #171717;
	color: #171717 !important;
}

.woo_c-products .clb-shop-card .clb-shop-card__hover-action a:hover .clb-shop-card__cart-label,
.woo_c-products .clb-shop-card .clb-shop-card__hover-action a:focus-visible .clb-shop-card__cart-label,
.products .clb-shop-card .clb-shop-card__hover-action a:hover .clb-shop-card__cart-label,
.products .clb-shop-card .clb-shop-card__hover-action a:focus-visible .clb-shop-card__cart-label {
	color: #171717 !important;
}

.clb-shop-card--layout-premium .clb-shop-card__utility,
.clb-shop-card--hover-reveal .clb-shop-card__utility {
	top: 14px;
	right: 14px;
	bottom: auto;
	left: 14px;
	width: auto;
	padding: 0;
	justify-content: flex-end;
}

.clb-shop-card--layout-premium .clb-shop-card__utility > *,
.clb-shop-card--hover-reveal .clb-shop-card__utility > * {
	flex: 0 1 auto;
}

/* Premium archive spacing and filter bar. */
.shop-product-child_premium .woo_c-products {
	margin-right: -12px;
	margin-left: -12px;
}

.shop-product-child_premium .woo_c-products > .product {
	margin-bottom: clamp(30px, 4vw, 54px);
	padding-right: 12px;
	padding-left: 12px;
}

.shop-product-child_premium .ordering-filters-holder {
	margin-bottom: clamp(24px, 3vw, 38px);
	padding: 14px 0;
	border-top: 1px solid rgba(23, 23, 23, 0.12);
	border-bottom: 1px solid rgba(23, 23, 23, 0.12);
}

.shop-product-child_premium .filters-button {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.11em;
	text-transform: uppercase;
}

.shop-product-child_premium .filters-button svg {
	width: 19px;
	height: 19px;
}

.shop-product-child_premium .woocommerce-result-count {
	color: var(--clb-card-muted, #7b746c);
	font-size: 12px;
}

/* Premium archive: the catalogue sidebar moves into Stockie's existing popup. */
.shop-product-child_premium > .page-sidebar,
.shop-product-child_premium > .woo-sidebar {
	display: none !important;
}

.shop-product-child_premium > .page-content {
	float: none;
	width: 100%;
	margin-right: 0;
	margin-left: 0;
}

.shop-product-child_premium > .page-content.with-left-sidebar,
.shop-product-child_premium > .page-content.with-right-sidebar {
	width: 100%;
	margin-right: 0;
	margin-left: 0;
}

@media screen and (min-width: 1025px) {
	.shop-product-child_premium .woo_c-products > .product {
		width: 25%;
		clear: none;
	}

	.shop-product-child_premium .woo_c-products > .product:nth-child(4n + 1) {
		clear: both;
	}
}

/* Today Best Deals */
.clb-today-deals {
	--clb-deals-accent: var(--clb-color-primary, #ff5c1a);
	margin: 0;
	padding: clamp(20px, 2.6vw, 34px);
	overflow: hidden;
	background: #f7f7f5;
	border-radius: 22px;
}

.clb-today-deals__header {
	display: flex;
	margin-bottom: 20px;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.clb-today-deals__title {
	margin: 0;
	font-size: clamp(22px, 2vw, 30px);
	line-height: 1.15;
}

.clb-today-deals__controls,
.clb-today-deals__timer {
	display: flex;
	align-items: center;
}

.clb-today-deals__controls {
	gap: 8px;
}

.clb-today-deals__timer {
	min-height: 38px;
	margin-right: 5px;
	padding: 7px 15px;
	gap: 5px;
	background: var(--clb-deals-accent);
	border-radius: 999px;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
}

.clb-today-deals__timer time {
	min-width: 66px;
	font-variant-numeric: tabular-nums;
}

.clb-today-deals__arrow {
	display: inline-flex;
	width: 38px;
	height: 38px;
	padding: 0;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid rgba(23, 23, 23, 0.1);
	border-radius: 50%;
	color: #171717;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.clb-today-deals__arrow:hover:not(:disabled),
.clb-today-deals__arrow:focus-visible:not(:disabled) {
	background: #171717;
	color: #fff;
}

.clb-today-deals__arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.clb-today-deals__rail {
	display: grid;
	/* Four complete deals per desktop view; the remaining deals stay on the rail. */
	grid-auto-columns: calc((100% - 48px) / 4);
	grid-auto-flow: column;
	gap: 16px;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	scroll-behavior: smooth;
	scroll-snap-type: inline mandatory;
	scrollbar-width: none;
}

.clb-today-deals__rail::-webkit-scrollbar {
	display: none;
}

.clb-today-deals__item {
	min-width: 0;
	overflow: hidden;
	background: #fff;
	border: 1px solid rgba(23, 23, 23, 0.06);
	border-radius: 16px;
	scroll-snap-align: start;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.clb-today-deals__item:hover {
	box-shadow: 0 16px 35px rgba(25, 25, 20, 0.08);
	transform: translateY(-3px);
}

.clb-today-deals__media {
	position: relative;
	display: flex;
	aspect-ratio: 1.2 / 1;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: #f3f3f1;
}

.clb-today-deals__media > a {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
}

.clb-today-deals__media img {
	display: block;
	width: 100%;
	height: 100%;
	padding: 18px;
	object-fit: contain;
	transition: transform 0.35s ease;
}

.clb-today-deals__item:hover .clb-today-deals__media img {
	transform: scale(1.035);
}

.clb-today-deals__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	padding: 5px 9px;
	background: var(--clb-deals-accent);
	border-radius: 6px;
	color: #fff;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1;
	text-transform: uppercase;
}

.clb-today-deals__wishlist {
	position: absolute;
	top: 9px;
	right: 9px;
	z-index: 3;
}

.clb-today-deals__wishlist .yith-wcwl-add-to-wishlist {
	margin: 0;
}

.clb-today-deals__content {
	padding: 14px 15px 17px;
}

.clb-today-deals__category {
	margin-bottom: 4px;
	overflow: hidden;
	color: #8a847d;
	font-size: 9px;
	font-weight: 600;
	letter-spacing: 0.11em;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.clb-today-deals__category a {
	color: inherit;
}

.clb-today-deals__name {
	margin: 0;
	overflow: hidden;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.clb-today-deals__meta {
	display: flex;
	min-height: 19px;
	margin-top: 5px;
	align-items: center;
	gap: 7px;
	color: #8a847d;
	font-size: 10px;
}

.clb-today-deals__rating {
	color: #171717;
	font-weight: 600;
}

.clb-today-deals__rating span {
	color: #f7b500;
}

.clb-today-deals__price {
	margin-top: 4px;
	color: #171717;
	font-size: 15px;
	font-weight: 700;
}

.clb-today-deals__price del {
	margin-right: 4px;
	color: #99938c;
	font-size: 10px;
	font-weight: 400;
}

.clb-today-deals__price ins {
	text-decoration: none;
}

/* Editorial pause between the deals rail and the main catalogue controls. */
.clb-shop-slogan {
	max-width: 760px;
	margin: 0 auto;
	padding: clamp(52px, 7vw, 96px) 24px;
	text-align: center;
}

.clb-shop-slogan__title {
	margin: 0;
	color: #171717;
	font-size: clamp(32px, 4vw, 54px);
	font-weight: 500;
	letter-spacing: -0.035em;
	line-height: 1.08;
}

.clb-shop-slogan__copy {
	max-width: 610px;
	margin: 18px auto 0;
	color: #8a847d;
	font-size: clamp(14px, 1.3vw, 18px);
	line-height: 1.65;
}

@media (max-width: 1024px) {
	.clb-shop-card--layout-premium .clb-shop-card__media {
		aspect-ratio: 3 / 4;
	}

	.clb-today-deals__rail {
		grid-auto-columns: calc((100% - 32px) / 3);
	}
}

@media (max-width: 768px) {
	.shop-product-child_premium .woo_c-products,
	.shop-product-child_premium .columns-sm-2 .woo_c-products {
		margin-right: -6px;
		margin-left: -6px;
	}

	.shop-product-child_premium .woo_c-products > .product,
	.shop-product-child_premium .columns-sm-2 .woo_c-products > .product {
		margin-bottom: 26px;
		padding-right: 6px;
		padding-left: 6px;
	}

	.clb-shop-card--layout-premium .clb-shop-card__content {
		padding: 12px 0 24px;
	}

	.woo_c-products .clb-shop-card--layout-premium .clb-shop-card__title,
	.products .clb-shop-card--layout-premium .clb-shop-card__title {
		font-size: 14px;
	}

	.clb-shop-card--layout-premium .clb-shop-card__category {
		margin-bottom: 5px;
		font-size: 9px;
	}

	.shop-product-child_premium .ordering-filters-holder {
		margin-bottom: 22px;
		padding: 10px 0;
	}

	.clb-today-deals {
		margin-bottom: 0;
		padding: 18px 14px;
		border-radius: 16px;
	}

	.clb-today-deals__header {
		margin-bottom: 15px;
		align-items: flex-start;
	}

	.clb-today-deals__controls {
		gap: 5px;
	}

	.clb-today-deals__timer {
		min-height: 34px;
		margin: 0;
		padding: 6px 10px;
	}

	.clb-today-deals__timer > span {
		display: none;
	}

	.clb-today-deals__arrow {
		width: 34px;
		height: 34px;
	}

	.clb-today-deals__rail {
		grid-auto-columns: minmax(190px, 72vw);
		gap: 10px;
	}

	.clb-shop-slogan {
		padding: 44px 16px;
	}

	.clb-shop-slogan__copy {
		margin-top: 12px;
		line-height: 1.55;
	}
}

@media (prefers-reduced-motion: reduce) {
	.clb-shop-card,
	.clb-shop-card *,
	.clb-shop-card *::before,
	.clb-shop-card *::after {
		transition-duration: 0.01ms !important;
	}
}
