/* ==========================================================================
   SUPERPACO REDESIGN THEME - MEGA PAPELERÍA DIAMANTE (2026)
   ========================================================================== */

:root {
    --sp-red: #d32f2f;
    --sp-red-dark: #b71c1c;
    --sp-blue: #0056b3;
    --sp-blue-dark: #003d80;
    --sp-teal: #00a896;
    --sp-bg-light: #f8f9fa;
    --sp-bg-white: #ffffff;
    --sp-text-dark: #212529;
    --sp-text-muted: #6c757d;
    --sp-border-color: #e9ecef;
    --sp-card-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --sp-hover-shadow: 0 10px 25px rgba(0, 86, 179, 0.12);
    --sp-radius: 12px;
    --sp-font-main: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --color-bg-base: #f4f7f6;
    --color-bg-tarjeta: #ffffff;
    --color-header-start: #ffffff;
    --color-header-end: #f8fafc;
    --color-primario: #0066cc;
    --color-primario-rgb: 0, 102, 204;
    --color-secundario: #f59e0b;
    --color-oro: #f59e0b;
    --color-texto-principal: #1e293b;
    --color-texto-secundario: #475569;
    --color-borde-suave: #e2e8f0;
    --color-sombra: rgba(0, 0, 0, 0.05);
    --color-sombra-hover: rgba(0, 102, 204, 0.15);
    --fuente-base: 'Plus Jakarta Sans', 'Nunito', sans-serif;
    --transicion-suave: all 0.3s ease;
}

body.superpaco-body {
    font-family: var(--sp-font-main);
    background-color: #f4f6f8;
    color: var(--sp-text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

/* --- BARRA SUPERIOR DE ANUNCIOS --- */
.superpaco-top-announcement {
    background: #0f172a;
    color: #cbd5e1;
    font-size: 0.82rem;
    padding: 6px 0;
    border-bottom: 1px solid #1e293b;
}

.top-announcement-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.announcement-left, .announcement-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-announcement-container .divider {
    color: #475569;
}

.top-announcement-container a.top-link {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.top-item-with-icon {
    display: flex;
    align-items: center;
    gap: 6px;
}

.svg-top-icon {
    vertical-align: middle;
    color: #94a3b8;
    flex-shrink: 0;
}

.svg-top-icon.green {
    color: #25D366;
}

.logo-img-pro {
    height: 52px;
    width: 52px;
    object-fit: contain;
    border-radius: 10px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo-banner-oficial {
    height: 64px;
    width: auto;
    max-width: 310px;
    object-fit: contain;
    transition: transform 0.25s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 86, 179, 0.08));
}

.logo-banner-oficial:hover {
    transform: scale(1.03);
}

/* Adaptación completa para celulares y dispositivos móviles (Android/PC) */
@media (max-width: 768px) {
    .superpaco-header-container {
        flex-direction: column;
        gap: 10px;
        padding: 10px 14px;
    }
    
    .superpaco-logo-brand {
        align-self: center;
        margin: 2px 0;
    }

    .logo-banner-oficial {
        height: 48px;
        max-width: 250px;
    }

    .superpaco-search-wrapper {
        width: 100%;
    }

    .superpaco-search-select {
        display: none;
    }

    .superpaco-actions-group {
        width: 100%;
        justify-content: space-around;
    }

    .superpaco-action-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .superpaco-nav-container {
        overflow-x: auto;
        white-space: nowrap;
        padding: 8px 12px;
        -webkit-overflow-scrolling: touch;
    }

    .superpaco-nav-links {
        display: inline-flex;
        gap: 12px;
    }

    .announcement-bar-container {
        font-size: 0.75rem;
        padding: 6px 10px;
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }

    .hero-split-grid {
        grid-template-columns: 1fr !important;
    }

    .carrusel-hero-container {
        height: 220px !important;
    }
}


.footer-logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    margin-bottom: 10px;
}


.action-svg-icon {
    color: var(--sp-blue);
    flex-shrink: 0;
}

.nav-svg-icon {
    vertical-align: middle;
    color: #64748b;
    margin-right: 4px;
    transition: color 0.2s;
}

.nav-link:hover .nav-svg-icon, .nav-link.active .nav-svg-icon {
    color: var(--sp-blue);
}

/* ==========================================================================
   GRID DE PRODUCTOS Y TARJETAS DEL CATÁLOGO DE INICIO Y BÚSQUEDA
   ========================================================================== */

#catalogo-contenedor,
.superpaco-catalogo-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
    width: 100% !important;
}

.seccion-catalogo {
    width: 100% !important;
    box-sizing: border-box !important;
}

.productos-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important;
    gap: 1.2rem !important;
    width: 100% !important;
    margin-top: 1rem !important;
}

.tarjeta-producto {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    position: relative !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
    cursor: pointer !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.tarjeta-producto:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 22px rgba(0, 102, 204, 0.14) !important;
    border-color: #0066cc !important;
}

.tarjeta-imagen-contenedor {
    width: 100% !important;
    height: 160px !important;
    max-height: 160px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f8fafc !important;
    border-radius: 10px !important;
    margin-bottom: 0.75rem !important;
    overflow: hidden !important;
}

.tarjeta-imagen-contenedor img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    transition: transform 0.3s ease !important;
}

.tarjeta-producto:hover .tarjeta-imagen-contenedor img {
    transform: scale(1.06) !important;
}

.tarjeta-info {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.4rem !important;
}

.tarjeta-titulo {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    height: 2.7em !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

.tarjeta-precio {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #0066cc !important;
    margin-top: 0.2rem !important;
}


.feature-svg-box {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(0, 102, 204, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- HEADER PRINCIPAL --- */
.superpaco-header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}


.superpaco-header-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Logo Brand */
.superpaco-logo-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.superpaco-logo-brand .logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.logo-text-box {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-main-title {
    font-weight: 800;
    font-size: 1.1rem;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.logo-sub-title {
    font-weight: 900;
    font-size: 0.9rem;
    color: var(--sp-blue);
    letter-spacing: 2px;
}

/* Search Box Wide SuperPaco */
.superpaco-search-wrapper {
    flex: 1;
    max-width: 650px;
    position: relative;
}

.superpaco-search-box {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 99px;
    padding: 3px 3px 3px 16px;
    transition: all 0.25s ease;
}

.superpaco-search-box:focus-within {
    background: #ffffff;
    border-color: var(--sp-blue);
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.12);
}

.superpaco-search-select {
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    padding-right: 12px;
    border-right: 1px solid #cbd5e1;
    outline: none;
    cursor: pointer;
}

.superpaco-search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 0.95rem;
    outline: none;
    color: #0f172a;
}

.superpaco-search-btn {
    background: var(--sp-blue);
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.superpaco-search-btn:hover {
    background: var(--sp-blue-dark);
    transform: scale(1.02);
}

.superpaco-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
    z-index: 1050;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

/* Actions Header */
.superpaco-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.superpaco-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.superpaco-action-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.superpaco-action-btn.highlight {
    background: rgba(0, 86, 179, 0.08);
    border-color: rgba(0, 86, 179, 0.2);
    color: var(--sp-blue);
}

.action-icon {
    font-size: 1.3rem;
}

.action-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.action-tag {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #64748b;
}

.action-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
}

/* Cart Box */
.superpaco-cart-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--sp-blue), #0077ff);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 99px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
    transition: all 0.25s ease;
}

.superpaco-cart-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 86, 179, 0.4);
}

.cart-icon-wrapper {
    position: relative;
    font-size: 1.3rem;
}

.cart-badge-count {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

.cart-label {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.cart-sub {
    font-size: 0.68rem;
    opacity: 0.9;
}

.cart-main {
    font-size: 0.85rem;
    font-weight: 700;
}

/* Navigation Bar */
.superpaco-nav-bar {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 2px solid #e2e8f0;
}

.superpaco-nav-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-cat-dropdown-btn {
    background: var(--sp-blue);
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.nav-cat-dropdown-btn:hover {
    background: var(--sp-blue-dark);
}

.superpaco-nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
    overflow-x: auto;
    white-space: nowrap;
}

.superpaco-nav-links .nav-link {
    text-decoration: none;
    color: #334155;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.superpaco-nav-links .nav-link:hover {
    color: var(--sp-blue);
    background: #f1f5f9;
}

.superpaco-nav-links .nav-link.accent {
    color: #d97706;
    font-weight: 700;
}

/* ==========================================================================
   HERO SECTION 70/30 (CARRUSEL REPARADO & SIDE PROMOS)
   ========================================================================== */

.superpaco-main-content {
    max-width: 1320px;
    margin: 20px auto;
    padding: 0 20px;
}

.superpaco-hero-section {
    margin-bottom: 25px;
}

.superpaco-hero-grid {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 20px;
    align-items: stretch;
}

/* CARRUSEL HERO FIX COMPLETO CON IMÁGENES PANORÁMICAS 1200x500 */
.carrusel-hero-container {
    position: relative;
    width: 100%;
    height: clamp(220px, 24vw, 360px);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    background: #0f172a;
}

.carrusel-hero-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.carrusel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carrusel-slide .carrusel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.carrusel-slide-content {
    position: absolute;
    bottom: 12px;
    left: 16px;
    padding: 8px 14px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 5;
}

.slide-badge {
    background: var(--sp-blue);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slide-title, .slide-desc {
    display: none;
}

.slide-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.slide-desc {
    font-size: 0.95rem;
    margin: 0 0 8px 0;
    opacity: 0.9;
    max-width: 600px;
}

.slide-btn {
    background: #ffffff;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 22px;
    border-radius: 99px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.slide-btn:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

/* Carrusel Arrows & Dots */
.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #0f172a;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.carrusel-btn:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.carrusel-btn-prev { left: 15px; }
.carrusel-btn-next { right: 15px; }

.carrusel-indicadores {
    position: absolute;
    bottom: 15px;
    right: 30px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carrusel-indicadores .indicador {
    width: 10px;
    height: 10px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.carrusel-indicadores .indicador.activo {
    width: 28px;
    background: #ffffff;
}

/* SIDE PROMOS (DERECHA 30%) */
.superpaco-side-promos {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.side-promo-card {
    position: relative;
    flex: 1;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    background: #1e293b;
}

.promo-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.side-promo-card:hover .promo-card-bg {
    transform: scale(1.06);
}

.promo-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.6) 100%);
}

.promo-card-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #ffffff;
    box-sizing: border-box;
}

.promo-tag {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.2);
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.promo-card-content h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 4px 0;
}

.promo-card-content p {
    font-size: 0.82rem;
    margin: 0 0 12px 0;
    opacity: 0.85;
}

.promo-link-btn {
    background: #ffffff;
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 99px;
    text-decoration: none;
    transition: all 0.2s;
}

.promo-link-btn:hover {
    background: #f1f5f9;
    transform: translateX(3px);
}

.promo-link-btn.green {
    background: #25D366;
    color: #ffffff;
}

/* ==========================================================================
   FEATURES BAR ESTILO SUPERPACO (TRUST BADGES)
   ========================================================================== */

.superpaco-features-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.feature-item-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.08);
}

.feature-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.feature-text h4 {
    margin: 0 0 2px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.feature-text p {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
}

/* ==========================================================================
   BARRA DE ESTADO DEL CATÁLOGO
   ========================================================================== */

.superpaco-status-bar {
    background: #ffffff;
    border-radius: 14px;
    padding: 12px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e2e8f0;
}

.status-bar-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot.green {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.status-text {
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
}

.btn-superpaco-refresh {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-superpaco-refresh:hover {
    background: #e2e8f0;
}

/* ==========================================================================
   LAYOUT DE CATÁLOGO (SIDEBAR + GRID PRODUCTOS)
   ========================================================================== */

.superpaco-catalog-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 25px;
    align-items: start;
}

/* SIDEBAR ESTILO SUPERPACO */
.superpaco-sidebar {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    position: sticky;
    top: 90px;
}

.sidebar-header-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.sidebar-header-box h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
}

.lista-categorias {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lista-categorias li button, .lista-categorias a {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lista-categorias li button:hover, .lista-categorias a:hover,
.lista-categorias li button.activa {
    background: rgba(0, 86, 179, 0.08);
    color: var(--sp-blue);
    font-weight: 700;
}

/* PRODUCTOS AREA */
.superpaco-products-area {
    min-height: 500px;
}

/* FOOTER SUPERPACO */
.superpaco-footer {
    background: #0f172a;
    color: #cbd5e1;
    margin-top: 50px;
    padding-top: 50px;
}

.footer-top-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 40px;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.footer-logo img {
    height: 40px;
}

.brand-desc {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #94a3b8;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col ul a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.footer-col ul a:hover {
    color: #38bdf8;
}

.footer-bottom-container {
    border-top: 1px solid #1e293b;
    padding: 20px;
    text-align: center;
    font-size: 0.82rem;
    color: #64748b;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .superpaco-hero-grid {
        grid-template-columns: 1fr;
    }
    .superpaco-side-promos {
        flex-direction: row;
    }
    .superpaco-features-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    .superpaco-catalog-layout {
        grid-template-columns: 1fr;
    }
    .superpaco-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .superpaco-side-promos {
        flex-direction: column;
    }
    .superpaco-features-bar {
        grid-template-columns: 1fr;
    }
    .superpaco-header-container {
        flex-direction: column;
        align-items: stretch;
    }
    .carrusel-hero-container {
        height: 250px;
    }
}

/* Reset y Estilos Globales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--fuente-base);
    background-color: var(--color-bg-base);
    color: var(--color-texto-principal);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* ==========================================================================
   HEADER PRINCIPAL
   ========================================================================== */

.amazon-header {
    background: var(--color-header-start);
    border-bottom: 1px solid var(--color-borde-suave);
    color: var(--color-texto-principal);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Top bar */
.amazon-header-top {
    display: flex;
    align-items: center;
    padding: 0.8rem 2rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Hover effect for header items */
.nav-item-hover {
    padding: 0.5rem 0.8rem;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transicion-suave);
}

.nav-item-hover:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* Logo */
.amazon-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.amazon-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

/* Location */
.amazon-location {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.location-icon {
    font-size: 1.4rem;
    color: var(--color-primario);
}

.location-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.location-small, .nav-small {
    font-size: 0.75rem;
    color: var(--color-texto-secundario);
}

.location-bold, .nav-bold {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-texto-principal);
}

/* Search Bar */
.amazon-search {
    flex: 1;
    display: flex;
    height: 48px;
    border-radius: 99px;
    background: #ffffff;
    border: 2px solid var(--color-borde-suave);
    overflow: hidden;
    margin: 0 1rem;
    transition: var(--transicion-suave);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    min-width: 250px;
}

.amazon-search:focus-within {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.search-select {
    background: transparent;
    border: none;
    border-right: 1px solid var(--color-borde-suave);
    color: var(--color-texto-secundario);
    padding: 0 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.amazon-search input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0 1.2rem;
    font-size: 1rem;
    color: var(--color-texto-principal);
    outline: none;
    min-width: 100px;
}

.search-btn {
    background: linear-gradient(135deg, var(--color-primario), var(--color-secundario));
    border: none;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    transition: var(--transicion-suave);
}

.search-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Right Navigation Links */
.amazon-nav-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.nav-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-decoration: none;
    color: var(--color-texto-principal);
    line-height: 1.2;
}

.lang-selector {
    font-size: 0.9rem;
    font-weight: 700;
    align-items: center;
    flex-direction: row;
    gap: 0.3rem;
}

.auth-link, .returns-link {
    padding: 0 0.5rem;
}

/* Cart */
.cart-link {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    background: #f1f5f9;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    border: 1px solid var(--color-borde-suave);
}

.cart-icon {
    font-size: 1.5rem;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--color-secundario);
    color: white;
    font-weight: 800;
    font-size: 0.75rem;
    height: 22px;
    min-width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 99px;
    box-shadow: 0 4px 8px rgba(168, 85, 247, 0.4);
}

.cart-text {
    font-size: 0.9rem;
    font-weight: 700;
}

/* Bottom Bar */
.amazon-header-bottom {
    display: flex;
    align-items: center;
    justify-content: center; /* Centrado */
    padding: 0.8rem 2rem; /* Más alto */
    gap: 2rem; /* Más separación entre botones */
    overflow-x: auto;
    white-space: nowrap;
    border-top: 1px solid var(--color-borde-suave);
    background: #ffffff;
    -webkit-overflow-scrolling: touch; /* Suavidad en scroll móvil */
}

.amazon-header-bottom::-webkit-scrollbar {
    display: none;
}

.nav-bottom-item {
    color: var(--color-texto-secundario);
    text-decoration: none;
    font-size: 1.05rem; /* Letra un poco más grande */
    font-weight: 600; /* Letra más gruesa para que resalte */
    padding: 0.5rem 1.2rem; /* Botón más grande */
    border-radius: 99px;
    transition: var(--transicion-suave);
}

.nav-bottom-item:hover {
    color: var(--color-primario);
    background: rgba(99, 102, 241, 0.08);
}

.menu-burger {
    font-weight: 700;
    color: var(--color-primario);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Responsividad para móviles */
@media (max-width: 900px) {
    .amazon-location, .returns-link, .lang-selector {
        display: none;
    }
    .amazon-header-top {
        flex-wrap: wrap;
        padding: 0.8rem 1rem;
    }
    .amazon-search {
        order: 3;
        width: 100%;
        margin: 0.5rem 0 0 0;
    }
    .amazon-header-bottom {
        justify-content: flex-start; /* Alinea a la izquierda en móvil para poder hacer scroll cómodo */
        padding: 0.8rem 1rem; /* Un poco menos de padding lateral en móvil */
        gap: 1rem; /* Un poco menos de espacio para que quepan más a la vista */
    }
}

/* ==========================================================================
   CINTA SUPERIOR (SLIM BANNER)
   ========================================================================== */
.cinta-superior-container {
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid var(--color-borde-suave);
    display: flex;
    justify-content: center;
    overflow: hidden;
    /* Eliminamos el height fijo para que la imagen defina su propia altura proporcionalmente */
}

.cinta-superior-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Asegura que cubra todo el ancho */
    object-position: center;
}

/* ==========================================================================
   BANNER PROMOCIONAL (HERO)
   ========================================================================== */

.hero-banner {
    background: linear-gradient(135deg, var(--color-header-start) 0%, var(--color-primario) 100%);
    color: white;
    padding: 3rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.hero-contenido {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-titulo {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-transform: uppercase;
    color: var(--color-oro);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitulo {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-btn {
    background-color: var(--color-oro);
    color: var(--color-header-start);
    padding: 0.8rem 2rem;
    border-radius: 99px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

/* ==========================================================================
   BOTÓN FLOTANTE WHATSAPP
   ========================================================================== */

.whatsapp-flotante {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999;
    text-decoration: none;
    transition: transform 0.3s ease;
    animation: pulso-whatsapp 2s infinite;
}

.whatsapp-flotante:hover {
    transform: scale(1.1);
}

@keyframes pulso-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Responsividad Header */
@media (max-width: 992px) {
    .header-top {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .contacto-header {
        display: none; /* Ocultar en móviles para limpiar diseño */
    }
    
    .nav-enlaces {
        padding-left: 1rem;
        gap: 1rem;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .btn-categorias {
        padding: 1rem;
    }
    .btn-categorias span {
        display: none; /* Solo texto en móvil */
    }
}

/* Contenedor Principal (Grid reseteado) */
#catalogo-contenedor {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* Estilos de Sección/Categoría */
.seccion-catalogo {
    background: var(--color-bg-tarjeta);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--color-borde-suave);
    transition: var(--transicion-suave);
}

.seccion-catalogo:hover {
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.08);
}

.seccion-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-borde-suave);
}

.seccion-icono {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--color-primario), var(--color-secundario));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.seccion-titulo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-texto-principal);
    text-transform: capitalize;
    letter-spacing: -0.5px;
}

.seccion-contador {
    background: #f1f5f9;
    color: var(--color-primario);
    padding: 0.4rem 1rem;
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Grid de Productos (Adaptativo/Responsivo) */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

/* Tarjeta de Producto */
.tarjeta-producto {
    background: #ffffff;
    border: 1px solid var(--color-borde-suave);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transicion-suave);
    position: relative;
    box-shadow: 0 2px 8px var(--color-sombra);
    -webkit-tap-highlight-color: transparent; /* Evita flash azul en Android */
}

.tarjeta-producto:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--color-sombra-hover);
    border-color: rgba(0, 102, 204, 0.3);
    z-index: 10;
}

/* Desactivar hover stuck en dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
    .tarjeta-producto:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0,0,0,0.03);
        border-color: rgba(255,255,255,0.9);
    }
    .tarjeta-producto:active {
        transform: scale(0.97);
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
        border-color: rgba(99, 102, 241, 0.3);
    }
}

/* Tarjeta sin imagen: eliminar el espacio gris y ajustar la altura al contenido sin huecos */
.tarjeta-producto.sin-imagen .tarjeta-imagen-contenedor {
    display: none !important;
}

.tarjeta-producto.sin-imagen {
    min-height: auto !important;
    height: auto !important;
    align-self: start !important;
    padding-top: 0 !important;
}

.tarjeta-producto.sin-imagen .badge-relevancia {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    display: inline-block !important;
    width: fit-content !important;
    margin: 0.8rem 0.8rem 0.4rem 0.8rem !important;
}

.tarjeta-producto.sin-imagen .tarjeta-info {
    flex-grow: 0 !important;
    padding: 0.8rem !important;
}

.tarjeta-producto.sin-imagen.con-badge .tarjeta-info {
    padding-top: 0 !important;
}

.tarjeta-producto.sin-imagen .tarjeta-nombre {
    min-height: auto !important;
}

/* Zona fija cuadrada de imagen */
.tarjeta-imagen-contenedor {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Fallback para Android WebView antiguo que no soporta aspect-ratio */
    min-height: 0;
    background: radial-gradient(circle, #ffffff 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
    overflow: hidden;
}

/* Fallback: si aspect-ratio no está soportado, usar padding-bottom */
@supports not (aspect-ratio: 1 / 1) {
    .tarjeta-imagen-contenedor {
        height: 0;
        padding-bottom: 100%; /* Cuadrado 1:1 */
    }
    .tarjeta-imagen-contenedor img {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

.tarjeta-imagen-contenedor::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.2), transparent);
}

.tarjeta-imagen-contenedor img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; 
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
    -webkit-user-drag: none; /* Evita drag accidental en Android */
}

.tarjeta-producto:hover .tarjeta-imagen-contenedor img {
    transform: scale(1.1) rotate(2deg);
}

/* Desactivar zoom de imagen en hover para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
    .tarjeta-producto:hover .tarjeta-imagen-contenedor img {
        transform: none;
    }
}

/* Información del producto */
.tarjeta-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

/* ID del Producto */
.tarjeta-id {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-secundario);
    background: rgba(168, 85, 247, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 99px;
    align-self: flex-start;
    letter-spacing: 0.5px;
}

/* Nombre del Producto */
.tarjeta-nombre {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-texto-principal);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em; 
}

/* Mensaje de Error / Fallback (Diseño de Alerta Premium) */
.alerta-error {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid var(--color-oro);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    margin: 3rem auto;
    max-width: 600px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.alerta-titulo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #b45309;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alerta-contenido p {
    font-size: 1.05rem;
    color: #78350f;
    margin-bottom: 1.25rem;
}

.alerta-codigo {
    background: #0f172a;
    color: #f8fafc;
    padding: 1.25rem;
    border-radius: 12px;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    border: 1px solid #1e293b;
    margin-bottom: 1.25rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.alerta-pasos {
    list-style-type: decimal;
    margin-left: 1.5rem;
    font-size: 1rem;
    color: #78350f;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Footer */
.app-footer {
    background: #0f172a;
    color: var(--color-texto-secundario);
    text-align: center;
    padding: 3rem 1.5rem;
    font-size: 0.9rem;
    border-top: 1px solid #1e293b;
    margin-top: auto;
}

/* ==========================================================================
   INFORMACION DE CONTACTO (FOOTER)
   ========================================================================== */
.info-contacto-contenedor {
    max-width: 600px;
    margin: 0 auto 3rem auto;
    text-align: left;
}

.info-contacto-titulo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-contacto-lista {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-contacto-lista li {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.info-icono-box {
    width: 45px;
    height: 45px;
    background-color: #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icono {
    font-size: 1.5rem;
}

.info-texto {
    font-size: 1.05rem;
    color: #94a3b8; /* Gris claro que resalte sobre azul oscuro */
    line-height: 1.4;
}

.info-label {
    color: #e2e8f0;
}

.copyright-texto {
    border-top: 1px solid #1e293b;
    padding-top: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 2rem;
}


/* Animaciones */
@keyframes brillo-diamante {
    0%, 100% { filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)); }
    50% { filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.8)); }
}

/* Responsividad extra para tablets y móviles */
@media (max-width: 768px) {
    .app-header { padding: 2rem 1rem; }
    .app-header h1 { font-size: 2rem; }
    #catalogo-contenedor { padding: 1.5rem 1rem; gap: 2rem; }
    .seccion-catalogo { padding: 1.5rem; border-radius: 16px; }
    .productos-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.25rem; }
    .tarjeta-nombre { font-size: 0.95rem; }
}

/* (Navegación antigua eliminada, reemplazada por el header e-commerce en la parte superior) */

/* ==========================================================================
   CONTENEDOR GENÉRICO DE PÁGINA (Para cotizador y admin)
   ========================================================================== */

.pagina-contenedor {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ==========================================================================
   MÓDULO COTIZADOR INTELIGENTE
   ========================================================================== */

#grid-coincidencias, .grid-coincidencias, #resultados-busqueda-manual {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-top: 1rem;
}

.tarjeta-coincidencia {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
}

.tarjeta-coincidencia:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 102, 204, 0.15);
    border-color: #0066cc;
}

.coincidencia-imagen {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.coincidencia-imagen img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.tarjeta-coincidencia:hover .coincidencia-imagen img {
    transform: scale(1.08);
}

.coincidencia-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.coincidencia-nombre {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin: 0;
}

.coincidencia-precio-bloque {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.coincidencia-precio {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0066cc;
    margin: 0;
}

@media (max-width: 768px) {
    #grid-coincidencias, .grid-coincidencias, #resultados-busqueda-manual {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .coincidencia-imagen {
        height: 110px;
    }
    
    .coincidencia-nombre {
        font-size: 0.85rem;
    }
    
    .coincidencia-precio {
        font-size: 1rem;
    }
}


/* Título de sección interna */
.seccion-titulo-pagina {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-header-start);
    text-align: center;
    margin-bottom: 0.25rem;
}

.seccion-subtitulo-pagina {
    font-size: 1rem;
    color: var(--color-texto-secundario);
    text-align: center;
    margin-bottom: 1rem;
}

/* Zona de Drag & Drop */
.zona-drop {
    border: 3px dashed var(--color-borde-suave);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    background-color: #f8fafc;
    transition: var(--transicion-suave);
    cursor: pointer;
    position: relative;
}

.zona-drop:hover,
.zona-drop.arrastrando {
    border-color: var(--color-primario);
    background-color: rgba(var(--color-primario-rgb), 0.04);
}

.zona-drop.arrastrando {
    box-shadow: 0 0 0 4px rgba(var(--color-primario-rgb), 0.15);
}

.zona-drop-icono {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.zona-drop-texto {
    font-size: 1.1rem;
    color: var(--color-texto-principal);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.zona-drop-formatos {
    font-size: 0.85rem;
    color: var(--color-texto-secundario);
    margin-bottom: 1.25rem;
}

.btn-subir-archivo {
    display: inline-block;
    padding: 0.7rem 1.75rem;
    background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-secundario) 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: var(--fuente-base);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicion-suave);
}

.btn-subir-archivo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--color-primario-rgb), 0.35);
}

.input-archivo-oculto {
    display: none;
}

/* Barra de progreso OCR */
.barra-progreso-contenedor {
    display: none;
    margin-top: 1.5rem;
    background-color: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    height: 12px;
}

.barra-progreso-contenedor.visible {
    display: block;
}

.barra-progreso {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primario), var(--color-secundario));
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progreso-texto {
    display: none;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-texto-secundario);
    margin-top: 0.5rem;
    font-weight: 500;
}

.progreso-texto.visible {
    display: block;
}

/* Tarjeta de Resultados de Cotización */
.resultado-cotizacion {
    display: none;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--color-sombra);
    border: 1px solid var(--color-borde-suave);
    border-top: 4px solid var(--color-oro);
}

.resultado-cotizacion.visible {
    display: block;
    animation: aparecer-suave 0.4s ease;
}

@keyframes aparecer-suave {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.resultado-titulo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-header-start);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resultado-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.resultado-item {
    background: var(--color-bg-base);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.resultado-item-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-texto-secundario);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.resultado-item-valor {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-header-start);
}

.resultado-item-valor.precio-total {
    color: var(--color-primario);
    font-size: 1.8rem;
}

.resultado-texto-extraido {
    background: #f1f5f9;
    border-radius: 10px;
    padding: 1.25rem;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.85rem;
    color: var(--color-texto-principal);
    line-height: 1.6;
    border: 1px solid var(--color-borde-suave);
    white-space: pre-wrap;
    word-break: break-word;
}

.resultado-texto-titulo {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-texto-secundario);
    margin-bottom: 0.5rem;
}

/* Modo Manual */
.modo-manual-contenedor {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px var(--color-sombra);
    border: 1px solid var(--color-borde-suave);
}

.modo-manual-titulo {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-header-start);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modo-manual-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
}

.form-grupo {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
    min-width: 150px;
}

.form-grupo label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-texto-secundario);
}

.form-grupo input,
.form-grupo select {
    padding: 0.65rem 1rem;
    border: 1px solid var(--color-borde-suave);
    border-radius: 10px;
    font-family: var(--fuente-base);
    font-size: 0.95rem;
    color: var(--color-texto-principal);
    background-color: #f8fafc;
    transition: var(--transicion-suave);
    outline: none;
}

.form-grupo input:focus,
.form-grupo select:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(var(--color-primario-rgb), 0.1);
}

.btn-calcular {
    padding: 0.7rem 1.75rem;
    background: linear-gradient(135deg, var(--color-oro) 0%, #c49b2a 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: var(--fuente-base);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicion-suave);
    white-space: nowrap;
}

.btn-calcular:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
}

/* ==========================================================================
   MÓDULO DE ADMINISTRACIÓN
   ========================================================================== */

/* Login */
.login-contenedor {
    max-width: 440px;
    width: 100%;
    margin: 3rem auto;
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--color-borde-suave);
    text-align: center;
}

.login-icono {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.login-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-header-start);
    margin-bottom: 0.4rem;
}

.login-subtitulo {
    font-size: 0.9rem;
    color: var(--color-texto-secundario);
    margin-bottom: 2rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
}

.login-form .form-grupo {
    width: 100%;
}

.login-form input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--color-borde-suave);
    border-radius: 10px;
    font-family: var(--fuente-base);
    font-size: 1rem;
    color: var(--color-texto-principal);
    background-color: #f8fafc;
    transition: var(--transicion-suave);
    outline: none;
}

.login-form input:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(var(--color-primario-rgb), 0.1);
}

.btn-login {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-secundario) 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: var(--fuente-base);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicion-suave);
    margin-top: 0.5rem;
}

.btn-login:hover {
    box-shadow: 0 6px 20px rgba(10, 17, 40, 0.35);
    transform: translateY(-2px);
}

.login-error {
    display: none;
    color: #dc2626;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    padding: 0.6rem;
    background-color: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

.login-error.visible {
    display: block;
    animation: aparecer-suave 0.3s ease;
}

/* Panel de Administración (Post-Login) */
.admin-panel {
    display: none;
}

.admin-panel.visible {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: aparecer-suave 0.4s ease;
}

.admin-header-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-bienvenida {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b; /* Color oscuro para que se vea sobre fondo blanco */
}

.admin-bienvenida span {
    color: var(--color-primario);
}

.btn-cerrar-sesion {
    padding: 0.6rem 1.25rem;
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 10px;
    font-family: var(--fuente-base);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicion-suave);
}

.btn-cerrar-sesion:hover {
    background-color: #fca5a5;
    color: #7f1d1d;
}

/* Búsqueda en tabla admin */
.admin-busqueda {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-borde-suave);
    border-radius: 10px;
    font-family: var(--fuente-base);
    font-size: 0.95rem;
    color: var(--color-texto-principal);
    background-color: #f8fafc;
    outline: none;
    transition: var(--transicion-suave);
}

.admin-busqueda:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(var(--color-primario-rgb), 0.1);
}

/* Tabla de Precios */
.tabla-contenedor {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--color-sombra);
    border: 1px solid var(--color-borde-suave);
}

.tabla-precios {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tabla-precios thead {
    background: linear-gradient(135deg, var(--color-header-start) 0%, var(--color-header-end) 100%);
    color: #ffffff;
}

.tabla-precios th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tabla-precios td {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--color-borde-suave);
    vertical-align: middle;
}

.tabla-precios tbody tr {
    transition: var(--transicion-suave);
}

.tabla-precios tbody tr:hover {
    background-color: rgba(var(--color-primario-rgb), 0.03);
}

.tabla-precios tbody tr:last-child td {
    border-bottom: none;
}

.tabla-id {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
    color: var(--color-primario);
    font-size: 0.8rem;
}

.tabla-seccion {
    font-size: 0.8rem;
    color: var(--color-texto-secundario);
    font-weight: 500;
}

.tabla-input-precio {
    width: 100px;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--color-borde-suave);
    border-radius: 8px;
    font-family: var(--fuente-base);
    font-size: 0.9rem;
    text-align: right;
    color: var(--color-texto-principal);
    background-color: #f8fafc;
    outline: none;
    transition: var(--transicion-suave);
}

.tabla-input-precio:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(var(--color-primario-rgb), 0.1);
}

.btn-guardar-precio {
    padding: 0.45rem 1rem;
    background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-secundario) 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: var(--fuente-base);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicion-suave);
}

.btn-guardar-precio:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(var(--color-primario-rgb), 0.3);
}

.btn-guardado {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%) !important;
}

/* Precio badge en tarjetas del catálogo */
.tarjeta-precio {
    font-size: 1rem;
    font-weight: 700;
    color: #16a34a;
    background-color: #f0fdf4;
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
    align-self: flex-start;
}

/* Responsive para nuevos módulos */
@media (max-width: 768px) {
    .nav-principal {
        gap: 0.35rem;
    }

    .nav-enlace {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .pagina-contenedor {
        padding: 1.5rem 1rem;
    }

    .zona-drop {
        padding: 2rem 1rem;
    }

    .resultado-grid {
        grid-template-columns: 1fr 1fr;
    }

    .login-contenedor {
        margin: 1.5rem auto;
        padding: 1.75rem;
    }

    .tabla-precios th,
    .tabla-precios td {
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }

    .tabla-input-precio {
        width: 80px;
    }

    .modo-manual-form {
        flex-direction: column;
    }
}

/* ==========================================================================
   SISTEMA DE COINCIDENCIAS INTELIGENTE (SMART MATCHING)
   ========================================================================== */

.coincidencias-oculto {
    display: none;
}

.grid-coincidencias {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    max-height: none !important;
    overflow-y: visible !important;
    padding-right: 0.5rem;
}

/* Scrollbar personalizado para el grid */
.grid-coincidencias::-webkit-scrollbar {
    width: 6px;
}
.grid-coincidencias::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}
.grid-coincidencias::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.grid-coincidencias::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.tarjeta-coincidencia {
    display: flex;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    gap: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.tarjeta-coincidencia:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.coincidencia-imagen {
    width: 180px;
    height: 180px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0.5rem;
}

.coincidencia-imagen img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.coincidencia-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.coincidencia-nombre {
    font-size: 1.15rem;
    font-weight: 500;
    color: #007185;
    line-height: 1.4;
    cursor: pointer;
    margin-bottom: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.coincidencia-nombre:hover {
    color: #c7511f;
    text-decoration: underline;
}

.coincidencia-rating {
    font-size: 0.95rem;
    color: #ffa41c;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.coincidencia-reviews {
    color: #007185;
    font-size: 0.85rem;
    font-weight: 400;
}

.coincidencia-stock {
    font-size: 0.9rem;
    color: #007600;
    font-weight: 600;
}

.coincidencia-controles {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.coincidencia-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #0f1111;
    cursor: pointer;
    background: #ffd814;
    padding: 0.4rem 0.8rem;
    border-radius: 99px;
    font-weight: 500;
    border: 1px solid #fcd200;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: background 0.2s;
}

.coincidencia-checkbox-label:hover {
    background: #f7ca00;
}

.coincidencia-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #007185;
}

/* Selector de Cantidad (Stepper) */
.coincidencia-cantidad {
    display: flex;
    align-items: center;
    border: 1px solid #888C8C;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f2f2;
    box-shadow: 0 1px 2px rgba(15,17,17,.15);
}

.btn-cantidad {
    background: transparent;
    border: none;
    padding: 0.4rem 0.7rem;
    font-weight: bold;
    color: #0f1111;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn-cantidad:hover {
    background: #e3e6e6;
}

.input-cantidad {
    width: 40px;
    border: none;
    border-left: 1px solid #888C8C;
    border-right: 1px solid #888C8C;
    text-align: center;
    font-family: var(--fuente-base);
    font-size: 0.95rem;
    font-weight: 600;
    background: #ffffff;
    outline: none;
    padding: 0.4rem 0;
}

.coincidencia-precio-bloque {
    text-align: right;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.coincidencia-precio {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f1111;
}

.coincidencia-envio {
    font-size: 0.85rem;
    color: #565959;
    font-weight: 500;
}


/* Buscador Manual Fallback */
.grid-cuentas-bancarias {
    grid-template-columns: repeat(3, 1fr);
}
.buscador-manual-contenedor {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px dashed var(--color-borde-suave);
    position: relative;
}

.buscador-manual-texto {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-texto-secundario);
    margin-bottom: 0.75rem;
}

.buscador-manual-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-borde-suave);
    border-radius: 10px;
    font-family: var(--fuente-base);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transicion-suave);
}

.buscador-manual-input:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(var(--color-primario-rgb), 0.1);
}

.resultados-busqueda-manual {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--color-borde-suave);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-height: 250px;
    overflow-y: auto;
    z-index: 10;
    display: none;
    margin-top: 0.5rem;
}

.resultados-busqueda-manual.visible {
    display: block;
}

.item-busqueda-manual {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: var(--transicion-suave);
}

.item-busqueda-manual:last-child {
    border-bottom: none;
}

.item-busqueda-manual:hover {
    background-color: rgba(var(--color-primario-rgb), 0.05);
}

.item-busqueda-manual img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    background: #f8fafc;
}

.item-busqueda-manual-info {
    flex: 1;
}

.item-busqueda-manual-nombre {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-texto-principal);
}

.item-busqueda-manual-precio {
    font-size: 0.8rem;
    font-weight: 700;
    color: #16a34a;
}

/* ==========================================================================
   BARRA DE ACTUALIZACIÓN Y ESTADO DEL CATÁLOGO
   ========================================================================== */

.barra-actualizacion {
    background: #ffffff;
    border-bottom: 1px solid var(--color-borde-suave);
    padding: 0.6rem 1.5rem;
}

.barra-actualizacion-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.info-actualizacion {
    font-size: 0.8rem;
    color: var(--color-texto-secundario);
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.info-actualizacion.visible {
    opacity: 1;
}

.btn-actualizar {
    padding: 0.45rem 1.2rem;
    background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-secundario) 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: var(--fuente-base);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicion-suave);
    white-space: nowrap;
}

.btn-actualizar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--color-primario-rgb), 0.3);
}

.btn-actualizar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   SKELETON LOADING (Placeholder mientras carga)
   ========================================================================== */

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-seccion {
    pointer-events: none;
}

.skeleton-tarjeta {
    pointer-events: none;
}

.skeleton-imagen {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite ease-in-out;
    min-height: 180px;
}

.skeleton-linea {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite ease-in-out;
    border-radius: 6px;
    height: 16px;
}

.skeleton-titulo {
    width: 40%;
    height: 24px;
}

.skeleton-id {
    width: 50px;
    height: 14px;
}

.skeleton-nombre {
    width: 80%;
    height: 14px;
}

/* ==========================================================================
   LAZY RENDER - ANIMACIÓN DE APARICIÓN DE SECCIONES
   ========================================================================== */

@keyframes seccion-aparecer {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.seccion-animada {
    animation: seccion-aparecer 0.4s ease forwards;
}

.seccion-placeholder {
    min-height: 100px;
}

.tarjeta-imagen-contenedor img {
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tarjeta-imagen-contenedor img.imagen-cargada {
    opacity: 1;
}


/* ==========================================================================
   INDICADOR DE BÚSQUEDA Y SIN RESULTADOS
   ========================================================================== */

.busqueda-indicador {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    color: #1d4ed8;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    animation: seccion-aparecer 0.3s ease;
}

.busqueda-sin-resultados {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-texto-secundario);
}

.busqueda-sin-icono {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.busqueda-sin-resultados h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-texto-principal);
    margin-bottom: 0.5rem;
}

.busqueda-sin-resultados p {
    font-size: 0.95rem;
}

/* Responsive para barra de actualización */
@media (max-width: 768px) {
    .barra-actualizacion-inner {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .info-actualizacion {
        font-size: 0.7rem;
    }
}

/* ==========================================================================
   INFO DETALLADA EN TARJETAS DE PRODUCTO
   ========================================================================== */

.tarjeta-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tarjeta-ext {
    font-size: 0.65rem;
    font-weight: 700;
    color: #6366f1;
    background-color: #eef2ff;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.tarjeta-seccion-label {
    font-size: 0.75rem;
    color: var(--color-texto-secundario);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tarjeta-tamano {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 400;
}

/* Badge de partes (PART1/PART2) */
.badge-partes {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    z-index: 2;
    pointer-events: none;
}

/* ==========================================================================
   MODAL DE IMAGEN GRANDE + GALERÍA DE PARTES
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: modal-fade-in 0.25s ease;
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS/Android */
}

@keyframes modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-contenido {
    background: #ffffff;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Scroll suave en Android/iOS */
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    animation: modal-slide-up 0.3s ease;
}

@keyframes modal-slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-cerrar {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #374151;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-cerrar:hover {
    background: #e2e8f0;
}

/* Área de imagen del modal */
.modal-imagen-area {
    position: relative;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    max-height: 55vh;
    padding: 2rem;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.modal-imagen {
    max-width: 100%;
    max-height: 50vh;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.3s;
}

/* Botones de navegación */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: var(--color-header-start);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.modal-prev { left: 12px; }
.modal-next { right: 12px; }

/* Info del modal */
.modal-info {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-titulo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-header-start);
    line-height: 1.3;
}

.modal-parte-badge {
    display: inline-block;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    align-self: flex-start;
}

.modal-detalles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--color-borde-suave);
}

.modal-detalles p {
    font-size: 0.85rem;
    color: var(--color-texto-principal);
    margin: 0;
}

.modal-detalles strong {
    color: var(--color-texto-secundario);
    font-weight: 600;
}

/* Thumbnails de partes */
.modal-partes-nav {
    margin-top: 0.5rem;
}

.modal-partes-titulo {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-header-start);
    margin-bottom: 0.5rem;
}

.modal-thumbs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.modal-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 10px;
    border: 2px solid var(--color-borde-suave);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    position: relative;
}

.modal-thumb img {
    width: 100%;
    height: 50px;
    object-fit: contain;
}

.modal-thumb span {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--color-texto-secundario);
    margin-top: 2px;
}

.modal-thumb:hover {
    border-color: var(--color-primario);
    transform: scale(1.05);
}

.modal-thumb-activo {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
    background: #eef2ff;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0.5rem;
    }

    .modal-contenido {
        border-radius: 16px;
        max-height: 95vh;
    }

    .modal-imagen-area {
        min-height: 200px;
        max-height: 40vh;
        padding: 1rem;
    }

    .modal-info {
        padding: 1rem 1.25rem 1.5rem;
    }

    .modal-titulo {
        font-size: 1.1rem;
    }

    .modal-detalles {
        grid-template-columns: 1fr;
    }

    .modal-thumb {
        width: 55px;
        height: 55px;
    }

    .modal-thumb img {
        height: 38px;
    }

    .modal-nav {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* ==========================================================================
   CARRUSEL HERO
   ========================================================================== */
.carrusel-hero-container {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
    background-color: #e2e8f0;
    touch-action: pan-y; /* Permite scroll vertical pero habilita swipe horizontal */
}

.carrusel-hero-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    will-change: transform; /* Optimización GPU para Android */
}

.carrusel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    color: #333;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    z-index: 10;
    transition: background 0.3s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation; /* Previene doble-tap zoom en Android */
    min-width: 44px; /* Mínimo touch target recomendado */
    min-height: 44px;
}

.carrusel-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

.carrusel-btn-prev { left: 10px; }
.carrusel-btn-next { right: 10px; }

.carrusel-indicadores {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carrusel-indicadores .indicador {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.carrusel-indicadores .indicador.activo {
    background-color: #ffffff;
}

/* ==========================================================================
   LAYOUT PRINCIPAL (SIDEBAR + MAIN) PREMIUM
   ========================================================================== */
.layout-principal {
    display: flex;
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 2rem;
    gap: 3rem;
    align-items: flex-start;
}

.sidebar-categorias {
    width: 280px;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid var(--color-borde-suave);
    border-radius: 24px;
    overflow: hidden;
    position: sticky;
    top: 100px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

.sidebar-titulo {
    background: var(--color-primario);
    color: #ffffff;
    padding: 1.5rem;
    font-weight: 700;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    letter-spacing: 0.5px;
}

.sidebar-icono-menu {
    font-size: 1.4rem;
}

.lista-categorias {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    max-height: 70vh;
    overflow-y: auto;
}

/* Estilizando el scrollbar del sidebar */
.lista-categorias::-webkit-scrollbar {
    width: 6px;
}
.lista-categorias::-webkit-scrollbar-track {
    background: transparent;
}
.lista-categorias::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 10px;
}

.categoria-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-texto-principal);
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transicion-suave);
    border-left: 4px solid transparent;
}

.categoria-item:hover, .categoria-item.activa {
    background: rgba(99, 102, 241, 0.08);
    color: var(--color-primario);
    border-left: 4px solid var(--color-primario);
    padding-left: 1.8rem; /* Efecto indent */
}

.categoria-item::after {
    content: '›';
    font-size: 1.4rem;
    color: var(--color-texto-secundario);
    transition: var(--transicion-suave);
}

.categoria-item:hover::after, .categoria-item.activa::after {
    transform: translateX(4px);
    color: var(--color-primario);
}

.contenido-catalogo {
    flex-grow: 1;
    min-width: 0;
}

/* Responsive Sidebar */
@media (max-width: 900px) {
    .layout-principal {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    .sidebar-categorias {
        width: 100%;
        position: static;
        margin-bottom: 0;
        border-radius: 16px;
    }
}

/* ==========================================================================
   DROPDOWN CATEGORÍAS
   ========================================================================== */
.dropdown-container {
    position: relative;
    cursor: pointer;
}

.dropdown-trigger {
    display: inline-block;
    height: 100%;
    padding: 0.4rem 0;
}

.dropdown-menu-flotante {
    position: absolute;
    top: 100%;
    left: 0;
    width: 250px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-container:hover .dropdown-menu-flotante {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header-morado {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    font-weight: 700;
    padding: 15px 20px;
    font-size: 1rem;
    text-transform: uppercase;
}

.dropdown-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-lista li {
    border-bottom: 1px solid #f1f5f9;
}

.dropdown-lista li:last-child {
    border-bottom: none;
}

.dropdown-lista li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.dropdown-lista li a::after {
    content: "›";
    font-size: 1.2rem;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.dropdown-lista li a:hover {
    background: #f8fafc;
    color: #6366f1;
    border-left: 4px solid #6366f1;
    padding-left: 16px;
}

.dropdown-lista li a:hover::after {
    color: #6366f1;
    transform: translateX(3px);
}

/* ==========================================================================
   MODAL DE PRODUCTO (DISEÑO E-COMMERCE)
   ========================================================================== */
.e-commerce-modal {
    max-width: 900px !important; /* Más ancho para dos columnas */
    width: 95% !important;
    padding: 0 !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 12px;
}

.modal-grid-ecommerce {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 500px;
}

@media (max-width: 768px) {
    .modal-grid-ecommerce {
        grid-template-columns: 1fr;
    }
}

/* Columna Izquierda: Galería */
.modal-galeria {
    padding: 2rem;
    border-right: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
}

.modal-imagen-principal {
    position: relative;
    width: 100%;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.modal-imagen-principal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Columna Derecha: Info y Compra */
.modal-info-ecommerce {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    background: #fafaf9;
}

.modal-titulo-grande {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.modal-reviews {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.modal-reviews .stars {
    color: #cbd5e1;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.modal-precio-box {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.modal-precio-valor {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0369a1; /* Azul elegante */
    line-height: 1;
}

.modal-impuestos {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.3rem;
}

.modal-meta-ecommerce {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #475569;
    padding: 1rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.modal-meta-ecommerce strong {
    color: #1e293b;
}

.modal-desc-corta {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 2rem;
}

.modal-desc-corta p {
    margin: 0 0 0.4rem 0;
}

/* Controles de Compra */
.modal-acciones-compra {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cantidad-selector {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cantidad-selector label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1e293b;
}

.cantidad-controles input {
    width: 60px;
    height: 42px;
    text-align: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    outline: none;
}

.btn-anadir-carrito {
    flex-grow: 1;
    height: 44px; /* Touch target mínimo 44px para Android */
    min-height: 44px;
    background: #0f172a;
    color: white;
    border: none;
    border-radius: 99px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-anadir-carrito:hover {
    background: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.2);
}

@media (hover: none) and (pointer: coarse) {
    .btn-anadir-carrito:hover {
        transform: none;
        box-shadow: none;
    }
    .btn-anadir-carrito:active {
        background: #334155;
        transform: scale(0.97);
    }
}

.modal-stock-badge {
    color: #10b981;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.modal-compartir {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
}

.btn-share-fb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1877f2;
    color: white;
    border: none;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   PANEL DE ESCÁNER (ADMIN)
   ========================================================================== */
.panel-escaner {
    background: #ffffff;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.1), 0 8px 10px -6px rgba(59, 130, 246, 0.1);
}

.escaner-header {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.escaner-header h3 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1.3rem;
}

.escaner-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.escaner-body {
    display: flex;
    gap: 2rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.escaner-grupo {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
    min-width: 250px;
}

.escaner-grupo label {
    font-weight: 700;
    color: #334155;
    font-size: 0.9rem;
}

.escaner-grupo input {
    padding: 0.8rem 1rem;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
    transition: all 0.2s;
}

.escaner-grupo input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.escaner-info-producto {
    width: 100%;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #10b981;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.escaner-nombre-producto {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1rem;
}

.escaner-stock-actual {
    font-size: 0.9rem;
    color: #64748b;
    background: #e2e8f0;
    padding: 0.3rem 0.6rem;
    border-radius: 99px;
    font-weight: bold;
}

.escaner-cantidad-controles {
    display: flex;
    gap: 0.5rem;
}

.escaner-cantidad-controles input {
    flex-grow: 1;
}

.btn-escaner-guardar {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-escaner-guardar:hover {
    background: #2563eb;
}

.escaner-mensaje {
    margin-top: 1rem;
    font-weight: bold;
    font-size: 0.95rem;
    padding: 0.5rem;
    border-radius: 6px;
    display: none;
}

.escaner-mensaje.exito {
    display: block;
    background: #dcfce7;
    color: #166534;
}

.escaner-mensaje.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
}

/* ==========================================================================
   DASHBOARD PREMIUM - ADMINISTRADOR (NUEVO REDISEÑO)
   ========================================================================== */

/* Login Premium */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 2rem;
}

.login-glass-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.login-icono-premium {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 50%;
    color: #3b82f6;
}

.login-header h2 {
    color: #0f172a;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
}

.login-header p {
    color: #64748b;
    margin-bottom: 2rem;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper span {
    position: absolute;
    left: 1rem;
    color: #94a3b8;
    font-size: 1.2rem;
}

.input-icon-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 1.05rem;
    font-weight: 500;
    color: #334155;
    transition: all 0.3s ease;
}

.input-icon-wrapper input:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    outline: none;
}

.btn-login-premium {
    width: 100%;
    padding: 1.1rem;
    background: var(--color-primario);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 102, 204, 0.2);
}

.btn-login-premium:hover {
    transform: translateY(-2px);
    background: #0052a3; /* Un azul más oscuro */
    box-shadow: 0 6px 15px rgba(0, 102, 204, 0.3);
}

/* Dashboard Layout */
.dashboard-mode {
    display: none;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem 0;
    animation: fadeIn 0.4s ease;
}

.dashboard-mode.visible {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-title {
    font-size: 2.2rem;
    color: #0f172a;
    margin: 0 0 0.3rem 0;
    font-weight: 800;
}

.dashboard-title span {
    color: #3b82f6;
    font-weight: 300;
}

.dashboard-subtitle {
    color: #64748b;
    margin: 0;
    font-size: 1.1rem;
}

.btn-cerrar-sesion-premium {
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.btn-cerrar-sesion-premium:hover {
    background: #f8fafc;
    color: #ef4444;
    border-color: #fecaca;
}

/* Dashboard Widgets */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.widget-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    transition: transform 0.2s;
}

.widget-card:hover {
    transform: translateY(-3px);
}

.widget-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

.widget-blue .widget-icon { background: #eff6ff; color: #3b82f6; }
.widget-green .widget-icon { background: #f0fdf4; color: #10b981; }
.widget-orange .widget-icon { background: #fff7ed; color: #f97316; }

.widget-info h4 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.widget-info p {
    margin: 0.3rem 0 0 0;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Dashboard Grid (Scanner & Accesos) */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.dashboard-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.card-header {
    background: #f8fafc;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.card-header h3 {
    margin: 0 0 0.3rem 0;
    color: #1e293b;
    font-size: 1.25rem;
}

.card-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.card-body {
    padding: 1.5rem;
}

/* Inputs premium inside cards */
.input-premium {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 500;
    color: #0f172a;
    transition: all 0.2s;
    background: #f8fafc;
}

.input-premium:focus {
    background: white;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.badge-premium {
    background: #e0e7ff;
    color: #4338ca;
    padding: 0.4rem 0.8rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Tabla Card */
.tabla-card {
    grid-column: 1 / -1;
}

.tabla-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.tabla-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #0f172a;
}

.input-search-wrapper {
    position: relative;
    width: 300px;
}

.input-search-wrapper span {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.admin-busqueda-premium {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 99px;
    font-size: 0.95rem;
    background: #f8fafc;
    transition: all 0.2s;
}

.admin-busqueda-premium:focus {
    background: white;
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.tabla-contenedor-premium {
    overflow-x: auto;
    max-height: 600px; /* Scroll interno para cabecera fija */
}

.tabla-precios-premium {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.tabla-precios-premium thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    border-bottom: 2px solid #e2e8f0;
    z-index: 10;
}

.tabla-precios-premium tbody tr {
    transition: background 0.2s;
}

.tabla-precios-premium tbody tr:hover {
    background: #f1f5f9;
}

.tabla-precios-premium td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    color: #334155;
    font-size: 0.95rem;
}

/* Campos dentro de la tabla */
.tabla-input-premium {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.tabla-input-premium:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    outline: none;
}

.btn-guardar-premium {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-guardar-premium:hover {
    background: #059669;
}

/* ==========================================================================
   RESPONSIVE GLOBAL PARA MÓVILES (Android / iOS)
   ========================================================================== */

/* ---- Tablets y móviles grandes (max 768px) ---- */
@media (max-width: 768px) {

    /* HEADER TOP: Logo + Carrito + Auth en una sola fila cómoda */
    .amazon-header-top {
        flex-wrap: wrap;
        padding: 0.6rem 0.8rem;
        gap: 0.3rem;
    }

    .amazon-logo {
        max-height: 40px;
    }

    .amazon-location, .returns-link, .lang-selector {
        display: none !important;
    }

    .amazon-search {
        order: 10;
        width: 100%;
        margin-top: 0.5rem;
        height: 40px;
    }

    .search-select {
        display: none;
    }

    .amazon-nav-right {
        gap: 0.4rem;
    }

    .auth-link .nav-line1 {
        font-size: 0.65rem;
    }
    .auth-link .nav-line2 {
        font-size: 0.75rem;
    }

    .cart-link {
        padding: 0.4rem 0.8rem;
    }

    .cart-text {
        font-size: 0.8rem;
    }

    /* BARRA DE NAVEGACIÓN INFERIOR */
    .amazon-header-bottom {
        justify-content: flex-start;
        padding: 0.6rem 0.8rem;
        gap: 0.6rem;
        -webkit-overflow-scrolling: touch;
    }

    .nav-bottom-item {
        font-size: 0.85rem;
        padding: 0.4rem 0.7rem;
        white-space: nowrap;
    }

    /* CINTA SUPERIOR (Banner informativo) */
    .cinta-superior-container {
        height: auto;
        max-height: 50px;
    }

    .cinta-superior-img {
        object-fit: cover;
        width: 100%;
        height: auto;
    }

    /* CARRUSEL HERO */
    .carrusel-hero-container {
        height: 200px;
    }

    .carrusel-btn {
        font-size: 1.5rem;
        padding: 0.3rem 0.6rem;
    }

    .carrusel-indicadores .indicador {
        width: 8px;
        height: 8px;
    }

    /* LAYOUT PRINCIPAL: Sidebar + Grid en columna */
    .layout-principal {
        flex-direction: column;
        padding: 0 0.8rem;
        margin: 1rem auto;
        gap: 1rem;
    }

    .sidebar-categorias {
        width: 100% !important;
        position: static !important;
    }

    /* CONTENIDO PRINCIPAL (CATÁLOGO) */
    #catalogo-contenedor {
        padding: 1rem 0.5rem;
        gap: 1.5rem;
    }

    .seccion-catalogo {
        padding: 1rem;
        border-radius: 14px;
    }

    .seccion-header {
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .seccion-titulo {
        font-size: 1.2rem;
    }

    .seccion-contador {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
    }

    /* GRID DE PRODUCTOS: 2 columnas en móvil */
    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .tarjeta-producto:hover {
        transform: none; /* Quita hover animations en móvil (no hay hover real) */
    }

    .tarjeta-info {
        padding: 0.7rem;
        gap: 0.3rem;
    }

    .tarjeta-nombre {
        font-size: 0.8rem;
        min-height: auto;
        -webkit-line-clamp: 2;
    }

    .tarjeta-id {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }

    /* MODAL DE PRODUCTO (E-COMMERCE) — Correcciones Móvil */
    .e-commerce-modal {
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 16px 16px 0 0 !important;
        max-height: 95vh !important;
    }

    .modal-grid-ecommerce {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
    }

    .modal-galeria {
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
    }

    .modal-imagen-principal {
        height: 220px;
        margin-bottom: 0.8rem;
    }

    .modal-info-ecommerce {
        padding: 1.2rem 1rem;
    }

    .modal-titulo-grande {
        font-size: 1.1rem;
    }

    .modal-precio-valor {
        font-size: 1.6rem;
    }

    .modal-meta-ecommerce {
        flex-wrap: wrap;
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .modal-acciones-compra {
        flex-wrap: wrap;
    }

    .btn-anadir-carrito {
        width: 100%;
        height: 44px;
        font-size: 0.95rem;
    }

    /* MODAL OVERLAY (general) */
    .modal-overlay {
        padding: 0 !important;
        align-items: flex-end !important;
    }

    .modal-contenido {
        border-radius: 16px 16px 0 0 !important;
        max-height: 95vh !important;
        width: 100% !important;
    }

    /* BOTÓN WHATSAPP */
    .whatsapp-flotante {
        bottom: 20px;
        left: 15px;
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }

    /* HERO BANNER */
    .hero-banner {
        padding: 2rem 1rem;
        margin-bottom: 1rem;
    }

    .hero-titulo {
        font-size: 1.5rem;
    }

    .hero-subtitulo {
        font-size: 1rem;
    }

    /* FOOTER */
    .app-footer {
        padding: 2rem 1rem;
    }

    .info-contacto-contenedor {
        margin-bottom: 2rem;
    }

    .info-contacto-titulo {
        font-size: 1rem;
    }

    .info-texto {
        font-size: 0.9rem;
    }

    /* ===================================================================
       DASHBOARD PREMIUM - RESPONSIVO PARA TABLETS/MOBILES (768px)
       =================================================================== */

    /* Login */
    .login-wrapper {
        min-height: 60vh;
        padding: 1rem;
    }

    .login-glass-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .login-icono-premium {
        font-size: 2.5rem;
        padding: 0.8rem;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    .input-icon-wrapper input {
        padding: 0.85rem 0.85rem 0.85rem 2.8rem;
        font-size: 1rem;
    }

    .btn-login-premium {
        padding: 0.95rem;
        font-size: 1rem;
    }

    /* Dashboard Header */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding-bottom: 1rem;
    }

    .dashboard-title {
        font-size: 1.5rem;
    }

    .dashboard-subtitle {
        font-size: 0.95rem;
    }

    .btn-cerrar-sesion-premium {
        width: 100%;
        text-align: center;
        padding: 0.7rem 1rem;
    }

    /* Widgets */
    .dashboard-widgets {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0.8rem;
    }

    .widget-card {
        padding: 1rem;
        gap: 0.8rem;
        border-radius: 12px;
    }

    .widget-icon {
        font-size: 1.8rem;
        width: 45px;
        height: 45px;
        border-radius: 10px;
    }

    .widget-info h4 {
        font-size: 1.4rem;
    }

    .widget-info p {
        font-size: 0.78rem;
    }

    /* Dashboard Grid (Scanner + Accesos) */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dashboard-card {
        border-radius: 14px;
    }

    .card-header {
        padding: 1.2rem;
    }

    .card-header h3 {
        font-size: 1.1rem;
    }

    .card-body {
        padding: 1.2rem;
    }

    .dashboard-mode {
        gap: 1.2rem;
        padding: 0.5rem 0;
    }

    /* Escáner en móvil */
    .escaner-grupo {
        min-width: unset;
        width: 100%;
    }

    .escaner-cantidad-controles {
        flex-direction: column;
        gap: 0.5rem;
    }

    .escaner-cantidad-controles .btn-escaner-guardar {
        width: 100%;
    }

    .input-premium {
        font-size: 1rem;
        padding: 0.85rem 1rem;
    }

    /* Empty state in Accesos */
    .empty-state {
        text-align: center;
        padding: 2rem 1rem;
    }

    .empty-icon {
        font-size: 2.5rem;
        display: block;
        margin-bottom: 0.5rem;
    }

    /* Tabla Card */
    .tabla-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
        padding: 1.2rem;
    }

    .tabla-header h3 {
        font-size: 1.2rem;
    }

    .input-search-wrapper {
        width: 100%;
    }

    .admin-busqueda-premium {
        width: 100%;
    }

    /* TABLA → TARJETAS EN MÓVIL */
    .tabla-contenedor-premium {
        max-height: none;
        overflow-x: visible;
    }

    .tabla-precios-premium thead {
        display: none;
    }

    .tabla-precios-premium,
    .tabla-precios-premium tbody {
        display: block;
        width: 100%;
    }

    .tabla-precios-premium tbody tr {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1rem;
        margin: 0 0.8rem 0.8rem 0.8rem;
        background: #f8fafc;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        position: relative;
    }

    .tabla-precios-premium tbody tr:hover {
        background: #f1f5f9;
    }

    .tabla-precios-premium td {
        display: flex;
        flex-direction: column;
        padding: 0;
        border: none;
        font-size: 0.9rem;
    }

    /* Nombre del producto - ancho completo */
    .tabla-precios-premium td:nth-child(2) {
        width: 100%;
        order: -2;
        margin-bottom: 0.3rem;
    }

    .tabla-precios-premium td:nth-child(2) strong {
        font-size: 1rem;
    }

    /* Sección - ancho completo */
    .tabla-precios-premium td:nth-child(3) {
        width: 100%;
        order: -1;
        margin-bottom: 0.5rem;
    }

    /* Código */
    .tabla-precios-premium td:nth-child(1) {
        width: 100%;
    }

    .tabla-precios-premium td:nth-child(1)::before { content: "Código:"; font-size: 0.75rem; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.2rem; }
    .tabla-precios-premium td:nth-child(4)::before { content: "Stock:"; font-size: 0.75rem; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.2rem; }
    .tabla-precios-premium td:nth-child(5)::before { content: "Estado:"; font-size: 0.75rem; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.2rem; }
    .tabla-precios-premium td:nth-child(6)::before { content: "Precio:"; font-size: 0.75rem; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.2rem; }

    /* Stock + Estado + Precio en 3 columnas */
    .tabla-precios-premium td:nth-child(4),
    .tabla-precios-premium td:nth-child(5),
    .tabla-precios-premium td:nth-child(6) {
        flex: 1;
        min-width: 0;
    }

    .tabla-precios-premium td:nth-child(4) input,
    .tabla-precios-premium td:nth-child(6) input {
        width: 100% !important;
    }

    /* Botón guardar - ancho completo */
    .tabla-precios-premium td:nth-child(7) {
        width: 100%;
        margin-top: 0.3rem;
    }

    .tabla-precios-premium td:nth-child(7) .btn-guardar-premium {
        width: 100%;
        padding: 0.7rem;
        font-size: 0.95rem;
        border-radius: 8px;
    }

    .tabla-input-premium {
        padding: 0.6rem 0.5rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }
}

/* ---- Móviles pequeños (max 480px) ---- */
@media (max-width: 480px) {

    .amazon-header-top {
        padding: 0.5rem;
    }

    .amazon-logo {
        max-height: 35px;
    }

    .amazon-search {
        height: 38px;
    }

    .search-btn {
        width: 45px;
        font-size: 1rem;
    }

    .amazon-header-bottom {
        padding: 0.5rem;
        gap: 0.3rem;
    }

    .nav-bottom-item {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    /* Grid: sigue 2 columnas pero más compacto */
    .productos-grid {
        gap: 0.5rem;
    }

    .tarjeta-imagen-contenedor {
        padding: 0.5rem;
    }

    .tarjeta-info {
        padding: 0.5rem;
    }

    .tarjeta-nombre {
        font-size: 0.72rem;
    }

    .seccion-catalogo {
        padding: 0.7rem;
        border-radius: 10px;
    }

    .seccion-titulo {
        font-size: 1rem;
    }

    /* Carrusel más pequeño */
    .carrusel-hero-container {
        height: 160px;
    }

    /* DASHBOARD 480px */
    .login-glass-card {
        padding: 1.5rem 1.2rem;
        border-radius: 16px;
    }

    .login-icono-premium {
        font-size: 2rem;
        padding: 0.7rem;
    }

    .login-header h2 {
        font-size: 1.3rem;
    }

    .dashboard-title {
        font-size: 1.3rem;
    }

    .dashboard-widgets {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .widget-card {
        flex-direction: row;
        padding: 0.9rem;
    }

    .widget-icon {
        font-size: 1.6rem;
        width: 40px;
        height: 40px;
    }

    .widget-info h4 {
        font-size: 1.3rem;
    }

    .card-header {
        padding: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .tabla-precios-premium tbody tr {
        margin: 0 0.5rem 0.6rem 0.5rem;
        padding: 0.8rem;
    }

    /* En pantalla muy chica: Stock + Estado + Precio se apilan */
    .tabla-precios-premium td:nth-child(4),
    .tabla-precios-premium td:nth-child(5),
    .tabla-precios-premium td:nth-child(6) {
        flex: none;
        width: 100%;
    }
}

/* ==========================================================================
   MOTOR DE BÚSQUEDA INTELIGENTE — ESTILOS v2.0
   ========================================================================== */

/* --- AUTO-SUGGEST DROPDOWN --- */
.search-suggest-container {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--color-borde-suave);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 999;
    max-height: 420px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: none;
    animation: suggestSlideIn 0.25s ease-out;
}

@keyframes suggestSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.suggest-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(226, 232, 240, 0.4);
}

.suggest-item:last-child {
    border-bottom: none;
}

.suggest-item:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(168, 85, 247, 0.06));
}

.suggest-item:first-child {
    border-radius: 16px 16px 0 0;
}

.suggest-icon {
    font-size: 1rem;
    opacity: 0.5;
    flex-shrink: 0;
}

.suggest-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.suggest-nombre {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--color-texto-principal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggest-seccion {
    font-size: 0.75rem;
    color: var(--color-texto-secundario);
}

.suggest-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.suggest-exact .suggest-badge {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
}

.suggest-partial .suggest-badge {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.suggest-fuzzy .suggest-badge {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #3730a3;
}

.suggest-footer {
    padding: 0.75rem 1.2rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primario);
    cursor: pointer;
    border-top: 1px solid var(--color-borde-suave);
    transition: all 0.2s ease;
    border-radius: 0 0 16px 16px;
}

.suggest-footer:hover {
    background: rgba(99, 102, 241, 0.06);
}

/* --- SEARCH HIGHLIGHT --- */
.search-highlight,
mark.search-highlight {
    background: linear-gradient(135deg, #fef08a, #fde047);
    color: #1e293b;
    padding: 0.05em 0.25em;
    border-radius: 4px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(253, 224, 71, 0.4);
}

/* --- BADGES DE RELEVANCIA EN TARJETAS --- */
.badge-relevancia {
    position: absolute;
    top: 8px;
    left: 8px;
}




.modal-premium .modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: modal-slide-up 0.3s ease;
}

.modal-premium .modal-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.modal-premium .modal-footer {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}

@media (max-width: 768px) {
    .modal-premium {
        padding: 0;
        align-items: flex-end;
    }
    .modal-premium .modal-content {
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
        width: 100%;
    }
}

/* ==========================================================================
   MEJORAS GLOBALES PARA ANDROID / TOUCH
   ========================================================================== */

/* Mejorar touch targets en todos los botones y enlaces interactivos */
@media (hover: none) and (pointer: coarse) {
    button, a, .nav-item-hover, .nav-bottom-item, .categoria-item,
    .suggest-item, .carrusel-btn {
        -webkit-tap-highlight-color: transparent;
    }

    /* Asegurar touch targets mínimos de 44px en Android */
    .nav-bottom-item {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .search-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .nav-item-hover:hover {
        transform: none; /* No translateY en touch */
    }

    .nav-item-hover:active {
        background: rgba(99, 102, 241, 0.1);
    }

    /* Indicador carrusel: touch target mayor */
    .carrusel-indicadores .indicador {
        width: 14px;
        height: 14px;
        padding: 4px;
    }
}

/* ==========================================================================
   BADGES DE RELEVANCIA
   ========================================================================== */
.badge-relevancia {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    z-index: 5;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    animation: badgePop 0.3s ease-out;
}

@keyframes badgePop {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.badge-relevancia-exacto {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.badge-relevancia-parcial {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.badge-relevancia-fuzzy {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

/* ==========================================================================
   INDICADOR DE RESULTADOS INTELIGENTES
   ========================================================================== */
.busqueda-inteligente {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--color-borde-suave);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    animation: fadeSlideIn 0.4s ease-out;
}

.busqueda-inteligente > span {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-texto-principal);
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.badges-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge-resultado {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 99px;
    letter-spacing: 0.3px;
}

.badge-exacto { background: #dcfce7; color: #166534; }
.badge-parcial { background: #fef3c7; color: #92400e; }
.badge-aproximado { background: #e0e7ff; color: #3730a3; }

/* ==========================================================================
   SUGERENCIAS CUANDO NO HAY RESULTADOS
   ========================================================================== */
.busqueda-sin-resultados {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-texto-secundario);
}

.busqueda-sin-icono {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.busqueda-sin-resultados h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-texto-principal);
    margin-bottom: 0.5rem;
}

.busqueda-sin-resultados p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.sugerencias-error {
    margin-top: 1.5rem;
}

.sugerencias-error p {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-texto-principal);
    margin-bottom: 0.75rem;
}

.sugerencias-btns {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sugerencia-btn {
    background: #f1f5f9;
    border: 1px solid var(--color-borde-suave);
    color: var(--color-primario);
    padding: 0.5rem 1.2rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--fuente-base);
}

.sugerencia-btn:hover {
    background: var(--color-primario);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.busqueda-indicador {
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-texto-secundario);
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .search-suggest-container {
        border-radius: 12px;
        max-height: 300px;
    }
    .suggest-item { padding: 0.65rem 1rem; }
    .suggest-badge { display: none; }
    .busqueda-inteligente {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.8rem 1rem;
    }
    .badge-relevancia {
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
    }
}

/* ==========================================================================
   MODAL DE REGISTRO DE CLIENTE Y GENERACIÓN DE RECIBO
   ========================================================================== */
.checkout-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow-y: auto;
}

.checkout-modal-card {
    background: #ffffff;
    border: 1px solid var(--color-borde-suave);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    animation: modalScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.checkout-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--color-borde-suave);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-radius: 16px 16px 0 0;
}

.checkout-modal-titulo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-texto-principal);
}

.checkout-modal-cerrar {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-texto-secundario);
    transition: var(--transicion-suave);
}

.checkout-modal-cerrar:hover { color: #ef4444; transform: scale(1.1); }

.checkout-modal-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cliente-form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem 1rem;
}

.form-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }

.form-field-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-texto-secundario);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-field-group input, 
.form-field-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-borde-suave);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: var(--fuente-base);
    color: var(--color-texto-principal);
    background: #f8fafc;
    transition: var(--transicion-suave);
}

.form-field-group input:focus, 
.form-field-group select:focus {
    outline: none;
    border-color: var(--color-primario);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

.search-client-wrapper { position: relative; }

.cliente-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--color-borde-suave);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1010;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.autocomplete-client-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
}

.autocomplete-client-item:hover { background: #f8fafc; }
.autocomplete-client-name { font-weight: 600; font-size: 0.9rem; color: var(--color-texto-principal); }
.autocomplete-client-cedula { font-size: 0.75rem; color: var(--color-texto-secundario); }

.form-instruccion {
    font-size: 0.8rem;
    color: var(--color-texto-secundario);
    font-style: italic;
    margin-top: -0.5rem;
}

.checkout-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--color-borde-suave);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
}

.btn-checkout-secondary {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid #cbd5e1;
    color: var(--color-texto-secundario);
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--fuente-base);
    transition: var(--transicion-suave);
}

.btn-checkout-secondary:hover {
    background: #f1f5f9;
    color: var(--color-texto-principal);
}

.btn-checkout-primary {
    padding: 0.75rem 2rem;
    background: var(--color-primario);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--fuente-base);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
    transition: var(--transicion-suave);
}

.btn-checkout-primary:hover {
    transform: translateY(-2px);
    background: #0052a3;
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.3);
}

.btn-checkout-save {
    background: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-checkout-save:hover {
    background: #059669;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   DISEÑO DEL TICKET DE RECIBO DE COMPRA (PREVIEW E IMPRESIÓN)
   ========================================================================== */
.recibo-modal-card {
    background: white;
    width: 100%;
    max-width: 800px;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 1px solid #cbd5e1;
}

.recibo-acciones-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px dashed #cbd5e1;
    padding-bottom: 1rem;
}

.recibo-logo-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.recibo-logo-preview img {
    height: 45px;
    object-fit: contain;
}

.recibo-contenedor {
    font-family: 'Courier New', Courier, monospace;
    color: #000;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #94a3b8;
    line-height: 1.4;
    font-size: 0.88rem;
}

.recibo-cabecera-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.recibo-empresa { display: flex; flex-direction: column; }
.recibo-empresa-nombre {
    font-family: var(--fuente-base);
    font-size: 1.2rem;
    font-weight: 800;
    color: #000;
    margin-bottom: 0.3rem;
}
.recibo-empresa-propietaria { font-weight: bold; margin-bottom: 0.2rem; }
.recibo-cliente-datos { display: flex; flex-direction: column; gap: 0.2rem; }
.recibo-cliente-datos div { display: flex; }
.recibo-cliente-datos strong { width: 120px; display: inline-block; flex-shrink: 0; }

.recibo-titulo-seccion {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 800;
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    padding: 0.4rem 0;
    margin: 1.5rem 0;
    letter-spacing: 1px;
}

.recibo-tabla {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.recibo-tabla th {
    border-bottom: 2px solid #000;
    padding: 0.5rem 0.25rem;
    text-align: left;
    font-weight: bold;
}

.recibo-tabla td {
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.text-right { text-align: right !important; }
.text-center { text-align: center !important; }

.recibo-totales-bloque {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
    margin-bottom: 3rem;
}

.recibo-totales-tabla { width: 320px; border-collapse: collapse; }
.recibo-totales-tabla td { padding: 0.4rem 0.5rem; border: 1px solid #000; font-weight: bold; }
.recibo-totales-tabla tr:first-child td { background: #f1f5f9; font-size: 1rem; }

.recibo-firmas-contenedor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 4rem;
    margin-bottom: 2rem;
    text-align: center;
}

.recibo-card-wrapper {
    border: 1px solid #94a3b8;
    padding: 20px 25px;
    margin: 0 auto;
    width: 100%;
    max-width: 750px;
    max-height: 75vh;
    overflow-y: auto;
    background: #fff;
    font-family: 'Courier New', Courier, monospace;
    box-sizing: border-box;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.recibo-body-top {
    flex: 1;
}

.recibo-sello-img {
    height: 45px !important;
    width: auto !important;
    max-width: 140px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto 6px auto !important;
}

.recibo-firma-linea { border-top: 1px solid #000; padding-top: 0.5rem; font-size: 0.8rem; font-weight: bold; }
.recibo-stamp { text-align: center; border-top: 1px dashed #94a3b8; padding-top: 1rem; font-size: 0.75rem; color: #475569; }

.recibo-btn-imprimir { background: #2563eb; color: #fff; }
.recibo-btn-imprimir:hover { background: #1d4ed8; }
.recibo-btn-cerrar { background: #475569; color: #fff; }
.recibo-btn-cerrar:hover { background: #334155; }

/* =========================================================================
   ESTILOS ADAPTATIVOS DE IMPRESIÓN PRO (Ajuste a 1 sola hoja y cualquier impresora)
   ========================================================================= */
@media print {
    @page {
        size: auto;
        margin: 5mm;
    }

    html, body {
        background: #fff !important;
        color: #000 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    body > * {
        display: none !important;
    }

    .amazon-header, .amazon-subnav, .footer-container, .servidor-offline-overlay,
    .carrito-overlay, button, .btn, .recibo-acciones-header, #btn-cerrar-recibo,
    #btn-imprimir-recibo, .no-print, nav, aside {
        display: none !important;
    }

    #recibo-modal, .checkout-modal-overlay {
        display: block !important;
        position: static !important;
        top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
        width: 100% !important;
        height: auto !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    .recibo-modal-card {
        display: block !important;
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        background: #fff !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #recibo-imprimir, .recibo-contenedor {
        display: block !important;
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 4px !important;
        background: #fff !important;
        color: #000 !important;
        font-family: Arial, Helvetica, sans-serif !important;
        font-size: 11px !important;
        line-height: 1.3 !important;
        box-shadow: none !important;
        border: none !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    #recibo-imprimir img, .recibo-empresa img {
        max-height: 40px !important;
        width: auto !important;
        margin-bottom: 3px !important;
    }

    .recibo-cabecera-grid {
        display: flex !important;
        justify-content: space-between !important;
        gap: 8px !important;
        border-bottom: 1px solid #000 !important;
        padding-bottom: 4px !important;
        margin-bottom: 4px !important;
    }

    .recibo-empresa, .recibo-cliente-datos {
        font-size: 10px !important;
        line-height: 1.2 !important;
    }

    .recibo-empresa-nombre {
        font-size: 12px !important;
        font-weight: bold !important;
    }

    .recibo-titulo-seccion {
        font-size: 11px !important;
        font-weight: bold !important;
        text-align: center !important;
        margin: 4px 0 !important;
        padding: 2px !important;
        background: #f0f0f0 !important;
        border: 1px solid #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .recibo-tabla {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-bottom: 6px !important;
        font-size: 10px !important;
    }

    .recibo-tabla th, .recibo-tabla td {
        padding: 2px 4px !important;
        border: 1px solid #ccc !important;
        word-break: break-word !important;
    }

    .recibo-tabla th {
        background: #eee !important;
        font-weight: bold !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .recibo-tabla tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .recibo-totales-bloque {
        display: flex !important;
        justify-content: flex-end !important;
        margin-top: 4px !important;
    }

    .recibo-totales-tabla {
        width: 220px !important;
        max-width: 100% !important;
        font-size: 10px !important;
        border-collapse: collapse !important;
    }

    .recibo-totales-tabla td {
        padding: 2px 4px !important;
        border: 1px solid #999 !important;
    }

    .recibo-totales-tabla tr:first-child td {
        font-weight: bold !important;
        font-size: 11px !important;
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .recibo-firmas-contenedor {
        display: flex !important;
        justify-content: space-around !important;
        margin-top: 1.5rem !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .recibo-firma-linea {
        width: 150px !important;
        text-align: center !important;
        border-top: 1px solid #000 !important;
        padding-top: 2px !important;
        font-size: 9px !important;
    }

    .recibo-stamp {
        font-size: 9px !important;
        text-align: center !important;
        margin-top: 0.5rem !important;
        color: #555 !important;
    }
}


@media (max-width: 768px) {
    .cliente-form-grid { grid-template-columns: 1fr; }
    .col-span-2, .col-span-3, .col-span-4 { grid-column: span 1; }
    .recibo-cabecera-grid { grid-template-columns: 1fr; gap: 1rem; }
}

/* =========================================================================
   ANIMACIÓN DE BRILLO PARA EL CARRITO
   ========================================================================= */
@keyframes brilloCarritoAnim {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); transform: scale(1); }
    50% { box-shadow: 0 0 25px 12px rgba(245, 158, 11, 0.4); transform: scale(1.15); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); transform: scale(1); }
}

.brillo-carrito {
    animation: brilloCarritoAnim 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
}

/* =========================================================================
   PANEL DE CARRITO (SIDEBAR)
   ========================================================================= */
.carrito-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10000;
    display: flex;
    justify-content: flex-end;
    animation: carritoFadeIn 0.25s ease;
}

@keyframes carritoFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes carritoSlideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

.carrito-panel {
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 30px rgba(0,0,0,0.1);
    animation: carritoSlideIn 0.3s ease;
}

.carrito-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--color-borde-suave);
    color: var(--color-texto-principal);
    flex-shrink: 0;
}

.carrito-panel-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.carrito-panel-cerrar {
    background: #e2e8f0;
    border: none;
    color: var(--color-texto-secundario);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.carrito-panel-cerrar:hover { background: #cbd5e1; }

.carrito-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.carrito-vacio {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 0.5rem;
    color: #64748b;
    text-align: center;
    padding: 2rem;
}

.carrito-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    align-items: flex-start;
    transition: background 0.15s;
}

.carrito-item:hover { background: #f8fafc; }

.carrito-item-img {
    width: 65px;
    height: 65px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
}

.carrito-item-img img { width: 100%; height: 100%; object-fit: cover; }

.carrito-item-info { flex: 1; min-width: 0; }
.carrito-item-nombre {
    font-weight: 600; font-size: 0.85rem; color: #1e293b; margin: 0 0 2px;
    line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.carrito-item-seccion { font-size: 0.7rem; color: #94a3b8; margin: 0 0 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.carrito-item-precio { font-size: 0.8rem; color: #059669; font-weight: 600; margin: 0 0 6px; }
.carrito-item-controles { display: flex; align-items: center; gap: 6px; }

.carrito-btn-cantidad {
    width: 26px; height: 26px; border: 1px solid #cbd5e1; background: #f8fafc;
    border-radius: 4px; font-size: 0.9rem; cursor: pointer; display: flex;
    align-items: center; justify-content: center; transition: all 0.15s;
    color: #334155; font-weight: bold;
}

.carrito-btn-cantidad:hover { background: #e2e8f0; border-color: #94a3b8; }
.carrito-item-cant { font-size: 0.85rem; font-weight: 700; min-width: 20px; text-align: center; color: #1e293b; }

.carrito-btn-eliminar { background: none; border: none; cursor: pointer; font-size: 0.9rem; margin-left: 6px; opacity: 0.5; padding: 2px 4px; }
.carrito-btn-eliminar:hover { opacity: 1; color: #ef4444; }

.carrito-item-subtotal { text-align: right; flex-shrink: 0; min-width: 60px; }
.carrito-item-subtotal p { font-weight: 700; font-size: 0.9rem; color: #0f172a; margin: 0; }

.carrito-panel-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.carrito-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.carrito-total span:first-child { font-size: 0.9rem; color: #475569; font-weight: 500; }
.carrito-total-valor { font-size: 1.25rem; font-weight: 700; color: #0f172a; }

.carrito-acciones { display: flex; gap: 0.5rem; }

.carrito-btn-vaciar {
    flex: 1; padding: 0.6rem; border: 1px solid #fca5a5; background: #fff5f5;
    color: #dc2626; border-radius: 8px; font-weight: 600; font-size: 0.8rem;
    cursor: pointer; transition: all 0.2s;
}
.carrito-btn-vaciar:hover { background: #fee2e2; }

.carrito-btn-cotizar {
    flex: 1; padding: 0.6rem; background: var(--color-oro); color: #fff;
    border: none; border-radius: 8px; font-weight: 700; font-size: 0.8rem;
    cursor: pointer; text-align: center; transition: all 0.2s; text-decoration: none;
}
.carrito-btn-cotizar:hover { background: #d97706; }

@media (max-width: 480px) {
    .carrito-panel { width: 100vw; max-width: 100vw; }
}

/* ==========================================================================
   CORRECCIONES MÓVILES RESPONSIVAS
   ========================================================================== */
@media (max-width: 480px) {
    html, body { max-width: 100% !important; overflow-x: hidden !important; }
    
    .amazon-header { width: 100% !important; max-width: 100vw !important; overflow: hidden; }
    .amazon-header-top { flex-wrap: wrap; gap: 0.5rem; padding: 0.6rem; }
    .amazon-search { order: 3; width: 100% !important; margin: 0.3rem 0; }
    .amazon-logo-link { flex: 1; }
    
    .productos-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.6rem !important; padding: 0.2rem !important; }
    .tarjeta-imagen-contenedor { height: 120px !important; }
    .tarjeta-info { padding: 0.6rem !important; gap: 0.3rem !important; }
    .tarjeta-nombre { font-size: 0.78rem !important; line-height: 1.25 !important; margin-bottom: 0.2rem !important; }
    .tarjeta-precio { font-size: 0.85rem !important; padding: 0.2rem 0.4rem !important; border-radius: 6px !important; }
    
    .modal-contenido.e-commerce-modal { padding: 1.2rem !important; }
    .modal-grid-ecommerce { display: flex !important; flex-direction: column !important; gap: 1rem !important; }
    
    .btn-anadir-carrito {
        width: 100% !important; height: 40px !important; font-size: 0.88rem !important; font-weight: 600 !important;
        border-radius: 8px !important; background: var(--color-primario) !important;
        border: none !important; color: white !important; display: flex !important;
        align-items: center !important; justify-content: center !important; margin-top: 0.5rem;
    }
    
    .modal-acciones-compra { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: space-between !important; gap: 0.8rem !important; width: 100% !important; }
    .cantidad-selector { flex-direction: row !important; align-items: center !important; gap: 0.5rem !important; }
    .cantidad-controles input { width: 50px !important; height: 36px !important; font-size: 0.9rem !important; border-radius: 6px !important; }
    
    input[type="file"] { max-width: 100% !important; font-size: 0.8rem !important; overflow: hidden !important; }
    
    .tarjeta-coincidencia { flex-direction: column !important; align-items: stretch !important; padding: 0.8rem !important; gap: 0.8rem !important; }
    .coincidencia-imagen { width: 100% !important; height: 140px !important; padding: 0 !important; }
    .coincidencia-info { width: 100% !important; }
    .coincidencia-precio-bloque { text-align: left !important; flex-direction: row !important; justify-content: space-between !important; align-items: center !important; border-top: 1px solid #eee !important; padding-top: 0.5rem !important; }
    
    .modal-imagen-principal { height: 180px !important; margin-bottom: 0 !important; }
    .modal-galeria { padding: 0.5rem !important; }
    
    .coincidencia-controles { flex-wrap: wrap !important; gap: 0.5rem !important; justify-content: space-between !important; width: 100% !important; }
    .coincidencia-checkbox-label { flex: 1 !important; justify-content: center !important; padding: 0.6rem !important; font-size: 0.9rem !important; border-radius: 8px !important; }
    .coincidencia-cantidad { flex: 1 !important; justify-content: center !important; }
    
    .grid-cuentas-bancarias { grid-template-columns: 1fr !important; }
    
    .checkout-modal-footer { flex-direction: column !important; gap: 0.8rem !important; padding: 1.2rem !important; }
    .checkout-modal-footer button { width: 100% !important; margin: 0 !important; }
}

/* ==========================================================================
   MODAL PREMIUM (Admin - Detalle de Pedido)
   ========================================================================== */
.modal-premium {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: modal-fade-in 0.25s ease;
}

.modal-premium .modal-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    animation: modal-slide-up 0.3s ease;
}

.modal-premium .modal-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.modal-premium .modal-footer {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}

@media (max-width: 768px) {
    .modal-premium { padding: 0; align-items: flex-end; }
    .modal-premium .modal-content { border-radius: 16px 16px 0 0; max-height: 95vh; width: 100%; }
}

/* Habilitar scroll fluido y recarga por deslizamiento (pull-to-refresh) en móvil */
html {
    scroll-behavior: smooth !important;
    overscroll-behavior-y: auto !important;
}

body {
    overscroll-behavior-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

#grid-coincidencias, .grid-coincidencias, #resultados-busqueda-manual, .resultados-busqueda-manual {
    max-height: none !important;
    overflow-y: visible !important;
    scroll-behavior: smooth !important;
    overscroll-behavior: auto !important;
}

/* ==========================================================================
   MEJORAS RESPONSIVAS Y TÁCTILES PARA PANEL DE ADMINISTRACIÓN Y CELULARES
   ========================================================================== */
.pagina-contenedor, .login-wrapper, .admin-panel {
    position: relative;
    z-index: 10;
    width: 100%;
}

.login-glass-card {
    position: relative;
    z-index: 20;
    pointer-events: auto !important;
}

.login-form input, 
.login-form button, 
.admin-panel input, 
.admin-panel button, 
.admin-panel select, 
.tabla-input-premium, 
.btn-guardar-premium,
.btn-login-premium,
.btn-cerrar-sesion-premium {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto !important;
    position: relative;
    z-index: 25;
}

@media (max-width: 768px) {
    .amazon-header {
        position: relative !important; /* No tapar elementos inferiores en pantallas táctiles chicas */
    }

    .login-wrapper {
        padding: 1rem 0.5rem;
        min-height: auto;
    }
    
    .login-glass-card {
        padding: 1.5rem 1rem;
        border-radius: 16px;
        margin: 1rem auto;
        max-width: 95%;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .tabla-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }
    
    .input-search-wrapper {
        width: 100% !important;
    }
    
    .tabla-contenedor-premium {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-height: none !important;
        touch-action: manipulation;
    }
    
    .tabla-precios-premium {
        width: 100%;
        min-width: 550px;
    }

    .tabla-precios-premium th, 
    .tabla-precios-premium td {
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
    }
    
    .tabla-input-premium, .tabla-input-precio, .admin-busqueda-premium {
        min-width: 90px;
        font-size: 16px !important; /* Evita el auto-zoom molesto del navegador al enfocar en móvil */
        padding: 0.6rem;
        min-height: 44px; /* Altura touch óptima */
        touch-action: manipulation;
        border-radius: 8px;
    }

    .btn-guardar-premium, .btn-login-premium, .btn-cerrar-sesion-premium, .btn-guardar-precio {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
    }
}

/* ==========================================================================
   MEJORAS MÓVILES EXCLUSIVAS (CÁMARA, BOTONES TÁCTILES Y NAVEGACIÓN FLOTANTE)
   ========================================================================== */
.zona-drop-botones {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 15px;
    width: 100%;
}

.btn-camara-movil {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
}

.btn-camara-movil:active, .btn-subir-archivo:active {
    transform: scale(0.96) !important;
}

@media (max-width: 768px) {
    .zona-drop-botones {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-subir-archivo, .btn-camara-movil {
        width: 100% !important;
        min-height: 50px !important;
        font-size: 1rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 12px !important;
    }

    .zona-drop {
        padding: 1.5rem 1rem !important;
        border-radius: 16px !important;
    }
    
    .zona-drop-icono {
        font-size: 2.8rem !important;
    }
    
    .zona-drop-texto {
        font-size: 1.05rem !important;
    }
    


/* ==========================================================================
   CARRUSEL HERO PREMIUM & DISEÑO MODERNO DE CATÁLOGO
   ========================================================================== */
.carrusel-hero-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 1.2rem auto 2rem auto;
    height: 440px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #0b132b 0%, #1c2541 50%, #0b132b 100%);
    box-shadow: 0 20px 40px rgba(0, 102, 204, 0.2);
}

@media (max-width: 768px) {
    .carrusel-hero-container {
        height: 280px;
        margin: 0.5rem auto 1.2rem auto;
        border-radius: 16px;
    }
}

.carrusel-hero-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.carrusel-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carrusel-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
}

.carrusel-overlay-gradient {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(11, 19, 43, 0.7) 0%, transparent 60%);
    z-index: 1;
    pointer-events: none;
}

.carrusel-action-bar {
    position: absolute;
    bottom: 24px;
    left: 30px;
    right: 30px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .carrusel-action-bar {
        bottom: 16px;
        left: 16px;
        right: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

.carrusel-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: fit-content;
    margin-bottom: 0.8rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.carrusel-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.6rem;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

@media (max-width: 768px) {
    .carrusel-title {
        font-size: 1.4rem;
        margin-bottom: 0.4rem;
    }
}

.carrusel-subtitle {
    font-size: 1.05rem;
    line-height: 1.45;
    opacity: 0.92;
    margin-bottom: 1.5rem;
    color: #e2e8f0;
}

@media (max-width: 768px) {
    .carrusel-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

.carrusel-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0066cc 0%, #00b4d8 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1.6rem;
    border-radius: 99px;
    text-decoration: none;
    width: fit-content;
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.carrusel-cta-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0, 102, 204, 0.55);
}

.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #0f172a;
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.carrusel-btn:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);
    color: #0066cc;
}

.carrusel-btn-prev { left: 16px; }
.carrusel-btn-next { right: 16px; }

.carrusel-indicadores {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    padding: 6px 14px;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 99px;
}

.indicador {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicador.activo {
    width: 28px;
    border-radius: 99px;
    background: #0066cc;
}

/* ==========================================================================
   CINTA DE SERVICIOS ANIMADA DE ENVIOS (REEMPLAZO DE LOGOSUPERIOR.PNG)
   ========================================================================== */
.cinta-servicios-animada {
    width: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    border-bottom: 2px solid #0066cc;
    padding: 0.75rem 1.5rem;
    overflow-x: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    -webkit-overflow-scrolling: touch;
}

.cinta-servicios-track {
    display: flex;
    align-items: center;
    justify-content: space-around;
    max-width: 1400px;
    margin: 0 auto;
    gap: 1.5rem;
    min-width: 1000px;
}

.cinta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: default;
}

.cinta-item:hover {
    background: rgba(0, 102, 204, 0.25);
    border-color: #00b4d8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.3);
}

.cinta-item-icono {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
    animation: pulso-icono 3s infinite ease-in-out;
}

@keyframes pulso-icono {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

.cinta-item-texto {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.cinta-titulo {
    font-size: 0.8rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.cinta-subtitulo {
    font-size: 0.75rem;
    color: #94a3b8;
}

.highlight-gold {
    color: #f59e0b;
    font-weight: 700;
}

.cinta-separador {
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.2), transparent);
}

/* ==========================================================================
   GRID DE CARDS PROMOCIONALES 3D
   ========================================================================== */
.promos-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    max-width: 1400px;
    margin: 1.2rem auto 1.8rem auto;
    padding: 0 1.5rem;
}

@media (max-width: 1024px) {
    .promos-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .promos-grid-container {
        grid-template-columns: 1fr;
    }
}

.promo-card-3d {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    height: 190px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.35s ease;
    border: 1px solid var(--color-borde-suave);
    background: #ffffff;
}

.promo-card-3d:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 14px 30px rgba(0, 102, 204, 0.2);
    border-color: #0066cc;
}

.promo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.promo-card-3d:hover .promo-img {
    transform: scale(1.08);
}

.promo-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 50%, rgba(15, 23, 42, 0.1) 100%);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #ffffff;
    z-index: 2;
}

.promo-badge {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 99px;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.promo-overlay h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    color: #ffffff;
    line-height: 1.2;
}

.promo-overlay p {
    font-size: 0.82rem;
    color: #cbd5e1;
    margin-bottom: 0.8rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0066cc;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 99px;
    text-decoration: none;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
    transition: background 0.2s ease;
}

.promo-btn:hover {
    background: #0088ff;
}



