/* ESTILOS DEL BUSCADOR */
.search-wrapper { position: relative; display: flex; gap: 8px; margin-bottom: 30px; margin-top: 15px;}
.search-input { flex: 1; padding: 14px 20px; border-radius: 100px; border: 1px solid #e5e7eb; outline: none; font-size: 16px; box-shadow: 0 2px 5px rgba(0,0,0,0.02); transition: border-color 0.2s;}
.search-input:focus { border-color: var(--verde); }
.btn-search { border-radius: 50%; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: var(--verde); color: white; border: none; cursor: pointer; flex-shrink: 0; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);}

.autocomplete-list { position: absolute; top: 100%; left: 0; right: 60px; background: white; border-radius: 16px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); z-index: 10; max-height: 250px; overflow-y: auto; margin-top: 8px; display: none; border: 1px solid #f3f4f6;}
.autocomplete-item { padding: 12px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; border-bottom: 1px solid #f3f4f6; transition: background 0.2s;}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.focused { background: #f9fafb; outline: none; }
.sugerencias-titulo { font-size: 1.1rem; margin-bottom: 12px; color: #374151; font-weight: 700;}

/* BANNERS */
.categorias-titulo { font-size: 1.1rem; margin: 30px 0 15px 0; color: #374151; font-weight: 700; }
.grid-banners { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 30px; }
.banner-cat { position: relative; border-radius: 20px; padding: 24px; min-height: 120px; display: flex; flex-direction: column; justify-content: flex-end; text-decoration: none; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.05); transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s; }
.banner-cat:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 14px 28px rgba(0,0,0,0.1); }
.banner-cat .cat-texto { color: white; font-size: 20px; font-weight: 700; z-index: 2; margin: 0; text-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.banner-cat .cat-sub { color: rgba(255,255,255,0.9); font-size: 13px; z-index: 2; margin-top: 4px; }
.banner-cat .cat-icon-bg { position: absolute; right: -10px; top: -10px; font-size: 100px; color: white; opacity: 0.2; z-index: 1; transform: rotate(-15deg); transition: transform 0.3s; }
.banner-cat:hover .cat-icon-bg { transform: rotate(0deg) scale(1.1); }
.bg-gradient-1 { background: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%); }
.bg-gradient-2 { background: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%); }
.bg-gradient-3 { background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%); }

/* =========================================
   NUEVO PERFIL DE EMPRESA MD3 (Puntos 5, 6 y 7)
   ========================================= */
.md3-profile-header {
	position: relative; margin-bottom: 60px;
}
.md3-profile-cover {
	height: 200px; width: 100%; border-radius: 0 0 32px 32px;
	background-size: cover; background-position: center;
	box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.md3-profile-avatar {
	position: absolute; bottom: -45px; left: 50%; transform: translateX(-50%);
	width: 100px; height: 100px; border-radius: 50%; border: 4px solid white;
	background: white; box-shadow: 0 10px 20px rgba(0,0,0,0.1); object-fit: cover;
}
.md3-profile-info { text-align: center; padding: 0 20px; }
.md3-profile-info h1 { font-size: 28px; font-weight: 800; color: #111827; margin: 0 0 8px; display:flex; align-items:center; justify-content:center; gap:6px;}
.md3-profile-info .verified { color: #3b82f6; font-size: 24px; }
.md3-profile-info p { color: #6b7280; font-size: 15px; max-width: 600px; margin: 0 auto 20px; line-height: 1.5; }

/* Action Row MD3 */
.md3-action-row { display: flex; justify-content: center; gap: 12px; margin-bottom: 40px; flex-wrap: wrap; }
.md3-action-btn {
	display: flex; align-items: center; gap: 8px;
	padding: 10px 20px; border-radius: 100px; border: none;
	font-weight: 600; font-size: 14px; cursor: pointer; transition: 0.2s;
}
.md3-btn-tonal { background: #f3f4f6; color: #111827; }
.md3-btn-tonal:hover { background: #e5e7eb; }
.md3-btn-social { width: 50px; height: 50px; padding: 0; justify-content: center; background: white; border: 1px solid #e5e7eb; color: #4b5563; text-decoration: none; }
.md3-btn-social:hover { background: #f9fafb; color: var(--verde); border-color: var(--verde); }

/* =========================================
   CARRUSEL DE SERVICIOS (Puntos 2 y 4)
   ========================================= */
.md3-services-list {
	display: grid; 
	/* La magia: en desktop mete todas las que entren (aprox 4), en móvil baja a 1 */
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); 
	gap: 24px; 
	padding-bottom: 40px;
	width: 100%;
	box-sizing: border-box; /* Evita que el padding rompa el ancho en móviles */
}

.md3-srv-card {
	background: white; border-radius: 24px; box-shadow: 0 4px 15px rgba(0,0,0,0.05);
	border: 1px solid #f3f4f6; overflow: hidden; 
	display: flex; flex-direction: column;
	width: 100%;
	box-sizing: border-box;
}

/* El contenedor mágico con Scroll Snapping */
.md3-srv-carousel-wrapper { position: relative; width: 100%; }
.md3-srv-carousel {
	display: flex; 
	overflow-x: auto; 
	scroll-snap-type: x mandatory;
	scrollbar-width: none; /* Oculta scrollbar en Firefox */
	scroll-behavior: smooth; /* Suaviza el movimiento al usar las flechas < > */
}
.md3-srv-carousel::-webkit-scrollbar { display: none; } /* Oculta en Chrome/Safari */

.md3-srv-carousel img {
	flex: 0 0 100%; 
	width: 100%; 
	aspect-ratio: 4/3; 
	object-fit: cover;
	scroll-snap-align: center; /* Frenado magnético al deslizar el dedo */
	scroll-snap-stop: always; /* LA MAGIA: Obliga a frenar en cada foto sí o sí */
}

/* Flechas del carrusel */
.btn-carousel-nav {
	position: absolute; top: 50%; transform: translateY(-50%);
	background: rgba(255,255,255,0.9); border: none; border-radius: 50%;
	width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
	cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.15); color: #111827; transition: 0.2s;
}
.btn-carousel-nav:hover { background: white; transform: translateY(-50%) scale(1.1); }
.btn-carousel-nav.prev { left: 8px; }
.btn-carousel-nav.next { right: 8px; }

.md3-srv-content { 
	padding: 20px; 
	display: flex; 
	flex-direction: column; 
	flex-grow: 1; /* Esto empuja el footer hacia el fondo para igualar alturas */
}
.md3-srv-content h3 { margin: 0 0 8px 0; font-size: 18px; color: #111827; line-height: 1.2; }
.md3-srv-content p { margin: 0 0 15px 0; color: #6b7280; font-size: 14px; line-height: 1.4; }

.md3-srv-footer { 
	display: flex; justify-content: space-between; align-items: center; 
	margin-top: auto; /* Se pega siempre al fondo de la tarjeta */
	gap: 10px; flex-wrap: wrap; /* Por si el precio es muy largo en celulares chicos */
}
.md3-srv-price { display: flex; flex-direction: column; }
.md3-srv-price strong { font-size: 18px; color: #111827; }
.md3-srv-price span { font-size: 12px; color: #6b7280; display:flex; align-items:center; gap:4px; }

.md3-btn-reservar {
	background: var(--verde); color: white; border: none; padding: 12px 24px;
	border-radius: 100px; font-weight: 700; font-size: 14px; cursor: pointer; transition: 0.2s;
	white-space: nowrap;
}
.md3-btn-reservar:hover { background: #047857; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }

/* Ajuste estricto para celulares */
@media (max-width: 768px) {
	.md3-services-list {
		grid-template-columns: 1fr; /* Fuerza 1 sola columna */
		gap: 16px;
	}
}

/* =========================================
   NUEVO MODAL 85% (BOTTOM SHEET MD3)
   ========================================= */
/* El overlay oscuro de fondo */
.modal-bottom-sheet {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: flex-end; /* Pega el contenido abajo */
    
    /* LA MAGIA: Oculto por defecto para que no estorbe */
    visibility: hidden; 
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Al tener la clase .open, se muestra el overlay */
.modal-bottom-sheet.open { 
    visibility: visible; 
    opacity: 1; 
}

/* La caja blanca del 85% */
#modalReservaUI .modal-content {
    width: 100%;
    height: 85vh; /* Se mantiene en 85% */
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    display: flex;
    max-width: inherit;
    flex-direction: column;
    
    /* LA MAGIA 2: Empieza escondido abajo de la pantalla */
    transform: translateY(100%); 
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

/* Al abrir, la caja blanca sube a su lugar */
#modalReservaUI.open .modal-content { 
    transform: translateY(0); 
}

/* El contenido scrolleable */
#modalReservaUI .modal-body {
    flex: 1;
    overflow-y: auto; 
    padding: 20px;
    padding-bottom: 40px; 
}

.modal-header-md3 {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px 10px;
}
.modal-header-md3 h3 { margin: 0; font-size: 20px; font-weight: 800; color: #111827; }

.btn-close-md3 {
    background: #f3f4f6; border: none; border-radius: 50%; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    color: #4b5563; transition: 0.2s;
}
.btn-close-md3:hover { background: #e5e7eb; color: #111827; }

.modal-body { overflow-y: auto; padding: 0 20px 40px; flex: 1; }

/* Contenedor principal flex que permite saltos de línea (wrap) */
.md3-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

/* Sub-grupos alineados al centro */
.action-group-main, 
.action-group-social {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

/* ========================================== */
/* COMPORTAMIENTO MÓVIL (Celulares)           */
/* ========================================== */
@media (max-width: 600px) {
    /* Forzamos a que los grupos ocupen todo el ancho para que bajen de línea */
    .action-group-main, 
    .action-group-social {
        width: 100%;
    }
    
    /* Hacemos que "Ubicación" y "Compartir" se estiren mitad y mitad parejos */
    .action-group-main .md3-action-btn {
        flex: 1;
        justify-content: center;
    }
}


.fa-brands, .fab {
    font-weight: 400;
    font-size: 20px;
}


