@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --amarillo: #FCD116;
    --azul: #003893;
    --rojo: #CE1126;
    --negro: #1a1a1a;
    --gris: #f5f5f5;
    --blanco: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--gris);
    color: var(--negro);
}

/* HEADER */
header {
    background: linear-gradient(135deg, var(--azul) 0%, #001a4d 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: var(--amarillo);
    color: var(--azul);
    text-align: center;
    padding: 6px;
    font-weight: 700;
    font-size: 0.8rem;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: var(--amarillo);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    overflow: hidden;
    position: relative;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.logo-emoji {
    font-size: 2.2rem;
}

.logo-text h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--amarillo);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-btn {
    background: var(--amarillo);
    color: var(--azul);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    position: relative;
}

.cart-count {
    background: var(--rojo);
    color: white;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 0.8rem;
    margin-left: 5px;
}

.admin-link {
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.admin-link:hover {
    opacity: 1;
}

/* HERO */
.hero {
    background: linear-gradient(135deg, var(--azul), var(--rojo));
    padding: 60px 40px;
    text-align: center;
    color: white;
}

.hero h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* NAV TABS */
.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: white;
    flex-wrap: wrap;
}

.nav-tab {
    padding: 10px 25px;
    border: 2px solid var(--azul);
    border-radius: 25px;
    background: white;
    color: var(--azul);
    font-weight: 700;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s;
}

.nav-tab:hover, .nav-tab.active {
    background: var(--azul);
    color: white;
}

/* PRODUCTS */
.section-title {
    text-align: center;
    padding: 40px 20px 20px;
}

.section-title h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    color: var(--azul);
}

.line {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--amarillo), var(--rojo));
    margin: 10px auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 30px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--rojo);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

/* DESCUENTO */
.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--rojo);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.price-current {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--azul);
}

.price-original {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.discount-percent {
    background: var(--rojo);
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* SELECTOR DE TALLAS */
.size-selector {
    margin-bottom: 15px;
}

.size-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    display: block;
}

.size-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.size-option {
    padding: 6px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    background: white;
    min-width: 45px;
    text-align: center;
}

.size-option:hover {
    border-color: var(--azul);
}

.size-option.selected {
    background: var(--azul);
    color: white;
    border-color: var(--azul);
}

.size-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f0f0f0;
}

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--rojo);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.product-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    margin: 8px 0;
}

.product-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 12px;
}

.product-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--azul);
    margin-bottom: 15px;
}

.add-to-cart {
    width: 100%;
    padding: 12px;
    background: var(--azul);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s;
}

.add-to-cart:hover {
    background: var(--rojo);
}

/* CART SIDEBAR */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
}

.cart-overlay.active {
    display: block;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    max-width: 90vw;
    height: 100%;
    background: white;
    z-index: 2001;
    transition: right 0.3s;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    background: var(--azul);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--gris);
    border-radius: 10px;
    margin-bottom: 10px;
}

.cart-item-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: white;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 700;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--azul);
    font-weight: 800;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 5px;
}

.remove-item {
    background: none;
    border: none;
    color: var(--rojo);
    cursor: pointer;
    font-size: 1.2rem;
}

.cart-footer {
    padding: 20px;
    border-top: 2px solid var(--gris);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.cart-summary-row.total {
    border-top: 2px solid var(--gris);
    margin-top: 10px;
    padding-top: 15px;
    font-size: 1.2rem;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    color: var(--azul);
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: var(--rojo);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    margin-top: 15px;
    font-family: 'Montserrat', sans-serif;
}

/* CHECKOUT MODAL */
.checkout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.checkout-overlay.active {
    display: flex;
}

.checkout-modal {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.checkout-header {
    padding: 25px;
    background: var(--azul);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.close-checkout {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.checkout-body {
    padding: 25px;
}

.order-summary-checkout {
    background: var(--gris);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.form-section {
    margin-bottom: 25px;
}

.form-section h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--azul);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gris);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.payment-option {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-option:hover,
.payment-option.selected {
    border-color: var(--azul);
    background: rgba(0, 56, 147, 0.05);
}

.payment-option .pay-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.payment-option .pay-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.payment-option .pay-info h4 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.payment-option .pay-info p {
    font-size: 0.8rem;
    color: #888;
}

.pay-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--azul), var(--rojo));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    margin-top: 20px;
    font-family: 'Montserrat', sans-serif;
}

/* SUCCESS MODAL */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 4000;
    display: none;
    align-items: center;
    justify-content: center;
}

.success-overlay.active {
    display: flex;
}

.success-modal {
    background: white;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.success-modal h2 {
    color: var(--azul);
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
}

.success-close-btn {
    padding: 12px 30px;
    background: var(--azul);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
}

/* NOTIFICATION */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--azul);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    z-index: 5000;
    transform: translateX(150%);
    transition: transform 0.3s;
    font-weight: 600;
}

.notification.show {
    transform: translateX(0);
}

/* WHATSAPP FLOTANTE */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s;
    animation: pulse-whatsapp 2s infinite;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

@keyframes pulse-whatsapp {
    0%, 100% { box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 6px 30px rgba(37, 211, 102, 0.7); }
}

.whatsapp-icon {
    position: absolute;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-ball {
    position: absolute;
    bottom: -5px;
    right: -5px;
    font-size: 1.5rem;
    background: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    line-height: 1;
}

/* FOOTER */
footer {
    background: var(--negro);
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 50px;
}

footer a {
    color: var(--amarillo);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .header-main {
        padding: 10px 15px;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .products-grid {
        padding: 20px 15px;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
    }
    
    .whatsapp-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .whatsapp-ball {
        font-size: 1.2rem;
        width: 24px;
        height: 24px;
    }
}