:root {
    --primary: #009EE3;
    --primary-dark: #007bbd;
    --secondary: #1e293b;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    margin: 0;
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

@media (max-width: 768px) {
    .header {
        padding: 0.5rem 4%;
    }
    .home-link {
        font-size: 1.25rem;
    }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary);
}

.home-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.header-center {
    flex-grow: 1;
    max-width: 500px;
    margin: 0 20px;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

#search-bar {
    width: 100%;
    padding: 10px 15px 10px 45px;
    border-radius: 25px;
    border: 1px solid #ddd;
    outline: none;
    transition: 0.3s;
}

#search-bar:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 158, 227, 0.1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right a {
    text-decoration: none;
    color: var(--secondary);
    font-size: 1.2rem;
    position: relative;
}

/* Sidebar */
.sidebar {
    background: var(--secondary);
    position: fixed;
    left: -280px;
    top: 0;
    height: 100%;
    width: 280px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    padding-top: 60px;
    box-shadow: 5px 0 15px rgba(0,0,0,0.1);
}

.sidebar.open {
    left: 0;
}

.nav-link {
    display: block;
    color: #ecf0f1;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    padding-left: 35px;
}

/* Grid & Content */
.content {
    padding: 40px 5%;
    max-width: 1300px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

@media (max-width: 768px) {
    .content {
        padding: 15px 4%;
    }
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

/* Product Card */
.product-card {
    background: #ffffff !important;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: rgba(0, 158, 227, 0.4);
}

.product-image-container {
    width: 100%;
    aspect-ratio: 1;
    background: #ffffff !important;
    position: relative;
    border-bottom: 1px solid #f1f5f9;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff !important;
    padding: 25px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-info {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
    justify-content: flex-start;
}

.availability-badge {
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 6px;
    min-height: 24px;
}

.product-name {
    margin: 4px 0 10px 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.6rem;
    min-height: 3.6rem;
    line-height: 1.35;
    word-break: break-word;
}

.product-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: auto;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
    min-height: 42px;
    display: flex;
    align-items: center;
}

/* Category Horizontal Carousel */
.category-carousel-wrapper {
    position: relative;
    width: 100%;
    margin-top: 10px;
}

.category-carousel-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px 20px 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.category-carousel-row::-webkit-scrollbar {
    display: none;
}

.category-carousel-row .product-card {
    flex: 0 0 260px;
    width: 260px;
    min-width: 260px;
}

@media (max-width: 768px) {
    .category-carousel-row .product-card {
        flex: 0 0 180px;
        width: 180px;
        min-width: 180px;
    }
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background: #ffffff;
    color: var(--secondary);
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.carousel-arrow:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.carousel-arrow.left {
    left: -12px;
}

.carousel-arrow.right {
    right: -12px;
}

@media (max-width: 768px) {
    .carousel-arrow {
        display: none;
    }
}

/* Auth Pages (Login) */
.auth-page {
    background: linear-gradient(135deg, #fdfaf5 0%, #d8edf3 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-card {
    background: #fff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    width: 70px;
    height: 70px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
    box-shadow: 0 8px 15px rgba(0, 158, 227, 0.2);
}

.auth-header h1 {
    font-size: 1.6rem;
    margin: 0 0 10px;
    color: var(--secondary);
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form .input-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--secondary);
}

.auth-form .input-field input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    transition: 0.3s;
}

.auth-form .input-field input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 158, 227, 0.1);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 158, 227, 0.3);
}

.auth-extras {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-muted);
}

.auth-footer {
    margin-top: 30px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.auth-message {
    margin-top: 15px;
    text-align: center;
    font-size: 0.9rem;
}

.auth-message.error { color: #e74c3c; }
.auth-message.success { color: #27ae60; }

/* Product Detail Page */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 15px;
    margin-bottom: 50px;
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .product-detail-layout {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        margin-top: 10px;
        overflow-x: hidden;
    }
    .header-center { display: none; }
}

.image-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.main-image-container {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    overflow: visible;
    min-height: 380px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
}

@media (max-width: 768px) {
    .main-image-container {
        min-height: 260px;
        padding: 10px;
    }
}

.main-image-container img, .main-image-container video, .main-image-container iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnail-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 15px;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.thumbnail-image {
    flex: 0 0 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.thumbnail-image.active {
    border-color: var(--primary);
}

.thumbnail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.product-detail-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.35;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.original-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

/* Buttons */
.btn-card, .buy-button, .add-to-cart-button, #watch-video-button, .mercado-libre-button, .download-demo-button, #share-product-button {
    padding: 12px 25px;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    display: inline-block;
}

.btn-primary-card, .buy-button {
    background: var(--primary);
    color: #fff;
}

.btn-primary-card:hover, .buy-button:hover {
    background: var(--primary-dark);
}

#share-product-button {
    background: #f1f1f1;
    color: #333;
}

.add-to-cart-button {
    background: var(--secondary);
    color: white;
}

/* Card Quick Action Buttons */
.card-btn-row {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    width: 100%;
}

.btn-card-action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 6px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}

.btn-card-cart {
    background: #f1f5f9;
    color: var(--secondary, #2c3e50);
    border: 1px solid #cbd5e1;
}

.btn-card-cart:hover {
    background: #e2e8f0;
}

.btn-card-buy {
    background: #009ee3;
    color: white;
}

.btn-card-buy:hover {
    background: #0082bc;
}

.btn-card-details {
    background: #f1f5f9;
    color: #475569;
    width: 100%;
}

.add-to-cart-button:hover {
    background: #34495e;
}

.mercado-libre-button {
    background: #fff159;
    color: #333;
    width: 100%;
}

.mercado-libre-button:hover {
    filter: brightness(0.95);
}

#watch-video-button {
    background: white;
    color: #e74c3c;
    border: 2px solid #e74c3c;
}

#watch-video-button:hover {
    background: #e74c3c;
    color: white;
}

.download-demo-button {
    background: #27ae60;
    color: white;
}

/* Badges */
.badges-wrapper {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
    z-index: 5;
}

.badge-web {
    position: static;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-video { background: #e74c3c; }
.badge-shipping { background: #27ae60; }
.badge-offer { background: #e67e22; }

/* --- SECCION DE OPINIONES MEJORADA --- */
#reviews-section {
    margin-top: 50px;
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.review-card {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.review-card:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.review-name {
    font-weight: 700;
    color: var(--secondary);
}

.review-rating {
    color: #f1c40f;
}

#review-form {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#review-form input, #review-form textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    width: 100%;
}

#review-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    font-size: 1.5rem;
    gap: 5px;
}

.rating-input span {
    cursor: pointer;
    color: #e4e5e9;
    transition: 0.2s;
}

.rating-input span:hover,
.rating-input span:hover ~ span {
    color: #ffc107;
}

/* Footer */
.site-footer {
    background: var(--secondary);
    color: #bdc3c7;
    padding: 40px 5%;
    text-align: center;
    margin-top: 50px;
}

/* Trust Bar */
.trust-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: white;
    padding: 20px 5%;
    margin: 25px 5% 0;
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.95rem;
}

.trust-item i {
    color: var(--primary);
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .trust-bar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        padding: 20px;
    }
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, var(--secondary) 0%, #0f172a 100%);
    color: white;
    border-radius: var(--radius);
    padding: 25px 40px;
    margin: 15px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    right: -30px;
    bottom: -30px;
    width: 200px;
    height: 200px;
    background: rgba(0, 158, 227, 0.15);
    border-radius: 50%;
    pointer-events: none;
}

.hero-banner-content {
    max-width: 650px;
    z-index: 1;
}

.hero-badge {
    background: rgba(0, 158, 227, 0.25);
    color: #38bdf8;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.hero-banner h1 {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.hero-banner p {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin: 0 0 15px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-banner-graphic {
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.08);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-banner-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    z-index: 1;
}

@media (max-width: 768px) {
    .hero-banner {
        display: none; /* Ocultar banner en móvil para mostrar los productos de inmediato arriba */
    }
    .trust-bar {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 12px;
        margin: 10px 3% 0;
        font-size: 0.75rem;
        border-radius: 12px;
    }
    .badges-wrapper {
        top: 6px;
        right: 6px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        max-width: 85%;
        gap: 3px;
    }
    .badge-web {
        font-size: 0.55rem;
        padding: 2px 6px;
        border-radius: 4px;
        gap: 2px;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
        gap: 12px;
    }
    .product-card {
        border-radius: 14px;
    }
    .product-info {
        padding: 12px;
    }
    .product-name {
        font-size: 0.82rem;
        height: 3.2rem;
        min-height: 3.2rem;
        line-height: 1.3;
        margin-bottom: 6px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .product-price {
        font-size: 1rem;
        margin-bottom: 8px;
        min-height: 32px;
    }
    .product-image {
        padding: 15px;
    }
    .content {
        padding: 15px 3%;
    }
    .btn-card, .btn-primary-card {
        padding: 8px 10px;
        font-size: 0.75rem;
        border-radius: 8px;
    }
}

.footer-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Video Modal */
.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.video-modal-content {
    width: 90%;
    max-width: 800px;
    aspect-ratio: 16/9;
    position: relative;
}

.video-modal-content iframe {
    width: 100%;
    height: 100%;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 24px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 2.2rem;
    box-shadow: 0 6px 22px rgba(37, 211, 102, 0.5);
    z-index: 9999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.7);
    color: white;
}

.whatsapp-float i {
    line-height: 1;
}

/* --- REGLAS DE VIDEO EN GALERÍA --- */
.video-thumb i {
    font-size: 1.5rem;
    color: var(--primary);
}

.video-thumb::after {
    content: 'PLAY';
    position: absolute;
    bottom: 5px;
    font-size: 0.6rem;
    font-weight: bold;
    color: var(--primary);
}

.brand-name:empty::before {
    content: '\00a0';
}

/* --- FLECHAS DEL CARRUSEL --- */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: var(--secondary);
    transition: 0.3s;
}

.nav-arrow:hover { background: var(--primary); color: white; }
.nav-arrow.left { left: 15px; }
.nav-arrow.right { right: 15px; }

@media (max-width: 768px) {
    .nav-arrow {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    .nav-arrow.left { left: 4px; }
    .nav-arrow.right { right: 4px; }
}

/* --- NUEVAS REGLAS DE FILTROS --- */
#category-title-container { padding: 10px 0; border-bottom: 2px solid var(--primary); margin-bottom: 20px; }
#clear-filter { background: var(--primary); color: white; border: none; padding: 5px 12px; border-radius: 8px; cursor: pointer; }

/* --- ETIQUETAS DE DISPONIBILIDAD --- */
.availability-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.availability-badge.digital {
    background: rgba(0, 158, 227, 0.1);
    color: #009EE3;
}
.availability-badge.stock {
    background: #DFFF00; /* Color Pistacho Suave */
    color: #2c3e50;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* --- BARRA DE CONFIANZA --- */
.trust-bar {
    display: flex;
    justify-content: space-around;
    padding: 15px 5%;
    background: #fff;
    border-bottom: 1px solid #eee;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 15px;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
}
.trust-item i {
    color: var(--primary);
    font-size: 1.2rem;
}
@media (max-width: 480px) {
    .trust-item span { font-size: 0.8rem; }
}

/* --- CARRITO Y DIRECCIONES --- */
.cart-page-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    padding: 40px 5%;
}

@media (max-width: 992px) {
    .cart-page-container {
        grid-template-columns: 1fr;
    }
}

.address-section {
    background: white;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 30px;
}

.addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.address-card {
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

.address-card:hover {
    border-color: var(--primary);
}

.address-card.selected {
    border-color: var(--primary);
    background: rgba(0, 158, 227, 0.05);
}

.address-card.selected::after {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--primary);
}

.address-card h5 { margin: 0 0 10px; color: var(--secondary); }
.address-card p { margin: 2px 0; font-size: 0.9rem; color: var(--text-muted); }

.secondary-button {
    background: #f1f1f1;
    color: var(--secondary);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

#new-address-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

#new-address-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

#addr-name, #addr-street { grid-column: span 2; }

.form-actions {
    grid-column: span 2;
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.save-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.cancel-button {
    background: #ccc;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
}

/* --- LEGAL PAGES --- */
.legal-container {
    max-width: 900px;
    margin: 40px auto;
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    box-sizing: border-box;
}

.legal-content {
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--secondary);
    word-break: break-word;
}

.legal-content h2, .legal-content h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--primary);
}

.legal-content p {
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .legal-container {
        margin: 12px;
        padding: 20px;
        border-radius: 12px;
    }

    .legal-container h1 {
        font-size: 1.5rem;
    }
}

.back-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
}

/* --- PHONE MOCKUP PARA VIDEOS --- */
.phone-mockup {
    width: 250px;
    height: 480px;
    background: #111;
    border: 10px solid #222;
    border-radius: 36px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .phone-mockup {
        width: 140px;
        height: 280px;
        border-width: 6px;
        border-radius: 20px;
    }
}

.video-container {
    width: 100%;
    height: 100%;
    background: #000;
}

.phone-mockup video, .phone-mockup iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phone-mockup img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* --- BARRA DE CATEGORÍAS RÁPIDAS (CHIPS) --- */
.web-categories-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 25px;
    scrollbar-width: none;
}

.web-categories-bar::-webkit-scrollbar {
    display: none;
}

.category-chip {
    background: #ffffff;
    color: var(--text-muted);
    border: 1px solid #e2e8f0;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.category-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 158, 227, 0.3);
}

/* --- DESCRIPCIÓN EXPANDIBLE (VER MÁS / VER MENOS) --- */
.product-desc-wrapper {
    position: relative;
    max-height: 130px;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.product-desc-wrapper.expanded {
    max-height: 3000px;
}

.toggle-desc-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    margin-top: 12px;
    padding: 0;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.toggle-desc-btn:hover {
    text-decoration: underline;
}

/* --- MODAL MODERNO DE CANTIDAD Y CARRITO (COMPARTIDO) --- */
.cart-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 100000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    animation: fadeIn 0.25s ease;
}

.cart-modal-card {
    background: white;
    width: 100%;
    max-width: 440px;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.25);
    position: relative;
    animation: scaleUp 0.25s ease;
}

@keyframes scaleUp {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.cart-modal-close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    background: #f1f5f9;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.cart-modal-close-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.cart-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.cart-modal-icon {
    font-size: 1.4rem;
    color: #009ee3;
}

.cart-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e293b;
}

.cart-modal-product-info {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid #f1f5f9;
}

.cart-modal-product-info img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
    background: white;
    border: 1px solid #e2e8f0;
}

.cart-modal-product-info h4 {
    margin: 0 0 4px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b;
}

.cart-modal-product-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.cart-modal-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-weight: 700;
    color: #334155;
    font-size: 0.95rem;
}

.qty-picker {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    background: white;
}

.qty-picker button {
    background: #f1f5f9;
    border: none;
    padding: 8px 16px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    color: #1e293b;
    transition: background 0.2s;
}

.qty-picker button:hover {
    background: #e2e8f0;
}

.qty-picker input {
    width: 45px;
    text-align: center;
    border: none;
    font-weight: 800;
    font-size: 1rem;
    color: #0f172a;
    outline: none;
}

.cart-modal-subtotal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 800;
    color: #1e293b;
}

.cart-modal-subtotal-row span:last-child {
    font-size: 1.25rem;
    color: #27ae60;
}

.cart-modal-actions {
    display: flex;
    gap: 10px;
}

.btn-modal {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
}

.btn-modal-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-modal-secondary:hover {
    background: #e2e8f0;
}

.btn-modal-primary {
    background: #009ee3;
    color: white;
}

.btn-modal-primary:hover {
    background: #0082bc;
}

/* SELECTOR DE VISTA 1 COLUMNA / 2 COLUMNAS MÓVIL */
.view-toggle-bar {
    display: none;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .view-toggle-bar {
        display: flex;
    }
}

.view-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
}

.view-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #64748b;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.view-btn.active {
    background: #009ee3;
    color: white;
    border-color: #009ee3;
    box-shadow: 0 2px 8px rgba(0, 158, 227, 0.3);
}

@media (max-width: 768px) {
    body.view-single-column .product-grid,
    .view-single-column .product-grid,
    .product-grid.view-single-column {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    body.view-single-column .product-card,
    .view-single-column .product-card,
    .product-grid.view-single-column .product-card {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        border-radius: 18px !important;
        overflow: hidden !important;
        box-shadow: 0 4px 18px rgba(0,0,0,0.08) !important;
    }

    body.view-single-column .product-image-container,
    .view-single-column .product-image-container,
    .product-grid.view-single-column .product-image-container {
        width: 100% !important;
        height: 220px !important;
        max-width: 100% !important;
        max-height: 220px !important;
        flex-shrink: 0 !important;
        border-radius: 18px 18px 0 0 !important;
    }

    body.view-single-column .badges-wrapper,
    .view-single-column .badges-wrapper,
    .product-grid.view-single-column .badges-wrapper {
        display: flex !important;
    }

    body.view-single-column .product-info,
    .view-single-column .product-info,
    .product-grid.view-single-column .product-info {
        flex: 1 !important;
        padding: 14px 16px 16px !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    body.view-single-column .product-name,
    .view-single-column .product-name,
    .product-grid.view-single-column .product-name {
        font-size: 1.05rem !important;
        font-weight: 800 !important;
        margin-top: 4px !important;
        line-height: 1.35 !important;
    }

    body.view-single-column .card-btn-row,
    .view-single-column .card-btn-row,
    .product-grid.view-single-column .card-btn-row {
        margin-top: 10px !important;
    }
}

/* MODAL DE ALERTAS Y AGRADECIMIENTO QTOOLFIX (COMPARTIDO GLOBAL) */
.qd-alert-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.68) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 200000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    animation: fadeIn 0.2s ease;
}

.qd-alert-card {
    background: white;
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    text-align: center;
    position: relative;
    animation: scaleUp 0.25s ease;
    border: 1px solid #e2e8f0;
}

.qd-alert-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 14px;
}

.qd-alert-icon-box.warning {
    background: #fff7ed;
    color: #e67e22;
    border: 1px solid #ffedd5;
}

.qd-alert-icon-box.error {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
}

.qd-alert-icon-box.success {
    background: #f0fdf4;
    color: #22c55e;
    border: 1px solid #dcfce7;
}

.qd-alert-card h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e293b;
}

.qd-alert-body p {
    margin: 0 0 20px;
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.5;
    font-weight: 500;
}

.qd-alert-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 800;
    background: #009ee3;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.qd-alert-btn:hover {
    background: #0082bc;
}

/* BOTÓN FLOTANTE VOLVER ARRIBA (SCROLL TO TOP) */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f1c40f;
    color: #1e293b;
    border: 1px solid #f39c12;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 18px rgba(241, 196, 15, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease, background 0.2s ease;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    background: #f39c12;
    color: #1e293b;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .back-to-top-btn {
        bottom: 95px;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 42px;
        height: 42px;
        font-size: 1.05rem;
    }

    .back-to-top-btn:hover, .back-to-top-btn:active {
        transform: translateX(-50%) scale(1.08) !important;
    }
}

/* --- BOTONES DE TIENDA, BÚSQUEDA, CARRITO Y USUARIO EN HEADER --- */
.header-shop-btn, .search-toggle-btn, .cart-icon-btn, .header-user-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--secondary);
    cursor: pointer;
    text-decoration: none;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: 0.2s;
}

.header-shop-btn:hover, .search-toggle-btn:hover, .cart-icon-btn:hover, .header-user-btn:hover {
    background: rgba(0, 158, 227, 0.1);
    color: var(--primary);
}

/* MENU DESPLEGABLE DE USUARIO (USER DROPDOWN) */
.user-dropdown-menu {
    position: absolute;
    top: 48px;
    right: 0;
    width: 220px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    border: 1px solid #e2e8f0;
    padding: 10px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: fadeIn 0.2s ease;
}

.user-dropdown-header {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 4px;
}

.user-dropdown-header strong {
    display: block;
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 800;
}

.user-dropdown-header span {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    word-break: break-all;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.2s, color 0.2s;
    box-sizing: border-box;
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: #009ee3;
}

.dropdown-item.logout-item {
    color: #ef4444;
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
    padding-top: 10px;
}

.dropdown-item.logout-item:hover {
    background: #fef2f2;
    color: #dc2626;
}

.cart-icon-btn {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #e74c3c;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 50%;
    min-width: 17px;
    height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.mobile-search-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #fff;
    padding: 0 5%;
}

.mobile-search-dropdown.open {
    max-height: 80px;
    padding: 12px 5%;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

#mobile-search-bar {
    width: 100%;
    padding: 12px 20px 12px 48px;
    border-radius: 25px;
    border: 1px solid #cbd5e1;
    outline: none;
    font-size: 1rem;
    background: #f8fafc;
    transition: 0.3s;
}

#mobile-search-bar:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 158, 227, 0.1);
}

.mobile-search-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.mobile-search-close:hover {
    color: var(--primary);
}

#logo-container img {
    height: 34px;
    max-width: 130px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 6px;
}

@media (max-width: 768px) {
    .brand-name {
        display: none !important;
    }
    .header-center {
        display: none;
    }
    #logo-container img {
        height: 28px !important;
        max-width: 100px !important;
    }
}

@media (min-width: 769px) {
    .search-toggle-btn {
        display: none;
    }
}

body.searching .trust-bar,
body.searching .web-categories-bar,
body.searching .hero-banner {
    display: none !important;
}

/* --- CART PAGE STYLES --- */
.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.cart-item-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    background: #f8fafc;
    flex-shrink: 0;
}

.cart-item-details {
    flex-grow: 1;
    min-width: 0;
}

.cart-item-name {
    margin: 0 0 5px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    flex-shrink: 0;
}

.quantity-change-btn {
    background: none;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    font-weight: bold;
    color: var(--secondary);
    transition: 0.2s;
}

.quantity-change-btn:hover {
    background: var(--primary);
    color: white;
}

.cart-item-quantity span {
    padding: 0 10px;
    font-weight: 700;
    font-size: 0.9rem;
}

.remove-item-button {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: 0.2s;
    flex-shrink: 0;
}

.remove-item-button:hover {
    color: #dc2626;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .cart-page-container {
        padding: 15px 3%;
    }
    .cart-item {
        padding: 10px;
        gap: 10px;
    }
    .cart-item-image {
        width: 55px;
        height: 55px;
    }
    .cart-item-name {
        font-size: 0.9rem;
    }
    .cart-item-price {
        font-size: 0.85rem;
    }
    .quantity-change-btn {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
}
