/* ===========================================
   ZACX - Tienda Online
   Estilos principales (con imágenes adaptativas)
   =========================================== */

/* Variables CSS y Reset */
:root {
    --primary-black: #000000;
    --primary-gold: #D4AF37;
    --gold-light: #E6C158;
    --gold-dark: #CDAA00;
    --white: #FFFFFF;
    --gray-light: #F5F5F5;
    --gray-medium: #E0E0E0;
    --gray-dark: #333333;
    --gray-darker: #1A1A1A;
    --success: #28A745;
    --danger: #DC3545;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --transition: all 0.3s ease;
    --header-height: 80px;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--white);
    background-color: var(--primary-black);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-gold);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--gold-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-gold);
    color: var(--primary-black);
}

.btn-primary:hover {
    background-color: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 1px solid var(--gray-medium);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-gold);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-gold);
    border: 1px solid var(--primary-gold);
}

.btn-outline:hover {
    background-color: var(--primary-gold);
    color: var(--primary-black);
}

/* Encabezado */
.header {
    background-color: var(--primary-black);
    border-bottom: 1px solid var(--gray-darker);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    border-radius: var(--radius);
    object-fit: cover;
}

.store-name {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-gold), var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
}

.nav {
    display: flex;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--white);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-gold);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-gold);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-container {
    display: flex;
    position: relative;
    width: 250px;
}

.search-input {
    width: 100%;
    padding: 10px 16px;
    padding-right: 40px;
    background-color: var(--gray-darker);
    border: 1px solid var(--gray-dark);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-gold);
}

.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 40px;
    background: none;
    border: none;
    color: var(--gray-medium);
    cursor: pointer;
}

.cart-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.3rem;
    position: relative;
    cursor: pointer;
    padding: 8px;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--primary-gold);
    color: var(--primary-black);
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Carrito de Compras */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background-color: var(--gray-darker);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s ease;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-title {
    font-size: 1.5rem;
    margin: 0;
    color: var(--primary-gold);
}

.close-cart {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 5px;
}

.cart-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart-message {
    text-align: center;
    color: var(--gray-medium);
    font-style: italic;
    padding: 2rem 0;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-dark);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary-gold);
    font-weight: 600;
    margin-bottom: 10px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background-color: var(--gray-dark);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
}

.quantity-btn:hover {
    background-color: var(--primary-gold);
    color: var(--primary-black);
}

.item-quantity {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.remove-item {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    margin-left: auto;
    padding: 5px;
}

.cart-summary {
    padding: 20px;
    border-top: 1px solid var(--gray-dark);
    background-color: rgba(0, 0, 0, 0.5);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.subtotal {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-gold);
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

/* Contenido Principal */
.main {
    padding: 40px 0;
}

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)), 
                url('img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
    padding: 80px 40px;
    margin-bottom: 60px;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary-gold), var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--gray-light);
}

.btn-hero {
    font-size: 1.1rem;
    padding: 15px 30px;
}

/* Filtros */
.filters-section {
    margin-bottom: 40px;
}

.section-title {
    margin-bottom: 0.5rem;
    color: var(--primary-gold);
}

.section-subtitle {
    color: var(--gray-medium);
    margin-bottom: 2rem;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-end;
    background-color: var(--gray-darker);
    padding: 25px;
    border-radius: var(--radius);
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--white);
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    background-color: var(--gray-dark);
    border-radius: var(--radius);
    transition: var(--transition);
}

.filter-label:hover {
    background-color: var(--primary-gold);
    color: var(--primary-black);
}

.filter-checkbox:checked + .filter-text {
    color: var(--primary-gold);
    font-weight: 600;
}

.filter-text {
    user-select: none;
}

.sort-select {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--gray-dark);
    border: 1px solid var(--gray-darker);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 1rem;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-gold);
}

/* CARRUSEL DE IMÁGENES - VERSIÓN MEJORADA */
.product-carousel {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: var(--gray-dark);
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: var(--gray-darker);
    padding: 10px;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 10;
}

.carousel-btn {
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.carousel-btn:hover {
    background-color: var(--primary-gold);
    color: var(--primary-black);
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.carousel-dot.active {
    background-color: var(--primary-gold);
    transform: scale(1.2);
}

.carousel-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
}

/* IMÁGENES ÚNICAS - VERSIÓN MEJORADA */
.product-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background-color: var(--gray-dark);
    padding: 15px;
    display: block;
}

/* Grid de Productos */
.products-section {
    margin-bottom: 60px;
}

.results-info {
    margin-bottom: 20px;
    color: var(--gray-medium);
    font-style: italic;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background-color: var(--gray-darker);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--white);
}

.product-category {
    display: inline-block;
    background-color: var(--gray-dark);
    color: var(--primary-gold);
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.product-description {
    color: var(--gray-medium);
    margin-bottom: 15px;
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-gold);
    margin-bottom: 20px;
}

.add-to-cart-btn {
    width: 100%;
    margin-top: auto;
    padding: 12px;
    font-size: 0.95rem;
}

/* Productos destacados */
.product-card.destacado {
    border: 2px solid var(--primary-gold);
}

.product-card.destacado::before {
    content: '🌟 DESTACADO';
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-gold);
    color: var(--primary-black);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 10;
}

.bundle-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #FF4081;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 10;
}

/* No resultados */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-medium);
}

.no-results i {
    margin-bottom: 20px;
    color: var(--gray-dark);
    font-size: 3rem;
}

.no-results h3 {
    color: var(--white);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

/* Pie de Página */
.footer {
    background-color: var(--gray-darker);
    padding: 60px 0 30px;
    border-top: 1px solid var(--gray-dark);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-gold);
}

.footer-text {
    color: var(--gray-medium);
    margin-bottom: 20px;
    line-height: 1.6;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--gray-medium);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--gray-medium);
    transition: var(--transition);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-gold);
    transform: translateX(5px);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--gray-dark);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-gold);
    color: var(--primary-black);
    transform: translateY(-3px);
}

/* Notificación de carrito */
.cart-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background-color: var(--success);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Responsive Design */
@media (max-width: 992px) {
    .nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--primary-black);
        padding: 20px;
        border-top: 1px solid var(--gray-darker);
        box-shadow: var(--shadow);
        z-index: 99;
    }
    
    .nav.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-link {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid var(--gray-darker);
        font-size: 1.1rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .search-container {
        width: 200px;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 20px;
    }
    
    .product-carousel,
    .product-image {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .search-container {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .hero {
        padding: 60px 20px;
        margin-bottom: 40px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .product-carousel,
    .product-image {
        height: 200px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .header {
        height: 70px;
    }
    
    .store-name {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .product-carousel,
    .product-image {
        height: 180px;
    }
    
    .cart-item-image {
        width: 60px;
        height: 60px;
    }
    
    .cart-sidebar {
        width: 100%;
    }
}

/* Accesibilidad: focus visible */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-gold);
    outline-offset: 3px;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    animation: fadeIn 0.5s ease;
}