/*=================================
NAVBAR - Estilos Centralizados
==================================*/

/*--------------------------------
1. Header Principal
--------------------------------*/
.header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 110px;
	min-height: 110px;
	background: #0202022d;
	/* Por encima del banner (101) y del contenido, sin tapar la franja del banner (empieza en top: 33px) */
	z-index: 102;
	overflow: visible;
	transition: background-color 200ms ease, box-shadow 200ms ease;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	margin: 0;
	border: none;
	padding: 0 20px;
}

/* Debajo del banner: con box-sizing border-box (Bootstrap) el bloque mide 33px de alto total, no 63px */
body:has(#publicidad-banner) .header {
	top: 33px;
}

#publicidad-banner {
	z-index: 101;
}

.header.scrolled {
	height: 140px;
	background: #5f5048;
}

.header_inner {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	overflow: visible;
}

/*--------------------------------
2. Navegación Principal
--------------------------------*/
.main_nav {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100%;
	overflow: visible;
}

.main_nav ul {
	display: flex;
	justify-content: center;
	align-items: center;
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 0;
	height: 100%;
}

.main_nav ul li {
	position: relative;
	display: inline-flex;
	align-items: center;
	height: 100%;
	vertical-align: middle;
	margin: 0;
}

.main_nav ul li.logo-container {
	margin: 0 40px;
	display: flex;
	align-items: center;
	height: 100%;
}

/* Solo enlaces de la barra principal (no aplica a .dropdown-menu1: el flex los dejaba alineados a la izquierda) */
.main_nav > ul > li > a,
.main_nav > ul > li.logo-container .logo1 > a {
	font-size: 13px;
	text-transform: uppercase;
	color: #ffffff;
	font-weight: 600;
	letter-spacing: 0.2em;
	transition: all 200ms ease;
	padding: 21px 18px;
	text-decoration: none;
	position: relative;
	white-space: nowrap;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.main_nav > ul > li > a:hover,
.main_nav > ul > li.logo-container .logo1 > a:hover {
	color: #ccb8ad;
}

.main_nav ul li:last-child {
	margin-right: 0;
}

/*--------------------------------
3. Logo
--------------------------------*/
.logo1 {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}

.logo1 img {
	max-height: 92px;
	width: auto;
	object-fit: contain;
	transition: max-height 200ms ease;
}

.header.scrolled .logo1 img {
	max-height: 84px;
}

/*--------------------------------
4. Menú Desplegable de Productos
   (selectores con .main_nav ganan a reglas sueltas en product.css / categories.css)
--------------------------------*/
.main_nav .dropdown {
	position: relative;
	z-index: 1;
}

.main_nav .dropdown .dropdown-menu1 {
	position: absolute !important;
	top: 100%;
	left: 50% !important;
	right: auto;
	transform: translateX(-50%);
	-webkit-transform: translateX(-50%);
	background-color: rgb(224 217 201);
	min-width: 220px;
	width: max-content;
	max-width: min(92vw, 240px);
	height: auto;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
	z-index: 1200;
	border-radius: 4px;
	padding: 12px 0;
	display: none;
	margin: 8px 0 0 0;
	list-style: none;
	box-sizing: border-box;
	text-align: center;
}

.main_nav .dropdown-menu1 li {
	margin: 0;
	padding: 0;
	width: 100%;
	color: #212529;
	line-height: 1.45;
	text-align: center;
}

.main_nav .dropdown .dropdown-menu1 li a {
	color: #806b5f;
	text-decoration: none;
	display: block !important;
	width: 100%;
	box-sizing: border-box;
	font-family: "Tenor Sans", "Open Sans", sans-serif;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	text-align: center !important;
	justify-content: unset !important;
	align-items: unset !important;
	/* Espaciado tipo menú original (antes de comprimir) */
	padding: 16px 28px !important;
	margin: 0 !important;
	line-height: 1.45;
	white-space: normal;
	transition: background-color 0.3s, color 0.2s;
}

.main_nav .dropdown-menu1 li a:hover {
	background-color: #f5f5f5;
	color: #333;
}

.main_nav .dropdown-menu1 li.categorias a {
	border-top: 1px solid #ddd;
	margin-top: 6px !important;
	padding-top: 18px !important;
}

/* Mostrar al hover en escritorio (sin !important: en ≤768px product_responsive fuerza display:none) */
.main_nav .dropdown:hover .dropdown-menu1 {
	display: block;
}

/* Flecha indicadora */
.main_nav .dropdown > a:after {
	content: " ▼";
	font-size: 10px;
	margin-left: 5px;
	vertical-align: middle;
}

/*--------------------------------
5. Contenido del Header (Lado Derecho)
--------------------------------*/
.header_content {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 22px;
	height: 100%;
	margin-left: auto;
}

.shopping {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	transform: none;
	top: auto;
}

/*--------------------------------
6. Ícono del Carrito
--------------------------------*/
.carrt-icon {
	position: relative;
	cursor: pointer;
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
	margin: 0;
	padding: 0;
}

.carrt-icon img {
	width: 24px;
	height: 24px;
	object-fit: contain;
}

.carrt-icon .count {
	position: absolute;
	top: -6px;
	right: -6px;
	background: #937c6f;
	color: white;
	border-radius: 50%;
	width: 16px;
	height: 16px;
	font-size: 10px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
}

.carrt-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	/* Por encima del header (102), debajo del panel del carrito */
	z-index: 1195;
	display: none;
}

.carrt-overlay.visible {
	display: block;
}

.carrt-sidebar {
	position: fixed;
	top: 0;
	right: -500px;
	width: 100%;
	max-width: 400px;
	height: 100vh;
	background: white;
	z-index: 1200;
	transition: right 0.3s ease;
	display: flex;
	flex-direction: column;
	box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);
	overflow-y: auto;
	overflow-x: hidden;
}

.carrt-sidebar.active {
	right: 0;
}

/* Estilos del carrito dentro del sidebar */
.carrt-header {
	padding: 20px;
	background: #f8f9fa;
	border-bottom: 1px solid #eee;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-shrink: 0;
}

.carrt-header h2 {
	font-size: 1.3rem;
	margin: 0;
	color: #333;
}

.close-carrt {
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	color: #666;
	padding: 0;
}

.carrt-content {
	flex: 1;
	overflow-y: auto;
	padding: 15px;
}

.carrt-summary {
	padding: 15px;
	border-top: 1px solid #eee;
	background: #f8f9fa;
	flex-shrink: 0;
}

/*--------------------------------
7. Avatar y Dropdown de Usuario
--------------------------------*/
.shopping {
	display: flex;
	align-items: center;
	gap: 16px;
	height: 100%;
	margin: 0;
	padding: 0;
	justify-content: center;
}

.avatar {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
}

.avatar-container {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}

.avatar-img {
	width: 28px;
	height: 28px;
	cursor: pointer;
	transition: transform 0.3s ease;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}

.avatar-img:hover {
	transform: scale(1.1);
}

.dropdown-content {
	display: none;
	position: absolute;
	right: 0;
	background-color: #f9f9f9;
	min-width: 200px;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
	z-index: 1001;
	border-radius: 5px;
	overflow: hidden;
	top: calc(100% + 10px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.dropdown-content.show {
	display: block;
}

.dropdown-content a {
	color: #333;
	padding: 12px 16px;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 10px;
	transition: background-color 0.3s;
	font-size: 13px;
	font-weight: 500;
}

.dropdown-content a i {
	width: 16px;
	text-align: center;
}

.dropdown-content a:hover {
	background-color: #f1f1f1;
	color: #000;
}

/*--------------------------------
8. Botón Hamburger (Mobile)
--------------------------------*/
.burger_container {
	display: none;
	cursor: pointer;
	width: 26px;
	height: 20px;
	margin-left: 14px;
	z-index: 100;
	flex-direction: column;
	justify-content: space-between;
}

.burger_container div {
	width: 100%;
	height: 2px;
	background: #ffffff;
	transition: all 200ms ease;
	margin: 0;
}

.burger_container div:first-child {
	margin-top: 0;
}

/*--------------------------------
9. Menú Móvil (panel lateral desde la derecha; coincide con main_styles / product_responsive)
--------------------------------*/
.menu {
	position: fixed;
	top: 0;
	right: -420px;
	left: auto;
	width: 400px;
	max-width: min(400px, 100vw);
	height: 100vh;
	height: 100dvh;
	background: #ffffff;
	/* Por encima del navbar (102) y del carrito lateral */
	z-index: 1210;
	padding: 87px 60px 24px 50px;
	box-sizing: border-box;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: flex-start;
	text-align: right;
	-webkit-transition: right 400ms ease;
	-moz-transition: right 400ms ease;
	-o-transition: right 400ms ease;
	transition: right 400ms ease;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
}

.menu.active {
	right: 0;
}

.menu_close_container {
	position: absolute;
	top: 30px;
	right: 60px;
	width: 18px;
	height: 18px;
	-webkit-transform: rotate(45deg);
	-moz-transform: rotate(45deg);
	-ms-transform: rotate(45deg);
	-o-transform: rotate(45deg);
	transform: rotate(45deg);
	cursor: pointer;
}

.menu_close {
	width: 100%;
	height: 100%;
	position: relative;
}

.menu_close div {
	width: 100%;
	height: 2px;
	background: #232323;
	position: absolute;
	top: 8px;
	left: 0;
	-webkit-transition: all 200ms ease;
	-moz-transition: all 200ms ease;
	-ms-transition: all 200ms ease;
	-o-transition: all 200ms ease;
	transition: all 200ms ease;
}

.menu_close div:last-of-type {
	-webkit-transform: rotate(90deg) translateX(-2px);
	-moz-transform: rotate(90deg) translateX(-2px);
	-ms-transform: rotate(90deg) translateX(-2px);
	-o-transform: rotate(90deg) translateX(-2px);
	transform: rotate(90deg) translateX(-2px);
	transform-origin: center;
}

.menu_close:hover div {
	background: #937c6f;
}

.menu .logo {
	margin-bottom: 60px;
	text-align: right;
}

.menu .logo img {
	max-width: 150px;
	height: auto;
}

.menu_nav ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.menu_nav ul li {
	margin-bottom: 11px;
}

.menu_nav ul li a {
	color: #2f2f2f;
	text-decoration: none;
	font-size: 12px;
	text-transform: uppercase;
	font-weight: 600;
	letter-spacing: 0.2em;
	display: block;
	padding: 6px 0;
	border-bottom: none;
	-webkit-transition: color 200ms ease;
	-moz-transition: color 200ms ease;
	transition: color 200ms ease;
}

.menu_nav ul li a:hover {
	color: #937c6f;
}

.menu .search {
	width: 100%;
	margin-bottom: 50px;
}

/*--------------------------------
10. Responsive
--------------------------------*/
@media (max-width: 1200px) {
	.header {
		height: 100px;
		min-height: 100px;
	}

	.header.scrolled {
		height: 100px;
		min-height: 100px;
	}

	.main_nav > ul > li > a,
	.main_nav > ul > li.logo-container .logo1 > a {
		padding: 15px 12px;
		font-size: 12px;
	}

	.main_nav ul li.logo-container {
		margin: 0 20px;
	}

	.shopping {
		gap: 10px;
		padding-right: 10px;
	}
}

@media (max-width: 992px) {
	.header {
		height: 80px;
		min-height: 80px;
	}

	.header.scrolled {
		height: 80px;
		min-height: 80px;
	}

	.main_nav > ul > li > a,
	.main_nav > ul > li.logo-container .logo1 > a {
		padding: 10px 10px;
		font-size: 11px;
	}

	.logo1 img {
		max-height: 80px;
	}

	/* Mantener visible el logo del header en tablet/móvil */
	.main_nav {
		display: flex !important;
		width: auto;
		flex: 0 0 auto;
		height: auto;
	}

	.main_nav ul {
		height: auto;
	}

	.main_nav ul li:not(.logo-container) {
		display: none !important;
	}

	.main_nav ul li.logo-container {
		display: inline-flex !important;
		margin: 0;
		height: auto;
	}

	.main_nav > ul > li.logo-container .logo1 > a {
		padding: 0 !important;
		height: auto !important;
	}

	.logo1 img {
		max-height: 64px;
	}

	/* Evitar que el burger se monte sobre avatar/carrito */
	.burger_container {
		display: flex;
		position: relative !important;
		right: auto !important;
		top: auto !important;
		margin-left: 12px;
		flex-shrink: 0;
		align-self: center;
	}

	.header_content {
		margin-left: auto;
		flex-shrink: 0;
	}

	.header_inner {
		justify-content: space-between;
		gap: 10px;
	}

	/* Logo centrado visualmente en la barra */
	.main_nav {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
	}

	.logo1 {
		justify-content: center;
	}

	.logo1 img {
		max-height: 78px;
	}

	/* Grupo de iconos alineado a la derecha: bolsa, avatar, burger */
	.header_content {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		gap: 8px;
		margin-left: auto;
		padding-right: 0;
	}

	.shopping {
		display: flex;
		align-items: center;
		flex-direction: row;
		gap: 8px;
	}

	.carrt-icon,
	.avatar-img {
		width: 20px !important;
		height: 20px !important;
	}

	.carrt-icon img {
		width: 18px !important;
		height: 18px !important;
	}

	.burger_container {
		width: 20px;
		height: 14px;
		margin-left: 6px;
	}
}

@media (max-width: 576px) {
	.header {
		height: 70px;
		min-height: 70px;
		top: 0;
		padding: 0 10px;
	}

	.header.scrolled {
		height: 70px;
		min-height: 70px;
	}

	body:has(#publicidad-banner) .header {
		top: 33px;
	}

	.burger_container {
		width: 24px;
		height: 19px;
		margin-left: 12px;
		position: relative !important;
		right: auto !important;
		top: auto !important;
	}

	.burger_container div {
		height: 1.5px;
		margin-top: 3px;
	}

	.carrt-icon {
		width: 23px;
		height: 23px;
	}

	.carrt-icon img {
		width: 22px;
		height: 22px;
	}

	.carrt-sidebar {
		max-width: 100%;
	}

	.menu {
		width: 100%;
		right: -100%;
		padding: 21px 15px 24px 15px;
	}

	.menu.active {
		right: 0;
	}

	.menu_close_container {
		right: 15px;
		top: 24px;
	}

	.menu .logo {
		margin-bottom: 35px;
		margin-right: auto;
	}

	.dropdown-content {
		min-width: 150px;
	}

	.dropdown-content a {
		padding: 10px 12px;
		font-size: 12px;
	}

	.logo1 img {
		max-height: 64px;
	}

	.header_content {
		gap: 6px;
	}

	.shopping {
		gap: 6px;
	}

	.carrt-icon,
	.avatar-img {
		width: 18px !important;
		height: 18px !important;
	}

	.carrt-icon img {
		width: 16px !important;
		height: 16px !important;
	}

	.burger_container {
		width: 18px;
		height: 12px;
		margin-left: 4px;
	}
}

/*
 * Ficha producto + listado Productos + Nosotros: CSS legacy y CDN;
 * body.page-product | body.page-categories | body.page-nosotros
 */
.page-product .header .header_content,
.page-categories .header .header_content,
.page-nosotros .header .header_content {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: nowrap;
	gap: 14px;
	height: 100%;
	margin-left: auto;
}

.page-product .header .shopping,
.page-categories .header .shopping,
.page-nosotros .header .shopping {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 0;
	margin: 0;
	padding: 0;
	transform: none;
	top: auto;
	position: relative;
}

.page-product .header .carrt-icon,
.page-categories .header .carrt-icon,
.page-nosotros .header .carrt-icon {
	margin: 0;
	top: auto;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.page-product .header .carrt-icon img,
.page-categories .header .carrt-icon img,
.page-nosotros .header .carrt-icon img {
	width: 20px;
	height: 20px;
	max-width: 20px;
	object-fit: contain;
	display: block;
}

.page-product .header .carrt-icon .count,
.page-categories .header .carrt-icon .count,
.page-nosotros .header .carrt-icon .count {
	top: -5px;
	right: -5px;
	width: 14px;
	height: 14px;
	font-size: 9px;
	font-weight: 600;
}

.page-product .header .avatar,
.page-categories .header .avatar,
.page-nosotros .header .avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	height: auto;
	margin: 0;
	padding: 0;
}

.page-product .header .avatar-img,
.page-categories .header .avatar-img,
.page-nosotros .header .avatar-img {
	width: 24px;
	height: 24px;
	max-width: 24px;
	object-fit: cover;
	display: block;
	flex-shrink: 0;
}

.page-product .header .burger_container,
.page-categories .header .burger_container,
.page-nosotros .header .burger_container {
	align-self: center;
}

