/* ============================================================
   MARCH — Header & Footer CSS
   ============================================================ */

/* ══════════════════════════════════════════════
   TOPBAR — Barra de anuncios rotativos
══════════════════════════════════════════════ */
.march-topbar {
	background-color: #111111;
	color: #ffffff;
	height: 36px;
	overflow: hidden;
	position: relative; /* relativo dentro del header fijo */
}

.march-topbar-track {
	position: relative;
	height: 100%;
}

.march-topbar-item {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	/* Empieza abajo, invisible */
	transform: translateY(100%);
	opacity: 0;
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
	            opacity  0.5s ease;
	will-change: transform, opacity;
}

/* Item activo: centrado, visible */
.march-topbar-item.is-active {
	transform: translateY(0);
	opacity: 1;
}

/* Item que sale: va hacia arriba */
.march-topbar-item.is-leaving {
	transform: translateY(-100%);
	opacity: 0;
}

.march-topbar-text {
	font-family: 'Outfit', sans-serif;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: #ffffff;
	white-space: nowrap;
}

.march-topbar-cta {
	font-family: 'Outfit', sans-serif;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: #ffffff;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
	transition: opacity 0.2s ease;
}
.march-topbar-cta:hover {
	opacity: 0.7;
}

/* ══════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════ */
.march-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	background: #ffffff;
	border-bottom: 1px solid #e5e5e5;
	transition: box-shadow 0.3s ease;
}
.march-header.march-header--scrolled {
	box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ── Inner container — CSS Grid 3 cols: [izq | logo | der] ── */
.march-header-inner {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 clamp(16px, 3vw, 40px);
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	width: 100%;
}

/* ── Fila superior ── */
.march-header-top {
	height: 60px;
	display: flex;
	align-items: center;
}

/* ── Mobile toggle: columna 1, izquierda ── */
.march-mobile-menu-toggle {
	grid-column: 1;
	justify-self: start;
}

/* ── Logo: columna 2, siempre centrado ── */
.march-header-logo {
	grid-column: 2;
	justify-self: center;
}

.march-header-logo a {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

/* Logo texto estilo Milk Bar: caja negra con texto blanco */
.march-logo-text {
	display: inline-block;
	background-color: #111111;
	color: #ffffff;
	font-family: 'Outfit', sans-serif;
	font-weight: 900;
	font-size: 20px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 6px 16px;
	line-height: 1;
}

/* Si hay imagen de logo subida */
.march-logo-img {
	max-height: 40px;
	width: auto;
}

/* ── Acciones: columna 3, siempre a la derecha ── */
.march-header-actions {
	grid-column: 3;
	justify-self: end;
	display: flex;
	align-items: center;
	gap: 0;
}

.march-header-action {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: #111111;
	background: none;
	border: none;
	cursor: pointer;
	border-radius: 0;
	text-decoration: none;
	transition: opacity 0.2s ease;
	position: relative;
}

/* Todos los SVG del header: mismo tamaño exacto */
.march-header-action svg {
	width: 22px;
	height: 22px;
	display: block;
	flex-shrink: 0;
}
.march-header-action:hover { opacity: 0.6; }

/* Contador del carrito */
.march-cart-count {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 16px;
	height: 16px;
	background: #111111;
	color: #ffffff;
	font-size: 9px;
	font-weight: 700;
	border-radius: 50%;
	display: none;
	align-items: center;
	justify-content: center;
	line-height: 1;
}
.march-cart-count--visible {
	display: flex;
}

/* ── Fila de navegación ── */
.march-header-nav {
	border-top: 1px solid #f0f0f0;
}
/* Nav inner: flex centrado (solo tiene 1 hijo — el menú) */
.march-header-nav .march-header-inner {
	height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	grid-template-columns: unset;
}

/* Lista del menú */
.march-nav-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 0;
}

.march-nav-menu > li {
	position: relative;
}

.march-nav-menu > li > a {
	display: block;
	padding: 0 18px;
	font-family: 'Outfit', sans-serif;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: #111111;
	text-decoration: none;
	line-height: 46px;
	white-space: nowrap;
	transition: opacity 0.2s ease;
}
.march-nav-menu > li > a:hover,
.march-nav-menu > li.current-menu-item > a,
.march-nav-menu > li.current-menu-parent > a {
	opacity: 0.55;
}

/* Submenú dropdown */
.march-nav-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background: #ffffff;
	border: 1px solid #e5e5e5;
	border-top: 2px solid #111111;
	list-style: none;
	margin: 0;
	padding: 8px 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: all 0.2s ease;
	z-index: 100;
}
.march-nav-menu > li:hover .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.march-nav-menu .sub-menu li a {
	display: block;
	padding: 10px 20px;
	font-family: 'Outfit', sans-serif;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #111111;
	text-decoration: none;
	transition: background 0.15s ease;
}
.march-nav-menu .sub-menu li a:hover {
	background: #f4f4f4;
}

/* ── Barra de búsqueda ── */
.march-search-bar {
	background: #f4f4f4;
	border-top: 1px solid #e5e5e5;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.35s ease, padding 0.35s ease;
}
.march-search-bar.march-search-bar--open {
	max-height: 80px;
}
.march-search-bar .march-header-inner {
	height: 64px;
	gap: 12px;
}
.march-search-bar form {
	display: flex;
	width: 100%;
	max-width: 600px;
	gap: 0;
}
.march-search-bar input[type="search"],
.march-search-input {
	flex: 1;
	padding: 12px 16px;
	border: 2px solid #111111;
	border-right: none;
	font-family: 'Outfit', sans-serif;
	font-size: 14px;
	outline: none;
	border-radius: 0;
	background: #fff;
}
.march-search-bar button[type="submit"] {
	padding: 12px 20px;
	background: #111111;
	color: #fff;
	border: 2px solid #111111;
	cursor: pointer;
	border-radius: 0;
}

/* ── Hamburger mobile ── */
.march-mobile-menu-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	width: 40px;
}
.march-mobile-menu-toggle span {
	display: block;
	width: 22px;
	height: 2px;
	background: #111111;
	transition: all 0.25s ease;
}
.march-mobile-menu-toggle.is-active span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.march-mobile-menu-toggle.is-active span:nth-child(2) {
	opacity: 0;
}
.march-mobile-menu-toggle.is-active span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ── Menú mobile ── */
.march-mobile-menu {
	position: fixed;
	top: 0;
	left: -100%;
	width: min(320px, 85vw);
	height: 100vh;
	background: #ffffff;
	z-index: 2000;
	padding: 24px;
	overflow-y: auto;
	transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.march-mobile-menu.is-open {
	left: 0;
}
.march-mobile-close {
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	display: block;
	margin-left: auto;
	margin-bottom: 32px;
	color: #111111;
}

.march-mobile-nav {
	list-style: none;
	margin: 0;
	padding: 0;
}
.march-mobile-nav li a {
	display: block;
	padding: 14px 0;
	font-family: 'Outfit', sans-serif;
	font-size: 18px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #111111;
	text-decoration: none;
	border-bottom: 1px solid #f0f0f0;
}
.march-mobile-nav .sub-menu {
	list-style: none;
	padding: 0 0 0 16px;
}
.march-mobile-nav .sub-menu li a {
	font-size: 14px;
	font-weight: 600;
}

.march-mobile-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.45);
	z-index: 1999;
}
.march-mobile-overlay.is-open {
	display: block;
}

/* Spacer para compensar el header fijo */
.march-header-spacer {
	height: 107px; /* 60px top + 46px nav + 1px border */
}

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.march-footer {
	background-color: #111111;
	color: #ffffff;
	padding: 72px 0 0;
}

.march-footer .march-container {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: clamp(40px, 6vw, 80px);
	padding-bottom: 60px;
}

/* ── Marca ── */
.march-footer-brand { }

.march-footer-logo {
	display: inline-block;
	text-decoration: none;
	margin-bottom: 16px;
}
.march-footer-logo-text {
	font-family: 'Outfit', sans-serif;
	font-weight: 900;
	font-size: 24px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #ffffff;
	background-color: #ffffff;
	color: #111111;
	padding: 6px 16px;
	display: inline-block;
}
.march-footer-logo-img {
	max-height: 36px;
	width: auto;
	filter: brightness(0) invert(1); /* Invertir logo a blanco */
}

.march-footer-tagline {
	font-size: 14px;
	color: #888888;
	line-height: 1.6;
	margin-bottom: 24px;
	max-width: 260px;
}

.march-footer-social {
	display: flex;
	gap: 12px;
}
.march-footer-social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	color: #888888;
	text-decoration: none;
	transition: color 0.2s ease;
}
.march-footer-social-link:hover {
	color: #ffffff;
}

/* ── Columnas ── */
.march-footer-cols {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
}

.march-footer-col-title {
	font-family: 'Outfit', sans-serif;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: #ffffff;
	margin-bottom: 20px;
}

.march-footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.march-footer-links a {
	font-size: 13px;
	font-weight: 400;
	color: #888888;
	text-decoration: none;
	transition: color 0.2s ease;
}
.march-footer-links a:hover {
	color: #ffffff;
}

/* ── Copyright ── */
.march-footer-bottom {
	border-top: 1px solid #222222;
}
.march-footer-bottom .march-container {
	display: block;
	padding-top: 20px;
	padding-bottom: 20px;
}
.march-footer-copy {
	font-size: 12px;
	color: #555555;
	text-align: center;
}

/* ── Responsive ── */
@media (max-width: 991px) {
	.march-mobile-menu-toggle { display: flex; }
	.march-header-nav { display: none; }
	.march-header-spacer { height: 61px; }

	.march-footer .march-container {
		grid-template-columns: 1fr;
		gap: 40px;
	}
}

@media (max-width: 576px) {
	.march-footer-cols {
		grid-template-columns: repeat(2, 1fr);
	}
}
