/*
 * Shop / product archive — Horizonte do Açaí
 * Scoped to the archive body classes + the `.hda-*` namespace.
 */

body.woocommerce-shop,
body.tax-product_cat,
body.tax-product_tag {
	--hda-s-deep: var(--e-global-color-6597c5e, #261559);
	--hda-s-purple: var(--e-global-color-e02c158, #471ea7);
	--hda-s-soft: #f1ecfb;
	--hda-s-ink: #2c2640;
	--hda-s-ink-soft: #6b6580;
	--hda-s-line: rgba(60, 40, 100, 0.1);
	--hda-s-bg: #f7f7f8;
	--hda-s-shadow: 0 8px 30px rgba(30, 20, 60, 0.06);
	--hda-s-font: var(--e-global-typography-text-font-family, "Roboto"), sans-serif;
	background: var(--hda-s-bg);
}

/* ---------- Hero ---------- */

.hda-shop-hero__title {
	margin: 0 0 6px;
	font-family: var(--hda-s-font);
	font-size: clamp(28px, 3vw, 38px);
	font-weight: 700;
	color: var(--hda-s-deep);
	line-height: 1.15;
}

.hda-shop-hero__sub {
	margin: 0;
	font-family: var(--hda-s-font);
	font-size: 15.5px;
	color: var(--hda-s-ink-soft);
}

/* ---------- Layout ---------- */

body.woocommerce-shop .hda-shop-row > .elementor-container,
body.tax-product_cat .hda-shop-row > .elementor-container {
	gap: 26px;
	align-items: flex-start;
}

body.woocommerce-shop .hda-shop-row > .elementor-container > .elementor-column,
body.tax-product_cat .hda-shop-row > .elementor-container > .elementor-column {
	max-width: none;
	flex-basis: 0;
}

body.woocommerce-shop .hda-shop-row > .elementor-container > .hda-col-side,
body.tax-product_cat .hda-shop-row > .elementor-container > .hda-col-side {
	flex-grow: 26;
}

body.woocommerce-shop .hda-shop-row > .elementor-container > .hda-col-main,
body.tax-product_cat .hda-shop-row > .elementor-container > .hda-col-main {
	flex-grow: 74;
}

/* ---------- Filters sidebar ---------- */

.hda-filters {
	background: #fff;
	border: 1px solid var(--hda-s-line);
	border-radius: 16px;
	box-shadow: var(--hda-s-shadow);
	padding: 24px 22px;
	font-family: var(--hda-s-font);
}

.hda-filters__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
}

.hda-filters__head .hda-icon {
	color: var(--hda-s-purple);
}

.hda-filters__title {
	margin: 0;
	font-size: 19px;
	font-weight: 700;
	color: var(--hda-s-deep);
}

.hda-filters__group {
	padding-bottom: 20px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--hda-s-line);
}

.hda-filters__group:last-of-type {
	border-bottom: none;
	margin-bottom: 12px;
}

.hda-filters__label {
	display: block;
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 700;
	color: var(--hda-s-purple);
}

/* Search */

.hda-filters__search {
	position: relative;
	display: flex;
}

.hda-filters__search input {
	width: 100%;
	height: 44px;
	padding: 0 44px 0 14px;
	border: 1px solid var(--hda-s-line);
	border-radius: 8px;
	font-family: var(--hda-s-font);
	font-size: 14px;
	color: var(--hda-s-ink);
}

.hda-filters__search input:focus {
	border-color: var(--hda-s-purple);
	outline: none;
	box-shadow: 0 0 0 3px rgba(71, 30, 167, 0.15);
}

.hda-filters__search button {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: var(--hda-s-deep);
	cursor: pointer;
}

.hda-filters__search button:hover {
	background: var(--hda-s-soft);
}

/* Category / weight lists */

.hda-filters__list,
.hda-filters__sublist {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hda-filters__sublist {
	margin: 6px 0 8px 22px;
	padding-left: 12px;
	border-left: 1px solid var(--hda-s-line);
}

.hda-filters__list > li {
	margin-bottom: 9px;
}

.hda-filters__check {
	display: flex;
	align-items: center;
	gap: 10px;
	/* Comfortable hit area without visually inflating the row */
	padding: 3px 0;
	font-size: 14px;
	color: var(--hda-s-ink);
	cursor: pointer;
}

.hda-filters__check input {
	flex-shrink: 0;
	width: 17px;
	height: 17px;
	accent-color: var(--hda-s-purple);
	cursor: pointer;
}

.hda-filters__check:hover span {
	color: var(--hda-s-purple);
}

.hda-filters__check em {
	font-style: normal;
	color: var(--hda-s-ink-soft);
	font-size: 13px;
}

.hda-filters__check input:focus-visible {
	outline: 2px solid var(--hda-s-purple);
	outline-offset: 2px;
}

/* Price */

.hda-filters__price {
	display: flex;
	align-items: center;
	gap: 8px;
}

.hda-filters__price input {
	width: 100%;
	min-width: 0;
	height: 42px;
	padding: 0 10px;
	border: 1px solid var(--hda-s-line);
	border-radius: 8px;
	font-family: var(--hda-s-font);
	font-size: 14px;
	text-align: center;
	color: var(--hda-s-ink);
}

.hda-filters__price input:focus {
	border-color: var(--hda-s-purple);
	outline: none;
	box-shadow: 0 0 0 3px rgba(71, 30, 167, 0.15);
}

.hda-filters__price-sep {
	flex-shrink: 0;
	font-size: 13px;
	color: var(--hda-s-ink-soft);
}

.hda-filters__hint {
	margin: 10px 0 0;
	font-size: 12.5px;
	color: var(--hda-s-ink-soft);
}

.hda-filters__hint .woocommerce-Price-amount {
	color: var(--hda-s-ink-soft);
	font-weight: 600;
}

/* Actions */

.hda-filters__actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.hda-filters__apply {
	min-height: 48px;
	border: none;
	border-radius: 8px;
	background: var(--hda-s-purple);
	color: #fff;
	font-family: var(--hda-s-font);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.18s ease;
}

.hda-filters__apply:hover {
	background: var(--hda-s-deep);
}

.hda-filters__clear {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	border: 1px solid var(--hda-s-purple);
	border-radius: 8px;
	color: var(--hda-s-purple) !important;
	font-size: 14.5px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.18s ease;
}

.hda-filters__clear:hover {
	background: var(--hda-s-soft);
}

.hda-filters__apply:focus-visible,
.hda-filters__clear:focus-visible {
	outline: 3px solid rgba(71, 30, 167, 0.4);
	outline-offset: 2px;
}

/* ---------- Toolbar ---------- */

.hda-shop-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
	padding: 16px 22px;
	margin-bottom: 20px;
	background: #fff;
	border: 1px solid var(--hda-s-line);
	border-radius: 14px;
	box-shadow: var(--hda-s-shadow);
	font-family: var(--hda-s-font);
}

.hda-shop-toolbar__count {
	margin: 0;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--hda-s-ink);
}

.hda-shop-toolbar__order form {
	margin: 0;
}

.hda-shop-toolbar__order select {
	min-height: 42px;
	padding: 0 34px 0 14px;
	border: 1px solid var(--hda-s-line);
	border-radius: 8px;
	background-color: #fff;
	font-family: var(--hda-s-font);
	font-size: 14px;
	color: var(--hda-s-ink);
	cursor: pointer;
}

.hda-shop-toolbar__order select:focus {
	border-color: var(--hda-s-purple);
	outline: none;
	box-shadow: 0 0 0 3px rgba(71, 30, 167, 0.15);
}

/* Card rules live in listing-card.css (shared with the product page). */

/* No-results state */
.hda-shop-empty {
	padding: 46px 30px;
	background: #fff;
	border: 1px solid var(--hda-s-line);
	border-radius: 16px;
	box-shadow: var(--hda-s-shadow);
	text-align: center;
	font-family: var(--hda-s-font);
	color: var(--hda-s-ink-soft);
}

/* ---------- Trust strip ---------- */

.hda-trust {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	padding: 26px 30px;
	background: #fff;
	border: 1px solid var(--hda-s-line);
	border-radius: 16px;
	box-shadow: var(--hda-s-shadow);
}

.hda-trust__item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0 22px;
	border-left: 1px solid var(--hda-s-line);
}

.hda-trust__item:first-child {
	padding-left: 0;
	border-left: none;
}

.hda-trust__icon {
	flex-shrink: 0;
	color: var(--hda-s-purple);
	line-height: 0;
}

.hda-trust__body {
	display: flex;
	flex-direction: column;
	font-family: var(--hda-s-font);
	line-height: 1.35;
}

.hda-trust__body strong {
	font-size: 14px;
	color: var(--hda-s-ink);
}

.hda-trust__body small {
	font-size: 12.5px;
	color: var(--hda-s-ink-soft);
}

/* ---------- Responsive ---------- */

/* ---------- Filter panel toggle ----------
   The button is markup-only until shop-page.js adds `hda-filters--collapsible`,
   and it is never shown on desktop, where the sidebar has its own room. */

.hda-filters__toggle {
	display: none;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 52px;
	padding: 0 18px;
	border: 1px solid var(--hda-s-line);
	border-radius: 12px;
	background: #fff;
	font-family: var(--hda-s-font);
	font-size: 16px;
	font-weight: 700;
	color: var(--hda-s-deep);
	cursor: pointer;
}

.hda-filters__toggle-main {
	display: flex;
	align-items: center;
	gap: 10px;
}

.hda-filters__toggle .hda-icon {
	color: var(--hda-s-purple);
}

.hda-filters__badge {
	display: inline-grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--hda-s-purple);
	color: #fff;
	font-size: 12.5px;
	font-weight: 700;
}

.hda-filters__toggle-caret {
	display: flex;
	color: var(--hda-s-ink-soft);
	transform: rotate(90deg);
	transition: transform 0.2s ease;
}

.hda-filters.is-open .hda-filters__toggle-caret {
	transform: rotate(-90deg);
}

.hda-filters__toggle:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(71, 30, 167, 0.35);
}

@media (max-width: 1024px) {
	body.woocommerce-shop .hda-shop-row > .elementor-container,
	body.tax-product_cat .hda-shop-row > .elementor-container {
		flex-direction: column;
	}

	/* Collapsed by default: the products are what the visitor came for, and the
	   facets sat between them and the top of the page. */
	.hda-filters--collapsible {
		padding: 0;
		border: none;
		box-shadow: none;
		background: transparent;
	}

	.hda-filters--collapsible .hda-filters__toggle {
		display: flex;
		box-shadow: var(--hda-s-shadow);
	}

	.hda-filters--collapsible .hda-filters__body {
		display: none;
		margin-top: 12px;
		padding: 20px 18px;
		border: 1px solid var(--hda-s-line);
		border-radius: 14px;
		background: #fff;
		box-shadow: var(--hda-s-shadow);
	}

	.hda-filters--collapsible.is-open .hda-filters__body {
		display: block;
	}

	/* The button already says "Filtros"; repeating it inside is noise. */
	.hda-filters--collapsible .hda-filters__head {
		display: none;
	}

	body.woocommerce-shop .hda-shop-row > .elementor-container > .elementor-column,
	body.tax-product_cat .hda-shop-row > .elementor-container > .elementor-column {
		width: 100%;
		flex-basis: auto;
	}

	.hda-trust {
		grid-template-columns: repeat(2, 1fr);
		gap: 22px 0;
	}

	.hda-trust__item:nth-child(3) {
		padding-left: 0;
		border-left: none;
	}
}

@media (max-width: 767px) {
	.hda-shop-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.hda-shop-toolbar__order select {
		width: 100%;
	}

	.hda-trust {
		grid-template-columns: 1fr;
		padding: 22px;
	}

	.hda-trust__item {
		padding: 0;
		border-left: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hda-filters__apply,
	.hda-filters__clear {
		transition: none;
	}
}
