/* ==========================================================
   TIENDA ONLINE ESTILO RETAIL / BIG SHOP - DULCE HOGAR
   ========================================================== */

body {
    background-color: #f8fafc;
    color: #0f172a;
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin: 0;
}

/* TOPBAR PROMOCIONAL SUPERIOR ANIMADO (CARRUSEL RETAIL) */
.top-promobar {
    background: #0f172a;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 10px 20px;
    border-bottom: 1px solid #1e293b;
    overflow: hidden;
}

.top-promobar-slider {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    position: relative;
}

.topbar-slides-wrapper {
    flex: 1;
    position: relative;
    height: 24px;
    overflow: hidden;
    text-align: center;
}

.topbar-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
    color: #ffffff;
    pointer-events: none;
}

.topbar-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.topbar-link-slide {
    text-decoration: none;
    color: #ffffff;
    cursor: pointer;
}

.topbar-link-slide:hover {
    text-decoration: underline;
    color: #34d399;
}

.topbar-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s, transform 0.15s;
    z-index: 2;
}

.topbar-nav-btn:hover {
    background: #059669;
    transform: scale(1.1);
}

/* HEADER PRINCIPAL CON BUSCADOR PÍLDORA */
.main-header-retail {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-retail-container {
    max-width: 1350px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.logo-img {
    height: 85px;
    width: auto;
    max-width: 190px;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    background: #ffffff;
    padding: 4px;
    border: 1.5px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo-link:hover .logo-img {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.logo-text-box {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.75rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.logo-subtitle {
    font-size: 0.85rem;
    font-weight: 800;
    color: #059669;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-top: 3px;
}

/* BUSCADOR PÍLDORA CEMENTADO */
.header-search-form {
    flex: 1;
    width: 100%;
}

.search-pill-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-pill-input {
    width: 100%;
    padding: 13px 55px 13px 24px;
    border-radius: 30px;
    border: 2px solid #cbd5e1;
    font-size: 0.98rem;
    font-family: inherit;
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-pill-input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.search-pill-btn {
    position: absolute;
    right: 6px;
    background: #059669;
    color: #ffffff;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: background 0.2s, transform 0.15s;
}

.search-pill-btn:hover {
    background: #047857;
}

/* ACCESOS MI CUENTA Y CARRITO */
.header-actions-box {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 12px;
    background: #f1f5f9;
    transition: background 0.2s;
}

.user-action-btn:hover {
    background: #e2e8f0;
}

.admin-badge-btn {
    background: #d97706;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.85rem;
}

.cart-action-btn {
    position: relative;
    background: #0f172a;
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.15rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.cart-count-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #059669;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    border: 2px solid #ffffff;
}

/* BARRA DE BENEFICIOS INFORMATIVOS (TRUST BADGES) */
.trust-bar-section {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 20px;
}

.trust-bar-container {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.trust-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.trust-item h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
    color: #0f172a;
}

.trust-item p {
    margin: 2px 0 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

/* CATEGORÍAS ESCALABLES & MEGAMENÚ DESPLEGABLE (OPCIÓN 2) */
.categories-bar-section {
    max-width: 1240px;
    margin: 20px auto 0;
    padding: 0 20px;
    position: relative;
}

.categories-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.btn-megamenu-trigger {
    background: #0f172a;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.btn-megamenu-trigger:hover {
    background: #059669;
    transform: translateY(-1px);
}

.cat-chip {
    background: #ffffff;
    color: #475569;
    border: 1.5px solid #e2e8f0;
    padding: 9px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    flex-shrink: 0;
}

.cat-chip:hover, .cat-chip.active {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
}

/* OVERLAY Y TARJETA DEL MEGAMENÚ */
.megamenu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.megamenu-overlay.show {
    opacity: 1;
    visibility: visible;
}

.megamenu-card {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.megamenu-overlay.show .megamenu-card {
    transform: translateY(0);
}

.megamenu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

.megamenu-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}

.megamenu-close:hover {
    color: #0f172a;
}

.megamenu-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 14px;
    padding: 10px 16px;
    margin-bottom: 20px;
}

.megamenu-search-box input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
}

.megamenu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px;
    overflow-y: auto;
    padding-right: 8px;
    max-height: 50vh;
}

.megamenu-col-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    transition: border-color 0.2s, background 0.2s;
}

.megamenu-col-item:hover {
    border-color: #059669;
    background: #ffffff;
}

.megamenu-cat-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.megamenu-cat-title:hover {
    color: #059669;
}

.megamenu-sub-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.megamenu-sub-list li {
    margin-bottom: 6px;
}

.megamenu-sub-list a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: color 0.2s;
    display: inline-block;
}

.megamenu-sub-list a:hover {
    color: #059669;
}

.megamenu-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

.megamenu-viewall-link {
    background: #0f172a;
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.9rem;
    display: inline-block;
}

/* HERO BANNER PROMOCIONAL */
.hero-banner-section {
    max-width: 1240px;
    margin: 20px auto 30px;
    padding: 0 20px;
}

.hero-banner-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 24px;
    padding: 40px;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.12);
    border: 1px solid #334155;
    position: relative;
    overflow: hidden;
}

.hero-badge {
    background: #d97706;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.78rem;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 12px;
}

.hero-content h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 12px 0;
    line-height: 1.25;
}

.hero-content p {
    color: #cbd5e1;
    font-size: 1rem;
    max-width: 600px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.hero-btn {
    background: #059669;
    color: #ffffff;
    border: none;
    padding: 12px 26px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.15s;
}

.hero-btn:hover {
    background: #047857;
    transform: translateY(-2px);
}

/* FILTROS DE PRECIO Y CONTADOR DE RESULTADOS */
.filters-bar-container {
    max-width: 1240px;
    margin: 0 auto 20px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.results-count {
    font-size: 0.92rem;
    color: #64748b;
}

.sort-form {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #475569;
}

.sort-form select {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    font-weight: 700;
    color: #0f172a;
    background: #ffffff;
    cursor: pointer;
}

/* CATÁLOGO RETAIL DE PRODUCTOS (GRILLA RETAIL) */
.shop-container {
    max-width: 1240px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.products-grid-retail {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}

.product-card-retail {
    background: #ffffff;
    border-radius: 18px;
    border: 1.5px solid #cbd5e1;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.product-card-retail:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    border-color: #059669;
}

.product-img-box {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8fafc;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card-retail:hover .product-img {
    transform: scale(1.05);
}

.badge-retail {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
}

.product-tag-badge {
    position: static !important;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 800;
    text-decoration: none;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    transition: transform 0.15s ease, opacity 0.15s ease;
    z-index: 1;
}

.product-tag-badge:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.badge-mayorista-retail {
    background: #059669;
    color: #ffffff;
}

.badge-promo-retail {
    background: #d97706;
    color: #ffffff;
}

.quick-view-trigger {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.product-card-retail:hover .quick-view-trigger {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.product-body-retail {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-cat-tag {
    font-size: 0.75rem;
    font-weight: 800;
    color: #059669;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.product-name-title {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
}

.product-name-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s;
}

.product-name-title a:hover {
    color: #059669;
}

.product-price-section {
    margin-top: auto;
    margin-bottom: 15px;
}

.main-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
}

.installments-tag {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

.wholesale-tag {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
}

.btn-buy-retail {
    background: #0f172a;
    color: #ffffff;
    text-decoration: none;
    padding: 11px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.88rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.product-card-retail:hover .btn-buy-retail {
    background: #059669;
}

.empty-state-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    padding: 50px;
    text-align: center;
    color: #64748b;
}

.empty-state-card i {
    font-size: 3.5rem;
    color: #cbd5e1;
    margin-bottom: 14px;
}

.btn-reset-filters {
    display: inline-block;
    background: #059669;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    margin-top: 15px;
}

/* RESPONSIVE MÓVIL */
@media (max-width: 768px) {
    .header-retail-container {
        flex-direction: column;
        gap: 12px;
    }

    .header-search-form {
        width: 100%;
    }

    .top-hide-mobile {
        display: none;
    }

    .hero-banner-card {
        padding: 20px 16px;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .streaming-rows-container {
        padding: 0 12px;
        margin: 15px auto 25px auto;
    }

    .streaming-row-block {
        padding: 14px 12px;
        border-radius: 14px;
        margin-bottom: 20px;
    }

    .streaming-nav-btn {
        display: none !important;
    }

    .products-grid-retail {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .product-body-retail {
        padding: 12px 10px;
    }

    .product-name-title {
        font-size: 0.92rem;
    }

    .btn-buy-retail {
        padding: 10px 8px;
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .products-grid-retail {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .streaming-card-item {
        min-width: 170px;
        width: 170px;
    }

    .product-card-retail {
        border-radius: 14px;
    }

    .product-body-retail {
        padding: 10px 8px;
    }

    .product-name-title {
        font-size: 0.85rem;
        line-height: 1.25;
    }

    .main-price {
        font-size: 1.15rem;
    }

    .btn-buy-retail {
        font-size: 0.8rem;
        padding: 9px 6px;
    }
}

/* FILAS SUBTITULADAS ESTILO STREAMING (HBO / NETFLIX) */
.streaming-rows-container {
    max-width: 1400px;
    margin: 25px auto 40px auto;
    padding: 0 20px;
}

.streaming-row-block {
    margin-bottom: 35px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04);
}

.streaming-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.streaming-row-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.streaming-row-link {
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s ease;
}

.streaming-row-link:hover {
    transform: translateX(3px);
}

.streaming-track-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.streaming-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    border: 2px solid #ffffff;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
    opacity: 0.9;
    line-height: 1;
    user-select: none;
}

.streaming-nav-btn:hover {
    background: #059669;
    color: #ffffff;
    transform: translateY(-50%) scale(1.12);
    opacity: 1;
}

.streaming-nav-btn.prev-btn {
    left: -14px;
}

.streaming-nav-btn.next-btn {
    right: -14px;
}

.streaming-track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 8px 4px 14px 4px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
    width: 100%;
}

.streaming-track::-webkit-scrollbar {
    height: 6px;
}

.streaming-track::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 10px;
}

.streaming-track::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.streaming-track::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.streaming-card-item {
    min-width: 260px;
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.streaming-card-item .product-card-retail {
    width: 100%;
    height: 100%;
}