/* ==========================================================================
   HEADER CUSTOM - Todo el CSS del rediseño del header (una sola línea,
   sin logo, menú tipo pestañas de carpeta, submenú Venta/Renta, buscador
   y carrito compactos). Este archivo se encola con máxima prioridad
   (después de WooCommerce, Storefront y Elementor) para que nada le
   gane en la cascada -- por eso ya no hace falta abusar de !important
   como cuando esto vivía en "CSS Adicional" del Personalizador.
   ========================================================================== */

/* ---- Header en una sola línea: desenvuelve los contenedores extra ---- */
.site-header .main-navigation .menu ul:not(.nav-menu) {
	display: none;
}

/* Hay DOS .col-full distintos en el header de Storefront: uno envuelve
   logo+buscador (hijo directo de .site-header), otro envuelve menú+
   carrito (dentro de .storefront-primary-navigation). Hay que
   "desenvolver" los DOS para que el "order" de cada elemento funcione
   de verdad -- si no, el que sigue envuelto queda con su propio lugar
   fijo en la fila, sin importar qué order le pongamos a lo que tiene adentro. */
.site-header > .col-full {
	display: contents;
}

.site-header .storefront-primary-navigation,
.site-header .storefront-primary-navigation > .col-full {
	display: contents;
}

.site-header .site-branding {
	order: 1;
	margin: 0;
	display: none;
}

.site-header .main-navigation {
	order: 2 !important;
	flex: 0 1 auto !important;
	min-width: 0;
	overflow: visible;
	/* SIN margin-left: auto -- el menú queda pegado a la izquierda,
	   arrancando justo donde estaba el logo (ahora oculto) */
}

.site-header .main-navigation .menu {
	display: flex;
	justify-content: flex-start; /* clave: crecer empuja hacia la DERECHA */
	align-items: center;
	flex-wrap: nowrap;
	margin: 0;
	padding: 0;
}

/* Carrito: primero del grupo derecho. El margin-left:auto empuja a ESTE
   grupo entero (carrito + buscador) hasta pegarlo contra el borde
   derecho del header, dejando el menú anclado a la izquierda */
.site-header .site-header-cart {
	order: 3 !important;
	flex: 0 0 auto !important;
	display: flex !important;
	align-items: center;
	margin: 0 0 0 auto !important;
	padding: 0;
}

/* Buscador: al final de todo, en la puntita del extremo derecho */
.site-header .site-search,
.site-header .storefront-search,
.site-header #storefront-search {
	order: 4 !important;
	flex: 0 0 auto !important;
	position: static;
	width: auto;
	max-width: clamp(130px, 12vw + 40px, 230px);
	margin: 0;
	padding: 0;
}

.site-header .site-search .widget,
.site-header .site-search .widget_product_search {
	margin: 0;
	padding: 0;
}

/* ---- Header: layout general ---- */
.site-header {
	flex-wrap: nowrap;
	padding: 10px 24px;
	gap: clamp(6px, 1.2vw, 14px);
	border-bottom: none;
	margin-bottom: 0;
}

body:not(.mitienda-home-hero-header) .site-header {
	margin-top: 0;
}

.site-header::after {
	display: none;
}

#content,
.site-content,
#primary,
.content-area {
	margin-top: 0;
	padding-top: 0;
}

@media (max-width: 900px) {
	.site-header {
		flex-wrap: wrap;
	}

	.site-header .main-navigation .menu {
		flex-wrap: wrap;
	}

	.site-header .site-search,
	.site-header .storefront-search,
	.site-header #storefront-search {
		max-width: 160px;
	}
}

/* ---- Pestañas del menú ---- */
.site-header .main-navigation ul {
	align-items: center;
}

.site-header .main-navigation ul li a {
	white-space: nowrap;
	display: flex;
	align-items: center;
	min-height: 38px; /* mínimo para alinear con buscador/carrito, pero el Personalizador puede agrandarlo */
	box-sizing: border-box;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.site-header .main-navigation ul li a:hover,
.site-header .main-navigation ul li.current-menu-item a,
.site-header .main-navigation ul li.current_page_item a {
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* ---- Buscador: pestaña trapezoidal idéntica a las del menú ---- */
.site-header .woocommerce-product-search {
	display: flex;
	align-items: center;
	width: 100%;
	height: 38px;
	box-sizing: border-box;
	background: rgba(255, 255, 255, 0.05);
	border: none;
	border-radius: 0;
	clip-path: polygon(14% 0, 86% 0, 100% 100%, 0% 100%);
	padding: 0 26px;
	margin: 0;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
	transition: background 0.2s ease, box-shadow 0.2s ease;
}

.site-header .woocommerce-product-search:hover,
.site-header .woocommerce-product-search:focus-within {
	background: #f2f2f2;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.site-header .woocommerce-product-search .search-field {
	width: 100%;
	height: auto;
	background: transparent;
	border: none;
	margin: 0;
	color: #cfcfcf;
	padding: 0;
	font-size: 0.82rem;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.site-header .woocommerce-product-search:hover .search-field,
.site-header .woocommerce-product-search:focus-within .search-field {
	color: #1d1d1f;
}

.site-header .woocommerce-product-search .search-field::placeholder {
	color: transparent; /* se quita el texto, sin cambiar el tamaño/forma del buscador */
}

.site-header .woocommerce-product-search:hover .search-field::placeholder,
.site-header .woocommerce-product-search:focus-within .search-field::placeholder {
	color: transparent;
}

/* Ícono de lupa propio, tamaño fijo controlado -- reemplaza cualquier
   ícono nativo de Storefront (esa era la causa de la desproporción) */
.site-header .woocommerce-product-search button[type="submit"] {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	background: transparent;
	border: none;
	color: inherit;
	padding: 0;
	margin: 0 0 0 8px;
	font-size: 0; /* mata cualquier texto/ícono de fuente que traiga por defecto */
	line-height: 0;
}

.site-header .woocommerce-product-search button[type="submit"]::before {
	content: "";
	display: block;
	width: 16px;
	height: 16px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.site-header .woocommerce-product-search:hover button[type="submit"]::before,
.site-header .woocommerce-product-search:focus-within button[type="submit"]::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d1d1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}

/* ---- Carrito: botón cuadrado, solo ícono ---- */
.site-header .site-header-cart > li {
	display: flex;
	align-items: center;
}

.site-header .site-header-cart .widget_shopping_cart {
	border: none;
}

.site-header .site-header-cart .cart-contents {
	font-size: 0;
	line-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 4px;
	color: #fff;
	text-decoration: none;
	position: relative;
}

.site-header .site-header-cart .cart-contents svg,
.site-header .site-header-cart .cart-contents img {
	display: none;
}

.site-header .site-header-cart .cart-contents::before {
	content: "";
	display: block;
	width: 18px;
	height: 18px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

/* ---- Submenú "Venta / Renta" en fila, empujando el resto a la derecha ---- */
.site-header .main-navigation ul li.menu-item-has-children,
.site-header .main-navigation ul li.page_item_has_children {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	position: static !important;
}

.site-header .main-navigation ul .sub-menu {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	position: static !important;
	float: none !important;
	max-width: 0;
	width: auto !important;
	overflow: hidden !important;
	margin: 0;
	padding: 0;
	list-style: none;
	white-space: nowrap;
	background-color: transparent !important;
	transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header .main-navigation ul li.menu-item-has-children:hover .sub-menu,
.site-header .main-navigation ul li.page_item_has_children:hover .sub-menu,
.site-header .main-navigation ul li.menu-item-has-children:focus-within .sub-menu,
.site-header .main-navigation ul li.page_item_has_children:focus-within .sub-menu {
	max-width: 300px !important;
}

.site-header .main-navigation ul .sub-menu li {
	display: flex !important;
	float: none !important;
	width: auto !important;
	margin: 0 0 0 6px;
}

.site-header .main-navigation ul .sub-menu li a {
	display: flex;
	align-items: center;
	height: 38px;
	box-sizing: border-box;
	width: auto;
	padding: 0 22px;
	margin: 0;
	background: rgba(255, 255, 255, 0.12);
	box-shadow: none;
	color: #ffffff;
	text-decoration: none;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	white-space: nowrap;
	clip-path: polygon(14% 0, 86% 0, 100% 100%, 0% 100%);
	transition: background 0.15s ease, color 0.15s ease;
}

.site-header .main-navigation ul .sub-menu li a:hover {
	background: #f2f2f2;
	color: #1d1d1f;
}

@media (max-width: 768px) {
	.site-header .main-navigation ul .sub-menu {
		max-width: 0;
	}
}

/* ---- Hero Home: full-bleed, rompe el contenedor .col-full ---- */
.home-hero {
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
}

html,
body {
	overflow-x: hidden;
}
