@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

:root {
	--primary: #e63946; /* Naranja vibrante */
	--primary-dark: #E64A19;
	--background: #FAFAFA;
	--surface: #FFFFFF;
	--text-main: #212121;
	--text-secondary: #757575;
	--text-secondary2: #8f8f8f;
	--radius: 16px;
	--shadow: 0 4px 12px rgba(0,0,0,0.05);
	--dodger: #3383fa;
}

*{
	box-sizing: border-box;
	font-family: "Google Sans", sans-serif;
	font-optical-sizing: auto;
	font-style: normal;
	font-variation-settings: "GRAD" 0;
	margin: 0;
	padding: 0;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
	user-select: none;
}

body {
	background-color: var(--background);
	color: var(--text-main);
	padding-bottom: 80px; /* Espacio para menú inferior en móvil */
}

/* --- HEADER --- */
header {
	background: var(--primary);
	padding: 9px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: sticky;
	top: -1px;
	z-index: 100;
	box-shadow: 0 2px 10px rgba(0,0,0,0.03);
	min-height: 60px;
}

.logo {
	font-weight: 800;
	font-size: 1.5rem;
	color: var(--surface);
	display: flex;
	align-items: center;
	gap: 5px;
}

.user-actions {
	display: flex;
	gap: 15px;
	color: var(--surface);
}

.icon-btn {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--surface);
	position: relative;
}

.badge {
	position: absolute;
	top: -5px;
	right: -5px;
	background: black;
	color: white;
	font-size: 0.7rem;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* --- Dirección actual --- */
.ubicacion-actual {
	background-color: #EA5A65;
	color: white;
	padding: 10px 20px;
	display: flex;
	align-items: center;
	font-size: 0.9rem;
}
.ubicacion-actual span {
	
}


#direccion-texto {
	flex-grow: 1;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cambiar-ubicacion {
	background: rgba(255,255,255,0.2);
	border: none;
	color: white;
	padding: 5px 10px;
	border-radius: 20px;
	cursor: pointer;
	font-size: 0.8rem;
	white-space: nowrap;
}


.ubicacion-actual .material-icons-round {
	margin-right: 5px; /* separación mínima */
	max-width: max-content;
}


/* --- Modal de ubicación --- */
.modal-ubicacion {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.5);
	z-index: 10000000;
	align-items: center;
	justify-content: center;
}

.modal-content {
	background: white;
	padding: 25px;
	border-radius: var(--radius);
	width: 90%;
	max-width: 400px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-content h3 {
	margin-bottom: 15px;
	color: var(--text-main);
}

.modal-content input {
	width: 100%;
	padding: 12px;
	margin-bottom: 10px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 1rem;
}

.modal-buttons {
	display: flex;
	gap: 10px;
	margin-top: 20px;
}

.modal-btn {
	flex: 1;
	padding: 12px 3px;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 600;
}

.btn-primary {
	background: var(--primary);
	color: white;
}

.btn-secondary {
	background: #eee;
	color: var(--text-main);
}

/* --- SEARCH BAR --- */
.search-container {
	padding: 10px 20px;
}

.search-box {
	background: #F0F0F0;
	border-radius: 12px;
	padding: 12px 15px;
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text-secondary);
}

.search-box input {
	border: none;
	background: transparent;
	width: 100%;
	outline: none;
	font-size: 1rem;
}

/* --- CATEGORIES --- */
.section-title {
	padding: 20px 20px 10px;
	font-size: 1.2rem;
	font-weight: 700;
}

.section-title img{
	width: 20px;
	vertical-align: bottom;
}

.categories-grid {
	display: flex;
	gap: 0px;
	overflow-x: auto;
	padding: 10px 20px;
	scrollbar-width: none;
}

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

.category-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: 80px;
	cursor: pointer;
}

.cat-icon {
	width: 60px;
	height: 60px;
	background: white;
	border-radius: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	font-size: 2rem;
	transition: transform 0.2s;
}

.category-item.active .cat-icon {
	background: var(--primary);
	color: white;
}

.category-item:hover .cat-icon {
	transform: translateY(-3px);
}

.category-item .cat-icon img {
	padding: 9px;
}

.cat-name {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--text-secondary);
}

.category-item.active .cat-name {
	color: var(--primary);
}

/* --- PROMO FLYERS (SCROLL HORIZONTAL) --- */
.promos-container {
	display: flex;
	overflow-x: auto;
	gap: 15px;
	padding: 10px 20px;
	scrollbar-width: none;
}

.promos-container::-webkit-scrollbar {
	display: none;
}

.promo-card {
	width: 280px;
	height: 160px;
	border-radius: var(--radius);
	position: relative;
	overflow: hidden;
	box-shadow: var(--shadow);
	flex-shrink: 0;
	background-size: cover;
	background-position: center;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 15px;
	cursor: pointer;
	text-decoration: none;
}

/* Gradiente para leer texto sobre imagen */
.promo-card::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.promo-content {
	position: relative;
	z-index: 2;
	color: white;
}

.promo-tag {
	background: var(--primary);
	color: white;
	padding: 4px 8px;
	border-radius: 6px;
	font-size: 0.8rem;
	font-weight: bold;
	display: inline-block;
	margin-bottom: 5px;
}

/* --- EMPRESAS/RESTAURANTES GRID --- */
.empresas-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 20px;
	padding: 10px 20px;
}

@media (max-width: 480px) {
	.empresas-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.empresa-card {
	background: var(--surface);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	transition: transform 0.2s;
	cursor: pointer;
	text-decoration: none;
	color: inherit;
	display: block;
}

.empresa-card:hover {
	transform: translateY(-5px);
}

.empresa-img-box {
	height: 140px;
	width: 100%;
	position: relative;
}

.empresa-img-box img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.empresa-emoji {
	position: absolute;
	top: 10px;
	right: 10px;
	background: rgba(255,255,255,0.9);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
}

.empresa-info {
	padding: 12px;
}

.empresa-name {
	font-weight: 700;
	margin-bottom: 4px;
	font-size: 1rem;
	height: 45px;
}

.empresa-cats {
	font-size: 0.85rem;
	color: var(--text-secondary);
	margin-bottom: 8px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.empresa-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 10px;
}

.promo-badge {
	background: #FFEB3B;
	color: #333;
	padding: 3px 8px;
	border-radius: 10px;
	font-size: 0.75rem;
	font-weight: 600;
}

/* --- VISTA DE EMPRESA INDIVIDUAL --- */
.empresa-header {
	position: relative;
	height: 200px;
	overflow: hidden;
}

.empresa-header img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.empresa-header-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
	padding: 20px;
	color: white;
}

.back-btn {
	position: absolute;
	top: 20px;
	left: 20px;
	background: rgba(255,255,255,0.9);
	border: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--text-main);
}

/* --- BOTTOM NAV (Mobile) --- */
.bottom-nav {
	position: fixed;
	bottom: 0;
	display: flex;
	justify-content: space-around;
	padding: 17px 0;
	z-index: 999;
	background-color: var(--primary);
	margin: 10px auto;
    width: 96%;
    border-radius: 9px;
    box-shadow: 0 3px 11px 4px #00000055;
    max-width: 800px;
}

.nav-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	gap: 4px;
	color: white;
	font-size: 17px;
}

.nav-item.active {
	color: var(--primary);
}

.nav-item .material-icons-round {
	font-size: 24px;
}

.gmnoprint{display: none}

/* --- Floating labels estilo Material --- */
.field {
	position: relative;
	margin-bottom: 18px;
}

.field input {
	width: 100%;
	padding: 16px 12px 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 1rem;
	background: transparent;
	outline: none;
}

.field label {
	position: absolute;
	top: 42%;
	left: 12px;
	color: var(--text-secondary);
	font-size: 1.1rem;
	transform: translateY(-50%);
	pointer-events: none;
	transition: transform 0.2s ease, top 0.2s ease, font-size 0.2s ease;
	background: white;
	padding: 0 4px;
}

/* Cuando hay foco o contenido */
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
	top: -3px;
	font-size: 0.8rem;
	color: var(--text-secondary);
	padding: 0 7px;
}

/* Borde activo */
.field input:focus {
	border-color: var(--primary);
}

.field input:focus + label {
	color: var(--primary);
}

/* Estilos para el enlace de usuario */
.user-info {
	text-decoration: none;
	color: inherit;
	display: block;
	transition: opacity 0.2s;
	cursor: pointer;
}

.user-info:hover {
	opacity: 0.8;
}

.user-name{
	font-weight: bolder;
}

.user-name, .user-phone{
	text-align: center;
}

/* Botón de login */
.login-btn {
	background: var(--primary);
	color: white;
	border: none;
	border-radius: 20px;
	padding: 8px 15px;
	font-size: 0.9rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	font-weight: 600;
	transition: background 0.2s;
}

.login-btn:hover {
	background: var(--primary-dark);
}

.empresa-img-box {
	height: 140px;
	width: 100%;
	position: relative;
	overflow: hidden; /* MUY IMPORTANTE */
}

.empresa-img-box::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--bg-img);
	background-size: cover;
	background-position: center;
	filter: blur(20px);
	transform: scale(1.1); /* evita bordes vacíos */
	opacity: 0.6;
	z-index: 0;
}

.empresa-img-box img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	position: relative;
	z-index: 1; /* queda arriba del blur */
}

.container7{
	max-width: 800px;
	margin: -1px auto 0;
}


@media (max-width: 480px) {
	.bottom-nav{
		left: 2%;
	}
}

#containerCarrito {
	background-color: #ebebeb;
}

#containerCarrito .variantesProducto{
	display: none;
}

.divEditarCarrito{
	position: relative;
    left: 0;
    right: 0;
    color: var(--primary);
    cursor: pointer;
    margin-bottom: 9px;
    top: 5px;
    width: 100%;
    text-align: right;
}

.divEditarCarrito img{
	width: 30px;
    vertical-align: middle;
}

.giraImg{
	transform: rotate(180deg);
}


