/* 🎨 ESQUEMA DE COLORES NEUTRO (NO CHOCA CON LOGO PÚRPURA) */
:root {
    --primary-color: #1a1a1a;
    /* Negro suave */
    --secondary-color: #4a4a4a;
    /* Gris medio */
    --accent-color: #28a745;
    /* Verde para disponible */
    --price-color: #dc3545;
    /* Rojo para precios */
    --text-color: #212529;
    /* Texto principal */
    --text-muted: #6c757d;
    /* Texto secundario */
    --bg-color: #f8f9fa;
    /* Fondo suave */
    --border-color: #dee2e6;
    /* Bordes */
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Estilos personalizados adicionales */
.product-card {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    overflow: hidden;
    background-color: #ffffff;
    /* Para que el borde redondeado se aplique bien */
}

.main-product-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    /* Altura máxima para la imagen principal */
    object-fit: contain;
    /* Mantiene la proporción sin cortar la imagen */
    border-bottom: 1px solid #eee;
}

.thumbnail-gallery {
    display: flex;
    gap: 0.5rem;
    /* Espacio entre miniaturas */
    padding: 0.75rem;
    overflow-x: auto;
    /* Permite scroll horizontal si hay muchas imágenes */
}

.thumbnail-gallery img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 0.25rem;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.thumbnail-gallery img:hover,
.thumbnail-gallery img.active {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.product-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.3;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--price-color);
    margin-bottom: 1rem;
}

.product-description {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.6;
}

.product-specs {
    list-style-type: none;
    padding-left: 0;
    font-size: 0.9rem;
}

.product-specs li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-specs li strong {
    color: var(--primary-color);
    min-width: 120px;
}

.spec-value {
    color: var(--secondary-color);
}

.product-specs li:last-child {
    border-bottom: none;
}

/* Estilos para el header sticky */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.75rem 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo {
    height: 75px;
    width: auto;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

#homeLogo {
    text-decoration: none;
    display: inline-block;
}

.logo-link {
    text-decoration: none;
    display: inline-block;
}

.sticky-header .logo {
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.sticky-header .logo:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    background: #128C7E;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.whatsapp-icon {
    width: 20px;
    height: 20px;
}

/* Botón de WhatsApp para productos individuales */
.whatsapp-product-btn {
    background: #25D366;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3);
    width: 100%;
    justify-content: center;
}

.whatsapp-product-btn:hover {
    background: #128C7E;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
    text-decoration: none;
}

.whatsapp-product-btn .whatsapp-icon {
    width: 22px;
    height: 22px;
}

/* Header con logo */
.header-section {
    background: linear-gradient(135deg, #ffffff 0%, var(--bg-color) 100%);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.logo-container img {
    max-height: 80px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-container img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.site-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.site-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

/* Estilos del Buscador */
.search-container {
    margin-top: 1.5rem;
    text-align: center;
}

.search-input {
    width: 100%;
    max-width: 500px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Estilos para productos filtrados */
.product-card.hidden {
    display: none !important;
}

.product-card.visible {
    display: block !important;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contador de resultados */
.search-results-count {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
}

/* Estilos de Paginación Modernos */
.pagination-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

/* Paginación moderna con Bootstrap */
.pagination-modern {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 15px;
    padding: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.1),
        0 4px 10px rgba(0, 0, 0, 0.05);
}

.pagination-modern .page-item {
    margin: 0 2px;
}

.page-link-modern {
    border: none !important;
    border-radius: 12px !important;
    padding: 0.75rem 1rem !important;
    font-weight: 500 !important;
    color: var(--primary-color) !important;
    background: transparent !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    min-width: 45px !important;
    justify-content: center !important;
    position: relative !important;
    overflow: hidden !important;
}

.page-link-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.page-link-modern:hover::before {
    left: 100%;
}

.page-link-modern:hover {
    color: white !important;
    background: linear-gradient(135deg, var(--accent-color), #20c997) !important;
    transform: translateY(-2px) !important;
    box-shadow:
        0 8px 25px rgba(40, 167, 69, 0.3),
        0 4px 10px rgba(40, 167, 69, 0.2) !important;
}

.page-item.active .page-link-modern {
    color: white !important;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    box-shadow:
        0 6px 20px rgba(26, 26, 26, 0.3),
        0 3px 8px rgba(26, 26, 26, 0.2) !important;
    transform: scale(1.05) !important;
}

.page-item.disabled .page-link-modern {
    color: var(--text-muted) !important;
    background: rgba(108, 117, 125, 0.1) !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.page-item.disabled .page-link-modern:hover {
    transform: none !important;
    box-shadow: none !important;
    background: rgba(108, 117, 125, 0.1) !important;
}

/* Iconos de paginación */
.pagination-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.page-link-modern:hover .pagination-icon {
    transform: scale(1.1);
}

/* Información de paginación moderna */
.pagination-info-modern {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 25px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

/* Estilos de Paginación Legacy (mantenidos para compatibilidad) */
.pagination-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pagination-btn.active {
    background: var(--accent-color);
    font-weight: bold;
}

.pagination-btn.disabled {
    background: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 1rem;
}

/* Responsive para paginación */
@media (max-width: 576px) {
    .pagination-modern {
        padding: 0.25rem;
        border-radius: 12px;
    }

    .page-link-modern {
        padding: 0.5rem 0.75rem !important;
        min-width: 40px !important;
        font-size: 0.9rem !important;
    }

    .pagination-icon {
        width: 16px;
        height: 16px;
    }

    .pagination-info-modern {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

/* Ajustar el margen del contenido principal para el header sticky */
body {
    padding-top: 70px;
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 0.5rem;
    }

    .logo {
        height: 35px;
    }

    .whatsapp-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}