/* Estilos adicionales para el catálogo dinámico */

/* Filtros de categoría */
.catalogo-filtros {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0 3rem;
    padding: 0 1rem;
}

.filtro-btn {
    background: var(--white);
    border: 2px solid var(--secondary-color);
    color: var(--text-dark);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filtro-btn:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(238, 201, 45, 0.4);
}

.filtro-btn.active {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(207, 129, 44, 0.4);
}

/* Badge destacado */
.producto-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary-color);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.producto-card {
    position: relative;
}

/* Precio del producto */
.producto-precio {
    text-align: center;
    margin: 1rem 0;
    padding: 0.75rem;
    background: var(--light-bg);
    border-radius: var(--border-radius);
}

.precio-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.precio-valor {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1.2;
}

.precio-nota {
    display: inline;
    font-size: 0.75rem;
    color: var(--text-light);
    font-style: italic;
    font-weight: 400;
    margin-left: 0.35rem;
}

/* Nota de precios */
.nota-precios {
    background: #fffef0;
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    margin-top: 3rem;
    border-radius: var(--border-radius);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.nota-precios i {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-top: 0.15rem;
}

.nota-precios p {
    margin: 0;
    color: var(--text-dark);
    line-height: 1.5;
    font-size: 0.8rem;
}

/* Modal de producto */
.producto-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

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

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

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

.producto-modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

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

.modal-header {
    background: linear-gradient(135deg, var(--secondary-color), #b86e25);
    color: var(--white);
    padding: 2rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.modal-imagen {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.modal-imagen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-info {
    flex: 1;
}

.modal-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    flex: 1;
}

.btn-cotizar-header {
    white-space: nowrap;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

.modal-precio {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.modal-precio .precio-valor {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
}

.modal-precio .precio-nota {
    font-size: 0.9rem;
    opacity: 0.8;
}

.modal-body {
    padding: 2rem;
}

.modal-descripcion {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.modal-body h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.modal-especificaciones {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.modal-especificaciones li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--light-bg);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    line-height: 1.4;
}

.modal-especificaciones i {
    color: var(--secondary-color);
    font-size: 1rem;
    margin-top: 0.2rem;
}

/* Modal footer eliminado - botón de cotización movido al header */

/* Responsive */
@media (max-width: 768px) {
    .catalogo-filtros {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        padding: 0 1rem;
    }
    
    .filtro-btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .modal-content {
        max-height: 95vh;
        margin: 0.5rem;
    }
    
    .modal-header {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-title-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .btn-cotizar-header {
        width: 100%;
    }
    
    .modal-precio {
        justify-content: center;
    }
    
    .modal-especificaciones {
        grid-template-columns: 1fr;
    }
    
    .producto-precio {
        padding: 0.75rem;
    }
    
    .precio-valor {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .btn-cotizar-header {
        width: 100%;
        justify-content: center;
    }
    
    .nota-precios {
        flex-direction: column;
        padding: 1rem;
    }
}

/* Animación para productos cargando */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.producto-card.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Estilos para imagen clickeable */
.imagen-clickeable {
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
}

.imagen-clickeable:hover {
    transform: scale(1.05);
}

.imagen-zoom-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(38, 49, 70, 0.8);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.imagen-clickeable:hover .imagen-zoom-hint {
    opacity: 1;
}

/* Lightbox para imagen completa */
.imagen-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 2rem;
}

.imagen-lightbox.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.lightbox-contenido,
.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.lightbox-contenido img,
.lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: block;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid white;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    z-index: 100001;
}

.lightbox-close:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: rotate(90deg);
    border-color: var(--secondary-color);
}

.lightbox-caption {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    margin-top: 1rem;
    max-width: 90%;
}

/* Responsive para lightbox */
@media (max-width: 768px) {
    .imagen-lightbox {
        padding: 1rem;
    }
    
    .lightbox-contenido img,
    .lightbox-content img {
        max-height: 70vh;
    }
    
    .lightbox-close {
        top: -40px;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .lightbox-caption {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
}

/* Estilos para galería de imágenes en modal */
.modal-galeria {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-galeria .modal-imagen {
    margin: 0 auto;
}

/* Indicadores en las tarjetas de productos */
.producto-imagen-container {
    position: relative;
}

.card-galeria-indicadores {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.card-indicador {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(38, 49, 70, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.card-indicador.active {
    background: var(--secondary-color);
    width: 10px;
    height: 10px;
}

.card-indicador:hover {
    background: var(--primary-color);
    transform: scale(1.2);
}

.galeria-indicadores {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.indicador {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicador.active {
    background: var(--primary-color);
    width: 12px;
    height: 12px;
}

.indicador:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Responsive para galería */
@media (max-width: 768px) {
    .card-galeria-indicadores {
        gap: 0.4rem;
    }
    
    .card-indicador {
        width: 7px;
        height: 7px;
    }
    
    .card-indicador.active {
        width: 9px;
        height: 9px;
    }
}

