/* ——— Botiga WooCommerce EMS Global ——— */

body.contrafoc-shop-page {
	background-color: #ffffff;
}

body.contrafoc-shop-page #page,
body.contrafoc-shop-page .site,
body.contrafoc-shop-page #content,
body.contrafoc-shop-page .site-content {
	background-color: #ffffff;
}

/* Footer: no heredar el blanco de la tienda */
body.contrafoc-shop-page #colophon,
body.contrafoc-shop-page #colophon .ast-container,
body.contrafoc-shop-page #colophon .ast-builder-grid-row-container,
body.contrafoc-shop-page #colophon .ast-builder-grid-row-container-inner,
body.contrafoc-shop-page #colophon .site-primary-footer-wrap,
body.contrafoc-shop-page #colophon .site-above-footer-wrap,
body.contrafoc-shop-page #colophon .site-below-footer-wrap,
body.contrafoc-shop-page #colophon .contrafoc-footer-dark,
body.contrafoc-shop-page #colophon .contrafoc-footer-dark__main,
body.contrafoc-shop-page #colophon .contrafoc-footer-dark__bottom {
	background-color: #1a1a1a !important;
	background: #1a1a1a !important;
}

body.contrafoc-shop-page .site-content {
	padding-top: 0;
}

body.contrafoc-shop-modal-open {
	overflow: hidden;
}

/* Contenedor principal */
body.contrafoc-shop-page .ast-single-post-order .ast-article-single,
body.contrafoc-shop-page .ast-woocommerce-container {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

/* Título de página */
body.contrafoc-shop-page .woocommerce-products-header,
body.contrafoc-shop-page .ast-archive-description {
	background: none;
	border: none;
	box-shadow: none;
	border-radius: 0;
	padding: 2.5rem 0 1.5rem;
	margin-bottom: 0;
	text-align: left;
	border-bottom: 1px solid #eceef1;
}

body.contrafoc-shop-page .woocommerce-products-header__title,
body.contrafoc-shop-page .page-title {
	font-size: clamp(1.85rem, 3.5vw, 2.5rem) !important;
	font-weight: 700 !important;
	color: #141414 !important;
	letter-spacing: -0.03em;
	margin: 0 !important;
	line-height: 1.15 !important;
}

body.contrafoc-shop-page .term-description,
body.contrafoc-shop-page .woocommerce-products-header .term-description {
	color: #5a5a5a;
	font-size: 1rem;
	line-height: 1.65;
	margin-top: 0.65rem;
	max-width: 40rem;
}

/* Layout */
.contrafoc-shop-layout {
	display: block;
}

.contrafoc-shop-main {
	min-width: 0;
}

/* ——— Filtro desplegable con checkboxes ——— */
.contrafoc-shop-filter-bar {
	background: none;
	border: none;
	box-shadow: none;
	border-radius: 0;
	padding: 1.25rem 0 1.5rem;
	margin-bottom: 0;
	border-bottom: 1px solid #eceef1;
}

.contrafoc-shop-filter-form {
	margin: 0;
}

.contrafoc-shop-filter-dropdown {
	position: relative;
	max-width: 420px;
}

.contrafoc-shop-filter-dropdown__trigger {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	width: 100%;
	padding: 0.7rem 1rem;
	border: 1px solid #e2e4e8;
	border-radius: 10px;
	background: #ffffff;
	color: #383838 !important;
	font-size: 0.9rem;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	text-align: left;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
	box-shadow: none;
}

.contrafoc-shop-filter-dropdown__trigger:hover,
.contrafoc-shop-filter-dropdown__trigger:focus,
.contrafoc-shop-filter-dropdown__trigger:focus-visible,
.contrafoc-shop-filter-dropdown.is-open .contrafoc-shop-filter-dropdown__trigger {
	border-color: #E72B2F;
	box-shadow: 0 0 0 3px rgba(231, 43, 47, 0.08);
	color: #383838 !important;
	background: #ffffff !important;
	outline: none !important;
}

.contrafoc-shop-filter-dropdown__icon {
	color: #E72B2F;
	flex-shrink: 0;
	display: flex;
}

.contrafoc-shop-filter-dropdown__label {
	font-weight: 600;
	color: #141414;
	flex-shrink: 0;
}

.contrafoc-shop-filter-dropdown__summary {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #5a5a5a;
}

.contrafoc-shop-filter-dropdown__chevron {
	flex-shrink: 0;
	display: flex;
	color: #9a9a9a;
	transition: transform 0.2s ease;
}

.contrafoc-shop-filter-dropdown.is-open .contrafoc-shop-filter-dropdown__chevron {
	transform: rotate(180deg);
}

.contrafoc-shop-filter-dropdown__panel {
	position: absolute;
	top: calc(100% + 0.45rem);
	left: 0;
	right: 0;
	z-index: 100;
	background: #ffffff;
	border: 1px solid #e2e4e8;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
	overflow: hidden;
}

.contrafoc-shop-filter-dropdown__list,
.contrafoc-shop-filter-dropdown__sublist {
	list-style: none;
	margin: 0;
	padding: 0;
}

.contrafoc-shop-filter-dropdown__list {
	max-height: 280px;
	overflow-y: auto;
	padding: 0.5rem;
}

.contrafoc-shop-filter-dropdown__sublist {
	margin: 0.15rem 0 0.35rem 1.65rem;
	padding-left: 0.75rem;
	border-left: 2px solid #f0f2f5;
}

.contrafoc-shop-filter-item__label {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.55rem 0.65rem;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.contrafoc-shop-filter-item__label:hover,
.contrafoc-shop-filter-item__label:focus-within {
	background: #f8f9fa;
}

.contrafoc-shop-filter-item__label:hover .contrafoc-shop-filter-item__text,
.contrafoc-shop-filter-item__label:focus-within .contrafoc-shop-filter-item__text {
	color: #383838;
}

.contrafoc-shop-filter-item__input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.contrafoc-shop-filter-item__box {
	width: 1.1rem;
	height: 1.1rem;
	flex-shrink: 0;
	border: 2px solid #d0d4da;
	border-radius: 4px;
	background: #ffffff;
	position: relative;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.contrafoc-shop-filter-item__input:checked + .contrafoc-shop-filter-item__box {
	background: #E72B2F;
	border-color: #E72B2F;
}

.contrafoc-shop-filter-item__input:checked + .contrafoc-shop-filter-item__box::after {
	content: "";
	position: absolute;
	left: 0.2rem;
	top: 0.05rem;
	width: 0.35rem;
	height: 0.6rem;
	border: solid #ffffff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.contrafoc-shop-filter-item__input:indeterminate + .contrafoc-shop-filter-item__box {
	background: #E72B2F;
	border-color: #E72B2F;
}

.contrafoc-shop-filter-item__input:indeterminate + .contrafoc-shop-filter-item__box::after {
	content: "";
	position: absolute;
	left: 0.2rem;
	right: 0.2rem;
	top: 50%;
	height: 2px;
	background: #ffffff;
	transform: translateY(-50%);
	border: none;
}

.contrafoc-shop-filter-item__text {
	flex: 1;
	font-size: 0.9rem;
	font-weight: 500;
	color: #383838;
	line-height: 1.35;
}

.contrafoc-shop-filter-item--child .contrafoc-shop-filter-item__text {
	font-size: 0.875rem;
	color: #5a5a5a;
}

.contrafoc-shop-filter-item__count {
	font-size: 0.75rem;
	font-weight: 600;
	color: #9a9a9a;
	background: #f0f2f5;
	padding: 0.1rem 0.45rem;
	border-radius: 999px;
	flex-shrink: 0;
}

.contrafoc-shop-filter-dropdown__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.75rem;
	border-top: 1px solid #eceef1;
	background: #fafafa;
}

.contrafoc-shop-filter-dropdown__clear {
	border: none;
	background: none;
	color: #5a5a5a !important;
	font-size: 0.875rem;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	padding: 0.45rem 0.5rem;
	transition: color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
	box-shadow: none;
}

.contrafoc-shop-filter-dropdown__clear:hover,
.contrafoc-shop-filter-dropdown__clear:focus,
.contrafoc-shop-filter-dropdown__clear:focus-visible {
	color: #E72B2F !important;
	background: none !important;
	outline: none !important;
	box-shadow: none !important;
}

.contrafoc-shop-filter-dropdown__apply {
	border: none;
	background: #E72B2F;
	color: #ffffff !important;
	font-size: 0.875rem;
	font-weight: 600;
	font-family: inherit;
	padding: 0.55rem 1rem;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
	box-shadow: none;
}

.contrafoc-shop-filter-dropdown__apply:hover,
.contrafoc-shop-filter-dropdown__apply:focus,
.contrafoc-shop-filter-dropdown__apply:focus-visible {
	background: #c91f23 !important;
	color: #ffffff !important;
	outline: none !important;
	box-shadow: none !important;
}

/* Barra: resultados + ordenación */
.contrafoc-shop-toolbar {
	background: none;
	border: none;
	border-radius: 0;
	border-bottom: 1px solid #eceef1;
	padding: 1.1rem 0;
	margin-bottom: 0 !important;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
}

body.contrafoc-shop-page .contrafoc-shop-toolbar .woocommerce-result-count,
body.contrafoc-shop-page .contrafoc-shop-toolbar .woocommerce-ordering {
	margin-bottom: 0;
}

body.contrafoc-shop-page .contrafoc-shop-toolbar .woocommerce-result-count {
	color: #7a7a7a;
	font-size: 0.875rem;
	margin: 0;
	float: none;
}

body.contrafoc-shop-page .woocommerce-ordering select {
	border: 1px solid #e2e4e8;
	border-radius: 8px;
	padding: 0.5rem 2rem 0.5rem 0.75rem;
	font-size: 0.875rem;
	color: #383838 !important;
	background-color: #ffffff;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

body.contrafoc-shop-page .woocommerce-ordering select:hover,
body.contrafoc-shop-page .woocommerce-ordering select:focus,
body.contrafoc-shop-page .woocommerce-ordering select:focus-visible {
	border-color: #E72B2F;
	box-shadow: 0 0 0 3px rgba(231, 43, 47, 0.08);
	outline: none !important;
	color: #383838 !important;
	background-color: #ffffff !important;
}

/* Graella de productes */
body.contrafoc-shop-page.woocommerce ul.products,
body.contrafoc-shop-page.woocommerce-page ul.products,
body.contrafoc-shop-page.woocommerce[class*="columns-"] ul.products,
body.contrafoc-shop-page.woocommerce-page[class*="columns-"] ul.products {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)) !important;
	justify-content: start;
	gap: 1.5rem !important;
	margin: 0 !important;
	padding: 1.75rem 0 2.5rem !important;
	background: none;
	border: none;
	border-radius: 0;
	list-style: none;
	width: 100%;
}

body.contrafoc-shop-page ul.products::before,
body.contrafoc-shop-page ul.products::after {
	display: none !important;
}

body.contrafoc-shop-page ul.products li.product,
body.contrafoc-shop-page.woocommerce[class*="columns-"] ul.products li.product,
body.contrafoc-shop-page.woocommerce-page[class*="columns-"] ul.products li.product {
	width: 100% !important;
	max-width: none;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	clear: none !important;
	background: #ffffff;
	border: 1px solid #e8eaed;
	border-radius: 14px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

body.contrafoc-shop-page ul.products li.product:hover {
	border-color: rgba(231, 43, 47, 0.3);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
	transform: translateY(-3px);
}

/* Imagen del producto */
body.contrafoc-shop-page ul.products li.product .woocommerce-loop-product__link,
body.contrafoc-shop-page ul.products li.product .astra-shop-thumbnail-wrap {
	display: block;
	overflow: hidden;
}

body.contrafoc-shop-page ul.products li.product img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.35s ease;
}

body.contrafoc-shop-page ul.products li.product:hover img {
	transform: scale(1.04);
}

/* Ocultar pill de carrito al hover (estilo moderno Astra) */
body.contrafoc-shop-page .astra-shop-thumbnail-wrap .ast-on-card-button:not(.ast-onsale-card),
body.contrafoc-shop-page .astra-shop-thumbnail-wrap .ast-select-options-trigger {
	display: none !important;
}

/* Badge de oferta */
body.contrafoc-shop-page ul.products li.product .onsale {
	background: #E72B2F !important;
	color: #ffffff !important;
	border-radius: 8px !important;
	font-size: 0.72rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 0.35rem 0.65rem !important;
	min-height: auto !important;
	line-height: 1.3 !important;
	top: 0.85rem !important;
	left: 0.85rem !important;
	right: auto !important;
	box-shadow: 0 2px 8px rgba(231, 43, 47, 0.35);
}

/* Categoría del producto */
body.contrafoc-shop-page ul.products li.product .ast-woo-product-category {
	display: block;
	padding: 1.1rem 1.25rem 0;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #E72B2F;
}

body.contrafoc-shop-page ul.products li.product .astra-shop-summary-wrap {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding-bottom: 0.25rem;
}

/* Título */
body.contrafoc-shop-page ul.products li.product .woocommerce-loop-product__title,
body.contrafoc-shop-page ul.products li.product h2 {
	padding: 0.5rem 1.25rem 0 !important;
	font-size: 1.05rem !important;
	font-weight: 700 !important;
	color: #141414 !important;
	line-height: 1.4 !important;
	margin: 0 !important;
}

body.contrafoc-shop-page ul.products li.product .woocommerce-loop-product__title:hover {
	color: #E72B2F !important;
}

/* Precio */
body.contrafoc-shop-page ul.products li.product .price {
	padding: 0.75rem 1.25rem 0 !important;
	margin: 0 !important;
	font-size: 1.1rem !important;
	color: #141414 !important;
}

body.contrafoc-shop-page ul.products li.product .price del {
	color: #9a9a9a;
	font-size: 0.9rem;
	opacity: 1;
}

body.contrafoc-shop-page ul.products li.product .price ins {
	text-decoration: none;
	font-weight: 700;
	color: #141414;
}

/* Botón añadir al carrito */
body.contrafoc-shop-page ul.products li.product .astra-shop-summary-wrap .button,
body.contrafoc-shop-page ul.products li.product .astra-shop-summary-wrap .add_to_cart_button {
	margin: auto 1.25rem 1.25rem !important;
	display: inline-block !important;
	width: calc(100% - 2.5rem) !important;
	text-align: center;
	background-color: #E72B2F !important;
	border: 2px solid #E72B2F !important;
	color: #ffffff !important;
	border-radius: 10px !important;
	font-weight: 600 !important;
	font-size: 0.9rem !important;
	padding: 0.8rem 1rem !important;
	line-height: 1.3 !important;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease !important;
	box-shadow: none !important;
}

body.contrafoc-shop-page ul.products li.product .astra-shop-summary-wrap .button:hover,
body.contrafoc-shop-page ul.products li.product .astra-shop-summary-wrap .add_to_cart_button:hover,
body.contrafoc-shop-page ul.products li.product .astra-shop-summary-wrap .button:focus,
body.contrafoc-shop-page ul.products li.product .astra-shop-summary-wrap .add_to_cart_button:focus {
	background-color: #c91f23 !important;
	border-color: #c91f23 !important;
	color: #ffffff !important;
	transform: translateY(-1px);
	outline: none !important;
	box-shadow: none !important;
}

/* Paginación */
body.contrafoc-shop-page .woocommerce-pagination {
	margin-top: 0;
	padding-bottom: 3rem;
	text-align: center;
}

body.contrafoc-shop-page .woocommerce-pagination ul {
	border: none !important;
	display: inline-flex;
	gap: 0.25rem;
	background: none;
	padding: 0;
}

body.contrafoc-shop-page .woocommerce-pagination ul li {
	border: none !important;
}

body.contrafoc-shop-page .woocommerce-pagination ul li a,
body.contrafoc-shop-page .woocommerce-pagination ul li span {
	border-radius: 8px !important;
	border: 1px solid #e2e4e8 !important;
	min-width: 2.25rem;
	line-height: 2.25rem;
	padding: 0 0.5rem;
	font-weight: 600;
	color: #383838 !important;
	background: #ffffff !important;
}

body.contrafoc-shop-page .woocommerce-pagination ul li a:hover {
	border-color: #E72B2F !important;
	color: #E72B2F !important;
}

body.contrafoc-shop-page .woocommerce-pagination ul li span.current {
	background: #E72B2F !important;
	border-color: #E72B2F !important;
	color: #ffffff !important;
}

/* Sin productos */
body.contrafoc-shop-page .woocommerce-info,
body.contrafoc-shop-page .woocommerce-no-products-found,
body.contrafoc-shop-page .contrafoc-shop-main .woocommerce-info {
	background: none;
	border: none;
	border-radius: 0;
	padding: 2.5rem 0;
	color: #7a7a7a;
	margin-top: 0;
	text-align: center;
}

/* Responsive */
@media (max-width: 921px) {
	.contrafoc-shop-filter-dropdown {
		max-width: none;
	}

	body.contrafoc-shop-page .ast-woocommerce-container {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}
}

@media (max-width: 544px) {
	body.contrafoc-shop-page ul.products {
		grid-template-columns: 1fr !important;
		padding: 1.25rem 0 2rem !important;
		gap: 1.25rem !important;
	}

	body.contrafoc-shop-page .woocommerce-products-header,
	body.contrafoc-shop-page .ast-archive-description {
		padding: 1.75rem 0 1.25rem;
	}

	body.contrafoc-shop-page .contrafoc-shop-toolbar {
		flex-direction: column;
		align-items: flex-start;
	}

	.contrafoc-shop-filter-bar {
		padding: 1rem 0 1.15rem;
	}

	body.contrafoc-shop-page .ast-woocommerce-container {
		padding-left: 1rem;
		padding-right: 1rem;
	}
}
