/* ==========================================================================
   cireseamare.ro - shop + single product styling
   Loaded on shop, product category and single product pages.
   Palette follows the Neve Customizer variables, with brand fallbacks.
   ========================================================================== */

body {
	--cm-accent: var(--nv-primary-accent, #fec503);
	--cm-accent-dark: var(--nv-secondary-accent, #efb900);
	--cm-ink: var(--nv-text-color, #1a1a1a);
	--cm-muted: #6b6b6b;
	--cm-sale: #d32f2f;
	--cm-line: #e8e6e1;
	--cm-card-bg: #fff;
	--cm-radius: 14px;
}

/* The sale badge is removed in PHP via the woocommerce_sale_flash filter.
   This is only a fallback for anything that renders it directly. */
span.onsale {
	display: none !important;
}

/* ---------- grid ---------- */
.woocommerce ul.products {
	--grid-column-gap: 28px;
	--grid-row-gap: 28px;
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
	align-items: stretch;
}

/* ---------- card shell ---------- */
.woocommerce ul.products li.product {
	margin: 0;
	padding: 0;
	width: auto;
	float: none;
	display: flex;
	text-align: center;
}

.woocommerce ul.products li.product .nv-card-content-wrapper {
	display: flex;
	flex-direction: column;
	width: 100%;
	background: var(--cm-card-bg);
	border: 1px solid var(--cm-line);
	border-radius: var(--cm-radius);
	overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
	box-shadow: 0 1px 2px rgba(20, 16, 8, .04);
}

.woocommerce ul.products li.product .nv-card-content-wrapper:hover,
.woocommerce ul.products li.product .nv-card-content-wrapper:focus-within {
	transform: translateY(-4px);
	border-color: #dcd7cc;
	box-shadow: 0 14px 30px rgba(20, 16, 8, .10);
}

/* the whole image + title + price block is one link */
.woocommerce ul.products li.product a.woocommerce-loop-product__link {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	text-decoration: none;
	color: inherit;
}

/* ---------- image ----------
   Product photos arrive in mixed shapes (9:16 portrait bottles, 1:1 squares),
   so the wrapper is a fixed 4:5 box and the photo is scaled to fit inside it
   with object-fit: contain. Nothing is cropped - the whole product is visible -
   and every card in the grid still lines up. */
.woocommerce ul.products li.product .sp-product-image,
.woocommerce ul.products li.product .sp-product-image .img-wrap {
	margin: 0;
	position: relative;
}

.woocommerce ul.products li.product .sp-product-image .img-wrap {
	overflow: hidden;
	background: #fff;
	aspect-ratio: 4 / 5;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	box-sizing: border-box;
}

.woocommerce ul.products li.product .sp-product-image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain;
	object-position: center;
	border-radius: 0;
	transition: transform .5s cubic-bezier(.2, .6, .2, 1);
}

.woocommerce ul.products li.product .nv-card-content-wrapper:hover .sp-product-image img {
	transform: scale(1.05);
}

/* ---------- badges ---------- */
/* NOU - new product, top-left corner */
.woocommerce ul.products li.product .img-wrap .cm-new-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	margin: 0;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--cm-accent);
	color: #1a1a1a;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.5;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(254, 197, 3, .45);
}

/* Indisponibil - centred over the product image */
.woocommerce ul.products li.product .img-wrap .out-of-stock-badge {
	position: absolute;
	top: 50%;
	left: 50%;
	right: auto;
	bottom: auto;
	transform: translate(-50%, -50%);
	z-index: 2;
	margin: 0;
	min-width: 0;
	min-height: 0;
	padding: 9px 20px;
	border-radius: 999px;
	background: rgba(26, 26, 26, .78);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-align: center;
	white-space: nowrap;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

/* ---------- text block ---------- */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	margin: 0;
	padding: 18px 18px 0;
	font-size: 17px;
	line-height: 1.35;
	font-weight: 600;
	color: var(--cm-ink);
	text-align: center;
	/* keep every card title the same height so prices and buttons line up */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(2 * 1.35em);
}

/* cut price on its own line, new price centred underneath it in red */
.woocommerce ul.products li.product .price {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	margin: 0;
	padding: 10px 18px 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--cm-ink);
	text-align: center;
}

.woocommerce ul.products li.product .price del {
	display: block;
	opacity: 1;
	font-size: 14px;
	font-weight: 500;
	color: var(--cm-muted);
	text-decoration: line-through;
}

.woocommerce ul.products li.product .price ins {
	display: block;
	background: none;
	text-decoration: none;
	font-weight: 800;
	color: var(--cm-sale);
}

.woocommerce ul.products li.product .price .woocommerce-Price-currencySymbol {
	font-size: .72em;
	font-weight: 600;
	margin-left: 2px;
}

/* keep the screen-reader-only price text from opening gaps in the flex column */
.woocommerce ul.products li.product .price .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- button, pinned to the bottom of every card ---------- */
.woocommerce ul.products li.product a.button {
	margin: auto 18px 18px;
	margin-top: auto;
	padding: 12px 16px;
	display: block;
	width: calc(100% - 36px);
	box-sizing: border-box;
	border: 0;
	border-radius: 10px;
	background: var(--cm-accent);
	color: #1a1a1a;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	transition: background .2s ease, transform .12s ease;
}

.woocommerce ul.products li.product a.button:hover,
.woocommerce ul.products li.product a.button:focus {
	background: var(--cm-accent-dark);
	color: #1a1a1a;
}

.woocommerce ul.products li.product a.button:active {
	transform: translateY(1px);
}

/* visible keyboard focus */
.woocommerce ul.products li.product a:focus-visible {
	outline: 2px solid var(--cm-accent-dark);
	outline-offset: 3px;
	border-radius: 6px;
}

/* spacing above the button when a card has no price row */
.woocommerce ul.products li.product .woocommerce-loop-product__link > :last-child {
	margin-bottom: 16px;
}

/* ==========================================================================
   Single product page price
   Matches the shop: cut price above, current price under it in red.
   These use display:block rather than flex so the price keeps whatever
   alignment the Elementor template sets for the summary column.
   ========================================================================== */

.elementor-widget-woocommerce-product-price .price,
.woocommerce div.product p.price,
.woocommerce div.product .summary .price {
	display: block;
	margin: 0 0 18px;
	font-size: 30px;
	font-weight: 800;
	line-height: 1.25;
	color: var(--cm-ink);
}

.elementor-widget-woocommerce-product-price .price del,
.woocommerce div.product p.price del,
.woocommerce div.product .summary .price del {
	display: block;
	margin-bottom: 2px;
	opacity: 1;
	font-size: 17px;
	font-weight: 500;
	color: var(--cm-muted);
	text-decoration: line-through;
}

.elementor-widget-woocommerce-product-price .price ins,
.woocommerce div.product p.price ins,
.woocommerce div.product .summary .price ins {
	display: block;
	background: none;
	text-decoration: none;
	font-weight: 800;
	color: var(--cm-sale);
}

.elementor-widget-woocommerce-product-price .price .woocommerce-Price-currencySymbol,
.woocommerce div.product p.price .woocommerce-Price-currencySymbol {
	font-size: .68em;
	font-weight: 600;
	margin-left: 3px;
}

/* ---------- archive header bits, if the template shows them ---------- */
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering select {
	font-size: 14px;
	color: var(--cm-muted);
}

.woocommerce nav.woocommerce-pagination ul {
	border: 0;
	gap: 6px;
	display: flex;
	justify-content: center;
}

.woocommerce nav.woocommerce-pagination ul li {
	border: 0;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
	border: 1px solid var(--cm-line);
	border-radius: 8px;
	min-width: 38px;
	padding: 8px 10px;
	font-weight: 600;
}

.woocommerce nav.woocommerce-pagination ul li span.current {
	background: var(--cm-accent);
	border-color: var(--cm-accent);
	color: #1a1a1a;
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
	.woocommerce ul.products {
		--grid-column-gap: 20px;
		--grid-row-gap: 20px;
	}
}

@media (max-width: 767px) {
	.woocommerce ul.products li.product .woocommerce-loop-product__title {
		font-size: 15px;
		padding: 14px 14px 0;
	}
	.woocommerce ul.products li.product .price {
		font-size: 18px;
		padding: 8px 14px 0;
	}
	.woocommerce ul.products li.product .img-wrap .out-of-stock-badge {
		font-size: 11px;
		padding: 8px 16px;
	}
	.woocommerce ul.products li.product a.button {
		margin: auto 14px 14px;
		margin-top: auto;
		width: calc(100% - 28px);
		padding: 11px 14px;
	}
	.elementor-widget-woocommerce-product-price .price,
	.woocommerce div.product p.price {
		font-size: 25px;
	}
	.elementor-widget-woocommerce-product-price .price del,
	.woocommerce div.product p.price del {
		font-size: 15px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.woocommerce ul.products li.product .nv-card-content-wrapper,
	.woocommerce ul.products li.product .sp-product-image img,
	.woocommerce ul.products li.product a.button {
		transition: none;
	}
	.woocommerce ul.products li.product .nv-card-content-wrapper:hover {
		transform: none;
	}
	.woocommerce ul.products li.product .nv-card-content-wrapper:hover .sp-product-image img {
		transform: none;
	}
}
