﻿/* =========================
   RESET / VARIABLES
========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --primary: #3483fa;
    --primary-soft: #e6f0ff;
    --green: #00a650;
    --bg: #f5f7fa;
    --card: #ffffff;
    --border: #e5e7eb;
    --text: #111;
    --muted: #6b7280;

    --header-h: 60px;
    --menu-h: 44px;
}

/* =========================
   BASE
========================= */

body {
    margin: 0;
    padding: 0;
    padding-bottom: 80px;
    font-family: Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.titulo {
    margin: 0;
    font-weight: 600;
}


.back-btn {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
}

.clear-btn {
    border: none;
    background: #eee;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;  
    
    font-size: 18px;
   
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* =========================
   MENU
========================= */

.menu {
    position: relative; /* o static */
    z-index: 1;
    margin-bottom: 4px;
    background: var(--bg);
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding: .4rem;
    scroll-behavior: smooth;
}

.menu-item {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: .5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, #ffffff, #f1f3f2);
    cursor: pointer;
    font-size: .9rem;
    transition: .2s;
}

    .menu-item:not(.active):hover {
        transform: translateY(-2px);
        background: linear-gradient(145deg, #f8faf9, #e8ecea);
        box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    }

    .menu-item.active {
        color: #f1f5f3;
        border: 1px solid rgba(0,0,0,0.2);
        background: linear-gradient(145deg, #6b7d73, #4f5f57 40%, #3e4c45);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), inset 0 -2px 4px rgba(0,0,0,0.25), 0 3px 8px rgba(0,0,0,0.15);
    }

/* =========================
   SUBMENU
========================= */

.submenu {
    position: relative; 
    z-index: 1000;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all .25s ease;
    max-height: 0;
    overflow: hidden;
}
    .submenu.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
        padding: 6px;
        border-radius: 12px;
        background: linear-gradient(180deg, #eef6ff, #e6f0ff);
        max-height: 120px; /* o auto si no animás */
    }


/* contenedor scroll */

.submenu-inner {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 6px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.submenu.open .submenu-inner {
    opacity: 1;
    transform: translateY(0);
    transition-delay: .05s;
}


.submenu::before {
    left: 0;
    background: linear-gradient(to right, #eef6ff, transparent);
}

.submenu::after {
    right: 0;
    background: linear-gradient(to left, #eef6ff, transparent);
}
.menu,
.toolbar,
.submenu {
    top: auto;
}
/* scrollbar */

.submenu-inner::-webkit-scrollbar {
    height: 6px;
}

.submenu-inner::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* cards submenu */

.submenu-card {
    scroll-snap-align: start;
    flex: 0 0 100px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    transition: all .2s ease;
}



    .submenu-card.active {
        background: linear-gradient(135deg, #6b7280, #4b5563);
        color: white;
        border: none;
        transform: translateY(-2px) scale(1.04);
        box-shadow: 0 6px 14px rgba(0,0,0,0.25);
    }
    .submenu-card:hover {
        transform: translateY(-2px);
        background: #f3f4f6;
        box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    }
    .submenu-card.active img {
        filter: brightness(0) invert(1);
    }
/* icono */

.submenu-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* texto */

.submenu-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    line-height: 1.1;
   



    word-break: break-word;
}

/* =========================
   GRID
========================= */

.card-grid {

    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
    gap: 1rem;
}

/* =========================
   CARD
========================= */

.card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all .2s ease;
    display: flex;
    flex-direction: column;
    min-width: 0;
    opacity: 0;
    transform: translateY(10px) scale(.98);
    animation: fadeInUp .4s ease forwards;
    animation-delay: calc(var(--i) * 0.03s);
    overflow: hidden;
    position: relative;
}

    .card:hover {
              
        transform: translateY(-6px);
        box-shadow: 0 10px 25px rgba(0,0,0,.1);
    }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================
   MEDIA
========================= */

.card-media {
    aspect-ratio: 1/1;
    background: #f3f4f6;
    position: relative;
}

    .card-media img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.badge-oferta {
    background: #ff3b30;
    font-weight: 700;

    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    padding: .3rem .7rem;
    border-radius: 999px;
    font-size: .7rem;
}

/* =========================
   BODY
========================= */

.card-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    
    min-width: 0;
}



.product-title {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 32px; /* 🔥 clave */  
}
/* línea superior */

.promo-line {
    font-size: .88rem;
    color: #043a2a;
    opacity: 0.85;
}
.promo-badge {
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 700;
    color: #fff;
    background: #00a650;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
}
.promo-sub {
    font-size: .78rem;
    color: #07523b;
    opacity: 0.95;
}
.promo-value {
    font-size: 14px;
    font-weight: 800;
    color: #00a650;
}


/* =========================
   BOTON
========================= */

.btn-add {
    background: var(--primary);
    border: none;
    color: white;
    border-radius: 8px;
    padding: 10px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

    .btn-add:hover {
        background: #2968c8;
    }
    .btn-add:active {
        transform: translateY(1px);
        box-shadow: inset 0 2px 6px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.2);
    }

    .btn-add::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 10px;
        background: linear-gradient( 120deg, transparent 30%, rgba(255,255,255,0.25), transparent 70% );
        opacity: 0.4;
        pointer-events: none;
    }

/* =========================
   SKELETON PRO (MercadoLibre style)
========================= */


.skeleton-media {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #eee, #f5f5f5, #eee);
    background-size: 200%;
    animation: shimmer 1.2s infinite;
}

.skeleton-line {
    height: 10px;
    border-radius: 6px;
    background: linear-gradient(90deg, #eee, #f5f5f5, #eee);
    background-size: 200%;
    animation: shimmer 1.2s infinite;
}

    .skeleton-line.title {
        height: 14px;
        width: 90%;
    }

    .skeleton-line.short {
        width: 60%;
    }

    .skeleton-line.price {
        height: 16px;
        width: 70%;
    }

        .skeleton-line.price.small {
            width: 40%;
        }

.skeleton-btn {
    margin-top: 10px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(90deg, #eee, #f5f5f5, #eee);
    background-size: 200%;
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}


.skeleton-card {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: none;
}
.toolbar {
    margin-top: 0px;
    position: relative;
    z-index: 1;
    background: var(--bg);
    padding-bottom: 0px;
}


/* =========================
   PAGINATION PRO
========================= */

.pagination {
    margin-top: 16px;
    margin-bottom: 20px; /* mínimo, solo aire */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 25px 0 50px;
}

/* info arriba */
.pagination-info {
    font-size: 13px;
    color: var(--muted);
}

/* controles */
.pagination-controls {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

/* botones */
.pagination button {
    min-width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: all .2s ease;
}

    /* hover */
    .pagination button:hover:not(:disabled) {
        background: #f3f4f6;
        transform: translateY(-1px);
    }

    /* activo */
    .pagination button.active {
        background: linear-gradient(145deg, #6b7d73, #4f5f57);
        color: white;
        border: none;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }

    /* disabled */
    .pagination button:disabled {
        opacity: .35;
        cursor: not-allowed;
    }

/* puntos */
.pagination .dots {
    display: flex;
    align-items: center;
    padding: 0 6px;
    color: #999;
}



/* =========================
   BOTTOM BAR MERCADO LIBRE STYLE
========================= */

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 64px;
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

/* ITEMS */
.nav-item {
    flex: 1;
    border: none;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #999;
    transition: all .2s ease;
}

    /* ICONOS (clave: más chicos y finos) */
    .nav-item .icon {
        font-size: 22px;
        margin-bottom: 2px;
    }

    /* ACTIVO */
    .nav-item.active {
        color: #3483fa;
        font-weight: 500;
    }

    /* BOTÓN CENTRAL (MUY IMPORTANTE) */
    .nav-item.center {
        flex: 0 0 auto; /* 🔥 clave: NO se estira */

        position: relative;
        top: -18px;
        width: 58px;
        height: 58px;
        background: #3483fa;
        color: white;
        border-radius: 50%;
        box-shadow: 0 6px 16px rgba(0,0,0,0.2);
        display: flex;
        align-items: center;
        justify-content: center;
    }
        /* icono centro */
        .nav-item.center .icon {
            font-size: 24px;
            margin: 0;
        }

        /* ocultar texto centro */
        .nav-item.center span {
            display: none;
        }

/* badge */
.badge {
    position: absolute;
    top: 4px;
    right: 8px;
    background: #ff3b30;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
}


/* SCROLL TOP (FLOTANTE REAL) */
.scroll-top-btn {
    position: fixed;
    bottom: 80px;
    right: 15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #3483fa;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

    /* visible */
    .scroll-top-btn.visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
/* 🔥 CAJA MODERNA */
.search-box-pro {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

    /* icono */
    .search-box-pro svg {
        width: 20px;
        height: 20px;
        color: #999;
    }

/* input */
.search-input-pro {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
}



.search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background .2s;
}

    .search-item:hover {
        background: #f3f4f6;
    }

    .search-item img {
        width: 40px;
        height: 40px;
        object-fit: contain;
        background: #f3f4f6;
        border-radius: 8px;
    }

    .search-item span {
        font-size: 14px;
    }

    .search-suggestions li {
        padding: 8px 12px;
        cursor: pointer;
    }

        .search-suggestions li:hover {
            background-color: #f0f0f0;
        }


.custom-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #333;
    color: white;
    padding: 12px 18px;
    border-radius: 25px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

    .custom-toast.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
/* =========================
   HEADER PRO
========================= */
.top-header-pro .brand,
.top-header-pro .header-actions {
    flex-shrink: 0;
}
.top-header-pro {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    background: linear-gradient(135deg, #f8fafc, #e5e7eb 50%, #d1d5db);
    color: #111;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1200;
    padding: 0 10px;
    gap: 10px;
}
.search-wrapper {
    width: 100%;
    max-width: 700px; /* podés subir a 900px si querés más grande */
    margin: 0 auto;
}
/* LOGO */
/* brand horizontal */
.brand {
    display: flex;
    flex-direction: column; /* para que Mayorista quede debajo */
    align-items: flex-start; /* alinea a la izquierda */
    gap: 0; /* sin espacio extra */
}

.brand-main {
    font-size: 18px; /* tamaño deseado */
    font-weight: 800;
    white-space: nowrap; /* evita que Maxi Red se rompa */
    background-color: darkslategray;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-sub {
    font-size: 15px;
    font-weight: 600;
    color: red;
    white-space: nowrap; /* evita que Mayorista se rompa */
}
/* BUSCADOR */
.header-search {
    height: 32px;
    padding: 0 34px 0 12px;
    font-size: 13px;
    
    width: 100%;
    
    min-width: 200px; /* opcional para que no colapse */
    flex: 1 1 100%;
    max-width: none;
    position: relative;
}
.header-search-icon {
    right: 10px;
    width: 16px;
    height: 16px;
    position: absolute;    
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* USUARIO */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(52,131,250,0.3);
}
.header-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    font-size: 12px;
    border: none;
    background: #eee;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
    .header-clear-btn:hover {
        background: #ddd;
    }
.toast-message {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #333;
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 9999;
    font-weight: bold;
    pointer-events: none;
}

    .toast-message.show {
        opacity: 1;
        transform: translateY(0);
    }

.destacado-card {
    background: #fff;
    border: 1px solid #e6f0ff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

    .destacado-card .product-title {
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        white-space: normal !important;
        min-height: 34px !important; /* 🔥 asegura 2 líneas reales */
        line-height: 1.2 !important;
    }
    /* efecto sutil premium */
    .destacado-card::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 14px;
        background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,0.6), transparent 60%);
        opacity: 0.4;
        pointer-events: none;
    }

    /* hover distinto a ofertas */
    .destacado-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 18px rgba(0,0,0,0.1);
    }

    .destacado-card .card-body {
        min-height: 70px; /* 🔥 da espacio al texto */
    }
.badge-destacado {
    background: #3483fa;
}
.destacados-section {
    background: linear-gradient(180deg, #f8fbff, #eef6ff);
    padding: 8px 12px 6px;
    border-radius: 14px;
    margin-top: 4px;
}
/* contenedor derecha */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* botón idioma */

.lang-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden; /* 🔥 recorta la imagen en círculo */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    background: white;
}

    .lang-btn img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* 🔥 importante */
    }


/* Input con radio completo por defecto */
.header-search-input {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: .6rem .9rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #ffffff;
    transition: box-shadow .15s, border-color .15s, border-radius .12s;
    font-size: .95rem;
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 50px;
}
.header-clear-btn {
    z-index: 10; /* 🔥 más alto que el input */
    pointer-events: auto;
}

/* La lista queda exactamente debajo del input, sin separación, y cierra las esquinas inferiores */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 12px 12px;
    z-index: 1000;
    max-height: 180px;
    overflow-y: auto;
    box-shadow: 0 10px 20px rgba(15,23,42,0.06);
}
/* pequeño ajuste para que la lista se vea pegada (evita gap por 1px de borde) */
.search-wrapper.open .header-search-input {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.price-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
}

/* fila superior */
.price-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.price-main {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    white-space: nowrap; /* 🔥 evita que se corte el $ */
    flex-shrink: 0; /* 🔥 evita que se achique */
}

.price-info {
    font-size: 0.85rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; /* 🔥 evita que empuje el precio */
}
/* fila inferior */
/* fila inferior */
.price-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 💚 badge de descuento (clave) */
.price-discount-badge {
    background: #e6f4ea;
    color: #00a650;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

/* label */
.price-sub {
    font-size: 12px;
    color: var(--green);
}
.currency {
    font-size: 0.85em;
    opacity: 0.8;
    margin-right: 2px;
}

.ofertas-row {
    padding-bottom: 2px;
    margin-top: 6px;
    display: flex;
    gap: 1rem;
    padding: 12px;
    overflow-x: auto; /* permite scroll horizontal */
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    overscroll-behavior-x: contain; /* evita saltos desde ancestros */
    -ms-overflow-style: auto;
    position: relative;
    white-space: nowrap; /* asegura que los hijos no hagan wrap */
}


/* Items con ancho controlado (no se estiran) */
.oferta-item {
    display: inline-flex;
    flex: 0 0 auto;
    width: 90px; /* ajustar si querés más/menos */
    height: 120px;
    box-sizing: border-box;
    vertical-align: top;
    scroll-snap-align: start;
}

/* Card interna mantiene tamaño y relación */
.oferta-item .card,
.oferta-horizontal .card {
    width: 100%;
    height: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    border: 1px solid rgba(0,0,0,0.06);
    background: linear-gradient(180deg, #fff, #fbfbfb);
}

/* Resaltado visual de las cards de ofertas */
    .oferta-item .card {
        border: 1px solid #ffe5e5;
        background: #fff;
        border-radius: 14px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        overflow: hidden;
        transition: all .2s ease;
    }
        .oferta-item .card:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 24px rgba(0,0,0,0.15);
        }
/* Hover/focus para destacar */
        .oferta-item .card:hover,
        .oferta-item .card:focus-within {
            box-shadow: 0 18px 40px rgba(239,68,68,0.25);
            transform: translateY(-6px) scale(1.01);         
            border-color: rgba(52,131,250,0.18);
        }

/* Imagen y cuerpo acostumbrados */
    .oferta-item .card-media {
        background: #f8fafc;
        padding: 6px;

        height: 70px;
        flex: 0 0 70px;
        display: flex;
        align-items: center;
        justify-content: center;
       
    }
    .oferta-item .card-body {
        background: #fff;
        padding: 8px;
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-height: 0;
    }
    .oferta-item .product-title {
        font-size: 12px;
        font-weight: 600;
        color: #111;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .oferta-item .price-main {
        font-size: 14px;
        font-weight: 800;
        color: #00a650;
    }
    .oferta-item .badge-oferta {
        background: #ff3b30;
        color: #fff;
        font-size: 9px;
        padding: 3px 6px;
        border-radius: 6px;
        font-weight: 700;
    }

/* Scrollbar visible en WebKit (desktop) */
.ofertas-row::-webkit-scrollbar { height: 10px; }
.ofertas-row::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.12);
    border-radius: 10px;
}
.ofertas-row::-webkit-scrollbar-track { background: transparent; }

/* Scrollbar para Firefox */
.ofertas-row { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.12) transparent; }
/* Modal: forzar visibilidad y pointer-events */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.45);
    z-index: 99999 !important;
    pointer-events: auto !important;
    padding: 20px;
}
.modal-card {
    position: relative;
    z-index: 100000 !important;
    pointer-events: auto !important;
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 16px 18px;
    /* 🔥 sombra ML real */
    box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.18);
    overflow: hidden;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #111;
}

.modal-close {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}
.modal-body {
    overflow-y: auto;
    padding-right: 4px;
    /* scrollbar sutil */
    scrollbar-width: thin;
}

    .modal-body::-webkit-scrollbar {
        width: 6px;
    }

    .modal-body::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.15);
        border-radius: 10px;
    }
.modal-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

    .modal-footer .btn-primary {
        flex: 1;
        background: #3483fa;
        color: white;
        border: none;
        border-radius: 8px;
        padding: 12px;
        font-weight: 600;
    }
.modal-overlay {
    background: rgba(0,0,0,0.35); /* antes 0.45 */
    backdrop-filter: blur(2px);
}
.modal-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient( 120deg, transparent 40%, rgba(255,255,255,0.5), transparent 60% );
    opacity: 0.3;
    pointer-events: none;
}

.modal-img {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    margin-bottom: 12px;
}

/* precio protagonista */
.modal-price {
    font-size: 22px;
    font-weight: 800;
    color: #00a650;
    margin-top: 10px;
}

/* descripción */
.modal-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}



.section-title {
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    margin: 12px 12px 6px;
    padding-left: 6px;
    border-left: 3px solid var(--primary);
    background: none;

    margin-bottom: 8px;
    position: relative;
    color: #111;
}

    /* línea arriba */
    .section-title::before {
        content: "";
        position: absolute;
        top: 0;
        left: 10%;
        width: 80%;
        height: 1px;
        background: linear-gradient(to right, transparent, #d1d5db, transparent);
    }

    /* línea abajo */
    .section-title::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 10%;
        width: 80%;
        height: 1px;
        background: linear-gradient(to right, transparent, #d1d5db, transparent);
    }


    .section-title::before,
    .section-title::after {
        display: none;
    }


/* línea superior ligeramente por encima del texto */
.destacados-section .section-title::before {
    top: -6px;
}

/* línea inferior ligeramente por debajo del texto */
.destacados-section .section-title::after {
    bottom: -6px;
}
/* =========================
   CARRUSEL RELACIONADOS
========================= */

.relacionados-row {
    margin-top: 4px;
    display: flex;
    gap: 0.8rem;
    padding: 10px 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* items */
.relacionado-item {
    flex: 0 0 auto;
    width: 120px;
}

    /* card estilo distinto a ofertas */
    .relacionado-item .card {
        border-radius: 12px;
        background: linear-gradient(180deg, #ffffff, #f9fafb);
        border: 1px solid rgba(0,0,0,0.06);
        box-shadow: 0 4px 12px rgba(0,0,0,0.06);
        transition: all .2s ease;
    }

        /* hover más suave que ofertas */
        .relacionado-item .card:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 22px rgba(0,0,0,0.12);
        }

    /* imagen */
    .relacionado-item .card-media {
        height: 90px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f3f4f6;
    }

    /* texto más chico */
    .relacionado-item .product-title {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }

    /* precio */
    .relacionado-item .price-main {
        font-size: 13px;
        font-weight: 700;
    }

/* scrollbar */
.relacionados-row::-webkit-scrollbar {
    height: 6px;
}

.relacionados-row::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
/*Slide novedades*/
.hero-header-pro.inside {
    position: absolute;
    top: 10px;
    left: 12px;
    z-index: 5;
    margin: 0; /* 🔥 importante */
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.hero-header-pro {
    position: relative;
    text-align: center;
    margin: 2px 0; /* 🔥 UNA sola fuente de verdad */
    padding: 0;

    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    pointer-events: none; /* opcional */

}

/* texto chico */
.hero-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #3483fa;
    text-transform: uppercase;
    position: relative;
    top: -8px;
    
}

/* título principal */
.hero-title {
    font-size: 14px;
    letter-spacing: 1px;
    color: #888;
    margin: 2px 0 0;
    top: -8px;
    font-weight: 800;
    position: relative;
    display: inline-block;
}

    /* 🔥 línea metálica */
    .hero-title::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -4px;
        width: 100%;
        height: 2px;
        background: linear-gradient( 90deg, transparent, rgba(52,131,250,0.6), rgba(0,0,0,0.2), rgba(52,131,250,0.6), transparent );
    }

/* ✨ brillo animado MUY sutil */
.hero-header-pro::before {

    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient( 120deg, transparent 40%, rgba(255,255,255,0.6), transparent 60% );
    opacity: 0.15;
    pointer-events: none;
}
.hero-minimal {
    margin: 0px auto;
    width: 100%;
    max-width: 720px;
    border: 2px solid rgba(52,131,250,0.25);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f3f4f6);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08), 0 0 0 3px rgba(52,131,250,0.08);
    overflow: hidden;
    position: relative;
}
.hero-slide {
    background: rgba(255,255,255,0.7);
backdrop-filter: blur(10px);
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
    pointer-events: none;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

    .hero-slide.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

.hero-tag {
    font-size: 11px;
    color: #888;
    letter-spacing: 1px;
}

.hero-name {
    margin-top: 6px;
    font-size: 17px;
    font-weight: 600;
    color: #111;
}


.dot {
    width: 6px;
    height: 6px;
    background: #bbb;
    border-radius: 50%;
    transition: all 0.25s ease;
    margin: 0 3px;
}
    .dot.active {
        width: 14px;
        background: #3483fa;
        border-radius: 999px;
    }
.hero-track {
    display: flex;
    transition: transform 0.25s cubic-bezier(.22,.61,.36,1);
    will-change: transform;
}

.hero-slide-min {

    display: flex;
    align-items: center;
    height: 140px;
    padding: 10px;
    gap: 0; /* 🔥 sin espacio para que sea mitad exacta */
    position: relative;
    min-width: 100%;
    cursor: pointer;
   padding-top: 30px;
    animation: heroFade .7s ease;
    flex: 0 0 100%;
    padding-bottom: 32px;
}

.hero-header-pro.inside .hero-title {
    font-size: 14px;
}

.hero-header-pro.inside .hero-kicker {
    font-size: 9px;
} 
@keyframes heroFade {
    from {
        opacity: 0.7;
        transform: scale(.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* imagen */
.hero-img {
    width: 45%; /* 🔥 más controlado */
    height: auto;
    max-height: 120px;
    margin: 0 auto; /* 🔥 centrado real */
    display: block;

    object-fit: contain; /* 🔥 importante */
    padding: 5px;
    position: static; /* 🔥 cambiar esto */
}
    .hero-img.loaded {
        opacity: 1;
    }
/* info */
.hero-info {
    align-items: flex-start;
    width: 80%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 10px 10px 0;
    gap: 6px;
    position: static; /* 🔥 clave */
    background: none;
    backdrop-filter: none;
    box-shadow: none;
    bottom: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.4);

}

    .hero-info h3 {
        align-items: center; /* 🔥 centra horizontalmente */
        text-align: center;
        width: 100%;
        font-size: 15px;
        font-weight: 700;
        color: #444;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* 🔥 máximo 2 líneas */
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.2;
        min-height: 34px; /* 🔥 reserva espacio aunque sea corto */

        order: 2;
        margin-bottom: 20px;
    }

.hero-price {
    order: 3;
    font-size: 20px;
    font-weight: 900;
    color: #00a650;
    text-align: center; /* 🔥 clave */
    width: 100%;
}
.hero-badge {
    order: 1;
    font-size: 12px;
    font-weight: 900;
    padding: 3px 8px;
    background: #3483fa;
    color: white;
    border-radius: 999px;
    align-self: flex-start;  
    margin-top: 5px;  
    display: inline-block;
   width:100%;
   align-items:center;
    text-align:center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    letter-spacing: 0.3px;
}
/* Animaciones */
.anim-a {
    animation: fadeSlide 0.5s ease;
}

.anim-b {
    animation: fadeSlide 0.5s ease;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.fade-text {
    animation: fadeInUpSoft .5s ease;
}


/* dots */
.hero-dots {
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 4px 0;
    pointer-events: auto; /* opcional si querés clickeables */

    background: none; /* 🔥 sacamos fondo si molesta */
    backdrop-filter: none;
}

.hero-controls-overlay {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 🔥 Mostrar SOLO cuando el usuario interactúa */
.hero-minimal:hover .hero-controls-overlay {
    opacity: 1;
}

/* BOTONES */
.hero-btn {
    pointer-events: auto;
    background: rgba(0,0,0,0.35);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.25s ease;
}

/* Animación entrada */
.hero-minimal:hover .hero-btn {
    transform: scale(1);
    opacity: 1;
}

/* Hover efecto */
.hero-btn:hover {
    background: rgba(0,0,0,0.7);
    transform: scale(1.1);
}

/* Posición */
.hero-btn.left {
    margin-left: 10px;
}

.hero-btn.right {
    margin-right: 10px;
}

/* Play centrado abajo */
.hero-btn.center {
    position: absolute;
    bottom: 10px; /* 🔥 antes -60px */
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    z-index: 5; /* 🔥 clave */
    
}

.hero-minimal:hover .hero-btn.center {
    transform: translateX(-50%) scale(1);
}
.hero-block {
    margin-top: 0px;
}
.hero-header-pro.outside {
    text-align: center;
    margin-bottom: -8px; /* 🔥 clave: lo pega al slider */
    z-index: 2;
}

/*---------------------------*/
/* MOBILE */

@media (max-width: 768px) {
    .toolbar {
        padding-bottom: 0;
    }

    .hero-block {
        margin-top: 0;
    }


    .hero-minimal {
        margin: 2px auto;
    } 
    /* 🔥 HEADER FIX DEFINITIVO */
    .top-header-pro {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 8px;
        height: auto;
    }
    /* LOGO */
    .brand {
        order: 1;
        flex: 0 0 auto;
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    /* ACCIONES (usuario + idioma) */
    .header-actions {
        order: 2;
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* BUSCADOR ABAJO */
    .search-wrapper {
        order: 3;
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    /* 🔧 INPUT */
    .header-search-input {
        width: 100%;
        font-size: 15px;
    }

    /* 🔧 CLEAR BTN */
    .header-clear-btn {
        right: 12px;
        font-size: 16px;
    }

    /* 🔧 SUGGESTIONS */
    .search-suggestions {
        width: 100%;
        left: 0;
        border-radius: 0 0 12px 12px;
        margin-top: 0;
    }

        .search-suggestions li {
            padding: 12px 14px;
            font-size: 15px;
        }
    .card {
        box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    }
    /*Slider Novedades*/
    .hero-header-pro {
        margin-bottom: 0px;
    }

    .hero-title {
        font-size: 16px;
    }
    .hero-controls-overlay {
        display: none;
    }

    .hero-minimal {
        
        width: 90%;
    }

    .hero-img {
        object-fit: contain; 
        height:110px;
        width:120px;
       
    }
    .hero-info {
        justify-content: center; /* 🔥 centra todo */
        gap: 4px;
    }
        .hero-info h3 {
            margin-bottom: 4px; /* 🔥 bajar de 15px a algo chico */
        }

    .hero-price {
        margin-top: 0;
        font-size: 20px; /* opcional */
    }

    /*--------------------*/


    /* 🔥 GRID PRODUCTOS */
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)); /* 🔥 clave */
        gap: .6rem;
        padding: 0 6px;
              
    }
        .card-grid .card {
            border: 1px solid #eee;
            box-shadow: none;
        }
    .card {
        min-width: 0;



        width: 100%;
        max-width: 100%;
    }
            .card-grid .card:hover {
                box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            }

            /* Badge */
    .hero-badge {
        white-space: nowrap; /* 🔥 no permite salto de línea */
        
    }
            /*------------*/

    /* 🔥 OFERTAS */
    .ofertas-row {
       
        white-space: normal;
        gap: .5rem;
        padding: 2px;
    }

    .oferta-item {
        width: calc(40% - .4rem); /* antes 30% */
        flex: 0 0 calc(40% - .4rem);
    }

        .oferta-item .card-media {
            aspect-ratio: 1/1;
            height: auto;
            padding: 0;
        }

    /* 🔥 SUBMENU COMPACTO */
    .submenu.open {
        padding: 4px;
        border-radius: 10px;
    }

    .submenu-inner {
        gap: 8px;
        padding: 4px;
        scrollbar-width: none;
    }

        .submenu-inner::-webkit-scrollbar {
            display: none;
        }

    .submenu-card {
        flex: 0 0 70px;
        height: 65px;
        padding: 5px;
        gap: 3px;
        border-radius: 8px;
    }

    .submenu-icon {
        width: 26px;
        height: 26px;
    }

    .submenu-text {
        font-size: 10px;
        line-height: 1.05;
    }

    /* 🔥 PAGINACIÓN */
    .pagination {
        margin: 0 0 80px;
    }

        .pagination button {
            min-width: 32px;
            height: 32px;
            font-size: 13px;
        }

    .pagination-info {
        font-size: 12px;
    }
}
.relacionados-empty {
    text-align: center;
    color: #6b7280;
    padding: 20px;
    font-size: 14px;
}
/*Pantallas grandes*/

@media (min-width: 1200px) {
    .hero-minimal {
        max-width: 1000px;
    }
}

@media (min-width: 1600px) {
    .hero-minimal {
        max-width: 1100px;
    }
}
/*------------------*/
/* Mantener el botón clear dentro del input de búsqueda */
.search-wrapper {
    position: relative; /* referencia para el botón absoluto */
}

.search-wrapper .header-search-input {
    padding-right: 48px; /* deja espacio para el botón clear */
}

.search-wrapper .header-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eee;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .search-wrapper .header-clear-btn {
        right: 8px;
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .search-wrapper .header-search-input {
        padding-right: 40px;
    }
    /* HeroSlider: título del producto más protagonista */
    .hero-product-title {
        font-size: 22px;           /* más grande en desktop */
        font-weight: 900;          /* peso fuerte */
        color: #0f172a;            /* contraste intenso */
        text-align: center;
        margin: 0 0 8px;
        line-height: 1.08;
        letter-spacing: -0.2px;
        display: -webkit-box;
        -webkit-line-clamp: 2;     /* hasta 2 líneas */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        text-shadow: 0 1px 0 rgba(255,255,255,0.15), 0 6px 24px rgba(2,6,23,0.04);
    }

    /* Hacer que la info quede centrada verticalmente y darle más aire */
    .hero-info {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center; /* centra el título y precio */
        padding: 8px 12px;
    }

    /* Precio ligeramente más pequeño para no competir con el título */
    .hero-price {
        font-size: 18px;
        font-weight: 800;
        color: #00a650;
        margin-top: 4px;
    }

    /* Ajustes responsive: en móviles mantener tamaño alto pero legible */
    @media (max-width: 768px) {
        .hero-product-title {
            font-size: 16px;
            -webkit-line-clamp: 2;
        }

        .hero-info {
            padding: 6px 8px;
        }

        .hero-img {
            width: 40%;
            max-height: 110px;
        }
    }
    /* Estilo para label delante del precio en el HeroSlider */
    .hero-price {
        display: flex;
        align-items: baseline;
        justify-content: center;
        gap: 8px;
        margin-top: 4px;
        white-space: nowrap;
    }

    .hero-price-label {
        font-size: 5px;
        color: #374151; /* gris oscuro */
        opacity: 0.85;
        letter-spacing: 0.6px;
    }

    .hero-price-value {
        font-size: 20px; /* mantiene proporciones */
        font-weight: 900;
        color: #00a650;
    }
    @media (max-width: 768px) {
        .hero-price {
            gap: 6px;
        }
        .hero-price-label {
            font-size: 10px;
        }
        .hero-price-value {
            font-size: 18px;
        }
    }
}

/* Forzar etiqueta "Precio en promo" en negro */
.hero-price-label {
    color: #374151 !important;
    font-size:10px !important;
    font-weight: 450 !important;
}