/**
 * Header (navbar + barra de categorías) y Footer, desktop y móvil.
 * Basado en Figma nodeId 310:2933 (Desk - Navbar) y 310:2963 (Desk - Categorías).
 */

/* ---------- Header wrapper ---------- */

.ht-header {
	position: sticky;
	top: 0;
	z-index: 100;
}

/* ---------- Navbar ---------- */

.ht-navbar {
	background: var(--ht-color-primary);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	padding: 11px var(--ht-gutter);
	min-height: var(--ht-header-height);
}

.ht-navbar__logo img {
	height: 68px;
	width: auto;
}

.ht-navbar--desktop > .ht-search-form {
	flex: 1;
	max-width: 650px;
	margin-inline: auto;
	position: relative;
	left: -7px;
}

.ht-search-form {
	position: relative;
	display: flex;
	align-items: center;
}

.ht-search-form__input {
	width: 100%;
	height: 52px;
	background: var(--ht-color-primary-dark);
	border: none;
	border-radius: var(--ht-radius-pill);
	padding: 0 68px 0 26px;
	color: var(--ht-white);
	font-family: var(--ht-font-ui);
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: -0.02em;
}

.ht-search-form__input::placeholder {
	color: rgba(255, 255, 255, 0.6);
}

.ht-search-form__submit {
	position: absolute;
	right: 5px;
	top: 5px;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--ht-color-primary-mid);
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ht-white);
	cursor: pointer;
}

.ht-search-form__submit svg {
	width: 20px;
	height: 20px;
}

.ht-navbar__actions {
	display: flex;
	align-items: center;
	gap: 18px;
	color: var(--ht-white);
}

.ht-navbar__action {
	display: flex;
	align-items: center;
	gap: 4px;
	color: var(--ht-white);
	cursor: pointer;
}

.ht-navbar__action-icon {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	color: var(--ht-white);
}

.ht-navbar__action-icon svg {
	width: 26px;
	height: 26px;
}

.ht-navbar__action-label {
	font-family: var(--ht-font-ui);
	font-weight: 600;
	font-size: 0.8125rem;
	line-height: 1.2;
}

.ht-navbar__action-sub {
	display: block;
	font-size: 0.6875rem;
	opacity: 0.85;
}

.ht-cart-count {
	position: absolute;
	top: -2px;
	right: -2px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 50%;
	background: var(--ht-color-accent);
	color: var(--ht-white);
	font-size: 0.6875rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ht-cart-count[data-count="0"] {
	display: none;
}

/* ---------- Barra de categorías ---------- */

.ht-category-bar {
	background: var(--ht-color-primary-mid);
	padding: 7.5px var(--ht-gutter);
}

.ht-category-bar__list {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	font-family: var(--ht-font-ui);
	font-weight: 600;
	font-size: 0.92rem;
	letter-spacing: -0.02em;
	color: rgba(255, 255, 255, 0.87);
}

.ht-category-bar__list a:hover {
	text-decoration: underline;
}

.ht-category-bar__sep {
	opacity: 0.6;
}

/* ---------- Header móvil ---------- */

.ht-navbar--mobile {
	display: none;
	flex-direction: column;
	gap: 12px;
	background: var(--ht-color-primary);
	padding: 12px var(--ht-gutter-mobile);
}

.ht-navbar--mobile .ht-navbar__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.ht-navbar__mobile-actions {
	display: flex;
	align-items: center;
	gap: 4px;
}

.ht-mobile-nav-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ht-white);
	cursor: pointer;
}

.ht-mobile-nav-toggle__icon,
.ht-mobile-nav-toggle__icon::before,
.ht-mobile-nav-toggle__icon::after,
.ht-mobile-nav-toggle__icon span {
	display: block;
	width: 22px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 180ms ease, opacity 180ms ease;
}

.ht-mobile-nav-toggle__icon {
	position: relative;
	background: transparent;
}

.ht-mobile-nav-toggle__icon::before,
.ht-mobile-nav-toggle__icon::after {
	content: "";
	position: absolute;
	left: 0;
}

.ht-mobile-nav-toggle__icon::before {
	top: -7px;
}

.ht-mobile-nav-toggle__icon::after {
	top: 7px;
}

.ht-mobile-nav-toggle.is-open .ht-mobile-nav-toggle__icon span {
	opacity: 0;
}

.ht-mobile-nav-toggle.is-open .ht-mobile-nav-toggle__icon::before {
	transform: translateY(7px) rotate(45deg);
}

.ht-mobile-nav-toggle.is-open .ht-mobile-nav-toggle__icon::after {
	transform: translateY(-7px) rotate(-45deg);
}

.ht-navbar--mobile .ht-navbar__mobile-actions .ht-navbar__action {
	gap: 0;
}

@media (max-width: 420px) {
	.ht-navbar--mobile .ht-navbar__action-label {
		display: none;
	}
}

.ht-navbar--mobile .ht-navbar__logo img {
	height: 40px;
}

.ht-navbar--mobile .ht-navbar__action-sub {
	display: none;
}

@media (max-width: 1024px) {
	.ht-navbar--desktop {
		display: none;
	}

	.ht-navbar--mobile {
		display: flex;
	}

	.ht-category-bar {
		padding: 8px var(--ht-gutter-mobile);
	}

	.ht-category-bar__list {
		font-size: 0.8125rem;
		gap: 10px;
	}

	.ht-js .ht-category-bar {
		display: none;
	}

	.ht-js .ht-category-bar.is-open {
		display: block;
	}

	.ht-category-bar__list {
		align-items: stretch;
		flex-direction: column;
		gap: 0;
	}

	.ht-category-bar__list a {
		display: flex;
		align-items: center;
		min-height: 44px;
	}

	.ht-category-bar__sep {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ht-mobile-nav-toggle__icon,
	.ht-mobile-nav-toggle__icon::before,
	.ht-mobile-nav-toggle__icon::after,
	.ht-mobile-nav-toggle__icon span {
		transition: none;
	}
}

/* ---------- Footer ---------- */
/* Nota de fidelidad: el nodo de footer (326:4200) no pudo abrirse en detalle
   por el límite de llamadas del plan Figma MCP durante esta sesión; la
   estructura de columnas sigue el sistema visual del resto del sitio y el
   contenido descrito en la sección "Contenido administrable" del brief. */

.ht-footer {
	position: relative;
	overflow: hidden;
	background: #205c2a;
	color: rgba(255, 255, 255, 0.87);
	padding: 56px 0 24px;
	background-image:
		radial-gradient(circle at 70% 20%, rgba(5, 43, 16, 0.08), transparent 32%),
		radial-gradient(circle at 18% 100%, rgba(5, 43, 16, 0.12), transparent 30%);
}

.ht-footer::before {
	content: "";
	position: absolute;
	inset: -12% -4%;
	background: #103010;
	mask: url("../images/why/fish-school.webp") center / 112% auto no-repeat;
	-webkit-mask: url("../images/why/fish-school.webp") center / 112% auto no-repeat;
	opacity: 0.17;
	pointer-events: none;
}

.ht-footer > .ht-container {
	position: relative;
	z-index: 1;
}

.ht-footer__brand {
	margin-bottom: 32px;
}

.ht-footer__brand img {
	height: 145px;
	width: auto;
}

.ht-footer__top {
	display: grid;
	grid-template-columns: 230px 346px 226px 227px minmax(0, 1fr);
	gap: 24px;
	min-height: 222px;
	padding-bottom: 56px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.ht-footer__col {
	padding-right: 18px;
	border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.ht-footer__col:last-child {
	padding-right: 0;
	border-right: 0;
}

.ht-footer__heading {
	font-family: var(--ht-font-ui);
	font-weight: 600;
	font-size: 1.75rem;
	line-height: 1.1;
	color: var(--ht-white);
	margin-bottom: 22px;
}

.ht-footer__text {
	font-size: 1rem;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.8);
	margin: 0 0 10px;
}

.ht-footer__text a {
	color: inherit;
}

.ht-footer__link-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.ht-footer__list {
	display: flex;
	flex-direction: column;
	gap: 18px;
	font-size: 1rem;
	color: rgba(255, 255, 255, 0.82);
}

.ht-footer__list a:hover {
	text-decoration: underline;
}

.ht-footer__social {
	display: flex;
	gap: 12px;
}

.ht-footer__social a {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color var(--ht-transition-fast);
}

.ht-footer__social-placeholder {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.72);
}

.ht-footer__social a:hover {
	background: var(--ht-color-primary-mid);
}

.ht-footer__bottom {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	padding-top: 24px;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.6);
	text-align: center;
}

.ht-footer__legal {
	display: flex;
	gap: 16px;
}

@media (max-width: 1024px) {
	.ht-footer__top {
		grid-template-columns: 1fr 1fr;
	}

	.ht-footer__col--links {
		grid-column: span 2;
	}

	.ht-footer__col:nth-child(2n) {
		border-right: 0;
		padding-right: 0;
	}
}

@media (max-width: 599px) {
	.ht-footer {
		padding: 40px 0 24px;
	}

	.ht-footer__top {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.ht-footer__col--links {
		grid-column: auto;
	}

	.ht-footer__col {
		border-right: 0;
		padding-right: 0;
	}

	.ht-footer__link-columns {
		grid-template-columns: 1fr 1fr;
	}

	.ht-footer__bottom {
		flex-direction: column;
	}
}
