/* ===== VARIABLES CSS ===== */
:root {
    --primary-orange: #ff6b35;
    --primary-blue: #3b82f6;
    --primary-yellow: #fbbf24;
    --primary-red: #ef4444;
    --secondary-orange: #ea580c;
    --secondary-blue: #1d4ed8;
    --accent-yellow: #f59e0b;
    --white: #ffffff;
    --light-gray: #f8fafc;
    --dark-gray: #1e293b;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s ease;
}

/* ===== RESET Y ESTILOS BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #B0E0E6 50%, #E0F6FF 100%);
    color: var(--dark-gray);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== LAYOUT PRINCIPAL ===== */
.container {
    display: flex;
    min-height: 100vh;
}



/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary-orange) 0%, var(--secondary-orange) 100%);
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.sidebar-header {
    text-align: center;
    padding: 0 1.5rem 2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
}

.logo {
    margin-bottom: 1rem;
    text-align: center;
}

.logo img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
}

.slogan {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
}

/* ===== NAVEGACIÓN ===== */
.nav-section {
    margin-bottom: 2rem;
}

.nav-title {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 1.5rem 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.nav-link.active {
    background: var(--primary-yellow);
    color: var(--dark-gray);
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--white);
}

.nav-icon {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

/* ===== CONTENIDO PRINCIPAL ===== */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--secondary-orange) 100%);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0;
    margin-bottom: 0;
}



/* ===== HEADER PRINCIPAL (ESTILO AMAZON) ===== */
.main-header {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.header-left h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.header-left p {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 500px;
    line-height: 1.6;
}

.header-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 180px;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.header-btn.cart {
    background: var(--primary-yellow);
    color: var(--dark-gray);
    border-color: var(--primary-yellow);
}

.header-btn.cart:hover {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
    transform: translateY(-2px);
}

.header-btn.login {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.header-btn.login:hover {
    background: var(--primary-orange);
    color: var(--white);
    border-color: var(--primary-orange);
    transform: translateY(-2px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--dark-gray);
    font-weight: 600;
    font-size: 1rem;
}

.header-btn.logout {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
}

.header-btn.logout:hover {
    background: var(--secondary-orange);
    color: var(--white);
    border-color: var(--secondary-orange);
    transform: translateY(-2px);
}

.quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
    padding: 1rem 2.2rem;
    margin: 0 0.5rem 0.5rem 0;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    outline: none;
    position: relative;
}

.quick-btn i, .quick-btn svg {
    font-size: 1.5em;
    vertical-align: middle;
}

.quick-btn.cart {
    background: var(--primary-yellow);
    color: var(--dark-gray);
    box-shadow: 0 6px 24px rgba(251,191,36,0.18);
    border: 2px solid var(--primary-yellow);
}
.quick-btn.cart:hover {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 32px rgba(239,68,68,0.18);
}

.quick-btn.login {
    background: var(--primary-blue);
    color: var(--white);
    border: 2px solid var(--primary-blue);
}
.quick-btn.login:hover {
    background: var(--primary-orange);
    color: var(--white);
    border-color: var(--primary-orange);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 32px rgba(255,107,53,0.18);
}

.quick-btn.register {
    background: var(--primary-orange);
    color: var(--white);
    border: 2px solid var(--primary-orange);
}
.quick-btn.register:hover {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 32px rgba(59,130,246,0.18);
}

.quick-btn.logout {
    background: var(--primary-red);
    color: var(--white);
    border: 2px solid var(--primary-red);
}

.quick-btn.logout:hover {
    background: var(--secondary-orange);
    color: var(--white);
    border-color: var(--secondary-orange);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 32px rgba(234,88,12,0.18);
}

/* Animación del carrito */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.cart-image-container img {
    transition: transform 0.3s ease;
}

.cart-image-container img:hover {
    transform: scale(1.1) rotate(5deg);
}

.quick-btn:not(:last-child)::after {
    content: '';
    display: block;
    position: absolute;
    right: -1rem;
    top: 25%;
    height: 50%;
    width: 2px;
    background: #e0e0e0;
    border-radius: 2px;
}

/* ===== HEADER ===== */
.header {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.header p {
    font-size: 1.2rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}



/* ===== CATEGORÍAS ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.category-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 3px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-orange);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.category-description {
    color: #64748b;
    margin-bottom: 1rem;
}

.category-count {
    background: var(--primary-yellow);
    color: var(--dark-gray);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
}

/* ===== PRODUCTOS ===== */
.products-section {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 2rem;
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-orange);
}

.product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Estilos para la galería de productos */
.product-gallery {
    position: relative;
}

.main-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-image img:hover {
    transform: scale(1.05);
}

.thumbnails {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0 0 8px 8px;
}

.thumb {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.thumb.active {
    border-color: var(--primary-orange);
    transform: scale(1.1);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb i {
    color: #6c757d;
    font-size: 14px;
}

.video-thumb {
    background: var(--primary-orange);
}

.video-thumb i {
    color: white;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-red);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-content {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.product-description {
    color: #64748b;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.product-specs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.spec-item {
    text-align: center;
}

.spec-label {
    color: #64748b;
    font-size: 0.8rem;
}

.spec-value {
    font-weight: 600;
    color: var(--dark-gray);
}

.product-pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
}

.price-item {
    text-align: center;
}

.price-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.price-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-orange);
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-orange);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-orange);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--secondary-blue);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-orange);
    border: 2px solid var(--primary-orange);
}

.btn-outline:hover {
    background: var(--primary-orange);
    color: var(--white);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: var(--transition);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .main-header {
        padding: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .header-left h1 {
        font-size: 2rem;
    }
    
    .header-actions {
        flex-direction: row;
        justify-content: center;
        min-width: auto;
    }
    
    .header-btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== SECCIONES DE CONTENIDO ===== */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* ===== BOTÓN FLOTANTE WHATSAPP ===== */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 2rem;
    box-shadow: var(--shadow-hover);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background: #128c7e;
    transform: scale(1.1);
    color: white;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ===== MODALES ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
    position: relative;
    animation: slideInUp 0.3s ease-out;
    margin: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--light-gray);
    color: var(--primary-red);
}

.modal-body {
    margin-bottom: 2rem;
}

.modal-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--light-gray);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Asegurar centrado del modal */
.modal-overlay.active {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-overlay .modal {
    align-self: center;
    justify-self: center;
}

/* ===== ESTILO AMAZON PARA MODAL ===== */
.modal.amazon-style {
    max-width: 400px;
    width: 90%;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal.amazon-style .modal-header {
    padding: 0 0 1.5rem 0;
    border-bottom: none;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.modal.amazon-style .modal-close {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #767676;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal.amazon-style .modal-close:hover {
    background: #f1f5f9;
}

.modal-logo {
    text-align: center;
    margin-bottom: 1rem;
}

.modal.amazon-style .modal-title {
    font-size: 1.75rem;
    font-weight: 400;
    color: #111;
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #111;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #a6a6a6;
    border-radius: 3px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #e77600;
    box-shadow: 0 0 3px 2px rgba(228, 121, 17, 0.5);
}

.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.radio-label input[type="radio"] {
    margin: 0;
}

.btn-primary-amazon {
    width: 100%;
    background: linear-gradient(to bottom, #f7dfa5, #f0c14b);
    border: 1px solid #a88734;
    border-radius: 3px;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: #111;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary-amazon:hover {
    background: linear-gradient(to bottom, #f5d78e, #eeb933);
}

.modal-divider {
    height: 1px;
    background: #e7e7e7;
    margin: 1.5rem 0;
}

.footer-text {
    color: #767676;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
}

.btn-secondary-amazon {
    width: 100%;
    background: linear-gradient(to bottom, #f7f8fa, #e7e9ec);
    border: 1px solid #d5d9dc;
    border-radius: 3px;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: #111;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary-amazon:hover {
    background: linear-gradient(to bottom, #e7e9ec, #d9dbdd);
}

/* ===== UTILIDADES ===== */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
