/* ==========================================================================
   Responsive: header en una línea + menú lateral (drawer) + slider productos
   ========================================================================== */

/* ---- Header en una sola línea en móvil ---- */
@media (max-width: 980px) {
	.et_pb_row_0_tb_header.et_pb_row--with-menu {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: center;
		justify-content: space-between;
	}

	.et_pb_row_0_tb_header .et_pb_column_0_tb_header,
	.et_pb_row_0_tb_header .et_pb_column_1_tb_header {
		width: auto !important;
		margin: 0 !important;
		float: none !important;
	}

	.et_pb_row_0_tb_header .et_pb_column_1_tb_header {
		display: flex !important;
		justify-content: flex-end;
	}

	/* Ocultamos el menú desplegable nativo de Divi: usamos nuestro drawer */
	.et_mobile_nav_menu .et_mobile_menu {
		display: none !important;
	}
}

/* ---- Drawer lateral ---- */
.mzp-drawer-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 99998;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.mzp-drawer-overlay.is-open {
	opacity: 1;
}

.mzp-drawer-overlay[hidden] {
	display: none;
}

.mzp-drawer {
	position: fixed;
	top: 0;
	right: 0;
	height: 100vh;
	width: min(86vw, 360px);
	background: #ffffff;
	z-index: 99999;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
	padding: 20px 22px;
	box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
	overflow-y: auto;
	box-sizing: border-box;
}

.mzp-drawer.is-open {
	transform: translateX(0);
}

.mzp-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 22px;
}

.mzp-drawer-logo {
	height: auto;
	max-height: 46px;
	width: auto;
	max-width: 160px;
	display: block;
}

.mzp-drawer-close {
	background: none;
	border: none;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	color: #1f2937;
	padding: 4px 8px;
}

.mzp-drawer-search {
	position: relative;
	margin-bottom: 20px;
}

.mzp-drawer-search input[type="search"] {
	width: 100%;
	height: 48px;
	padding: 0 16px 0 46px;
	border: 1px solid #cfd8e3;
	border-radius: 10px;
	font-size: 16px;
	color: #3f4e67;
	outline: none;
	box-sizing: border-box;
}

.mzp-drawer-search input[type="search"]:focus {
	border-color: #1353c2;
}

.mzp-drawer-search .header-menu-search-icon,
.mzp-drawer-search svg {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	color: #5b6b84;
	pointer-events: none;
}

.mzp-drawer-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mzp-drawer-nav li {
	margin: 0;
}

.mzp-drawer-nav a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 15px 4px;
	font-size: 18px;
	font-weight: 600;
	color: #1f2937;
	text-decoration: none;
	border-bottom: 1px solid #f0f0f0;
}

.mzp-drawer-nav a .heroicon,
.mzp-drawer-nav a svg {
	width: 24px;
	height: 24px;
	color: #1353c2;
	flex-shrink: 0;
}

.mzp-drawer-nav a:hover {
	color: #1353c2;
}

/* Ocultamos el buscador que se cuela como item de menú dentro del nav clonado */
.mzp-drawer-nav .menu-item-header-search {
	display: none;
}

/* ---- Slider horizontal de productos en móvil ---- */
.grid-productos-dots {
	display: none;
}

@media (max-width: 640px) {
	.grid-productos {
		display: flex !important;
		grid-template-columns: none !important;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		gap: 16px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 4px;
	}

	.grid-productos::-webkit-scrollbar {
		display: none;
	}

	.grid-productos .producto-card {
		flex: 0 0 85%;
		scroll-snap-align: center;
	}

	.grid-productos-dots {
		display: flex;
		justify-content: center;
		gap: 8px;
		margin-top: 18px;
	}

	.grid-productos-dot {
		width: 10px;
		height: 10px;
		border-radius: 50%;
		border: none;
		padding: 0;
		background: #cfd8e3;
		cursor: pointer;
		transition: background 0.2s ease, transform 0.2s ease;
	}

	.grid-productos-dot.is-active {
		background: #1353c2;
		transform: scale(1.15);
	}
}
