/* === fuentes === */
@font-face {
    font-family: 'Nunito';
    src: url(/fuentes/Nunito/Nunito-Regular.ttf) format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url(/fuentes/Nunito/Nunito-Bold.ttf) format('truetype');
    font-weight: 700;
    font-display: swap; 
}

@font-face {
    font-family: 'Nunito';
    src: url(/fuentes/Nunito/Nunito-Black.ttf) format('truetype');
    font-weight: 900;
    font-display: swap;
}

/* === SIDEBAR === */

        /* Sidebar - Del primer archivo */
        .sidebar {
            background-color: #161B0C;
            width: 180px;
            height: 100vh;
            position: fixed;
            left: 0;
            top: 0;
            padding-top: 100px;
            color: white;
        }
        
        .sidebar h2 {
            font-size: 24px;
            margin: 20px 0 10px 20px;
        }
        
        .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: #8ACF3A;
        }
        
        
        .content {
            margin-left: 180px;
            padding: 20px 40px;
        }
        .grid-productos {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            padding: 20px;
            margin: 20px;
        }
        
        /* Estilos para el pop-up */
        .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;
        }

        .producto img {
            cursor: pointer;
            transition: transform 0.3s ease;
        }

        .producto img:hover {
            transform: scale(1.05);
        }

        .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: #ffffff;
        }
        
        .low-stock {
            color: #ffffff;
        }
        
        .out-of-stock {
            color: #ffffff;
        }
        
        .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;
        }
        
        .producto button {
            display: none; /* Ocultamos los botones originales */
        }


/* === VARIABLES === */
:root {
    --color-primary: #8ACF3A;
    --color-secondary: #161B0C;
    --color-accent: #2C7A54;
    --color-background: #F4EAF4;
    --color-text: #2D2D2D;
    --color-light: #FFFFFF;
    --shadow-soft: 0 4px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 6px 15px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition-standard: all 0.3s ease;
}

/* === fuentes === */
@font-face {
    font-family: 'Nunito';
    src: url('/fuentes/Nunito/Nunito-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

/* === RESET Y ESTILOS GENERALES === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

/* === TIPOGRAFÍA === */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito', sans-serif;
    margin-bottom: 0.5em;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    font-weight: 900;
}

h2 {
    font-size: 2.5rem;
    font-weight: 900;
}

h3 {
    font-size: 2rem;
    font-weight: 900;
}

h4 {
    font-size: 1.5rem;
    font-weight: 700;
}

h5 {
    font-size: 1.25rem;
    font-weight: 700;
}

h6 {
    font-size: 1rem;
    font-weight: 700;
}

p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* === HEADER Y NAVEGACIÓN === */
/* === HEADER Y NAVEGACIÓN === */
header {
    background-color: var(--color-secondary);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-soft);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    flex: 0 0 auto;
}

.menu-center {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.menu-center ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.cart-right {
    flex: 0 0 auto;
    margin-left: 20px;
}

.cart-icon {
    color: var(--color-light);
    text-decoration: none;
    font-size: 1.25rem;
    padding: 8px 12px;
    border-radius: 5px;
    transition: var(--transition-standard);
    display: flex;
    align-items: center;
}

.cart-icon:hover {
    background: rgba(138, 207, 58, 0.6);
}
nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    justify-content: center;
}

/* Estilos adicionales para el carrito */
.cart-icon {
    color: var(--color-light);
    text-decoration: none;
    font-size: 1.4rem;
    padding: 8px 12px;
    border-radius: 5px;
    transition: var(--transition-standard);
}

.cart-icon:hover {
    background: rgba(138, 207, 58, 0.6);
}

.logo img {
    height: 60px;
    width: auto;
    transition: var(--transition-standard);
}

.logo:hover img {
    transform: scale(1.05);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

nav a {
    color: var(--color-light);
    text-decoration: none;
    font-size: 15 px;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background 0.3s ease; /* Transición suave al cambiar el fondo */
    font-weight: 700;
}

nav a:hover, nav a.active {
    background: rgba(138, 207, 58, 0.6);
    color: var(--color-light);
}

/* === SIDEBAR === */
.sidebar {
    background-color: var(--color-secondary);
    width: 220px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding-top: 100px;
    color: var(--color-light);
    box-shadow: var(--shadow-soft);
    z-index: 900;
}

.sidebar h2 {
    font-size: 1.5rem;
    margin: 20px 0 20px 20px;
    color: var(--color-primary);
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    margin-bottom: 5px;
}

.sidebar a {
    color: var(--color-light);
    text-decoration: none;
    font-size: 1rem;
    padding: 12px 20px;
    display: block;
    transition: var(--transition-standard);
    border-left: 3px solid transparent;
}

.sidebar a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--color-primary);
    padding-left: 25px;
}

/* === CONTENEDOR PRINCIPAL === */
main {
    margin-left: 220px;
    padding-top: 90px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* === TÍTULO DE LA PÁGINA === */
.titulo-categoria {
    color: var(--color-primary);
    text-align: center;
    font-size: 2.5rem;
    margin: 20px 0 40px;
    position: relative;
    font-weight: 900;
}

.titulo-categoria::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--color-primary);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* === GRID DE PRODUCTOS === */
.grid-productos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 20px;
}

/* === TARJETAS DE PRODUCTOS === */
.producto {
    background: var(--color-light);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-standard);
    display: flex;
    flex-direction: column;
    position: relative;
}

.producto:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

.producto img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: var(--transition-standard);
}

.producto img:hover {
    transform: scale(1.05);
}

.producto h2 {
    margin: 10px 0;
    font-size: 1.4rem;
    color: var(--color-accent);
    font-weight: 700;
}

.producto p {
    margin: 5px 0;
    color: var(--color-text);
}

.producto p:last-of-type {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: auto;
    padding-top: 10px;
}

.gender {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
}

.gender.male {
    color: #4285F4;
}

.gender.female {
    color: #DB4437;
}

/* === MODAL === */
.modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background-color: var(--color-light);
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 900px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    max-height: 85vh;
    overflow-y: auto;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #777;
    cursor: pointer;
    transition: var(--transition-standard);
}

.close-button:hover {
    color: var(--color-primary);
}

.animal-details {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.animal-image {
    flex: 1;
    min-width: 300px;
}

.animal-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.animal-info {
    flex: 1;
    min-width: 300px;
}

.animal-info h2 {
    color: var(--color-accent);
    margin-top: 0;
    font-size: 2rem;
}

.animal-info .scientific-name {
    font-style: italic;
    color: #666;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.animal-info .price {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--color-primary);
    margin: 20px 0;
}

/* === TABS === */
.tabs {
    display: flex;
    margin: 25px 0 0;
    border-bottom: 1px solid #ddd;
}

.tab {
    padding: 12px 20px;
    cursor: pointer;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
    transition: var(--transition-standard);
    font-weight: 700;
}

.tab:hover {
    background-color: #e9e9e9;
}

.tab.active {
    background-color: var(--color-light);
    border-bottom: 1px solid var(--color-light);
    position: relative;
    top: 1px;
    color: var(--color-accent);
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === STORE INFO === */
.habitat-info h3, .care-info h3, .store-info h3 {
    color: var(--color-accent);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.store-location {
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid var(--color-accent);
}

.store-location h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--color-accent);
    font-size: 1.1rem;
}

.store-location p {
    margin: 5px 0;
}

.availability {
    font-weight: bold;
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
}

.in-stock {
    color: #fff;
    background-color: var(--color-accent);
}

.low-stock {
    color: #fff;
    background-color: #e6a817;
}

.out-of-stock {
    color: #fff;
    background-color: #d9534f;
}

/* === BOTONES === */
.modal-button {
    background-color: var(--color-accent);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 20px;
    transition: var(--transition-standard);
}

.modal-button:hover {
    background-color: #235e41;
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

/* === FOOTER === */
footer {
    background-color: var(--color-secondary);
    color: var(--color-light);
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    margin-left: 220px;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1200px) {
    .grid-productos {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    main {
        margin-left: 0;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding-top: 90px;
        padding-bottom: 20px;
    }
    
    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .sidebar li {
        margin: 0 10px;
    }
    
    .sidebar a {
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .sidebar a:hover {
        border-left: none;
        border-bottom: 3px solid var(--color-primary);
        padding-left: 20px;
    }
    
    footer {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.75rem;
    }
    
    nav ul {
        display: none;
    }
    
    .grid-productos {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .producto {
        max-width: 450px;
        margin: 0 auto;
    }
    
    .animal-details {
        flex-direction: column;
    }
    
    .animal-image, .animal-info {
        min-width: 100%;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 10% auto;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab {
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px;
    }
    
    .logo img {
        height: 40px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .titulo-categoria {
        font-size: 1.75rem;
    }
    
    .modal-content {
        padding: 15px;
    }
    
    .close-button {
        top: 10px;
        right: 15px;
    }
    
    .tab {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* === MENÚ RESPONSIVE === */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--color-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
}

@media (max-width: 768px) {
    /* Header y navegación móvil */
    .menu-toggle {
        display: block;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 90px;
        left: 0;
        right: 0;
        background-color: var(--color-secondary);
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        z-index: 1000;
        gap: 0;
    }
    
    nav.active ul {
        display: flex;
    }
    
    nav ul li {
        width: 100%;
        text-align: center;
    }
    
    nav ul li a {
        display: block;
        padding: 15px;
        width: 100%;
    }
    
    /* Sidebar en modo móvil */
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding-top: 90px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 20px 20px;
    }
    
    .sidebar li {
        margin: 5px;
    }
    
    .sidebar a {
        border-left: none;
        border-radius: 20px;
        padding: 8px 15px;
        display: inline-block;
    }
    
    .sidebar a:hover {
        border-left: none;
        background-color: var(--color-primary);
        color: var(--color-secondary);
        padding-left: 15px;
    }
    
    /* Contenido principal */
    main {
        margin-left: 0;
        padding-top: 90px;
    }
    
    .grid-productos {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }
    
    footer {
        margin-left: 0;
    }
}

@media (max-width: 576px) {
    /* Ajustes para pantallas muy pequeñas */
    .grid-productos {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    .producto {
        max-width: 100%;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab {
        margin-bottom: 5px;
        flex: 1 0 40%;
        text-align: center;
        font-size: 0.9rem;
        padding: 8px 5px;
    }
    
    .animal-details {
        flex-direction: column;
    }
    
    .modal-content {
        padding: 15px;
        margin: 5% auto;
    }
    
    .animal-image, .animal-info {
        min-width: 100%;
    }
    
    .animal-info h2 {
        font-size: 1.5rem;
    }
    
    .animal-info .price {
        font-size: 1.4rem;
    }
    
    h1.titulo-categoria {
        font-size: 1.8rem;
        margin: 15px 0 25px;
    }
}