/* =========================================================
   SS DECO - FOOTER UTILITIES FIX 2.8
   ========================================================= */

@media (max-width: 999px) {

	/*
	 * Footer superior:
	 * 1) conserva los cuatro enlaces principales en 2 columnas;
	 * 2) coloca las utilidades debajo, una por fila y centradas.
	 */
	.site-footer #footer-menu > ul.menu,
	#footer #footer-menu > ul.menu,
	footer #footer-menu > ul.menu {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		grid-auto-flow: row !important;
		align-items: center !important;
		column-gap: 28px !important;
		row-gap: 0 !important;
		width: 100% !important;
	}

	/* Menu principal: SS Deco / Productos / Nosotros / Contacto */
	.site-footer #footer-menu > ul.menu > li:not(.ss-mobile-utility-item):not(.ss-theme-toggle-item),
	#footer #footer-menu > ul.menu > li:not(.ss-mobile-utility-item):not(.ss-theme-toggle-item),
	footer #footer-menu > ul.menu > li:not(.ss-mobile-utility-item):not(.ss-theme-toggle-item) {
		grid-column: auto !important;
		width: 100% !important;
		text-align: center !important;
	}

	.site-footer #footer-menu > ul.menu > li:not(.ss-mobile-utility-item):not(.ss-theme-toggle-item) > a,
	#footer #footer-menu > ul.menu > li:not(.ss-mobile-utility-item):not(.ss-theme-toggle-item) > a,
	footer #footer-menu > ul.menu > li:not(.ss-mobile-utility-item):not(.ss-theme-toggle-item) > a {
		justify-content: center !important;
		text-align: center !important;
	}

	/* -----------------------------------------------------
	   ORDEN EXACTO DE UTILIDADES
	   ----------------------------------------------------- */

	.site-footer #footer-menu .ss-mobile-utility-search,
	#footer #footer-menu .ss-mobile-utility-search,
	footer #footer-menu .ss-mobile-utility-search {
		order: 10 !important;
	}

	.site-footer #footer-menu .ss-mobile-utility-cart,
	#footer #footer-menu .ss-mobile-utility-cart,
	footer #footer-menu .ss-mobile-utility-cart {
		order: 11 !important;
	}

	.site-footer #footer-menu .ss-mobile-utility-account,
	#footer #footer-menu .ss-mobile-utility-account,
	footer #footer-menu .ss-mobile-utility-account {
		order: 12 !important;
	}

	.site-footer #footer-menu .ss-theme-toggle-item,
	#footer #footer-menu .ss-theme-toggle-item,
	footer #footer-menu .ss-theme-toggle-item {
		order: 13 !important;
	}

	/* Cada utilidad ocupa una fila completa */
	.site-footer #footer-menu .ss-mobile-utility-item,
	.site-footer #footer-menu .ss-theme-toggle-item,
	#footer #footer-menu .ss-mobile-utility-item,
	#footer #footer-menu .ss-theme-toggle-item,
	footer #footer-menu .ss-mobile-utility-item,
	footer #footer-menu .ss-theme-toggle-item {
		grid-column: 1 / -1 !important;
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		text-align: center !important;
	}

	/* Separacion antes de Buscar */
	.site-footer #footer-menu .ss-mobile-utility-search,
	#footer #footer-menu .ss-mobile-utility-search,
	footer #footer-menu .ss-mobile-utility-search {
		margin-top: 14px !important;
		padding-top: 14px !important;
		border-top: 1px solid rgba(243, 238, 230, 0.14) !important;
	}

	/* Las otras tres no crean lineas adicionales */
	.site-footer #footer-menu .ss-mobile-utility-cart,
	.site-footer #footer-menu .ss-mobile-utility-account,
	.site-footer #footer-menu .ss-theme-toggle-item,
	#footer #footer-menu .ss-mobile-utility-cart,
	#footer #footer-menu .ss-mobile-utility-account,
	#footer #footer-menu .ss-theme-toggle-item,
	footer #footer-menu .ss-mobile-utility-cart,
	footer #footer-menu .ss-mobile-utility-account,
	footer #footer-menu .ss-theme-toggle-item {
		margin-top: 0 !important;
		padding-top: 0 !important;
		border-top: 0 !important;
	}

	/* Buscar / Carrito / Mi cuenta centrados */
	.site-footer #footer-menu .ss-mobile-utility-link,
	.site-footer #footer-menu .ss-mobile-utility-button,
	#footer #footer-menu .ss-mobile-utility-link,
	#footer #footer-menu .ss-mobile-utility-button,
	footer #footer-menu .ss-mobile-utility-link,
	footer #footer-menu .ss-mobile-utility-button {
		display: inline-flex !important;
		width: auto !important;
		min-width: 170px !important;
		min-height: 44px !important;
		align-items: center !important;
		justify-content: center !important;
		margin: 0 auto !important;
		padding: 9px 14px !important;
		text-align: center !important;
	}

	.site-footer #footer-menu .ss-mobile-cart-count,
	#footer #footer-menu .ss-mobile-cart-count,
	footer #footer-menu .ss-mobile-cart-count {
		margin-left: 6px !important;
		margin-right: 0 !important;
	}

	/* Toggle centrado y sin ninguna linea propia */
	.site-footer #footer-menu .ss-theme-toggle,
	#footer #footer-menu .ss-theme-toggle,
	footer #footer-menu .ss-theme-toggle {
		display: inline-flex !important;
		width: auto !important;
		min-width: 170px !important;
		min-height: 44px !important;
		align-items: center !important;
		justify-content: center !important;
		margin: 0 auto !important;
		padding: 9px 14px !important;
		border: 0 !important;
		box-shadow: none !important;
		text-align: center !important;
	}

	.site-footer #footer-menu .ss-theme-toggle-item::before,
	.site-footer #footer-menu .ss-theme-toggle-item::after,
	#footer #footer-menu .ss-theme-toggle-item::before,
	#footer #footer-menu .ss-theme-toggle-item::after,
	footer #footer-menu .ss-theme-toggle-item::before,
	footer #footer-menu .ss-theme-toggle-item::after {
		display: none !important;
		content: none !important;
	}
}
