﻿/* ========================================
   CSS PARA PRODUCTOS - AVES.CSHTML
   Solo clases necesarias para el contenido
======================================== */

/* 1. VARIABLES Y CONFIGURACIÓN BASE */
:root {
    /* Colores de marca */
    --green: #00973a;
    --orange: #ff7a2a;
    --purple: #7a1fa2;
    /* Colores de interfaz - Tema Claro */
    --bg-body: #f3f9f5;
    --bg-card: #ffffff;
    /* Colores de texto */
    --text-main: #111111;
    --text-muted: #4a5568;
    /* Bordes */
    --border-soft: #e5e5e5;
    /* Transiciones */
    --transition-base: all 0.3s ease;
    --transition-fast: all 0.2s ease;
}

/* Tema oscuro */
body.dark-mode {
    --bg-body: #050709;
    --bg-card: #111827;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --border-soft: #1f2933;
}

/* 2. SECCIÓN DE PRODUCTOS */
.productos-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 20px 60px;
}

.productos-container {
    width: 100%;
}

/* 3. ENCABEZADO DE SECCIÓN */
.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 3rem;
    color: var(--purple);
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

    .section-title::after {
        content: '';
        position: absolute;
        bottom: -12px;
        left: 50%;
        transform: translateX(-50%);
        width: 100px;
        height: 4px;
        background: var(--orange);
        border-radius: 2px;
    }

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: 24px;
}

/* 4. SUBSECCIONES POR CATEGORÍA */
.categoria-subsection {
    margin-bottom: 100px;
}

.categoria-header {
    margin-bottom: 50px;
}

.categoria-imagen-banner {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

    .categoria-imagen-banner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
        object-position: center 41%;
    }

.categoria-subsection:hover .categoria-imagen-banner img {
    transform: scale(1.05);
}

.categoria-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
}

.categoria-titulo {
    font-size: 2.5rem;
    color: white;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.categoria-descripcion {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 600px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* 5. GRID DE PRODUCTOS */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* 6. TARJETAS DE PRODUCTOS */
.producto-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-soft);
    position: relative;
    overflow: hidden;
}

    .producto-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: var(--orange);
        transform: scaleX(0);
        transition: transform 0.4s ease;
    }

    .producto-card:hover::before {
        transform: scaleX(1);
    }

    .producto-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }

/* Header de la tarjeta */
.producto-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-soft);
}

.producto-icono {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--purple);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(122, 31, 162, 0.3);
}

    .producto-icono img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

.producto-card-titulo {
    font-size: 1.4rem;
    color: var(--text-main);
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

/* Body de la tarjeta */
.producto-card-body {
    flex: 1;
    margin-bottom: 20px;
}

.producto-card-descripcion {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* ========================================
   ESPECIFICACIONES CON COLAPSO/EXPANSIÓN
======================================== */

/* Contenedor wrapper para las specs */
.producto-specs-wrapper {
    position: relative;
}

/*---------*/
/* Lista de especificaciones mostrando 3 lineas de la tabla*/
/*.producto-specs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    max-height: 150px;*/ /* Muestra aproximadamente 3 items */
    /*overflow: hidden;
    transition: max-height 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}*/

    /* Estado expandido */
    /*.producto-specs.expanded {
        max-height: 600px;
    }*/

/* Expandir al hacer hover en la tarjeta */
/*.producto-card:hover .producto-specs {
    max-height: 600px;
}*/

/*---------*/
/*Lista de especificaciones sin tabla*/
.producto-specs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    max-height: 0; /* ✅ CAMBIO: De 150px a 0 para ocultar completamente */
    overflow: hidden;
    transition: max-height 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

    /* Estado expandido */
    .producto-specs.expanded {
        max-height: 600px;
    }

/* Expandir al hacer hover en la tarjeta */
.producto-card:hover .producto-specs {
    max-height: 600px;
}
/*---------------*/

/* Items de especificaciones */
.producto-specs li {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 151, 58, 0.05);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-main);
    border-left: 3px solid var(--green);
    transition: var(--transition-fast);
}

.producto-specs strong {
    color: var(--purple);
    margin-right: 6px;
    font-weight: 600;
}

body.dark-mode .producto-specs li {
    background: rgba(0, 151, 58, 0.1);
}

/* Gradiente de fade cuando está colapsado */
.producto-specs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom, transparent, var(--bg-card));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Ocultar gradiente cuando está expandido */
.producto-specs.expanded::after,
.producto-card:hover .producto-specs::after {
    opacity: 0;
}

/* Botón toggle para expandir/colapsar */
.specs-toggle {
    width: 100%;
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--purple);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-base);
}

    .specs-toggle:hover {
        background: var(--orange);
        transform: translateY(-2px);
    }

    .specs-toggle i {
        font-size: 0.75rem;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Rotar ícono cuando está expandido */
    .specs-toggle.expanded i {
        transform: rotate(180deg);
    }

/* Footer de la tarjeta */
.producto-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 2px solid var(--border-soft);
    margin-top: auto;
}

.producto-card-precio {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--purple);
}

.btn-detalle {
    padding: 10px 20px;
    background: var(--purple);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: 0 2px 10px rgba(122, 31, 162, 0.3);
}

    .btn-detalle:hover {
        background: var(--orange);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(255, 122, 42, 0.4);
    }

/* 7. MODAL DE DETALLES */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.modal-container {
    background: var(--bg-card);
    border-radius: 20px;
    max-width: 1100px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(30px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

/* Botón cerrar modal */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--purple);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(122, 31, 162, 0.4);
}

    .modal-close:hover {
        background: var(--orange);
        transform: rotate(90deg);
    }

/* Contenido del modal */
.modal-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    padding: 40px;
}

/* Imagen en el modal */
.modal-imagen {
    position: sticky;
    top: 20px;
    height: fit-content;
}

    .modal-imagen img {
        width: 100%;
        height: auto;
        border-radius: 16px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
        object-fit: cover;
    }

/* Información del modal */
.modal-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.modal-titulo {
    font-size: 2.2rem;
    color: var(--green);
    font-weight: 700;
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--orange);
}

.modal-descripcion {
    font-size: 1.1rem;
    color: var(--text-main);
    line-height: 1.7;
    margin: 0;
}

/* Secciones del modal */
.modal-seccion {
    background: rgba(0, 151, 58, 0.05);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--green);
}

body.dark-mode .modal-seccion {
    background: rgba(0, 151, 58, 0.1);
}

.modal-subtitulo {
    font-size: 1.3rem;
    color: var(--purple);
    font-weight: 700;
    margin: 0 0 16px 0;
}

/* Especificaciones en el modal */
.modal-specs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

    .modal-specs li {
        display: flex;
        align-items: center;
        padding: 10px 14px;
        background: var(--bg-card);
        border-radius: 8px;
        font-size: 0.95rem;
        color: var(--text-main);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .modal-specs strong {
        color: var(--purple);
        margin-right: 6px;
        font-weight: 600;
    }

/* Listas en el modal */
.modal-lista {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .modal-lista li {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        color: var(--text-main);
        line-height: 1.6;
        font-size: 0.95rem;
    }

        .modal-lista li::before {
            content: "✓";
            color: var(--green);
            font-weight: bold;
            font-size: 1.2rem;
            flex-shrink: 0;
        }

/* Texto del modal */
.modal-texto {
    color: var(--text-main);
    line-height: 1.7;
    margin: 0;
    font-size: 0.95rem;
}

/* Footer del modal */
.modal-footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 24px;
    border-top: 2px solid var(--border-soft);
    margin-top: 12px;
}

.modal-nota {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
    text-align: center;
}

.btn-contacto-modal {
    padding: 14px 32px;
    background: var(--purple);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: 0 4px 15px rgba(122, 31, 162, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .btn-contacto-modal:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(122, 31, 162, 0.4);
        background-color: var(--orange);
    }

/* Scrollbar personalizada para el modal */
.modal-container::-webkit-scrollbar {
    width: 8px;
}

.modal-container::-webkit-scrollbar-track {
    background: var(--bg-body);
    border-radius: 10px;
}

.modal-container::-webkit-scrollbar-thumb {
    background: var(--orange);
    border-radius: 10px;
}

    .modal-container::-webkit-scrollbar-thumb:hover {
        background: var(--purple);
    }

/* 8. RESPONSIVE DESIGN */
@media (max-width: 1200px) {
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 992px) {
    .modal-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
    }

    .modal-imagen {
        position: relative;
        top: 0;
    }

    .modal-titulo {
        font-size: 1.8rem;
    }

    .modal-specs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .productos-section {
        padding: 100px 15px 60px;
    }

    .section-header {
        margin-bottom: 60px;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .categoria-titulo {
        font-size: 2rem;
    }

    .categoria-descripcion {
        font-size: 1rem;
    }

    .categoria-subsection {
        margin-bottom: 70px;
    }

    .productos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .producto-card {
        padding: 24px;
    }

    .producto-card-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .btn-detalle {
        width: 100%;
    }

    .modal-overlay {
        padding: 10px;
    }

    .modal-container {
        max-height: 95vh;
    }

    .modal-content {
        padding: 24px;
        gap: 20px;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .modal-titulo {
        font-size: 1.5rem;
    }

    .modal-subtitulo {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }

    .categoria-titulo {
        font-size: 1.6rem;
    }

    .producto-card-titulo {
        font-size: 1.2rem;
    }
}
