/* ==========================================================================
   1. IMPORTACIÓN Y RESET (Normalize Style)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    /* Colores Marca */
    --ub-green: #c9184a;
    --ub-yellow: #eeca06;
    --ub-dark: #1a1a1a;
    --ub-gray: #6b6b6b;
    --ub-light-bg: #f8f9fa;
    
    /* Sombras y Efectos */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Nunito Sans', sans-serif;
    background-color: var(--ub-light-bg);
    color: var(--ub-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: 'Nunito Sans', sans-serif; border: none; cursor: pointer; }


/* =========================================
   PANTALLA DE BIENVENIDA (Welcome Screen)
   ========================================= */
.welcome-screen {
    position: relative;
    height: 100vh;
    width: 100%;
    background: var(--ub-green);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    font-family: 'Nunito Sans', sans-serif;
}

/* Textura de Puntos (Pattern) */
.bg-pattern {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0.15;
    background-image: radial-gradient(#ffffff 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 1;
}

.welcome-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 400px;
    padding: 20px;
    text-align: center;
}

/* Branding */
.brand-header {
    margin-bottom: 40px;
}

.main-logo {
    height: 70px;
    filter: brightness(0) invert(1);
    margin-bottom: 15px;
}

.brand-name {
    color: white;
    font-weight: 900;
    font-size: 2.8rem;
    letter-spacing: 6px;
    margin: 0;
}

.brand-tagline {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 300;
}

/* Tarjeta de Selección */
.selection-card {
    background: rgba(255, 255, 255, 0.98);
    padding: 35px 25px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.card-title {
    color: var(--ub-dark);
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 25px;
}

/* Inputs y Selects */
.label-pro {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--ub-gray);
    text-transform: uppercase;
    text-align: left;
    margin-bottom: 8px;
    padding-left: 5px;
}

.form-select-pro {
    width: 100%;
    padding: 14px 18px;
    border-radius: 15px;
    border: 2px solid #edf2f7;
    background-color: #f8fafc;
    color: #334155;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none; /* Limpia estilos nativos */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23cbd5e1'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
}

.form-select-pro:focus {
    outline: none;
    border-color: var(--ub-green);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.1);
}

.form-select-pro:disabled {
    background-color: #f1f5f9;
    color: #cbd5e1;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

/* Mensaje de Próximamente */
.soon-badge {
    background: #fef9c3;
    color: #854d0e;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #fde047;
}

/* Footer Info */
.welcome-footer-info {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
}

.info-item {
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-item i {
    color: var(--ub-yellow);
    font-size: 1.1rem;
}

/* Utility */
.d-none { display: none !important; }

/* ==========================================================================
   2. FONDO ANIMADO
   ========================================================================== */
body::before {
    content: "";
    position: fixed;
    top: -5%; left: -5%;
    width: 110%; height: 110%;
    background-image: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)), 
                      url('../img/bg-pattern.png'); /* O un patrón sutil */
    background-size: 300px;
    z-index: -1;
    animation: pan-background 30s infinite alternate ease-in-out;
}

@keyframes pan-background {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(-2%, 2%); }
}

/* Navbar Principal */
.navbar-pro {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.nav-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Columna Izquierda: Logo */
.nav-column-left {
    flex-shrink: 0;
}

.brand-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.logo-img { height: 32px; width: auto; }
.brand-subtext {
    font-size: 9px;
    font-weight: 800;
    color: var(--ub-green);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-top: 1px;
}

/* Columna Centro: Buscador (Flexible) */
.nav-column-center {
    flex-grow: 1; /* Esto hace que el buscador use el espacio vacío */
    max-width: 60%;
}

.search-container-pro {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon-pro {
    position: absolute;
    left: 12px;
    color: #888;
    font-size: 16px;
}

.search-input-pro {
    width: 100%;
    background: #f1f1f1;
    border: 1.5px solid var(--ub-green);
    border-radius: 10px;
    padding: 8px 10px 8px 35px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Nunito Sans', sans-serif;
    transition: all 0.2s;
}

.search-input-pro:focus {
    background: #fff;
    border-color: var(--ub-green);
    outline: none;
    box-shadow: 0 4px 12px rgba(6, 193, 103, 0.1);
}

/* Columna Derecha: Botones */
.nav-column-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-add-pro {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--ub-green);
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.btn-add-pro:hover {
    background: var(--ub-yellow);
    color: #000;
}
.btn-add-pro i { font-size: 16px; color: #fff; }

/* Ocultar el botón por defecto (móviles) */
.btn-add-pro {
    display: none !important;
}

/* Mostrar el botón solo a partir de 600px */
@media (min-width: 600px) {
    .btn-add-pro {
        display: flex !important; /* Usamos flex para que mantenga la alineación de icono y texto */
        align-items: center;
        gap: 5px;
    }
}

.cart-btn-pro {
    background: none;
    border: none;
    position: relative;
    color: #333;
    padding: 5px;
}

.cart-btn-pro i { font-size: 24px; }

.cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--ub-green);
    color: white;
    font-size: 9px;
    font-weight: 800;
    height: 16px;
    width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* ==========================================================================
   3. HEADER (Glassmorphism Pro)
   ========================================================================== */
.sticky-header-container {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.search-bar { 
    background: rgba(0,0,0,0.04); 
    border: 1px solid transparent;
    border-radius: 12px; 
    padding: 12px 20px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-bar:focus {
    background: #fff;
    border-color: var(--ub-green);
    box-shadow: 0 0 0 4px rgba(6, 193, 103, 0.1);
    outline: none;
}

/* ==========================================================================
   4. CATEGORÍAS (Pills)
   ========================================================================== */
.categories-wrapper { padding: 15px 0; }

.category-card { 
    padding: 4px 16px;
    border-radius: 12px;
    background: white;
    border: 1px solid #eee;
    font-weight: 700;
    color: var(--ub-gray);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.category-card:hover { transform: translateX(-2px); border-color: var(--ub-green); }
.category-card.active { 
    background: var(--ub-green); 
    color: #fff; 
    border-color: var(--ub-green);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ==========================================================================
   5. CARDS DE RESTAURANTES (UX Híbrida)
   ========================================================================== */
.rest-card { 
    border: none; 
    border-radius: 20px; 
    overflow: hidden;
    background: #fff;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.spec-badge { 
    font-size: 0.7rem; 
    color: var(--ub-green); 
    background: rgba(6, 193, 103, 0.1); 
    padding: 4px 10px; 
    border-radius: 6px; 
    margin-right: 6px; 
    font-weight: 800; 
}

.btn-whatsapp { 
    background-color: var(--ub-green); 
    color: white; 
    border-radius: 12px; 
    font-weight: 800; 
    padding: 12px; 
    font-size: 0.9rem;
}
.btn-whatsapp:hover {
    background-color: var(--ub-yellow);
}

/* Adaptación Móvil Horizontal */
@media (max-width: 767px) {
    .rest-card {
        flex-direction: row; display: flex;
        padding: 12px; height: 140px;
    }
    .rest-img {
        width: 110px; height: 100% !important;
        border-radius: 14px;
    }
    .card-body {
        padding: 0 0 0 16px !important;
        display: flex; flex-direction: column; justify-content: space-between;
    }
    .btn-whatsapp { width: 100% !important; padding: 6px !important; }
}

@media (min-width: 768px) {
    .rest-img { height: 200px; width: 100%; object-fit: cover; }
    .card-body { padding: 20px; }
}

.footer-edzi {
    background-color: var(--ub-green);
    /* Curva superior elegante */
    padding: 60px 0 30px 0;
    color: #ffffff;
    margin-top: 80px;
    position: relative;
}

.footer-top-guapo {
    margin-bottom: 40px;
}

.footer-logo-white {
    height: 40px;
    filter: brightness(0) invert(1);
    margin: 0 auto;
    margin-bottom: 16px;
}

.footer-title {
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.footer-subtitle {
    font-size: 0.95rem;
    opacity: 0.85;
    max-width: 400px;
    margin: 0 auto 15px auto;
}

/* Redes Sociales en Círculos */
.footer-social-guapo {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 35px;
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: #ffffff;
    color: var(--ub-green);
    transform: translateY(-5px);
}

.footer-divider-guapo {
    width: 60px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 auto 25px auto;
}

.footer-bottom-guapo {
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.fw-black { font-weight: 900; }

.location-tag {
    margin-top: 5px;
    opacity: 0.6;
    font-weight: 700;
    text-transform: uppercase;
}

/* Ajuste móvil */
@media (max-width: 600px) {
    .footer-edzi {
        border-radius: 30px 30px 0 0;
        padding: 50px 20px 30px 20px;
    }
    .footer-title { font-size: 1.2rem; }
}

.rest-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Clase para la animación de entrada */
.fade-in-card {
    animation: fadeInScale 0.4s ease forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Evita que los items que no coinciden se vean mientras se ocultan */
.rest-item.d-none {
    display: none !important;
}