/* ==========================================
   Jujuy Food - Custom Styles
   ========================================== */

/* Variables de colores - Paleta cálida y apetitosa */
:root {
    --primary: #e63946;
    --primary-dark: #c1121f;
    --primary-light: #f4a4a4;
    --secondary: #f4a261;
    --accent: #2a9d8f;
    --accent-light: #4ecdc4;
    
    --bg-warm: #fef9f3;
    --bg-card: #ffffff;
    --text-dark: #2d3436;
    --text-muted: #636e72;
    
    --gradient-primary: linear-gradient(135deg, #e63946 0%, #f4a261 100%);
    --gradient-dark: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 999px;
}

/* Base */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-warm);
    color: var(--text-dark);
    padding-top: 10px; /* Espacio para navbar fija */
    padding-bottom: 80px; /* Espacio para bottom nav en mobile */
}

/* Navbar */
.navbar {
    background: var(--gradient-primary);
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
}

.navbar-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.btn-location {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.btn-location:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    transform: translateY(-1px);
}

.btn-noti, .btn-user {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-noti:hover, .btn-user:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    padding: 3rem 0 4rem;
    position: relative;
    margin-bottom: 2rem;
}

.hero-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-box-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.hero-decoration {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--bg-warm);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 1;
}

/* Section Titles */
.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Categorías */
.btn-category {
    background: white;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-category:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.category-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.category-name {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* Cards de Locales */
.card-local {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.card-local:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-local-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #ffe5e5 0%, #fff0f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.card-local-body {
    padding: 1.25rem;
}

.card-local-title {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.card-local-meta {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

/* Estado Chips */
.estado-local-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.75rem;
}

.estado-local-chip.abierto {
    background: rgba(42, 157, 143, 0.12);
    color: #1f7a6e;
}

.estado-local-chip.cerrado {
    background: rgba(230, 57, 70, 0.10);
    color: #b32632;
}

.estado-local-chip.pausado {
    background: rgba(123, 135, 148, 0.14);
    color: #55606d;
}

/* Logos Destacados */
.logos-strip-track {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.logos-strip-track::-webkit-scrollbar {
    display: none;
}

.logo-destacado-item {
    min-width: 80px;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    background: white;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.logo-destacado-item:hover {
    transform: scale(1.05);
    border-color: var(--primary-light);
}

.logo-destacado-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-destacado-fallback {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

/* Carrusel Hero */
.carousel-item {
    background: var(--gradient-primary);
    min-height: 300px;
    padding: 3rem;
    color: white;
}

.carousel-caption-custom {
    text-align: left;
}

.carousel-kicker {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.carousel-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.carousel-desc {
    font-size: 1rem;
    opacity: 0.95;
    max-width: 400px;
}

/* Bottom Nav (Mobile) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    padding: 0.5rem 0;
    z-index: 1030;
    border-radius: 1.5rem 1.5rem 0 0;
}

.btn-nav {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.5rem;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-nav i {
    font-size: 1.25rem;
}

.btn-nav:hover, .btn-nav.active {
    color: var(--primary);
}

/* Horarios Form */
.horario-dia {
    background: white;
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid #e9ecef;
}

.horario-dia-header {
    font-weight: 700;
    text-transform: capitalize;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

/* Notificaciones */
.noti-item {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.noti-item.leida {
    opacity: 0.7;
    border-left-color: #dee2e6;
}

.noti-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

/* Botones Personalizados */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.1);
}

.btn-success {
    background: linear-gradient(135deg, #2a9d8f 0%, #4ecdc4 100%);
    border: none;
    font-weight: 700;
}

/* Responsive */
@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
    
    .bottom-nav {
        display: none;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .navbar-brand .brand-text {
        font-size: 1.25rem;
    }
    
    .carousel-title {
        font-size: 1.5rem;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-local, .btn-category, .noti-item {
    animation: fadeIn 0.5s ease forwards;
}

/* Utilidades */
.cursor-pointer {
    cursor: pointer;
}

.bg-soft-primary {
    background-color: rgba(230, 57, 70, 0.1);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-fav {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-fav i {
    color: #ccc;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.btn-fav.active i {
    color: #ff4757; /* Rojo corazón */
}

.btn-fav:hover {
    transform: scale(1.1);
    background: white;
}
.dropdown-menu {
    margin-top: 15px !important;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item:active {
    background-color: #ff4757;
}
/* El modal y su fondo deben estar por encima de todo */
.modal {
    z-index: 2000 !important;
}
.modal-backdrop {
    z-index: 1900 !important;
}

/* El dropdown del perfil debe quedar por debajo si el modal aparece */
.dropdown-menu {
    z-index: 1500 !important;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1050;
    padding: 8px 0;
    border-top: 1px solid #eee;
}

.btn-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: #666;
    width: 100%;
    font-size: 0.75rem;
    transition: color 0.3s;
}

.btn-nav i {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

.btn-nav:active, .btn-nav:focus {
    color: #ff4757; /* El color de tu marca */
}

/* Evita que el contenido de la web quede tapado por la nav */
body {
    padding-bottom: 70px; 
}

@media (min-width: 992px) {
    body { padding-bottom: 0; }
}

/* Ocultar la flecha del dropdown en ambos botones */
.btn-user.dropdown-toggle::after, 
.btn-nav.dropdown-toggle::after {
    display: none !important;
}

/* Ajustes para el menú cuando sale desde abajo (Mobile) */
/* Reemplazá tu bloque .dropup .dropdown-menu por este */
.dropup .dropdown-menu {
    bottom: 75px !important; /* Un poquito más arriba de la barra */
    top: auto !important;
    left: 70% !important; /* Lo mandamos al centro horizontal */
    right: auto !important;
    transform: translateX(-50%) !important; /* El truco para que el centro del menú coincida con el centro del botón */
    
    /* Mejoras visuales para que parezca una App */
    min-width: 200px;
    border: none !important;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.15) !important;
    border-radius: 15px !important;
}

/* Si sentís que queda muy a la derecha o izquierda, 
   podés ajustar el left en % hasta que calce justo sobre tu ícono */

/* Clase para arreglar el menú en Mobile */
@media (max-width: 768px) {
    .menu-mobile-fix {
        position: fixed !important;
        bottom: 80px !important; /* Arriba de tu Bottom Nav */
        top: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important; /* Centrado horizontal perfecto */
        width: 90% !important; /* Casi todo el ancho del celu */
        max-width: 320px !important;
        margin: 0 auto !important;
        box-shadow: 0 -5px 25px rgba(0,0,0,0.2) !important;
        border-radius: 20px !important;
        border: none !important;
        z-index: 2000 !important;
    }

    /* Fondo oscuro opcional cuando se abre el menú para que resalte */
    .dropdown-menu.show::before {
        content: "";
        /* Si querés un efecto de desenfoque atrás, avisame */
    }
}

/* En PC el de arriba se ve, en mobile se oculta la navbar user icon */
@media (max-width: 991px) {
    .navbar .btn-user {
        display: none !important;
    }
}
.btn-location {
    background: rgba(var(--bs-primary-rgb), 0.1); /* Un fondo suave del color de tu marca */
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

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

#btnUbicacionActual {
    max-width: 150px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.descripcion-ajustable {
    white-space: normal !important;
    display: block !important;
    width: 100%;
}

/* Botón contenedor */
.btn-category-compact {
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 8px 4px; /* Padding reducido */
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70px; /* Altura fija pequeña */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-category-compact:hover, .btn-category-compact:active {
    border-color: #0d6efd;
    background-color: #f8f9ff;
    transform: translateY(-2px);
}

/* Iconos más pequeños */
.category-icon-small {
    font-size: 1.2rem; /* Tamaño discreto */
    margin-bottom: 2px;
}

/* Nombres más pequeños y legibles */
.category-name-small {
    font-size: 0.7rem; /* Fuente pequeña para móvil */
    font-weight: 600;
    color: #444;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Opcional: Si quieres que el contenedor de los botones tenga scroll horizontal 
   en lugar de muchas filas, añade esto al div 'contenedorCategoriasHome' en tu HTML:
   class="d-flex flex-nowrap overflow-auto py-2" style="-webkit-overflow-scrolling: touch;" 
*/

/* Benefit Cards */
.benefit-card {
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateX(8px);
}

.benefit-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* --- Estilos para las Tarjetas de Destacados Tipo Perfil --- */

/* Ajustes para el slider general */
.mySwiperDestacados {
    width: 100%;
    padding: 20px 0 30px 0; /* Espacio para sombras y puntos */
    overflow: hidden;
}

/* Contenedor principal de la tarjeta */
.destacado-profile-card {
    background: #ffffff;
    border-radius: 20px; /* Bordes muy redondeados */
    overflow: hidden; /* Importante para cortar el fondo de color arriba */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* Sombra suave y profunda */
    width: 100%;
    max-width: 320px; /* Ancho máximo para que no se deforme en desktop */
    margin: 0 auto; /* Centrar la tarjeta */
    transition: transform 0.3s ease;
}

.destacado-profile-card:hover {
    transform: translateY(-5px); /* Pequeña elevación al pasar el mouse */
}

/* 1. Fondo de color en la parte superior (Cabecera) */
.profile-card-header {
    height: 100px; /* Altura de la franja de color */
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

/* Efecto de degradado suave opcional para el header */
.profile-card-header::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.05) 100%);
}

/* 2. El truco: Imagen superpuesta */
.profile-img-container {
    text-align: center;
    position: relative;
    margin-top: -55px; /* Margen negativo: mitad del alto de la imagen + 5px de separación */
    z-index: 10; /* Asegurar que esté por encima del header */
}

.profile-img-container img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%; /* Foto redonda */
    border: 5px solid #ffffff; /* Borde blanco grueso para separarla del fondo */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* Sombra para la imagen */
}

/* 3. El cuerpo de la tarjeta */
.profile-card-body {
    padding: 20px 25px 30px 25px;
    text-align: center;
}

/* Título (Nombre del Local) */
.profile-card-body h4 {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 5px 0;
    color: #2d3748;
}

/* Subtítulo (Categoría) */
.profile-card-body p {
    font-size: 0.95rem;
    color: #718096;
    margin: 0;
}

/* Contenedor para botones o acciones */
.profile-card-actions {
    margin-top: 25px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Estilo para los botones */
.btn-ver-local {
    background: #ba4242;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background 0.3s ease;
    width: 100%; /* Botones de ancho completo */
}

.btn-ver-local:hover {
    background: #0ea5e9;
}

/* Animación deslizar a la izquierda (login sale) */
.modal.slide-out-left .modal-dialog {
  animation: slideOutLeft 0.3s ease forwards;
}

@keyframes slideOutLeft {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(-50px); opacity: 0; }
}

/* Animación deslizar desde la derecha (registro entra) */
.modal.slide-in-right .modal-dialog {
  animation: slideInRight 0.3s ease forwards;
}

@keyframes slideInRight {
  from { transform: translateX(50px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
