/* ==========================================================================
   1. VARIABLES & RESET (Cimientos)
   ========================================================================== */
:root {
    /* Estas deben coincidir con tu variables.css */
    --transition-fast: 0.3s ease;
    --shadow-soft: 0 4px 12px rgba(0,0,0,0.08);
    --color-amazon: #FF9900;
        --color-vivero: #e0e0e0;
        --color-texto: #333;
        --sombra-premium: 0 4px 15px rgba(255, 153, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* ==========================================================================
   2. ESTRUCTURA BASE (Layout)
   ========================================================================== */
body {
    width: 100%;
    min-height: 100vh;
    font-family: var(--font-main, 'Open Sans', sans-serif);
    color: var(--verde-bosque, #233F31);
    background-color: var(--arena-suave, #F8F9F5);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    flex: 1; /* Empuja el footer hacia abajo */
}

/* ==========================================================================
   3. SISTEMA DE NAVEGACIÓN (Tabs) - ¡CORREGIDO!
   ========================================================================== */

/* 1. Estado base: OCULTAS */
.tab-section {
    display: none !important; /* Forzamos que estén ocultas por defecto */
    opacity: 0;
}

/* 2. Estado activo: VISIBLES */
/* Cuando JS añade la clase .active, quitamos el display:none */
.tab-section.active {
    display: block !important;
    opacity: 1;
    animation: fadeIn 0.4s ease-out; /* Mantenemos tu animación suave */
}

/* Estilo de los botones (Nav-Tabs) */
.nav-tabs {
    display: flex;
    justify-content: space-around;
    background: white;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.tab-btn {
    border: none;
    background: none;
    font-family: var(--font-title);
    font-weight: 700;
    color: #888; /* Color neutro para inactivos */
    padding: 10px 15px;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.tab-btn.active {
    color: var(--verde-bosque, #233F31);
}

/* Rayita verde debajo del botón activo */
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    width: 70%;
    height: 3px;
    background: var(--verde-bosque, #233F31);
    border-radius: 10px;
}

/* ==========================================================================
   4. COMPONENTES (Cards & Inputs)
   ========================================================================== */
.card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-soft);
}

.btn-primary-large {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 15px;
    background: var(--verde-bosque);
    color: white;
    font-family: var(--font-title);
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s active;
}

.btn-primary-large:active {
    transform: scale(0.98);
}

/* ==========================================================================
   5. UTILIDADES & ANIMACIONES
   ========================================================================== */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Floating Button (Home only logic via JS) */
.floating-download {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--verde-bosque);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 99;
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
footer {
    padding: 40px 20px;
    text-align: center;
    color: var(--verde-salvia);
    font-family: var(--font-title);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* LA OPCIÓN ONLINE: Brillante y destacada */
.producto-online {
    border: 2px solid var(--color-amazon);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: var(--sombra-premium);
    position: relative;
}

.tag-recomendado {
    position: absolute;
    top: -10px;
    right: 10px;
    background: var(--color-amazon);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* LA OPCIÓN LOCAL: Útil pero secundaria */
#contenedor-local {
    margin-top: 25px;
    border-top: 1px dashed #ccc;
    padding-top: 15px;
}

.tarjeta-vivero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    border: 1px solid var(--color-vivero);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.btn-ruta {
    background-color: #666; /* Gris neutro para no competir con el naranja */
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    transition: background 0.3s;
}

.btn-ruta:hover {
    background-color: #444;
}

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--verde-bosque, #233F31);
    margin-bottom: 5px;
}

.input-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--verde-bosque, #233F31);
}

#ad-container-veredicto {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 12px;
    /* Forzamos que Google vea un ancho desde el principio */
    min-width: 280px;
}

/* Evitamos que el anuncio empuje el diseño hacia fuera */
.adsbygoogle {
    max-width: 100vw !important;
}