body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f1ea ;;
}
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.flag-grid-item {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.flag-grid-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
body.no-scroll {
    overflow: hidden;
}
#main-logo {
  max-width: 150px;
  height: auto;
}
.bg-verde-custom {
    background-color: #BFD8B8;
}
/* Estilo para los popups personalizados */
.custom-popup .leaflet-popup-content-wrapper {
    background: #FFFFFF;
    color: #333;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #E5E7EB;
}
.custom-popup .leaflet-popup-content {
    margin: 14px;
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
}
.custom-popup .leaflet-popup-tip {
    background: #FFFFFF;
}
/* Estilo para los botones de Zoom (+/-) */
.leaflet-bar a, .leaflet-bar a:hover {
    background-color: #FFFFFF !important;
    color: #16A34A !important; /* Verde de tu tema */
    border-radius: 8px !important;
    border: 1px solid #E5E7EB !important;
}
.leaflet-control-zoom {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}
#map-container {
    width: 100%;
    min-height: 350px;
    height: 350px;
    max-height: 500px;
    border-radius: 16px;
    margin: 0 auto;
    background: #e5e7eb;
    overflow: hidden;
}
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
}
.modal-custom-bg {
    background-color: #f3f1ea !important;
}
@keyframes spin-animation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* 2. Estilo para el loader grande (usado en modales y carga inicial) */
.loader {
    border: 8px solid #e5e7eb; /* gris claro */
    border-top: 8px solid #22c55e; /* verde */
    border-radius: 50%;
    width: 96px;
    height: 96px;
    margin: 4rem auto; /* Centrado con margen */
    /* ¡LA LÍNEA QUE FALTABA! */
    animation: spin-animation 0.75s linear infinite;
}
/* 3. Estilo para el spinner pequeño de botón (cuando está visible) */
.button-spinner:not(.hidden) {
    display: inline-block;
    animation: spin-animation 0.75s linear infinite;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
}
.delivery-link-btn,
.delivery-link-btn:link,
.delivery-link-btn:visited {
    display: inline-block; /* ¡CLAVE! Para que se comporte como un botón y acepte espaciado */
    background-color: #16a34a; /* Verde de tu marca */
    color: #ffffff !important;   /* Texto blanco (forzado para anular otros estilos) */
    font-size: 0.75rem;      /* Tamaño de texto pequeño */
    font-weight: 700;        /* Negrita */
    padding: 0.25rem 0.75rem; /* Espaciado interno (py-1 px-3) */
    border-radius: 9999px;   /* Totalmente redondeado */
    text-decoration: none !important;   /* Sin subrayado (forzado) */
    line-height: normal;     /* Altura de línea normal */
    cursor: pointer;         /* Muestra el cursor de mano */
    transition: background-color 0.2s ease-in-out;
}
.delivery-link-btn:hover {
    background-color: #15803d; /* Verde más oscuro al pasar el mouse */
    color: #ffffff !important; /* Mantiene el texto blanco */
}
.background-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 30;
    overflow-y: auto;
    padding-top: 120px;
    padding-bottom: 40px;
}
.background-view .content-wrapper {
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
    filter: blur(8px);
    opacity: 0.7;
    pointer-events: none;
}
.foreground-prompt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(4px);
}
.no-scroll {
    overflow: hidden;
}
.sticky-register-bar {
    position: sticky;
    top: -1px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 20;
    text-align: center;
    margin-bottom: 1.5rem;
}
/* Contenedor Hero de la Receta */
.hero-container {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    background-color: #e5e7eb; /* Fallback color */
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    z-index: 20;
}

.text-shadow-strong {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Formateo de Listas (Limpia los estilos default de Tailwind) */
.recipe-content ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.recipe-content ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.recipe-content li {
    margin-bottom: 0.5rem;
}

/* Ajustes Responsive para el Hero */
@media (max-width: 768px) {
    .hero-container {
        height: 300px;
    }
    .hero-overlay {
        padding: 1rem;
    }
}

/* =========================================
   ESTILOS PÁGINA PREMIUM (Toggle & Listas)
   ========================================= */

/* Toggle Switch Personalizado */
.toggle-checkbox {
    appearance: none;
    -webkit-appearance: none;
    opacity: 0;
    z-index: -1;
    position: absolute;
}

.toggle-checkbox:checked + .toggle-label {
    background-color: #22c55e; /* green-500 */
}

.toggle-checkbox:checked + .toggle-label:before {
    transform: translateX(100%);
}

.toggle-label {
    width: 50px;
    height: 26px;
    background-color: #e5e7eb; /* gray-200 */
    border-radius: 9999px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
    display: inline-block;
}

.toggle-label:before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Listas de Características con Iconos */
.feature-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: #4b5563; /* gray-600 */
}

.icon-check {
    color: #16a34a; /* green-600 */
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.icon-cross {
    color: #d1d5db; /* gray-300 */
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.text-excluded {
    color: #9ca3af; /* gray-400 */
    text-decoration: line-through;
}
/* --- BUSCADOR CATALOGO --- */
.search-box-container {
    background-color: #ffffff;
    border: 4px solid rgba(20, 83, 45, 0.3); /* Un verde oscuro semitransparente manual */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    border-radius: 9999px; /* Pill shape */
    display: flex;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-box-container:focus-within {
    border-color: #16a34a; /* green-600 activo */
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.search-input {
    border: none;
    outline: none;
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.125rem; /* text-lg */
    color: #374151; /* gray-700 */
}

/* --- ESTILOS DEL BOTÓN DE BÚSQUEDA --- */
.search-btn {
    background-color: #14532d; /* Verde oscuro */
    color: #ffffff !important; /* FORZAMOS EL BLANCO */
    font-weight: bold;
    padding: 0 2rem;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}

.search-btn:hover {
    background-color: #052e16;
}

/* Forzar color blanco también en el icono por si acaso */
.search-btn i {
    color: #ffffff !important;
}

/* LÓGICA RESPONSIVA MANUAL (Reemplaza a md:inline de Tailwind) */
.search-btn-text {
    display: none; /* Oculto en móviles por defecto */
}

@media (min-width: 768px) {
    .search-btn-text {
        display: inline !important; /* Visible en pantallas medianas/grandes */
    }
}

/* Estado hover para el icono */
button:hover .btn-fav-icon, 
a:hover .btn-fav-icon {
    color: #b91c1c !important; /* Rojo más oscuro al pasar el mouse */
    transform: scale(1.1);
}

/* --- BOTÓN FAVORITOS (Corrección Visual) --- */
.btn-fav-container {
    background-color: #ffffff !important;
    border: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 3.5rem; /* Altura fija siempre */
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    
    /* ESTADO MÓVIL (Por defecto): CÍRCULO PERFECTO */
    width: 3.5rem; 
    border-radius: 50%;
    padding: 0;
}

.btn-fav-container:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.25);
}

.btn-fav-icon {
    color: #dc2626 !important; /* Rojo */
    font-size: 1.5rem !important;
    display: block !important;
}

/* Lógica del Texto (Guardar) */
.btn-fav-text {
    display: none; /* Oculto en móvil para mantener el círculo */
    color: #374151; /* Gris oscuro */
    font-weight: 700;
    font-size: 0.875rem;
    margin-left: 0.5rem; /* Separación del icono */
}

/* --- ESTADO ESCRITORIO (Pantallas > 768px) --- */
@media (min-width: 768px) {
    .btn-fav-container {
        width: auto; /* El ancho se adapta al texto */
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        border-radius: 9999px; /* Forma de Píldora (Capsule) */
    }

    .btn-fav-text {
        display: inline-block; /* Mostrar texto en PC */
    }
}
