/* Hixwer – Catálogo */
:root { --hxc-red: #D6202A; --hxc-red-h: #B01A22; --hxc-text: #3A3A3A; --hxc-grey: #F2F2F2; --hxc-border: #E3E3E3; }

/* ---------- Encabezado de la categoría ---------- */
.tax-product_cat .ast-archive-entry-banner,
.post-type-archive-product .ast-archive-entry-banner { padding: 90px 0 !important; text-align: center; }
.tax-product_cat .ast-archive-entry-banner h1,
.post-type-archive-product .ast-archive-entry-banner h1 {
	font-family: "Inter", sans-serif; font-weight: 700; text-transform: uppercase;
	font-size: clamp(26px, 3.2vw, 40px); line-height: 1.15; letter-spacing: .3px; margin: 0;
}
.tax-product_cat .ast-archive-entry-banner .ast-container > *:not(h1),
.tax-product_cat .ast-archive-entry-banner p,
.post-type-archive-product .ast-archive-entry-banner .ast-container > *:not(h1),
.post-type-archive-product .ast-archive-entry-banner p {
	color: #fff !important; font-family: "Nunito", sans-serif; font-size: 17px; line-height: 1.5;
	max-width: 720px; margin: 16px auto 0 !important;
}

/* Sin contador ni orden (no están en el diseño) */
.hxc-layout ~ .woocommerce-result-count,
.hxc-main .woocommerce-result-count,
.hxc-main .woocommerce-ordering { display: none !important; }

/* ---------- Layout ---------- */
.hxc-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; margin: 70px 0 90px; }
.hxc-layout--full { grid-template-columns: minmax(0, 1fr); }
.hxc-main { min-width: 0; }
.hxc-toggle, .hxc-overlay, .hxc-filters__head, .hxc-actions { display: none; }

/* ---------- Panel de filtros ---------- */
.hxc-filters { background: var(--hxc-grey); padding: 32px 28px 12px; position: sticky; top: 110px; max-height: calc(100vh - 130px); overflow: auto; }
.admin-bar .hxc-filters { top: 142px; }
.hxc-form { margin: 0; }
.hxc-group { border: 0; margin: 0 0 28px; padding: 0; min-width: 0; }
.hxc-group legend {
	padding: 0; margin: 0 0 14px; color: var(--hxc-red); font-family: "Inter", sans-serif;
	font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
}
.hxc-check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 11px; cursor: pointer; font-family: "Nunito", sans-serif; font-size: 15px; line-height: 1.35; color: #000; }
.hxc-check input {
	appearance: none; -webkit-appearance: none; flex: 0 0 18px; width: 18px; height: 18px; margin: 1px 0 0;
	border: 1.5px solid #000; border-radius: 2px; background: #fff center / 12px no-repeat; cursor: pointer;
	transition: background-color .15s, border-color .15s;
}
.hxc-check input:checked {
	background-color: var(--hxc-red); border-color: var(--hxc-red);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E");
}
.hxc-check input:focus-visible { outline: 2px solid var(--hxc-red); outline-offset: 2px; }
.hxc-check:hover span { color: var(--hxc-red); }
body.hxc-loading .hxc-main { opacity: .45; pointer-events: none; transition: opacity .2s; }

/* ---------- Filtros activos ---------- */
.hxc-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 24px; }
.hxc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 50px; background: var(--hxc-grey); color: #000 !important; font-family: "Inter", sans-serif; font-size: 13px; text-decoration: none !important; }
.hxc-chip span { color: var(--hxc-red); font-size: 16px; line-height: 1; }
.hxc-chip:hover { background: #E7E7E7; }
.hxc-chips__clear { color: var(--hxc-red) !important; font-family: "Inter", sans-serif; font-size: 13px; text-decoration: underline !important; margin-left: 4px; }

/* ---------- Grilla de productos ---------- */
.hxc-main ul.products, .woocommerce .hxc-main ul.products[class*="columns-"] { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 44px 32px !important; margin: 0 !important; padding: 0 !important; }
.hxc-main ul.products::before, .hxc-main ul.products::after { display: none !important; }
.hxc-main ul.products li.product { width: auto !important; margin: 0 !important; padding: 0 !important; float: none !important; clear: none !important; text-align: left; }
.hxc-main li.product .astra-shop-thumbnail-wrap { margin: 0 0 18px; overflow: hidden; background: #fff; }
.hxc-main li.product .astra-shop-thumbnail-wrap img {
	width: 100% !important; aspect-ratio: 4 / 3; object-fit: contain; margin: 0 !important;
	transition: transform .6s cubic-bezier(.22,.61,.36,1);
}
.hxc-main li.product:hover .astra-shop-thumbnail-wrap img { transform: scale(1.04); }
.hxc-main li.product .astra-shop-summary-wrap { padding: 0 !important; }

/* Etiqueta de categoría */
.hxc-tag {
	display: inline-block; margin: 0 0 12px; padding: 4px 10px; border: 1px solid var(--hxc-red); border-radius: 4px;
	color: #000; font-family: "Inter", sans-serif; font-size: 11px; font-weight: 600; line-height: 1.3;
	letter-spacing: .4px; text-transform: uppercase;
}

/* Título */
.hxc-main li.product .woocommerce-loop-product__title {
	margin: 0 0 8px !important; padding: 0 !important; color: #000; font-family: "Inter", sans-serif;
	font-size: 20px !important; font-weight: 600; line-height: 1.25;
}
.hxc-main li.product a:hover .woocommerce-loop-product__title { color: var(--hxc-red); }

/* Bajada: máximo 2 líneas */
.hxc-main li.product .ast-woo-shop-product-description,
.hxc-main li.product .ast-woo-shop-product-description p {
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
	margin: 0 !important; color: var(--hxc-text); font-family: "Nunito", sans-serif; font-size: 15px; line-height: 1.5;
}
.hxc-main li.product .ast-woo-shop-product-description p + p { display: none; }

/* Sin resultados */
.hxc-main .woocommerce-info { margin: 0; }

/* ---------- Tablet ---------- */
@media (max-width: 1200px) {
	.hxc-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 32px; }
	.hxc-main ul.products, .woocommerce .hxc-main ul.products[class*="columns-"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 36px 24px !important; }
}

/* ---------- Mobile: filtros en panel lateral ---------- */
@media (max-width: 921px) {
	.tax-product_cat .ast-archive-entry-banner, .post-type-archive-product .ast-archive-entry-banner { padding: 56px 0 !important; }
	.hxc-layout { display: block; margin: 32px 0 60px; }
	.hxc-toggle {
		display: inline-flex; align-items: center; gap: 8px; margin: 0 0 24px; padding: 11px 22px;
		border: 1px solid #000; border-radius: 50px; background: #fff; color: #000; cursor: pointer;
		font-family: "Inter", sans-serif; font-size: 14px; font-weight: 600;
	}
	.hxc-toggle:hover { border-color: var(--hxc-red); color: var(--hxc-red); }
	.hxc-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--hxc-red); color: #fff; font-size: 12px; }
	.hxc-overlay { display: block; position: fixed; inset: 0; z-index: 99998; background: rgba(0,0,0,.45); }
	.hxc-overlay[hidden] { display: none; }
	.hxc-filters {
		position: fixed; top: 0; left: 0; bottom: 0; z-index: 99999; width: min(88vw, 360px); max-height: none;
		padding: 0; display: flex; flex-direction: column; transform: translateX(-102%);
		transition: transform .3s cubic-bezier(.22,.61,.36,1); box-shadow: 0 0 40px rgba(0,0,0,.2);
	}
	.admin-bar .hxc-filters { top: 0; }
	.hxc-filters.is-open { transform: none; }
	.hxc-filters__head {
		display: flex; align-items: center; justify-content: space-between; padding: 18px 20px;
		border-bottom: 1px solid #DADADA; font-family: "Inter", sans-serif; font-size: 17px; font-weight: 700; color: #000;
	}
	.hxc-close { border: 0; background: none; font-size: 30px; line-height: 1; color: #000; cursor: pointer; padding: 0 4px; }
	.hxc-form { flex: 1; display: flex; flex-direction: column; min-height: 0; }
	.hxc-form .hxc-group:first-of-type { margin-top: 24px; }
	.hxc-group { padding: 0 20px; }
	.hxc-check { font-size: 16px; padding: 4px 0; }
	.hxc-actions {
		display: flex; gap: 10px; margin-top: auto; position: sticky; bottom: 0; padding: 14px 20px;
		background: var(--hxc-grey); border-top: 1px solid #DADADA;
	}
	.hxc-btn {
		flex: 1; display: inline-flex; align-items: center; justify-content: center; height: 46px; border: 1px solid var(--hxc-red);
		border-radius: 50px; background: var(--hxc-red); color: #fff !important; cursor: pointer; text-decoration: none !important;
		font-family: "Inter", sans-serif; font-size: 14px; font-weight: 600;
	}
	.hxc-btn--ghost { background: #fff; color: #000 !important; border-color: #000; }
	body.hxc-lock { overflow: hidden; }
	.hxc-main li.product .woocommerce-loop-product__title { font-size: 18px !important; }
}
@media (max-width: 599px) {
	.hxc-main ul.products, .woocommerce .hxc-main ul.products[class*="columns-"] { grid-template-columns: minmax(0, 1fr) !important; gap: 36px !important; }
}
@media (prefers-reduced-motion: reduce) {
	.hxc-filters, .hxc-main li.product .astra-shop-thumbnail-wrap img { transition: none; }
}
