/* ===== Variables y Reset ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --accent: #f59e0b;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --gray: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    background: var(--white);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-heading {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.section-tag {
    display: inline-block;
    background: #dbeafe;
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.section-heading h2 {
    font-size: 2.2rem;
    color: var(--dark);
    margin-bottom: 15px;
}

.section-heading p {
    color: var(--gray);
}

/* ===== Navegación ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: background 0.3s, box-shadow 0.3s;
}

.header.scrolled {
    background: var(--white);
    box-shadow: var(--shadow);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.header.scrolled .logo {
    color: var(--dark);
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 10px;
    font-size: 1.3rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s, opacity 0.3s;
}

.header.scrolled .nav-menu a {
    color: var(--dark);
}

.nav-menu a:hover {
    color: var(--accent);
}

.btn-nav {
    background: var(--primary);
    padding: 10px 22px;
    border-radius: 30px;
    color: var(--white) !important;
}

.btn-nav:hover {
    background: var(--primary-dark) !important;
    color: var(--white) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: 0.3s;
}

.header.scrolled .nav-toggle span {
    background: var(--dark);
}

/* ===== Hero ===== */
.hero {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    display: flex;
    align-items: center;
    position: relative;
}

.hero-overlay {
    width: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08), transparent 50%);
}

.hero-content {
    padding: 120px 20px 60px;
    color: var(--white);
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-bottom: 35px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ===== Botones ===== */
.btn {
    display: inline-block;
    padding: 13px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: 'Poppins', sans-serif;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--accent);
    color: var(--dark);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
}

.btn-primary:hover {
    background: #e08e00;
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
    border-color: var(--white);
    background: rgba(255,255,255,0.1);
}

.btn-full {
    width: 100%;
}

/* ===== Sección Nosotros ===== */
.about {
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.about-card {
    background: var(--light);
    padding: 35px;
    border-radius: var(--radius);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.about-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.about-card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.about-card h3 {
    color: var(--dark);
    margin-bottom: 12px;
}

.about-card p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* ===== Estadísticas ===== */
.stats {
    background: var(--dark);
    padding: 60px 0;
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 1rem;
    opacity: 0.85;
}

/* ===== Catálogo ===== */
.catalog {
    background: var(--light);
}

.catalog-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 24px;
    border-radius: 30px;
    border: 2px solid #cbd5e1;
    background: var(--white);
    color: var(--gray);
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Poppins', sans-serif;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.product-card.hidden {
    display: none;
}

.product-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
}

.product-image.tech {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.product-image.home {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
}

.product-image.sports {
    background: linear-gradient(135deg, #10b981, #22d3ee);
}

.badge-sale {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ef4444;
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-info h3 {
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.product-info p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
    flex: 1;
}

.product-bottom {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 15px;
}

.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.price-old {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 0.9rem;
}

.btn-product {
    background: var(--dark);
    color: var(--white);
    text-align: center;
    font-size: 0.9rem;
    padding: 11px 20px;
}

.btn-product:hover {
    background: var(--primary);
}

/* ===== Testimonios ===== */
.testimonials {
    background: var(--white);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background: var(--light);
    border-radius: var(--radius);
    padding: 30px;
    position: relative;
}

.stars {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.testimonial-card p {
    color: var(--dark-2);
    font-style: italic;
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.testimonial-author small {
    color: var(--gray);
}

/* ===== Contacto ===== */
.contact {
    background: var(--light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
}

.contact-info h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 15px;
}

.contact-info > p {
    color: var(--gray);
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-icon {
    font-size: 1.5rem;
    background: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.contact-item strong {
    color: var(--dark);
}

.contact-item p {
    color: var(--gray);
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s;
    background: var(--white);
    color: var(--dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group input.invalid,
.form-group textarea.invalid,
.form-group select.invalid {
    border-color: #ef4444;
}

.error-msg {
    color: #ef4444;
    font-size: 0.8rem;
    display: block;
    margin-top: 5px;
    min-height: 15px;
}

.form-success {
    background: #dcfce7;
    color: #166534;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 500;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #334155;
}

.logo-footer {
    color: var(--white) !important;
    margin-bottom: 15px;
}

.footer-brand > p {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-contact p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* ===== Carrito ===== */
.cart-fab {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: 1.6rem;
    border: none;
    box-shadow: var(--shadow);
    cursor: pointer;
    z-index: 999;
    transition: transform 0.2s, background 0.2s;
}

.cart-fab:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.cart-fab span {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent);
    color: var(--dark);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-modal {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 30px rgba(0,0,0,0.2);
    z-index: 1002;
    padding: 30px;
    transition: right 0.3s;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.cart-modal.open {
    right: 0;
}

.cart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

.cart-items {
    list-style: none;
    flex: 1;
}

.cart-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.cart-items li button {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
}

.cart-empty {
    color: var(--gray);
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .about-grid,
    .catalog-grid,
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    .section-heading h2 {
        font-size: 1.8rem;
    }
    .hero h1 {
        font-size: 2.2rem;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 80px 30px;
        gap: 20px;
        transition: right 0.3s;
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-menu a {
        color: var(--dark) !important;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
        background: var(--dark);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
        background: var(--dark);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .about-grid,
    .catalog-grid,
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}