/*
 * Shop and category listings in the UNIK voice: a campaign photo header,
 * filters as one compact row of chips, products right below.
 */

/* ---------- Header with the campaign photo ---------- */
.uniklabb-shop-hero {
	position: relative; display: flex; flex-direction: column; justify-content: flex-end;
	min-height: clamp(300px, 44vh, 460px); box-sizing: border-box;
	padding: clamp(28px, 4vw, 64px) var(--unik-gutter) !important; color: #fff;
	background:
		linear-gradient(90deg, rgba(8, 14, 24, .86) 0%, rgba(8, 14, 24, .42) 55%, rgba(8, 14, 24, .1) 100%),
		var(--shop-hero-image, none) center 38% / cover no-repeat,
		#10243a;
}
.uniklabb-shop-hero > * { width: 100%; max-width: var(--wp--style--global--wide-size, 1400px) !important; margin-right: auto !important; margin-left: auto !important; }
.uniklabb-shop-hero .wc-block-breadcrumbs, .uniklabb-shop-hero .woocommerce-breadcrumb { margin: 0 auto 10px !important; color: rgba(255, 255, 255, .78); font-size: 12px; }
.uniklabb-shop-hero a { color: #fff; }
.uniklabb-shop-hero h1 { margin-top: 0; margin-bottom: 0; color: #fff; font-family: var(--unik-display); font-size: clamp(64px, 9vw, 168px); font-weight: 400; letter-spacing: -.005em; line-height: .86; text-transform: uppercase; }
.uniklabb-shop-hero__lead { margin-top: 14px !important; margin-bottom: 0 !important; font-size: 15px; opacity: .86; }

/* ---------- Tools: filters as one row of chips ---------- */
.uniklabb-shop-tools { align-items: flex-end !important; gap: 18px 32px !important; padding-top: 24px !important; padding-bottom: 24px !important; }
.uniklabb-shop-tools > .wp-block-group { margin-left: auto; align-items: center; gap: 18px; }
.uniklabb-filter-title { margin: 0 0 10px !important; font-family: inherit !important; font-size: 11px !important; font-weight: 700; letter-spacing: .28em; line-height: 1.2; text-transform: uppercase; }

.uniklabb-shop-tools .wp-block-woocommerce-product-filter-checkbox-list fieldset { margin: 0; padding: 0; border: 0; }
.uniklabb-shop-tools .wc-block-product-filter-checkbox-list__items { display: flex; flex-wrap: wrap; gap: 8px; }
.uniklabb-shop-tools .wc-block-product-filter-checkbox-list__item { margin: 0; }
.uniklabb-shop-tools .wc-block-product-filter-checkbox-list__label {
	position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; box-sizing: border-box;
	border: 1px solid var(--unik-line); color: var(--unik-ink); background: #fff; cursor: pointer;
	font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
	transition: background-color .6s cubic-bezier(.215, .61, .355, 1), color .6s cubic-bezier(.215, .61, .355, 1), border-color .6s cubic-bezier(.215, .61, .355, 1);
}
.uniklabb-shop-tools .wc-block-product-filter-checkbox-list__label:hover { border-color: var(--unik-ink); }
/* The real checkbox stays in place for keyboards and screen readers; the chip shows its state. */
.uniklabb-shop-tools .wc-block-product-filter-checkbox-list__input-wrapper { position: absolute; inset: 0; opacity: 0; }
.uniklabb-shop-tools .wc-block-product-filter-checkbox-list__input { width: 100%; height: 100%; margin: 0; cursor: pointer; }
.uniklabb-shop-tools .wc-block-product-filter-checkbox-list__label:has(input:checked) { border-color: var(--unik-ink); color: #fff; background: var(--unik-ink); }
.uniklabb-shop-tools .wc-block-product-filter-checkbox-list__label:has(input:focus-visible) { outline: 2px solid var(--unik-accent); outline-offset: 2px; }
.uniklabb-shop-tools .wc-block-product-filter-checkbox-list__text-wrapper { display: inline; }
/* WooCommerce draws a box around each list; the chips are enough. */
.uniklabb-shop-tools .wp-block-woocommerce-product-filter-checkbox-list,
.uniklabb-shop-tools .wc-block-product-filter-checkbox-list__items { margin: 0; padding: 0; border: 0 !important; box-shadow: none; }
.uniklabb-shop-tools .wc-block-product-filters__overlay-content > * { box-sizing: border-box; max-width: 100%; }

/* Sizes in wearing order, whatever order WooCommerce lists them in. */
.wc-block-product-filter-checkbox-list__item:has(input[value="p"]) { order: 1; }
.wc-block-product-filter-checkbox-list__item:has(input[value="m"]) { order: 2; }
.wc-block-product-filter-checkbox-list__item:has(input[value="g"]) { order: 3; }
.wc-block-product-filter-checkbox-list__item:has(input[value="gg"]) { order: 4; }

.uniklabb-shop-tools .wp-block-woocommerce-product-filter-price { min-width: 240px; }
.uniklabb-shop-tools .wc-block-product-filter-price-slider__content { gap: 10px; }
.uniklabb-shop-tools .wc-block-product-filter-price-slider input[type="text"] { min-height: 40px; border: 1px solid var(--unik-line); border-radius: 0; font-size: 13px; }

/* Desktop: the filters sit inline, not in boxes stacked down the page. */
@media (min-width: 601px) {
	.uniklabb-shop-tools .wp-block-woocommerce-product-filters { flex: 1 1 auto; }
	.uniklabb-shop-tools .wc-block-product-filters__overlay-content { flex-direction: row !important; flex-wrap: wrap; align-items: flex-start; gap: 22px 40px !important; }
	.uniklabb-shop-tools .wc-block-product-filters__overlay-content > * { flex: 0 0 auto; margin: 0 !important; padding: 0 !important; border: 0 !important; }
}

/* Phones: one "Filtros" button opens WooCommerce's drawer. */
@media (max-width: 600px) {
	.uniklabb-shop-hero { min-height: 260px; }
	.uniklabb-shop-hero h1 { font-size: clamp(60px, 19vw, 96px); }
	.uniklabb-shop-tools { align-items: center !important; justify-content: space-between !important; gap: 12px !important; padding-top: 16px !important; padding-bottom: 16px !important; }
	.uniklabb-shop-tools { flex-wrap: nowrap !important; }
	.uniklabb-shop-tools .wp-block-woocommerce-product-filters { flex: 0 0 auto; width: auto; }
	.uniklabb-shop-tools > .wp-block-group { flex: 0 1 auto; min-width: 0; margin-left: 0; }
	.uniklabb-shop-tools .wc-block-catalog-sorting select, .uniklabb-shop-tools .orderby { max-width: 136px; min-height: 44px; font-size: 12px; }
	.uniklabb-shop-grid { padding-top: 22px !important; }
	.uniklabb-shop-tools .wc-block-product-filters__open-overlay {
		display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; white-space: nowrap;
		border: 1px solid var(--unik-ink); border-radius: 0; color: var(--unik-ink); background: #fff;
		font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
	}
	.uniklabb-shop-tools .wc-block-product-results-count { display: none; }
	.wc-block-product-filters__overlay-content { gap: 26px !important; }
}

@media (prefers-reduced-motion: reduce) {
	.uniklabb-shop-tools .wc-block-product-filter-checkbox-list__label { transition: none; }
}
