/**
 * Rotitoo — Product cards & shop UI (site-wide)
 */

body.rotitoo-app-shell {
	--rotitoo-card-radius: 14px;
	--rotitoo-border: 1px solid rgba(215, 185, 165, 0.38);
	--rotitoo-glow: rgba(220, 175, 155, 0.18);
	--rotitoo-glow-hover: rgba(230, 185, 165, 0.32);
	--rotitoo-rose-soft: rgba(235, 210, 195, 0.35);
}

/* ─── Shop / archive grid — mobile-first 2 cols ─────────────── */
body.rotitoo-app-shell .products.elements-grid,
body.rotitoo-app-shell .wd-products-element .products,
body.rotitoo-app-shell .wd-products-tabs .wd-tab-content .products {
	--wd-col-lg: 2 !important;
	--wd-col-md: 2 !important;
	--wd-col-sm: 2 !important;
	--wd-gap-lg: 10px !important;
	--wd-gap-md: 10px !important;
	--wd-gap-sm: 10px !important;
}

@media (min-width: 769px) {
	body.rotitoo-app-shell .products.elements-grid,
	body.rotitoo-app-shell .wd-products-element .products {
		--wd-col-lg: 3 !important;
		--wd-gap-lg: 16px !important;
	}
}

@media (min-width: 1100px) {
	body.rotitoo-app-shell .products.elements-grid,
	body.rotitoo-app-shell .wd-products-element .products {
		--wd-col-lg: 4 !important;
		--wd-gap-lg: 18px !important;
	}
}

/* ─── Product card ──────────────────────────────────────────── */
body.rotitoo-app-shell .wd-product .product-wrapper {
	border: var(--rotitoo-border);
	border-radius: var(--rotitoo-card-radius);
	overflow: hidden;
	background: #fff;
	box-shadow:
		0 1px 3px rgba(180, 140, 120, 0.05),
		0 4px 14px var(--rotitoo-glow),
		0 0 0 0.5px var(--rotitoo-rose-soft);
	transition: box-shadow 0.3s ease, transform 0.25s ease, border-color 0.25s ease;
}

body.rotitoo-app-shell .wd-product:hover .product-wrapper {
	border-color: rgba(220, 175, 155, 0.55);
	box-shadow: 0 8px 28px var(--rotitoo-glow-hover);
	transform: translateY(-2px);
}

body.rotitoo-app-shell .wd-product .product-element-top {
	background: #fff;
	aspect-ratio: 1 / 1;
	display: flex !important;
	align-items: center;
	justify-content: center;
	padding: 0;
	overflow: hidden;
	border-bottom: 1px solid rgba(230, 215, 205, 0.25);
}

body.rotitoo-app-shell .wd-product .product-image-link {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: #fff !important;
}

body.rotitoo-app-shell .wd-product .product-image-link img,
body.rotitoo-app-shell .wd-product .product-element-top img {
	object-fit: contain !important;
	object-position: center !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	background: #fff !important;
	--dominant-color: #fff !important;
}

body.rotitoo-app-shell .wd-product img[data-dominant-color],
body.rotitoo-app-shell .wd-product img.not-transparent {
	background-color: #fff !important;
	--dominant-color: #fff !important;
}

body.rotitoo-app-shell .wd-product .product-element-top,
body.rotitoo-app-shell .wd-product .wd-quick-shop {
	background: #fff !important;
}

body.rotitoo-app-shell .wd-product .wd-product-details,
body.rotitoo-app-shell .wd-product .product-element-bottom {
	padding: 10px 12px 14px;
	text-align: center;
	background: #fff;
}

body.rotitoo-app-shell .wd-product .wd-entities-title {
	font-size: 0.78rem;
	font-weight: 500;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.2em;
	color: #3d3530;
}

body.rotitoo-app-shell .wd-product .price {
	font-size: 0.85rem;
	font-weight: 600;
	color: #2c2420;
}

body.rotitoo-app-shell .wd-product .price ins {
	text-decoration: none;
	color: #b85c4a;
}

body.rotitoo-app-shell .wd-product .product-labels .onsale {
	background: rgba(255, 255, 255, 0.92);
	color: #b85c4a;
	font-size: 0.62rem;
	border-radius: 20px;
	border: 1px solid rgba(220, 175, 155, 0.4);
}

body.rotitoo-app-shell .wd-product .wd-compare-btn {
	display: none !important;
}

/* ─── Load more / pagination ────────────────────────────────── */
body.rotitoo-app-shell .wd-load-more,
body.rotitoo-app-shell .products-footer .btn {
	border-radius: 999px;
	padding: 12px 28px;
	font-weight: 600;
	letter-spacing: 0.04em;
}

/* ─── Category chips on shop ────────────────────────────────── */
body.rotitoo-app-shell .wd-cat .wd-entities-title {
	font-size: 0.85rem;
	font-weight: 600;
}

body.rotitoo-app-shell .wd-cat .wd-cat-count {
	opacity: 0.65;
	font-size: 0.75rem;
}

/* ─── Shop toolbar ──────────────────────────────────────────── */
body.rotitoo-app-shell .shop-loop-head {
	border-radius: 12px;
	background: #fdfbf9;
	border: 1px solid rgba(230, 215, 205, 0.5);
	padding: 12px 16px;
	margin-bottom: 16px;
}

body.rotitoo-app-shell .woocommerce-ordering select {
	border-radius: 999px;
	padding: 8px 16px;
	border: 1px solid rgba(215, 185, 165, 0.4);
	font-size: 0.82rem;
}

/* ─── Single product — moved to single-product.css ──────────── */

/* ─── Related / upsells ─────────────────────────────────────── */
body.rotitoo-app-shell .related-products,
body.rotitoo-app-shell .upsells-products {
	margin-top: 32px;
}

/* ─── Swatches lite (replaces WVS plugin CSS on catalog) ───── */
body.rotitoo-app-shell .variable-items-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	padding: 0;
	margin: 0;
	list-style: none;
}

body.rotitoo-app-shell .variable-item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-width: 36px;
	border-radius: 10px;
	border: 1.5px solid rgba(215, 185, 165, 0.45);
	overflow: hidden;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 1px 4px rgba(180, 140, 120, 0.08);
}

body.rotitoo-app-shell .variable-item .variable-item-contents,
body.rotitoo-app-shell .variable-item .variable-item-image {
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
}

body.rotitoo-app-shell .variable-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

body.rotitoo-app-shell .variable-item.selected,
body.rotitoo-app-shell .variable-item.selected-variable-item {
	border-color: #c4785a;
	box-shadow: 0 0 0 2px rgba(196, 120, 90, 0.25);
}

body.rotitoo-app-shell .variable-item.disabled,
body.rotitoo-app-shell .variable-item.no-stock {
	opacity: 0.35;
	pointer-events: none;
}

/* Faster paint for off-screen product cards */
body.rotitoo-app-shell .wd-product {
	content-visibility: auto;
	contain-intrinsic-size: 280px 380px;
}
