/* ========================================
   ESTILOS TENIS NACIONALES - STAR DG
   ======================================== */

:root {
    /* Colores principales - Tonos Azul Professional */
    --primary: #264b69;
    --primary-dark: #1a3549;
    --primary-light: #3d7385;
    --background: #F8F9FA;
    --background-white: #FFFFFF;
    --foreground: #212121;
    --muted: #E9ECEF;
    --muted-foreground: #6C757D;
    --border: #DEE2E6;
    --card: #FFFFFF;
    --success: #10b981;
    --destructive: #EF4444;
    --accent-coral: #588ea7;  /* Azul medio */
    --accent-orange: #86bac1;  /* Azul claro/turquesa */
    --accent-lime: #a1c5ce;   /* Azul muy claro */
    --whatsapp: #25D366;
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ========================================
   HEADER
   ======================================== */

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--primary);
    box-shadow: 0 2px 10px rgba(26, 35, 126, 0.15);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
}

.nav-desktop {
    display: flex;
    gap: 1.5rem;
}

.nav-desktop a {
    color: #ffffff;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-desktop a:hover,
.nav-desktop a.active {
    color: var(--accent-lime);
}

.nav-desktop a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-lime);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    color: #ffffff;
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-icon span {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-coral);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 4rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></svg>') repeat;
    background-size: 50px 50px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    color: #ffffff;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    font-weight: 400;
}

/* ========================================
   PRODUCTOS SECTION
   ======================================== */

.productos-section {
    padding: 4rem 0;
    background-color: var(--background);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-coral), var(--accent-orange));
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

/* ========================================
   PRODUCTO CARD
   ======================================== */

.producto-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.producto-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.producto-imagen {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
    background-color: var(--muted);
}

.producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.producto-card:hover .producto-imagen img {
    transform: scale(1.05);
}

.producto-info {
    padding: 1.5rem;
}

.producto-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.producto-descripcion {
    color: var(--muted-foreground);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.producto-precio {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-orange);
    margin-bottom: 1rem;
}

.producto-acciones {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-carrito,
.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    width: 100%;
}

.btn-carrito {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #ffffff;
}

.btn-carrito:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    transform: scale(1.02);
}

.btn-whatsapp {
    background-color: var(--whatsapp);
    color: #ffffff;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: scale(1.02);
}

/* ========================================
   CARRITO FLOTANTE
   ======================================== */

.carrito-flotante {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--background-white);
    z-index: 200;
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
}

.carrito-flotante.active {
    right: 0;
}

.carrito-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--primary);
    color: #ffffff;
}

.carrito-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
}

.cerrar-carrito {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.cerrar-carrito:hover {
    transform: scale(1.2);
}

.carrito-items {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.carrito-vacio {
    text-align: center;
    color: var(--muted-foreground);
    padding: 2rem;
}

.carrito-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--muted);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.carrito-item-info h4 {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.carrito-item-info p {
    font-size: 0.85rem;
    color: var(--accent-orange);
    font-weight: 600;
}

.carrito-item-acciones {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-eliminar {
    background: var(--destructive);
    color: #ffffff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.btn-eliminar:hover {
    background: #DC2626;
}

.carrito-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--border);
    background: var(--background-white);
}

.carrito-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.btn-checkout {
    width: 100%;
    padding: 1rem;
    background: var(--whatsapp);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.3s;
}

.btn-checkout:hover {
    background: #128C7E;
}

/* ========================================
   OVERLAY
   ======================================== */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    background: var(--primary-dark);
    color: #ffffff;
    padding: 3rem 0 0;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--accent-lime);
}

.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    opacity: 0.9;
    transition: opacity 0.3s, color 0.3s;
}

.footer-section a:hover {
    opacity: 1;
    color: var(--accent-lime);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 1.25rem;
    transition: background 0.3s, transform 0.3s;
}

.social-links a:hover {
    background: var(--whatsapp);
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }

    .nav-desktop {
        display: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .carrito-flotante {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .productos-grid {
        grid-template-columns: 1fr;
    }

    .producto-imagen {
        height: 200px;
    }
}
