/* ===== RESET Y VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --verde-principal: #2e7d32;
    --verde-claro: #4caf50;
    --verde-oscuro: #1b5e20;
    --verde-brillo1: #00b09b;
    --verde-brillo2: #96c93d;
    --amarillo: #fbc02d;
    --gris-claro: #f5f5f5;
    --sombra: 0 10px 30px rgba(0,0,0,0.1);
    --transicion: all 0.3s ease;
}

/* ===== FONDO GENERAL CON MOVIMIENTO ===== */
body.fondo-verde {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #00b09b, #96c93d, #2e7d32, #4caf50);
    background-size: 400% 400%;
    animation: brillo-verde 12s ease infinite;
    min-height: 100vh;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

@keyframes brillo-verde {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 25%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 75%; }
    100% { background-position: 0% 50%; }
}

/* ===== HEADER (FONDO BLANCO) ===== */
header {
    background: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--amarillo);
    box-shadow: var(--sombra);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    height: 50px;
    width: auto;
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--verde-principal);
}

nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

nav a {
    color: var(--verde-oscuro);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transicion);
    border: 2px solid transparent;
}

nav a:hover,
nav a.active {
    background: var(--verde-principal);
    color: white;
    transform: translateY(-2px);
}

.header-linea {
    height: 4px;
    background: linear-gradient(90deg, var(--verde-claro), var(--amarillo), var(--verde-principal));
    width: 100%;
}

/* ===== MAIN WRAPPER ===== */
.main-wrapper {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 30px;
}

h1 {
    color: white;
    text-align: center;
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitulo {
    color: white;
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 40px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

/* ===== FILTROS ===== */
.filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.filtros button {
    padding: 12px 24px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 50px;
    background: rgba(255,255,255,0.2);
    color: white;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: var(--transicion);
    backdrop-filter: blur(5px);
}

.filtros button:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.filtros button.active {
    background: var(--amarillo);
    color: var(--verde-oscuro);
    border-color: white;
}

/* ===== FOOTER ===== */
.footer {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    padding: 40px 30px 20px;
    margin-top: 60px;
    border-top: 4px solid var(--amarillo);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-col {
    color: #333;
}

.footer-col strong {
    color: var(--verde-principal);
    font-size: 1.2rem;
    display: block;
    margin-bottom: 15px;
}

.footer-col p {
    color: #666;
    margin-bottom: 8px;
}

.footer-col a {
    color: #666;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: var(--transicion);
}

.footer-col a:hover {
    color: var(--verde-principal);
    transform: translateX(5px);
}

.footer-col.small {
    font-size: 0.9rem;
    color: #999;
}

/* ===== LOADING SPINNER ===== */
.loading-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--sombra);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--verde-principal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== SCROLL PERSONALIZADO ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--verde-principal);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--verde-oscuro);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        border-bottom: 3px solid var(--amarillo);
    }
    
    nav.active {
        display: flex;
    }
    
    nav a {
        width: 100%;
        text-align: center;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .subtitulo {
        font-size: 1.1rem;
    }
    
    .main-wrapper {
        padding: 0 20px;
    }
}
/* ===== BOTONES FLOTANTES DE FACEBOOK - CORREGIDO ===== */
.floating-social {
    position: fixed;
    right: 20px;
    bottom: 120px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.floating-social-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.floating-social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.floating-social-btn:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 15px 30px rgba(46, 125, 50, 0.3);
    border-color: white;
}

.floating-social-btn:hover::before {
    opacity: 1;
}

.floating-social-btn img {
    width: 28px;
    height: 28px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    /* IMPORTANTE: No aplicar filtro que cambie color */
    filter: none !important;
}

/* El hover SOLO cambia el fondo, NO la imagen */
.floating-social-btn:hover img {
    transform: scale(1.1);
    /* Eliminado el filter que lo volvía blanco */
}

/* Tooltip flotante */
.floating-social-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 70px;
    background: white;
    color: var(--verde-oscuro);
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.floating-social-btn:hover::after {
    opacity: 1;
    visibility: visible;
    right: 80px;
}

/* ===== CARRITO GIRATORIO 3D CON TRANSPARENCIA ===== */
.floating-cart {
    position: fixed;
    left: 30px;
    bottom: 40px;
    width: 90px;
    height: 90px;
    z-index: 9999;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 15px 20px rgba(0,0,0,0.25));
    animation: levitate 3s ease-in-out infinite;
    background: transparent; /* Fondo transparente */
}

.floating-cart:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 25px 30px rgba(251, 192, 45, 0.5));
}

.floating-cart img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    /* Giro 3D en su propio eje */
    animation: spin3D 8s linear infinite;
    transform-style: preserve-3d;
    backface-visibility: visible;
    /* Asegurar transparencia si el PNG la tiene */
    background: transparent !important;
    mix-blend-mode: multiply; /* Ayuda con transparencias */
}

.floating-cart:hover img {
    animation: spin3DFast 1s ease-in-out;
}

/* Animaciones 3D */
@keyframes spin3D {
    0% {
        transform: perspective(800px) rotateY(0deg);
    }
    25% {
        transform: perspective(800px) rotateY(90deg);
    }
    50% {
        transform: perspective(800px) rotateY(180deg);
    }
    75% {
        transform: perspective(800px) rotateY(270deg);
    }
    100% {
        transform: perspective(800px) rotateY(360deg);
    }
}

@keyframes spin3DFast {
    0% {
        transform: perspective(800px) rotateY(0deg);
    }
    100% {
        transform: perspective(800px) rotateY(360deg);
    }
}

@keyframes levitate {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .floating-social {
        right: 15px;
        bottom: 100px;
        gap: 8px;
    }
    
    .floating-social-btn {
        width: 45px;
        height: 45px;
    }
    
    .floating-social-btn img {
        width: 22px;
        height: 22px;
    }
    
    .floating-cart {
        left: 20px;
        bottom: 30px;
        width: 70px;
        height: 70px;
    }
    
    .floating-social-btn::after {
        display: none;
    }
}

/* Ajuste para index */
.index-page .floating-cart {
    bottom: 100px;
}
/* Animaciones */
@keyframes slowSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fastSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes levitate {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .floating-social {
        right: 15px;
        bottom: 100px;
        gap: 8px;
    }
    
    .floating-social-btn {
        width: 45px;
        height: 45px;
    }
    
    .floating-social-btn img {
        width: 22px;
        height: 22px;
    }
    
    .floating-cart {
        left: 20px;
        bottom: 30px;
        width: 60px;
        height: 60px;
    }
    
    /* Ocultar tooltips en móvil */
    .floating-social-btn::after {
        display: none;
    }
}

/* Ajuste especial para index sin header fijo */
.index-page .floating-cart {
    bottom: 100px;
}
