/* Variables CSS */
:root {
    --primary-color: #2c5aa0;
    --secondary-color: #ff6b35;
    --accent-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-light: #f8f9fa;
    --gray-medium: #6c757d;
    --gray-dark: #343a40;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Banner Promocional */
.promo-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 10px 0;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.promo-container {
    position: relative;
    height: 20px;
}

.promo-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(-20px);
    transition: var(--transition);
}

.promo-text.active {
    opacity: 1;
    transform: translateY(0);
}

/* Header */
.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Botones del Header */
.menu-toggle, .btn-search, .btn-account, .btn-cart {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--dark-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.menu-toggle:hover, .btn-search:hover, .btn-account:hover, .btn-cart:hover {
    background-color: var(--gray-light);
    color: var(--primary-color);
}

.btn-cart {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Navegación Desktop */
.desktop-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.desktop-nav a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 5px 0;
    position: relative;
}

.desktop-nav a:hover {
    color: var(--primary-color);
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.desktop-nav a:hover::after {
    width: 100%;
}

/* Barra de Búsqueda */
.search-bar {
    display: none;
    padding: 15px 0;
    border-top: 1px solid var(--gray-light);
}

.search-bar.active {
    display: flex;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary-color);
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--secondary-color);
}

/* Navegación Mobile */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 1001;
    overflow-y: auto;
}

.mobile-nav.active {
    left: 0;
}

.nav-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: flex-end;
}

.close-menu {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--dark-color);
    cursor: pointer;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-light);
}

.nav-link:hover {
    background: var(--gray-light);
    color: var(--primary-color);
}

.dropdown-menu {
    list-style: none;
    background: var(--gray-light);
    display: none;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px 12px 40px;
    text-decoration: none;
    color: var(--gray-dark);
    transition: var(--transition);
    border-bottom: 1px solid #ddd;
}

.dropdown-menu a:hover {
    background: #e9ecef;
    color: var(--primary-color);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #1e3a8a);
    color: white;
    padding: 60px 0;
}

.hero-slider {
    position: relative;
}

.slide {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.slide.active {
    display: flex;
}

.slide-content {
    flex: 1;
    max-width: 500px;
}

.slide-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.slide-image {
    flex: 1;
    text-align: center;
}

.slide-image img {
    max-width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

/* Botones */
.btn-primary, .btn-outline, .btn-checkout {
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

/* Galería */
.gallery-section {
    padding: 60px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 200px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Secciones Comunes */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Marcas */
.brands-section {
    padding: 60px 0;
    background: var(--gray-light);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
}

.brand-item {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.brand-item img {
    max-width: 100%;
    max-height: 60px;
    filter: grayscale(100%);
    transition: var(--transition);
}

.brand-item:hover img {
    filter: grayscale(0%);
}

/* Productos */
.featured-products, .offers-section {
    padding: 60px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--gray-medium);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.product-title {
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-prices {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.product-old-price {
    text-decoration: line-through;
    color: var(--gray-medium);
    font-size: 1rem;
}

.product-discount {
    background: var(--accent-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-add-cart {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-cart:hover {
    background: var(--secondary-color);
}

/* Categorías */
.categories-section {
    padding: 60px 0;
    background: var(--gray-light);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background: white;
    padding: 40px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 2rem;
}

.category-card h3 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.category-card p {
    color: var(--gray-medium);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--light-color);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

.footer-column a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #34495e;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer-bottom p {
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* Modal Carrito */
.cart-modal {
    position: fixed;
    top: 0;
    right: -100%;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 1002;
    display: flex;
    flex-direction: column;
}

.cart-modal.active {
    right: 0;
}

.cart-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--dark-color);
    cursor: pointer;
}

.cart-items {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.empty-cart {
    text-align: center;
    color: var(--gray-medium);
    padding: 40px 0;
}

.empty-cart i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-light);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--gray-medium);
    cursor: pointer;
    transition: var(--transition);
}

.cart-item-remove:hover {
    color: var(--secondary-color);
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-light);
}

.cart-total {
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.btn-checkout {
    width: 100%;
    background: var(--accent-color);
    color: white;
}

.btn-checkout:hover {
    background: #27ae60;
}

/* Responsive */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .header-actions {
        display: flex;
        gap: 10px;
    }

    .slide {
        flex-direction: column;
        text-align: center;
    }

    .slide-content h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .cart-modal {
        width: 100%;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .brands-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: none;
    }

    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}