/* === ESTILOS GENERALES === */
body {
    font-family: 'Nunito', sans-serif;
    background-color: #F4EAF4;
    color: #2D2D2D;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: auto;
}

/* === HEADER Y NAVEGACIÓN === */
header {
    background-color: #161B0C;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-sizing: border-box;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

.logo {
    color: #A94FC7;
    font-size: 32px;
    font-weight: bold;
    transition: transform 0.2s ease-in-out;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 50px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    padding: 0;
    margin: 0;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

nav a:hover, nav a.active {
    background:  rgba(138, 207, 58, 0.6);
}

/* Botón menú hamburguesa para móvil */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: white;
    position: absolute;
    top: 20px;
    right: 20px;
} 

/* === SIDEBAR === */
.sidebar {
    background-color: #161B0C;
    width: 180px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    padding-top: 80px;
    padding-bottom: 80px;
    color: white;
    overflow-y: auto;
    z-index: 900;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.sidebar h2 {
    font-size: 24px;
    margin: 20px 0 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.sidebar h2:after {
    content: '▼';
    font-size: 14px;
    margin-left: 8px;
}

.sidebar h2.collapsed:after {
    content: '►';
}

.sidebar-category {
    margin-bottom: 15px;
}

.sidebar-category:last-child {
    margin-bottom: 20px;
}

.sidebar-content {
    display: block;
}

.sidebar-content.hidden {
    display: none;
}

.hidden {
    display: none;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    padding: 10px 20px;
}

.sidebar a {
    color: white;
    text-decoration: none;
    font-size: 16px;
}

.sidebar a:hover {
    color: #A94FC7;
}

/* === CONTENT === */
.content {
    margin-left: 180px;
    padding: 20px 40px;
    padding-top: 80px;
}

main {
    padding-top: 20px;
}

/* === SECCIÓN HERO === */
.hero {
    text-align: center;
    padding: 120px 20px 60px;
    background: linear-gradient(to bottom, #161B0C, #1E2421);
    color: #A4E57C;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: bold;
}

/* === CATEGORÍAS === */
.categorias {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.categoria {
    background: #A94FC7;
    padding: 15px 30px;
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.2s ease, background 0.3s;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.categoria:hover {
    transform: scale(1.1);
    background: #8A38A0;
}

/* Título de la categoría */
.titulo-categoria {
    color: #6a0dad;
    text-align: center;
    font-size: 36px;
    margin-top: 20px;
    margin-bottom: 30px;
}

/* === SECCIÓN DE PRODUCTOS Y GRID === */
.ofertas {
    text-align: center;
    padding: 60px 20px;
}

.ofertas h2 {
    font-size: 32px;
    color: #6a0dad;
    margin-bottom: 20px;
}

.productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    justify-content: center;
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    margin: 20px 0;
}

/* Producto */
.producto {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.producto:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.2);
}

.producto img {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    margin-bottom: 10px;
    cursor: pointer;
}

.producto img:hover {
    transform: scale(1.05);
}

.producto h2 {
    margin: 10px 0;
    font-size: 20px;
    color: #6a0dad;
}

.producto p {
    margin: 5px 0;
    color: #444;
}

.producto p:last-of-type {
    font-size: 18px;
    font-weight: bold;
    color: #A94FC7;
    margin-top: 5px;
}

/* === BOTÓN DE COMPRA === */
.producto button {
    background: #161B0C;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    transition: background 0.3s, transform 0.2s;
}

.producto button:hover {
    background: #A94FC7;
    transform: scale(1.05);
}

.gender {
    display: inline-block;
    margin-left: 5px;
    font-size: 18px;
}

.male {
    color: #1E90FF;
}

.female {
    color: #FF69B4;
}

/* Hide categories */
.category-section {
    display: none;
}

.category-section.active {
    display: block;
}

/* === MODAL === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto; 
    padding: 20px;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-height: 80vh;
    overflow-y: auto;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

.animal-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.animal-image {
    flex: 1;
    min-width: 300px;
}

.animal-image img {
    width: 100%;
    border-radius: 4px;
}

.animal-info {
    flex: 1;
    min-width: 300px;
}

.animal-info h2 {
    color: #2c7a54;
    margin-top: 0;
}

.animal-info p.scientific-name {
    font-style: italic;
    color: #666;
    margin-bottom: 20px;
}

.animal-info .price {
    font-size: 1.5em;
    font-weight: bold;
    color: #2c7a54;
    margin: 15px 0;
}

.modal-button {
    background-color: #2c7a54;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 15px;
}

.modal-button:hover {
    background-color: #235e41;
}

.habitat-info, .care-info, .store-info {
    margin-top: 15px;
}

.habitat-info h3, .care-info h3, .store-info h3 {
    color: #2c7a54;
    margin-bottom: 5px;
}

.store-location {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border-left: 3px solid #2c7a54;
}

.store-location h4 {
    margin-top: 0;
    margin-bottom: 5px;
    color: #2c7a54;
}

.store-location p {
    margin: 3px 0;
}

.availability {
    font-weight: bold;
}

.in-stock {
    color: #00d86c;
}

.low-stock {
    color: #e6a817;
}

.out-of-stock {
    color: #d9534f;
}

/* === TABS === */
.tabs {
    display: flex;
    margin-top: 20px;
    border-bottom: 1px solid #ddd;
}

.tab {
    padding: 10px 15px;
    cursor: pointer;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
}

.tab.active {
    background-color: white;
    border-bottom: 1px solid white;
    position: relative;
    top: 1px;
}

.tab-content {
    display: none;
    padding: 15px 0;
}

.tab-content.active {
    display: block;
}

/* === FILTER CONTROLS === */
.filter-controls {
    margin: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0px 2px 5px rgba(0,0,0,0.1);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c7a54;
}

.filter-group select, .filter-group input {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.filter-button {
    background-color: #A94FC7;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.filter-button:hover {
    background-color: #8e3ba8;
}

/* === SECCIÓN DE CONTACTO === */
.contacto {
    text-align: center;
    padding: 60px 20px;
    background: #F4EAF4;
}

.contacto h2 {
    font-size: 30px;
    color: #6a0dad;
    margin-bottom: 20px;
}

.contacto button {
    background: #A94FC7;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
}

.contacto button:hover {
    background: #8A38A0;
    transform: scale(1.05);
}

/* === ICONO DE USUARIO === */
.user-menu {
    position: absolute;
    top: 10px;
    right: 30px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-menu img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #6a0dad;
    background-color: #fff;
    transition: transform 0.2s;
}

.user-menu img:hover {
    transform: scale(1.1);
}

/* === MENÚ DESPLEGABLE DEL USUARIO === */
.dropdown {
    display: none;
    position: absolute;
    top: 55px;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    padding: 12px;
    width: 170px;
    text-align: center;
}

.dropdown p {
    font-weight: bold;
    margin: 8px 0;
    font-size: 16px;
}

.dropdown hr {
    border: none;
    height: 1px;
    background: #ccc;
    margin: 8px 0;
}

.dropdown a, .dropdown button {
    display: block;
    width: 100%;
    padding: 10px;
    text-decoration: none;
    color: black;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.dropdown a:hover, .dropdown button:hover {
    background: #f2f2f2;
    border-radius: 5px;
}

/* === FOOTER === */
footer {
    background-color: #161B0C;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    margin-left: 180px;
}

/* === RESPONSIVE DESIGN === */
@media screen and (min-width: 1200px) and (min-height: 900px) {
    .sidebar {
        padding-top: 80px;
    }
    
    .sidebar-category {
        margin-bottom: 12px;
    }
}

@media (max-height: 700px) {
    .sidebar {
        padding-top: 80px;
    }
}

@media (max-width: 768px) {
    /* Grid adjustments */
    .grid-productos {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .productos {
        grid-template-columns: 1fr;
    }
    
    /* Sidebar y navegación */
    .sidebar {
        width: 150px;
    }
    
    .content, footer {
        margin-left: 150px;
    }
    
    /* Categorías */
    .categorias {
        flex-direction: column;
        align-items: center;
    }
    
    /* Header y navegación móvil */
    header {
        flex-direction: column;
        padding: 10px 15px;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
        margin-top: 15px;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav li {
        margin: 8px 0;
        width: 100%;
        text-align: center;
    }
    
    .menu-toggle {
        display: block;
    }
    
    /* Filtros */
    .filters {
        flex-direction: column;
    }
    
    .filter-group {
        margin-bottom: 10px;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .grid-productos {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding-top: 80px;
        padding-bottom: 10px;
        overflow-y: visible;
    }
    
    .content, footer {
        margin-left: 0;
        padding: 15px;
        padding-top: 100px;
    }
    
    /* Header más compacto */
    header {
        flex-direction: column;
        padding: 10px;
    }
    
    nav ul {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Modal */
    .modal-content {
        margin: 10% auto;
    }
    
    .animal-details {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .producto {
        width: 100%;
        padding: 10px;
        margin-bottom: 15px;
    }
    
    /* Ajustes para pantallas muy pequeñas */
    header {
        padding: 8px 10px;
    }
    
    .logo img {
        height: 40px;
    }
    
    /* Título de categoría más pequeño */
    .titulo-categoria {
        font-size: 24px;
        margin: 15px 0;
    }
    
    .producto h2 {
        font-size: 16px;
    }
    
    /* Ajustar el espacio en los filtros */
    .filter-controls {
        margin: 10px;
        padding: 10px;
    }
    
    .filter-button {
        width: 100%;
        margin-top: 5px;
    }
    
    /* Modal más ajustado */
    .modal-content {
        margin: 5% auto;
    }
    
    /* Tabs en el modal más compactos */
    .tab {
        padding: 8px;
        font-size: 13px;
    }
    
    /* Imágenes en el modal */
    .animal-image img {
        max-height: 200px;
        object-fit: contain;
    }
    
    /* Sidebar */
    .sidebar h2 {
        font-size: 18px;
        margin: 15px 0 8px 15px;
    }
    
    .sidebar li {
        padding: 8px 15px;
    }
    
    .sidebar a {
        font-size: 14px;
    }
    
    /* Footer más compacto */
    footer {
        padding: 15px 10px;
        font-size: 14px;
    }
}
@media (max-width: 480px) {
    .producto {
        width: 100%;
    }
    .categoria {
        width: 80px;
        height: 80px;
    }
    .categoria-label {
        font-size: 14px;
    }
    .productos {
        flex-direction: column;
        align-items: center;
    }
    
    .producto {
        width: 90%;
        max-width: 280px;
        margin-bottom: 20px;
    }
    
    .slider-controls {
        display: none; /* Ocultar controles de slider en móviles muy pequeños */
    }
    .hero h1 {
        font-size: 24px;
    }
    
    .hero {
        padding: 90px 10px 30px;
    }
    
    .wave-divider svg {
        height: 40px; /* Ola más pequeña en móviles */
    }
    
    .ofertas, .contacto {
        padding: 40px 15px;
    }
    
    .ofertas h2, .contacto h2 {
        font-size: 26px;
    }

    .dropdown-menu {
        display: none;
        position: absolute;
        top: 50px;
        right: 30px;
        background-color: #161B0C;
        border-radius: 5px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        min-width: 150px;
    }
    
    .dropdown-menu a {
        display: block;
        padding: 12px 20px;
        text-decoration: none;
        color: white;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .dropdown-menu a:last-child {
        border-bottom: none;
    }
    
    .dropdown-menu a:hover {
        background-color: rgba(138, 207, 58, 0.6);
    }

}
    /* Menú hamburguesa para móviles */
    .menu-toggle {
        display: none;
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
    }
    
    @media (max-width: 768px) {
        .menu-toggle {
        display: block;
        }
        
        nav.active ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 18px;
        left: 0;
        right: 0;
        background-color: #161B0C;
        padding: 10px 0;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
        }
        
        nav ul li {
        margin: 0;
        text-align: center;
        width: 100%;
        }
        
        nav ul li a {
        display: block;
        padding: 12px 15px;
        }
        nav {
            display: none; /* Oculto por defecto en móvil */
            position: absolute;
            top: 60px; /* Ajusta según la altura de tu header */
            left: 0;
            width: 100%;
            background-color: #1a1a1a; /* Color de fondo para el menú */
            z-index: 100;
        }
        
        nav.active {
            display: block; /* Se muestra cuando tiene la clase active */
        }
        
        nav ul {
            flex-direction: column;
            padding: 0;
        }
        
        nav ul li {
            width: 100%;
            padding: 10px 20px;
            border-bottom: 1px solid #333;
        }
        
        .menu-toggle {
            display: block;
            cursor: pointer;
            font-size: 24px;
        }
    }
    /* Ocultar el toggle en pantallas grandes */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    
    nav {
        display: flex !important; /* Asegurarse de que se muestre en desktop */
    }
}