/**
 * Estilos exclusivos de la card de producto WooCommerce.
 * Separados del layout general de tienda para mantener la estructura más limpia.
 */

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product.oz-product-card {
	height: 100%;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 1rem;
	border: 1px solid var(--OZ-Color-6);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
	overflow: hidden;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__link {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	margin-bottom: 0.9rem;
	padding: 0.75rem;
	border-radius: 12px;
	background: #fff;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__image-wrap,
:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__image-wrap img {
	width: 100%;
	height: 100%;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__image-wrap img {
	display: block;
	object-fit: contain;
	margin: 0;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__badge-wrap {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 2;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__badge-wrap .onsale {
	position: static;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2rem;
	margin: 0;
	padding: 0.35rem 0.75rem;
	border-radius: 999px;
	background: var(--OZ-Color-3);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__content {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.7rem;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__title {
	margin: 0;
	color: var(--OZ-Color-1);
	font-size: 1rem;
	line-height: 1.35;
	text-align: center;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__meta {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	margin-top: auto;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__categories {
	font-size: 0.8125rem;
	line-height: 1.45;
	text-align: center;
	color: var(--OZ-Color-2);
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__categories a {
	color: inherit;
	text-decoration: none;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__categories a:hover {
	text-decoration: underline;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__rating .star-rating {
	margin-left: auto;
	margin-right: auto;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__price {
	text-align: center;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__price .price {
	margin: 0;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__actions {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	margin-top: 1rem;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__purchase-form,
:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__purchase-row {
	display: block;
	width: 100%;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__purchase-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__quantity {
	display: grid;
	grid-template-columns: 34px minmax(44px, 1fr) 34px;
	align-items: center;
	flex: 1 1 auto;
	min-height: 2.5rem;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	background: #fff;
	overflow: hidden;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__qty-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--OZ-Color-1);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__qty-input {
	width: 100%;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--OZ-Color-1);
	font-size: 0.875rem;
	font-weight: 600;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__qty-input::-webkit-outer-spin-button,
:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__qty-input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__add-button,
:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__quote-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.5rem;
	padding: 0.65rem 1rem;
	border-radius: 999px;
	border: 1px solid transparent;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.1;
	text-decoration: none;
	text-align: center;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__add-button {
	flex: 0 0 auto;
	background: #facc15;
	border-color: #facc15;
	color: #111827;
	white-space: nowrap;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__add-button:hover {
	background: #f4be07;
	border-color: #f4be07;
	color: #111827;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__add-button--full,
:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__quote-link {
	width: 100%;
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__quote-link {
	background: #fff;
	border-color: #e5e7eb;
	color: var(--OZ-Color-1);
}

:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__quote-link:hover {
	background: #f8fafc;
	border-color: #d1d5db;
	color: var(--OZ-Color-1);
}

/* En sliders de productos del tema usamos una versión más compacta, como en la referencia:
   imagen grande, tipografía más contenida y CTA inline cantidad + agregar. */
:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__inner {
	padding: 0.75rem;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__media {
	margin-bottom: 0.6rem;
	padding: 0.35rem;
}

:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__content {
	gap: 0.35rem;
}

:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__title {
	font-size: 0.85rem;
	line-height: 1.3;
	font-weight: 500;
}

:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .woocommerce-loop-product__title {
	min-height: 2.2em;
}

:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__meta {
	gap: 0.3rem;
}

:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__categories,
:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__price,
:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__rating {
	font-size: 0.75rem;
}

:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__rating,
:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__price {
	display: none;
}

:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__actions {
	gap: 0.35rem;
	margin-top: 0.7rem;
}

:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__purchase-row {
	gap: 0;
}

:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__quantity {
	grid-template-columns: 24px minmax(28px, 1fr) 24px;
	min-height: 1.9rem;
	border-radius: 4px 0 0 4px;
	border-right: 0;
}

:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__qty-button,
:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__qty-input {
	font-size: 0.75rem;
}

:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__qty-input {
	font-weight: 500;
}

:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__add-button {
	min-height: 1.9rem;
	padding: 0.35rem 0.8rem;
	border-radius: 0 4px 4px 0;
	font-size: 0.75rem;
	font-weight: 700;
}

:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__quote-link {
	min-height: 1.8rem;
	padding: 0.35rem 0.75rem;
	border-radius: 4px;
	font-size: 0.75rem;
	background: #fff;
	color: #111827;
}

/* En 5 columnas la card es demasiado estrecha para qty + "Agregar" en línea
   (incluso en escritorio). Apilamos verticalmente con el mismo patrón que ≤991px
   para evitar que el CTA se desborde. */
.oz-shop-layout__main ul.products.cols-5 li.product .oz-product-card__purchase-row {
	flex-wrap: wrap;
	gap: 0.4rem;
}

.oz-shop-layout__main ul.products.cols-5 li.product .oz-product-card__quantity,
.oz-shop-layout__main ul.products.cols-5 li.product .oz-product-card__add-button {
	width: 100%;
}

/* Cuando la grilla pasa a 2 columnas (≤991px) la columna de la card queda
   muy estrecha para mostrar cantidad + "Agregar" en línea. Se apila verticalmente
   y se reducen tamaños/paddings para evitar el desborde del CTA. */
@media (max-width: 991px) {
	:is(.oz-shop-layout__main) ul.products li.product .oz-product-card__inner {
		padding: 0.75rem;
	}

	:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__purchase-row {
		flex-wrap: wrap;
		gap: 0.4rem;
	}

	:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__quantity,
	:is(.oz-shop-layout__main, .oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__add-button {
		width: 100%;
	}

	:is(.oz-shop-layout__main) ul.products li.product .oz-product-card__quantity {
		grid-template-columns: 30px minmax(36px, 1fr) 30px;
		min-height: 2.2rem;
	}

	:is(.oz-shop-layout__main) ul.products li.product .oz-product-card__add-button,
	:is(.oz-shop-layout__main) ul.products li.product .oz-product-card__quote-link {
		min-height: 2.2rem;
		padding: 0.5rem 0.75rem;
		font-size: 0.8rem;
	}

	:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__quantity,
	:is(.oz-wc-products-theme, .ozs.ozs--wc-products) ul.products li.product .oz-product-card__add-button {
		border-radius: 4px;
	}
}

/* Móvil pequeño: cards a 1 columna ya tienen aire, mantener el botón cómodo. */
@media (max-width: 575px) {
	:is(.oz-shop-layout__main) ul.products li.product .oz-product-card__add-button,
	:is(.oz-shop-layout__main) ul.products li.product .oz-product-card__quote-link {
		min-height: 2.4rem;
		font-size: 0.85rem;
	}
}
