
/* 🔹 RESET Y CONFIGURACIÓN GLOBAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', 'Open Sans', Arial, sans-serif;
    line-height: 1.6;
    color:  #801C39;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* container principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* cabeza y navegacion */
.header {
    background: linear-gradient(135deg, #801C39 0%, #801C39 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}

/* busqueda */
.search-bar {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #801C39;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #801C39;
    transform: translateY(-50%) scale(1.05);
}

.search-icon {
    width: 16px;
    height: 16px;
}

/* sugerencias de busqueda */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
}

.search-suggestion {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-suggestion:hover {
    background: #f8f9fa;
}

.search-suggestion:last-child {
    border-bottom: none;
}

.suggestion-type {
    font-size: 0.8rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

/* botoncito volver al catalogo */
.back-to-catalog {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #801C39;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.back-to-catalog:hover {
    background: #801C39;
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.back-icon {
    width: 16px;
    height: 16px;
}

/* menu de categorias */
.categories-nav {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
    position: sticky;
    top: 72px;
    z-index: 999;
}

.categories-list {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.category-btn {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.9rem;
    color: #495057;
}

.category-btn:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.category-btn.active {
    background: #801C39;
    color: white;
    border-color: #801C39;
}

/* layout p`rincipal*/
.main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* botoncitos */
.btn-primary {
    background: #801C39;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary:hover {
    background: #801C39;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 85, 48, 0.3);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    color: #801C39;
    border: 1px solid #801C39;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: #801C39;
    color: white;
    transform: translateY(-2px);
}

/* seccion de los productos */
.products-section {
    width: 100%;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #801C39;
    margin: 0;
}

.products-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.products-count {
    color: #6c757d;
    font-size: 0.9rem;
}

.view-options {
    display: flex;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.25rem;
    border-radius: 8px;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-btn img {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.view-btn.active img {
    opacity: 1;
}

/* grid de productos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #f8f9fa;
    padding: 1rem;
}

.product-info {
    padding: 1.25rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #801C39;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-category {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: capitalize;
    margin-bottom: 0.75rem;
}

.product-specs {
    font-size: 0.85rem;
    color: #495057;
    line-height: 1.4;
}

.product-specs small {
    display: block;
    margin-bottom: 0.25rem;
}

/* paginacion */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-btn {
    background: white;
    border: 1px solid #e9ecef;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #801C39;
    color: #801C39;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-number {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.page-number.active {
    background: #801C39;
    color: white;
    border-color: #801C39;
}

.page-number:hover:not(.active) {
    background: #f8f9fa;
    border-color: #801C39;
}

/* estados especiales */
.loading {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #801C39;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.no-results-img {
    width: 100px;
    height: 100px;
    opacity: 0.5;
    margin-bottom: 1rem;
}

/* footer */
.footer {
    background: #801C39;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #fff;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* utilidades */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.p-2 { padding: 2rem; }

/* menu basico boton */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 3px;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 20px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

/* accesibilidad mejoras */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* estilos para marcadores de busqueda*/
mark {
    background: #fff3cd;
    color: #856404;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
}

/* 🔹 VISTA DE LISTA */
.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.products-grid.list-view .product-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.products-grid.list-view .product-image {
    height: 150px;
    width: 100%;
    object-fit: contain;
}

.products-grid.list-view .product-info {
    padding: 1rem 1rem 1rem 0;
}

.products-grid.list-view .product-name {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.products-grid.list-view .product-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.products-grid.list-view .product-specs small {
    display: block;
    margin-bottom: 0.25rem;
}

/* Responsive para vista lista */
@media (max-width: 768px) {
    .products-grid.list-view .product-card {
        grid-template-columns: 120px 1fr;
        gap: 1rem;
    }
    
    .products-grid.list-view .product-image {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .products-grid.list-view .product-card {
        grid-template-columns: 100px 1fr;
        gap: 0.75rem;
    }
    
    .products-grid.list-view .product-image {
        height: 100px;
    }
    
    .products-grid.list-view .product-name {
        font-size: 1rem;
    }
}

/* 🔹 REDES SOCIALES */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
    text-decoration: none;
}

.social-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* Responsive para redes sociales */
@media (max-width: 768px) {
    .social-links {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
    }
    
    .social-link {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 0.75rem;
    }
    
    .social-link span {
        display: block;
        font-size: 0.8rem;
    }
    
    .social-icon {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .social-links {
        gap: 1rem;
    }
    
    .social-link {
        padding: 0.5rem;
    }
    
    .social-icon {
        width: 20px;
        height: 20px;
    }
}