/* ============================================
   VARIABLES Y CONFIGURACIÓN BASE
   ============================================ */
:root {
	--slc-mobile-header-height: 64px;
	--slc-mobile-drawer-width: min(88vw, 360px);
	--slc-z-header: 9998;
	--slc-z-overlay: 9999;
	--slc-z-drawer: 10000;
	--slc-overlay: rgba(0, 0, 0, 0.48);
	--slc-bg: #1E1F24;
	--slc-text: white;
	--slc-green: #7bbd42;
	--slc-green-rgb: 123, 189, 66;
	--slc-cart-bg: #d92323;
	--slc-transition: 220ms ease;
}

/* Utilidad accesibilidad */
.screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ============================================
   ESTILOS PRINCIPALES (MÓVIL)
   ============================================ */
@media (max-width: 1000px) {
	/* ----- Contenedor principal ----- */
	.slc-mobile-menu {
		display: block;
	}

	/* Evita overflow horizontal: 100% + padding debe contar dentro del ancho */
	.slc-mobile-menu,
	.slc-mobile-menu *,
	.slc-mobile-menu *::before,
	.slc-mobile-menu *::after {
		box-sizing: border-box;
	}

	/* ----- Utilidades (scopeadas al plugin) ----- */
	.slc-mobile-menu .d-flex {
		display: flex !important;
	}

	.slc-mobile-menu .align-items-center {
		align-items: center !important;
	}

	.slc-mobile-menu .justify-content-end {
		justify-content: flex-end !important;
	}

	.slc-mobile-menu .justify-content-center {
		justify-content: center !important;
	}

	.slc-mobile-menu .container {
		margin-left: auto;
		margin-right: auto;
		padding-left: var(--bs-gutter-x, 10px);
		padding-right: var(--bs-gutter-x, 10px);
		width: 100%;
	}
	.slc-mobile-header .container { 
		padding-inline: 16px; 
	}
	.slc-mobile-menu .header-wrapper {
		position: relative;
	}

	/* ----- Header ----- */
	.slc-mobile-header {
		position: fixed;
		top: 50px;
		left: 0;
		right: 0;
		width: 100%;
		max-width: 100vw;
		z-index: var(--slc-z-header);
		background: var(--slc-bg);
		font-weight: 700;
	}

	.slc-mobile-menu .main-header {
		width: 100%;
		padding-top: 6px;
		padding-bottom: 6px;
	}

	.slc-mobile-header__bar {
		min-height: var(--slc-mobile-header-height);
		padding: 0;
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
		column-gap: 0.75rem;
	}

	/* Izquierda (botón menú) */
	.slc-mobile-header__start {
		justify-self: start;
	}

	/* Centro (logo/nombre) */
	.slc-mobile-header__center {
		grid-column: 2;
		justify-self: center;
		display: flex;
		justify-content: center;
		min-width: 0;
	}

	/* Esta clase viene en el HTML de referencia con justify-content-end; aquí la centramos de verdad */
	.slc-mobile-menu .mobile-menu-logo {
		justify-content: center !important;
	}

	.slc-mobile-header__center .custom-logo {
		width: 62px;
		height: 35px;
	}

	/* Derecha (acciones) */
	.slc-mobile-header__actions {
		justify-self: end;
		display: flex;
		gap: 0.5rem;
		justify-content: flex-end;
	}

	.slc-mobile-header__actions div {
		font-weight: 900;
		
	}
	/* Carrito: evitar que estilos del theme (ul/li) rompan la altura/alineación del header */
	.slc-mobile-menu .shopping-cart-module ul,
	.slc-mobile-menu .shopping-cart-module li {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.slc-mobile-menu .shopping-cart-module .cart-total-value {
		display: none;
	}

	/* En el layout de referencia el botón de menú es solo icono */
	.slc-mobile-header__toggle .slc-mobile-action__text {
		display: none;
	}

	/* Elemento decorativo del header de referencia (no lo usamos) */
	.slc-mobile-menu .sticky-background {
		display: none;
	}

	/* Base para todos los botones/links de acción */
	.slc-mobile-action {
		position: relative;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 35px;
		height: 35px;
		padding: 0;
		border: 0;
		background: var(--slc-green);
		color: white;
		font-size: 20px;
		cursor: pointer;
		transition: background-color var(--slc-transition);
	}

	.slc-mobile-icon {
		display: block;
		width: 1.15rem;
		height: 1.15rem;
		flex: 0 0 auto;
	}

	.slc-mobile-action:hover,
	.slc-mobile-action:focus-visible {
		background-color: rgba(var(--slc-green-rgb), 0.00);
		outline: none;
	}

	/* Ajustes específicos para el toggle del menú */
	.slc-mobile-header__toggle {
		width: 35px;
	}

	/* Texto del botón (solo "Menú") */
	.slc-mobile-action__text {
		font-size: 0.75rem;
		font-weight: 700;
		letter-spacing: 0.03em;
		text-transform: uppercase;
	}

	/* Icono animado */
	.slc-mobile-header__toggle-icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		position: relative;
		width: 1.5rem;
		height: 1.5rem;
	}

	.slc-mobile-header__toggle-icon svg {
		display: block;
		width: 100%;
		height: 100%;
	}

	.slc-icon-menu,
	.slc-icon-close {
		transition: opacity var(--slc-transition), transform var(--slc-transition);
	}

	.slc-icon-close {
		position: absolute;
		inset: 0;
		opacity: 0;
		transform: rotate(-90deg) scale(0.8);
	}

	.slc-mobile-header__toggle[aria-expanded="true"] .slc-icon-menu {
		opacity: 0;
		transform: rotate(90deg) scale(0.8);
	}

	.slc-mobile-header__toggle[aria-expanded="true"] .slc-icon-close {
		opacity: 1;
		transform: rotate(0) scale(1);
	}

	/* ----- Barra de búsqueda desplegable ----- */
	.slc-mobile-search {
		padding: 0 1rem 1rem;
		background: var(--slc-bg);
	}

	.slc-mobile-search[hidden] {
		display: none !important;
	}

	.slc-mobile-search__form {
		display: flex;
		align-items: center;
		border-radius: 999px;
		background: #fff;
	}

	.slc-mobile-search__input {
		flex: 1;
		min-height: 46px;
		padding: 0 1rem;
		border: 0;
		background: transparent;
		font-size: 16px;
		outline: none;
	}

	.slc-mobile-search__submit {
		width: 46px;
		height: 46px;
		border: 0;
		background: transparent;
		color: var(--slc-green);
		font-size: 18px;
		cursor: pointer;
	}

	.slc-mobile-search__submit .slc-mobile-icon {
		width: 1.1rem;
		height: 1.1rem;
		margin: 0 auto;
	}


	.slc-mobile-cart-count.is-empty {
		display: none;
	}

	/* ----- Drawer (Menú lateral) ----- */
	.slc-mobile-drawer {
		pointer-events: none;
	}

	.slc-mobile-drawer.is-open {
		pointer-events: auto;
	}

	.slc-mobile-drawer__overlay {
		position: fixed;
		inset: 0;
		z-index: var(--slc-z-overlay);
		background: var(--slc-overlay);
		opacity: 0;
		transition: opacity var(--slc-transition);
	}

	.slc-mobile-drawer__overlay[hidden] {
		display: none !important;
	}

	.slc-mobile-drawer.is-open .slc-mobile-drawer__overlay {
		opacity: 1;
	}

	.slc-mobile-drawer__panel {
		position: fixed;
		top: 0;
		left: 0;
		z-index: var(--slc-z-drawer);
		width: var(--slc-mobile-drawer-width);
		height: 100dvh;
		overflow-y: auto;
		background: var(--slc-bg);
		box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
		transform: translateX(-100%);
		transition: transform var(--slc-transition);
		/* El width:300px estaba duplicado y no es necesario */
	}

	.slc-mobile-drawer.is-open .slc-mobile-drawer__panel {
		transform: translateX(0);
	}

	/* Título del drawer */
	.st-menu-title {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
		margin: 0;
		padding: 15px 5px;
		background: #2c313b;
		border-bottom: 1px solid white;
		font-size: 1.125rem;
		text-transform: uppercase;
		color: #fff;
	}

	.title-text {
		grid-column: 2;
		text-align: center;
	}

	.slc-mobile-drawer__close {
		grid-column: 3;
		justify-self: end;
		margin-right: 5px;
		background: none;
		border: 0;
		color: var(--slc-green);
		font-size: 31px;
		font-weight: 700;
		line-height: 12px;
		cursor: pointer;
	}

	.slc-mobile-drawer__close .slc-mobile-icon {
		width: 1.5rem;
		height: 1.5rem;
	}

	/* Menú de navegación */
	.slc-mobile-drawer__menu,
	.slc-mobile-drawer__menu ul {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.menu-item a {
		display: block;
		padding: 0.95rem 10px; /* Combinadas propiedades de padding */
		color: var(--slc-text);
		font-size: 1rem;
		font-weight: 400;
		text-decoration: none;
		text-transform: uppercase;
		transform: scaleY(1.05);
		transition: color 180ms ease, transform 180ms ease;
	}

	.menu-item a:hover,
	.menu-item a:focus-visible {
		color: var(--slc-green);
		transform: translateX(3px) scaleY(1.05);
		outline: none;
	}

	.slc-mobile-drawer__menu .sub-menu {
		padding-left: 0.875rem;
	}

	/* Prevenir scroll */
	html.has-slc-mobile-drawer-open,
	body.has-slc-mobile-drawer-open {
		overflow: hidden;
		touch-action: none;
	}
}

/* ============================================
   ESTILOS DE ESCRITORIO Y AJUSTES
   ============================================ */
@media (min-width: 1001px) {
	.slc-mobile-menu {
		display: none !important;
	}
}

