/* =============================================================
   DESIGN SYSTEM — Tienda Online Estilo Mercado Libre
   Ver DESIGN_SYSTEM.md para documentación completa
   ============================================================= */

/* --- Variables --- */
:root {
    --ml-yellow:        #ffe600;
    --ml-yellow-dark:   #f5d400;
    --ml-blue:          var(--color-primario);
    --ml-blue-dark:     var(--color-primario-dark);
    --ml-blue-darker:   var(--color-primario-darker);
    --ml-green:         #00a650;
    --ml-red:           #f23d4f;
    --ml-orange:        #ff7733;

    --bg-page:          #ebebeb;
    --bg-card:          #ffffff;

    --text-primary:     #333333;
    --text-secondary:   #666666;
    --text-muted:       #999999;
    --text-link:        var(--ml-blue);

    --border-color:         #e6e6e6;
    --border-radius-card:   6px;
    --border-radius-btn:    6px;
    --border-radius-input:  4px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.10);
    --shadow-md: 0 2px 8px rgba(0,0,0,.12);
    --shadow-lg: 0 4px 20px rgba(0,0,0,.15);

    --font-family: 'Inter', 'Proxima Nova', system-ui, -apple-system, sans-serif;

    /* color personalizable por configuración del negocio */
    --color-primario: #3483fa;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 14px;
    scroll-behavior: smooth;
    position: relative;
    min-height: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-page);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--text-link); text-decoration: none; }
a:hover { color: var(--ml-blue-dark); }

/* Override Bootstrap container max-width */
.container, .container-sm, .container-md, .container-lg, .container-xl {
    max-width: 1200px !important;
}

/* Main content area */
.main-content {
    min-height: calc(100vh - 120px);
    padding: 20px 0 40px;
}

/* Bootstrap icon baseline fix */
.bi { vertical-align: -0.125em; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }


/* =============================================================
   HEADER / NAVBAR — Estilo Mercado Libre
   ============================================================= */

.ml-header {
    background-color: var(--color-primario);
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

.ml-header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.ml-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
}
.ml-logo img { max-height: 60px; width: auto; }
.ml-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.ml-search-wrapper {
    flex: 1;
    max-width: 680px;
}
.ml-search-form { display: flex; width: 100%; }
.ml-search-input {
    flex: 1;
    height: 42px;
    border: none;
    border-radius: 2px 0 0 2px;
    padding: 0 16px;
    font-size: 14px;
    font-family: var(--font-family);
    outline: none;
    color: var(--text-primary);
    background: #fff;
    box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.08);
}
.ml-search-input:focus { box-shadow: inset 0 0 0 2px var(--color-primario); }
.ml-search-input::placeholder { color: #aaa; }
.ml-search-btn {
    height: 42px;
    width: 52px;
    background: var(--color-primario);
    border: none;
    border-radius: 0 2px 2px 0;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
}
.ml-search-btn:hover { background: var(--color-primario-dark); }

.ml-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.ml-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    color: rgba(255,255,255,.88);
    font-size: 11px;
    font-weight: 600;
    transition: background .15s, color .15s;
    white-space: nowrap;
    line-height: 1.2;
    cursor: pointer;
}
.ml-nav-link:hover { background: rgba(255,255,255,.15); color: #fff; }
.ml-nav-link i { font-size: 21px; margin-bottom: 2px; }

.ml-cart-link { position: relative; }
.ml-cart-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    background: #fff;
    color: var(--color-primario);
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}


/* =============================================================
   BREADCRUMB
   ============================================================= */

.ml-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    padding: 10px 0 14px;
    flex-wrap: wrap;
}
.ml-breadcrumb a { color: var(--text-muted); }
.ml-breadcrumb a:hover { color: var(--color-primario); text-decoration: underline; }
.ml-breadcrumb-sep { color: #ccc; font-size: 10px; }
.ml-breadcrumb .active { color: var(--text-secondary); }


/* =============================================================
   CARDS GENÉRICAS
   ============================================================= */

.ml-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow .2s, transform .15s;
}
.ml-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Override Bootstrap .card */
.card {
    border-radius: var(--border-radius-card) !important;
    border-color: var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: box-shadow .2s, transform .15s !important;
}
.card:hover {
    box-shadow: var(--shadow-lg) !important;
    transform: translateY(-2px) !important;
}
.card-body { padding: 20px !important; }


/* =============================================================
   PRODUCT CARDS
   ============================================================= */

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: box-shadow .2s, transform .15s;
    overflow: hidden;
}
.product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.14);
    transform: translateY(-2px);
}
.product-card-img-wrap {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    background: #fff;
}
.product-card-img-wrap img {
    max-height: 148px;
    max-width: 100%;
    object-fit: contain;
}
.product-card-body {
    padding: 4px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-card-brand {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 500;
}
.product-card-name {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
    flex-grow: 1;
}
.product-card-price {
    font-size: 22px;
    font-weight: 300;
    color: var(--text-primary);
    margin: 8px 0 12px;
    line-height: 1.1;
}
.product-card-nostock {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.product-card-blocked {
    border-color: #dadada;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}

.product-card-blocked .product-card-img-wrap img {
    filter: grayscale(.35);
    opacity: .78;
}

.product-card-alert {
    color: #b42318;
    font-weight: 700;
    margin-bottom: 10px;
}


/* =============================================================
   CATEGORY CARDS
   ============================================================= */

.category-card {
    background: #fff;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 18px 12px;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: box-shadow .15s, border-color .15s;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}
.category-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primario);
    color: var(--color-primario);
}
.category-card-icon {
    font-size: 30px;
    color: var(--color-primario);
    margin-bottom: 8px;
    display: block;
}
.category-card-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
}
.category-card-count {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}


/* =============================================================
   BUTTONS
   ============================================================= */

.btn {
    border-radius: var(--border-radius-btn);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-family);
    padding: 10px 24px;
    transition: filter .15s, background .15s, box-shadow .15s, color .15s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1.4;
}
.btn-sm  { padding: 6px 16px; font-size: 13px; }
.btn-lg  { padding: 13px 32px; font-size: 16px; }

/* Primary — Color dinámico del negocio */
.btn-primary {
    background-color: var(--color-primario) !important;
    border-color: var(--color-primario) !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--color-primario-dark) !important;
    border-color: var(--color-primario-dark) !important;
    box-shadow: 0 2px 8px var(--color-primario-rgba) !important;
    color: #fff !important;
}

/* Accent/Secondary — Para acciones alternativas (ej: agregar al carrito) */
.btn-accent {
    background-color: var(--color-secundario) !important;
    border-color: var(--color-secundario) !important;
    color: #fff !important;
}
.btn-accent:hover, .btn-accent:focus, .btn-accent:active {
    background-color: var(--color-secundario-dark) !important;
    border-color: var(--color-secundario-dark) !important;
    box-shadow: 0 2px 8px var(--color-secundario-rgba) !important;
    color: #fff !important;
}

/* Outline primary */
.btn-outline-primary {
    color: var(--color-primario) !important;
    border-color: var(--color-primario) !important;
    background: transparent !important;
}
.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--color-primario) !important;
    color: #fff !important;
}

/* Outline secondary */
.btn-outline-secondary {
    color: var(--text-secondary) !important;
    border-color: #ccc !important;
    background: transparent !important;
}
.btn-outline-secondary:hover {
    background-color: #f2f2f2 !important;
    color: var(--text-primary) !important;
}

/* Success (WhatsApp / OK) */
.btn-success {
    background-color: var(--ml-green) !important;
    border-color: var(--ml-green) !important;
    color: #fff !important;
}
.btn-success:hover {
    filter: brightness(.92);
    color: #fff !important;
}

/* Danger */
.btn-danger {
    background-color: var(--ml-red) !important;
    border-color: var(--ml-red) !important;
    color: #fff !important;
}

/* Focus outline — accesibilidad */
.btn:focus-visible {
    outline: 2px solid var(--color-primario);
    outline-offset: 2px;
    box-shadow: none !important;
}


/* =============================================================
   FORMS & INPUTS
   ============================================================= */

.form-control, .form-select {
    border: 1px solid #ccc;
    border-radius: var(--border-radius-input);
    padding: 10px 14px;
    font-size: 14px;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    height: auto;
}
.form-control:focus, .form-select:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px var(--color-primario-rgba);
    outline: none;
}
.form-control::placeholder { color: #aaa; }
.form-control-sm { padding: 6px 10px; font-size: 13px; }

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
}
.form-check-input:checked {
    background-color: var(--color-primario);
    border-color: var(--color-primario);
}
.form-check-input:focus {
    box-shadow: 0 0 0 3px var(--color-primario-rgba);
}

/* Input group */
.input-group .form-control { border-radius: var(--border-radius-input) 0 0 var(--border-radius-input); }
.input-group .btn { border-radius: 0 var(--border-radius-input) var(--border-radius-input) 0; }


/* =============================================================
   HERO BANNER
   ============================================================= */

.ml-hero {
    background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-primario-darker) 100%);
    color: #fff;
    border-radius: 6px;
    padding: 40px 48px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.ml-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -8%;
    width: 380px;
    height: 380px;
    background: rgba(255,255,255,.07);
    border-radius: 50%;
    pointer-events: none;
}
.ml-hero-title { font-size: 30px; font-weight: 700; margin: 0 0 10px; line-height: 1.2; }
.ml-hero-subtitle { font-size: 15px; opacity: .9; margin: 0 0 24px; max-width: 480px; line-height: 1.5; }

/* =============================================================
   DESTACADOS BANNERS (4 layouts + autoplay)
   ============================================================= */

.destacados-section {
    background: linear-gradient(140deg, rgba(255,255,255,.95) 0%, rgba(245,248,255,.92) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 18px;
    overflow: hidden;
}

.destacados-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.destacados-actions {
    display: inline-flex;
    gap: 8px;
}

.destacados-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.12);
    color: var(--text-primary);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.destacados-btn:hover,
.destacados-btn:focus-visible {
    background: var(--color-primario-lighter);
    box-shadow: 0 4px 14px var(--color-primario-rgba);
    transform: translateY(-1px);
}

.destacados-carousel {
    position: relative;
    min-height: 320px;
}

.destacados-track {
    position: relative;
    min-height: 320px;
}

.destacados-skeleton {
    height: 320px;
    border-radius: 10px;
    overflow: hidden;
    background: #f7f7f7;
    border: 1px solid #ececec;
}

.destacados-skeleton-shimmer {
    width: 100%;
    height: 100%;
    background: linear-gradient(100deg, #f1f1f1 0%, #fafafa 45%, #f1f1f1 100%);
    background-size: 220% 100%;
    animation: destacadosShimmer 1.2s linear infinite;
}

@keyframes destacadosShimmer {
    from { background-position: 200% 0; }
    to { background-position: -40% 0; }
}

.destacado-banner {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 108px 1fr minmax(180px, 34%);
    align-items: center;
    gap: 16px;
    min-height: 320px;
    background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-primario-dark) 62%, var(--color-secundario-dark) 100%);
    border-radius: 10px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
    opacity: 0;
    transform: translateX(26px) scale(.985);
    transition: opacity .52s ease, transform .52s ease;
    pointer-events: none;
}

.destacado-banner.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.destacado-logo-wrap {
    width: 96px;
    height: 96px;
    border-radius: 14px;
    padding: 10px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.24);
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
}

.destacado-logo-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.destacado-content {
    color: #fff;
    min-width: 0;
}

.destacado-phrase {
    margin: 0 0 8px;
    font-size: 13px;
    letter-spacing: .05em;
    text-transform: uppercase;
    font-weight: 700;
    opacity: .9;
}

.destacado-title {
    margin: 0 0 8px;
    font-size: clamp(1.2rem, 2.8vw, 1.95rem);
    line-height: 1.15;
    font-weight: 800;
    text-wrap: balance;
}

.destacado-desc {
    margin: 0 0 12px;
    font-size: 14px;
    opacity: .9;
    max-width: 60ch;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.destacado-price {
    margin: 0 0 12px;
    font-size: clamp(1.35rem, 3.2vw, 2.2rem);
    font-weight: 900;
    letter-spacing: -.02em;
}

.destacado-cta {
    background: #fff !important;
    color: var(--color-primario-dark) !important;
    border-color: #fff !important;
}

.destacado-cta:hover,
.destacado-cta:focus-visible {
    background: var(--color-secundario-lighter) !important;
    border-color: var(--color-secundario-lighter) !important;
}

.destacado-image-wrap {
    width: 100%;
    height: 260px;
    border-radius: 14px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.24);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.destacado-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Layout 1: logo izquierda, imagen derecha */
.destacado-banner.layout-1 {
    grid-template-columns: 108px 1fr minmax(200px, 36%);
}

/* Layout 2: imagen izquierda, logo en centro */
.destacado-banner.layout-2 {
    grid-template-columns: minmax(220px, 34%) 108px 1fr;
}

.destacado-banner.layout-2 .destacado-image-wrap {
    order: 1;
}

.destacado-banner.layout-2 .destacado-logo-wrap {
    order: 2;
    justify-self: center;
}

.destacado-banner.layout-2 .destacado-content {
    order: 3;
}

/* Layout 3: imagen superior en desktop compacto */
.destacado-banner.layout-3 {
    grid-template-columns: 108px 1fr;
    grid-template-rows: minmax(170px, 1fr) auto;
}

.destacado-banner.layout-3 .destacado-image-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
    height: 170px;
}

.destacado-banner.layout-3 .destacado-logo-wrap {
    grid-column: 1;
    grid-row: 2;
}

.destacado-banner.layout-3 .destacado-content {
    grid-column: 2;
    grid-row: 2;
}

/* Layout 4: logo izquierda y texto compacto */
.destacado-banner.layout-4 {
    grid-template-columns: 110px 1fr minmax(220px, 33%);
}

.destacado-banner.layout-4 .destacado-title {
    font-size: clamp(1.1rem, 2.4vw, 1.6rem);
}

.destacados-indicators {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.destacados-dot {
    width: 24px;
    height: 6px;
    border: none;
    border-radius: 999px;
    background: rgba(0,0,0,.2);
    transition: width .25s ease, background .25s ease;
}

.destacados-dot.active {
    width: 36px;
    background: var(--color-primario);
}

.destacados-empty .destacados-actions,
.destacados-empty .destacados-indicators {
    display: none;
}

@media (min-width: 1920px) {
    .destacados-carousel,
    .destacados-track,
    .destacado-banner {
        min-height: 390px;
    }

    .destacado-image-wrap {
        height: 320px;
    }
}

@media (max-width: 1024px) {
    .destacados-carousel,
    .destacados-track,
    .destacado-banner {
        min-height: 340px;
    }

    .destacado-banner,
    .destacado-banner.layout-1,
    .destacado-banner.layout-2,
    .destacado-banner.layout-4 {
        grid-template-columns: 94px 1fr minmax(160px, 32%);
        gap: 12px;
    }

    .destacado-banner.layout-3 {
        grid-template-columns: 94px 1fr;
    }

    .destacado-logo-wrap {
        width: 84px;
        height: 84px;
    }

    .destacado-image-wrap {
        height: 230px;
    }
}

@media (max-width: 768px) {
    .destacados-section {
        padding: 14px;
    }

    .destacados-carousel,
    .destacados-track,
    .destacado-banner {
        min-height: 300px;
    }

    .destacado-banner,
    .destacado-banner.layout-1,
    .destacado-banner.layout-2,
    .destacado-banner.layout-3,
    .destacado-banner.layout-4 {
        grid-template-columns: 72px 1fr;
        grid-template-rows: auto auto;
        gap: 10px;
        padding: 16px;
    }

    .destacado-image-wrap {
        grid-column: 1 / -1;
        grid-row: 2;
        height: 140px;
        width: 100%;
    }

    .destacado-logo-wrap {
        width: 64px;
        height: 64px;
        border-radius: 10px;
    }

    .destacado-content {
        grid-column: 2;
        grid-row: 1;
    }

    .destacado-desc {
        display: none;
    }

    .destacado-price {
        margin-bottom: 8px;
    }
}

@media (max-width: 320px) {
    .destacados-carousel,
    .destacados-track,
    .destacado-banner {
        min-height: 280px;
    }

    .destacado-banner,
    .destacado-banner.layout-1,
    .destacado-banner.layout-2,
    .destacado-banner.layout-3,
    .destacado-banner.layout-4 {
        grid-template-columns: 58px 1fr;
        padding: 12px;
        gap: 8px;
    }

    .destacado-logo-wrap {
        width: 52px;
        height: 52px;
        padding: 7px;
    }

    .destacado-phrase {
        font-size: 10px;
    }

    .destacado-title {
        font-size: 1rem;
    }

    .destacado-price {
        font-size: 1.2rem;
    }

    .destacado-image-wrap {
        height: 112px;
    }
}

/* =============================================================
   OFFER BANNERS (carousel de productos destacados)
   ============================================================= */

.offer-banner-carousel {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,.10);
}

.offer-banner-slide {
    background: linear-gradient(120deg, var(--color-primario) 0%, var(--color-primario-darker) 55%, #1a1a2e 100%);
    color: #fff;
    min-height: 180px;
    display: flex;
    align-items: center;
    padding: 28px 36px;
    position: relative;
    overflow: hidden;
}

.offer-banner-slide::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
    pointer-events: none;
}

.offer-banner-logo-wrap {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin-right: 28px;
}

.offer-banner-logo-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: .9;
}

.offer-banner-divider {
    width: 2px;
    height: 80px;
    background: rgba(255,255,255,.2);
    border-radius: 2px;
    flex-shrink: 0;
    margin-right: 28px;
}

.offer-banner-content {
    flex: 1;
    min-width: 0;
}

.offer-banner-tag {
    display: inline-block;
    background: rgba(255,255,255,.18);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.offer-banner-brand {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    opacity: .75;
    margin: 0 0 4px;
}

.offer-banner-name {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.offer-banner-price {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.5px;
    margin: 0 0 14px;
}

.offer-banner-img-wrap {
    flex-shrink: 0;
    width: 130px;
    height: 130px;
    border-radius: 10px;
    background: rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 24px;
    overflow: hidden;
}

.offer-banner-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: luminosity;
    opacity: .85;
}

.carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    opacity: .4;
}

.carousel-indicators .active {
    opacity: 1;
}

@media (max-width: 575px) {
    .offer-banner-slide {
        padding: 20px 18px;
        min-height: 160px;
    }
    .offer-banner-logo-wrap {
        width: 64px;
        height: 64px;
        margin-right: 14px;
    }
    .offer-banner-divider { display: none; }
    .offer-banner-name { font-size: 16px; }
    .offer-banner-price { font-size: 20px; }
    .offer-banner-img-wrap { display: none; }
}


/* =============================================================
   SECTIONS
   ============================================================= */

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px;
}
.section-title-sm {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px;
}
.page-section { margin-bottom: 32px; }


/* =============================================================
   PRODUCT DETAIL
   ============================================================= */

.product-detail-img-wrap {
    background: #fff;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    box-shadow: var(--shadow-sm);
}
.product-detail-img-wrap img {
    max-height: 360px;
    max-width: 100%;
    object-fit: contain;
}
.product-detail-panel {
    background: #fff;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}
.product-detail-brand {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}
.product-detail-name {
    font-size: 22px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0 0 16px;
}
.product-detail-price {
    font-size: 36px;
    font-weight: 300;
    color: var(--text-primary);
    margin: 0 0 4px;
    line-height: 1;
}
.product-detail-stock-ok  { font-size: 13px; color: var(--ml-green); font-weight: 600; margin-bottom: 20px; }
.product-detail-stock-low { font-size: 13px; color: var(--ml-orange); font-weight: 600; margin-bottom: 20px; }
.product-detail-stock-no  { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-bottom: 20px; }

.quantity-selector { display: flex; align-items: center; gap: 0; margin-bottom: 16px; }
.quantity-selector label { font-size: 14px; color: var(--text-secondary); margin-right: 12px; font-weight: 500; }
.quantity-selector input[type=number] {
    width: 72px; height: 40px; text-align: center;
    border: 1px solid #ccc; border-radius: 4px;
    font-size: 15px; font-weight: 600;
    font-family: var(--font-family);
}

.product-detail-meta { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-color); }
.product-detail-meta p { font-size: 13px; color: var(--text-muted); margin: 4px 0; }
.product-detail-meta a { color: var(--ml-blue); }


/* =============================================================
   FILTERS SIDEBAR
   ============================================================= */

.filters-panel {
    background: #fff;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.filter-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.filter-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 18px 0 10px;
}
.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
}
.filter-option:hover { color: var(--color-primario); }
.filter-option input[type=radio] { accent-color: var(--color-primario); width: 14px; height: 14px; flex-shrink: 0; }
.filter-option-count { color: var(--text-muted); font-size: 12px; margin-left: auto; }
.filter-price-row { 
    display: flex; 
    gap: 8px; 
    margin-top: 8px;
    flex-wrap: wrap;
}
.filter-price-row input {
    flex: 1;
    min-width: 60px;
    max-width: 100%;
    height: 36px; 
    padding: 0 10px;
    border: 1px solid #ccc; 
    border-radius: 4px; 
    font-size: 13px;
    font-family: var(--font-family);
    box-sizing: border-box;
}
.filter-price-row input:focus { 
    border-color: var(--color-primario); 
    outline: none; 
    box-shadow: 0 0 0 2px var(--color-primario-rgba); 
}

/* Mobile responsive: stack vertically on small screens */
@media (max-width: 576px) {
    .filter-price-row {
        flex-direction: column;
    }
    .filter-price-row input {
        min-width: auto;
        width: 100%;
    }
}
.filters-scroll { max-height: 200px; overflow-y: auto; padding-right: 4px; }
.filters-scroll::-webkit-scrollbar { width: 4px; }
.filters-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }


/* =============================================================
   CART TABLE
   ============================================================= */

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
    background: transparent;
    white-space: nowrap;
}
.cart-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.cart-table tr:last-child td { border-bottom: none; }
.cart-table-wrap {
    background: #fff;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.cart-item-img {
    width: 64px; height: 64px; object-fit: contain;
    border-radius: 4px; border: 1px solid var(--border-color);
    padding: 4px; background: #fff; flex-shrink: 0;
}
.cart-item-name { font-size: 14px; color: var(--text-primary); font-weight: 500; margin: 0 0 3px; }
.cart-item-unit-price { font-size: 12px; color: var(--text-muted); margin: 0; }
.cart-subtotal { font-size: 16px; font-weight: 600; color: var(--text-primary); }

.cart-qty-input {
    width: 62px; height: 36px; text-align: center;
    border: 1px solid #ccc; border-radius: 4px;
    font-size: 14px; font-weight: 600;
    font-family: var(--font-family);
    display: block; margin: 0 auto;
}
.cart-qty-input:focus { border-color: var(--color-primario); outline: none; box-shadow: 0 0 0 2px var(--color-primario-rgba); }

.cart-remove-btn {
    background: none; border: none; color: var(--text-muted); font-size: 18px;
    cursor: pointer; padding: 6px; border-radius: 4px;
    transition: color .15s, background .15s;
    display: flex; align-items: center;
}
.cart-remove-btn:hover { color: var(--ml-red); background: rgba(242,61,79,.08); }


/* =============================================================
   SUMMARY PANEL
   ============================================================= */

.summary-panel {
    background: #fff;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 7px 0;
}
.summary-row.total {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    padding-top: 14px;
    border-top: 2px solid var(--border-color);
    margin-top: 6px;
}
.summary-divider { border: none; border-top: 1px solid var(--border-color); margin: 6px 0; }


/* =============================================================
   SHIPPING OPTIONS
   ============================================================= */

.shipping-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    background: #fff;
}
.shipping-option:has(input:checked) { border-color: var(--color-primario); background: var(--color-primario-rgba); }
.shipping-option input[type=radio] { accent-color: var(--color-primario); margin-top: 2px; flex-shrink: 0; }
.shipping-option-label { font-size: 14px; font-weight: 600; color: var(--text-primary); margin: 0 0 2px; }
.shipping-option-desc  { font-size: 12px; color: var(--text-muted); margin: 0; }
.shipping-option-icon  { font-size: 22px; color: var(--color-primario); flex-shrink: 0; }


/* =============================================================
   CHECKOUT STEPS
   ============================================================= */

.checkout-step-card {
    background: #fff;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.checkout-step-header {
    padding: 16px 20px;
    background: #fafafa;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}
.checkout-step-number {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--color-primario); color: #fff;
    font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.checkout-step-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 0; }
.checkout-step-body  { padding: 20px; }

.payment-method-btn {
    display: flex; align-items: center; gap: 14px;
    width: 100%; padding: 16px 20px;
    border-radius: 6px; border: 1.5px solid var(--border-color);
    background: #fff; font-size: 14px; font-weight: 600;
    font-family: var(--font-family);
    color: var(--text-primary); cursor: pointer; text-align: left;
    transition: border-color .15s, box-shadow .15s, background .15s;
    margin-bottom: 10px;
}
.payment-method-btn i { font-size: 22px; flex-shrink: 0; }
.payment-method-btn:hover { border-color: var(--color-primario); box-shadow: 0 0 0 2px var(--color-primario-rgba); }
.payment-method-btn.mp  { color: #009ee3; border-color: #b3dff7; }
.payment-method-btn.mp:hover  { background: rgba(0,158,227,.04); border-color: #009ee3; box-shadow: 0 0 0 2px rgba(0,158,227,.15); }
.payment-method-btn.wsp { color: var(--ml-green); border-color: #9de8be; }
.payment-method-btn.wsp:hover { background: rgba(0,166,80,.04); border-color: var(--ml-green); box-shadow: 0 0 0 2px rgba(0,166,80,.15); }
.payment-btn-desc { font-size: 12px; color: var(--text-muted); font-weight: 400; display: block; margin-top: 1px; }


/* =============================================================
   CONFIRMATION PAGE
   ============================================================= */

.confirmation-icon-wrap {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--ml-green); color: #fff;
    font-size: 40px; display: flex;
    align-items: center; justify-content: center;
    margin: 0 auto 20px;
}


/* =============================================================
   CONTACT BAR
   ============================================================= */

.contact-bar {
    background: #fff;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-top: 24px;
    box-shadow: var(--shadow-sm);
}
.contact-bar-item {
    display: flex; flex-direction: column;
    align-items: center; text-align: center;
    gap: 6px; padding: 12px;
}
.contact-bar-item i { font-size: 26px; color: var(--color-primario); }
.contact-bar-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.contact-bar-value { font-size: 14px; color: var(--text-primary); }


/* =============================================================
   FOOTER
   ============================================================= */

.ml-footer {
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 32px 0 0;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 0;
}
.ml-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.ml-footer-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.ml-footer-link { display: block; color: var(--text-secondary); font-size: 13px; padding: 3px 0; }
.ml-footer-link:hover { color: var(--color-primario); }
.ml-footer-link i { margin-right: 6px; }

.footer-social-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; border-radius: 4px;
    font-size: 13px; font-weight: 600;
    text-decoration: none; margin-bottom: 8px;
    transition: filter .15s; color: #fff;
}
.footer-social-btn:hover { filter: brightness(.90); color: #fff; }
.footer-social-btn.facebook  { background: #1877f2; }
.footer-social-btn.instagram { background: linear-gradient(135deg,#f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); }
.footer-social-btn.whatsapp  { background: #25d366; }

.ml-footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 14px 20px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 24px;
}


/* =============================================================
   TOAST NOTIFICATIONS
   ============================================================= */

.ml-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 340px;
    pointer-events: none;
}
.ml-toast {
    background: #333;
    color: #fff;
    padding: 13px 18px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    animation: mlToastIn .25s ease;
    pointer-events: auto;
}
.ml-toast.success { background: var(--ml-green); }
.ml-toast.danger  { background: var(--ml-red); }
.ml-toast.info    { background: var(--color-primario); }
.ml-toast i { font-size: 18px; flex-shrink: 0; }
@keyframes mlToastIn {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}


/* =============================================================
   EMPTY STATE
   ============================================================= */

.empty-state { text-align: center; padding: 60px 24px; }
.empty-state i { font-size: 56px; color: #d0d0d0; display: block; margin-bottom: 16px; }
.empty-state-title { font-size: 20px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state-text  { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }


/* =============================================================
   BADGES
   ============================================================= */

.badge-ml {
    display: inline-block; padding: 3px 8px;
    border-radius: 3px; font-size: 11px;
    font-weight: 700; letter-spacing: 0.3px;
}
.badge-ml-green  { background: rgba(0,166,80,.12);  color: var(--ml-green); }
.badge-ml-orange { background: rgba(255,119,51,.12); color: var(--ml-orange); }
.badge-ml-gray   { background: rgba(0,0,0,.07);      color: var(--text-muted); }
.badge-ml-blue   { background: var(--color-primario-rgba); color: var(--color-primario); }


/* =============================================================
   ALERTS
   ============================================================= */

.alert-ml {
    padding: 12px 16px; border-radius: 6px;
    font-size: 14px; display: flex; align-items: center;
    gap: 10px; margin-bottom: 16px;
}
.alert-ml i { font-size: 18px; flex-shrink: 0; }
.alert-ml-info    { background: var(--color-primario-rgba);  color: var(--color-primario-darker); border-left: 3px solid var(--color-primario); }
.alert-ml-success { background: rgba(0,166,80,.10);   color: #006b35; border-left: 3px solid var(--ml-green); }
.alert-ml-warning { background: rgba(255,119,51,.10);  color: #a84400; border-left: 3px solid var(--ml-orange); }
.alert-ml-danger  { background: rgba(242,61,79,.10);  color: #c0192a; border-left: 3px solid var(--ml-red); }


/* =============================================================
   MODALS
   ============================================================= */

.modal-content {
    border-radius: 8px !important;
    border: none !important;
    box-shadow: 0 8px 40px rgba(0,0,0,.2) !important;
}
.modal-header { border-bottom: 1px solid var(--border-color) !important; padding: 16px 20px !important; }
.modal-footer { border-top: 1px solid var(--border-color) !important; padding: 14px 20px !important; }
.modal-title  { font-size: 16px !important; font-weight: 700 !important; }


/* =============================================================
   PAGINATION
   ============================================================= */

.pagination .page-link {
    color: var(--ml-blue);
    border-color: var(--border-color);
    font-size: 14px;
    padding: 7px 14px;
    font-family: var(--font-family);
}
.pagination .page-item.active .page-link {
    background-color: var(--ml-blue) !important;
    border-color: var(--ml-blue) !important;
    color: #fff !important;
}
.pagination .page-link:hover { background: rgba(52,131,250,.08); color: var(--ml-blue); }
.pagination .page-link:focus { box-shadow: 0 0 0 3px rgba(52,131,250,.15); }


/* =============================================================
   UTILITIES
   ============================================================= */

.text-ml-blue   { color: var(--ml-blue) !important; }
.text-ml-green  { color: var(--ml-green) !important; }
.text-ml-red    { color: var(--ml-red) !important; }
.text-ml-muted  { color: var(--text-muted) !important; }


/* =============================================================
   RESPONSIVE
   ============================================================= */

@media (max-width: 991px) {
    .ml-search-wrapper { max-width: 100%; }
}

@media (max-width: 991px) {
    .ml-search-wrapper { flex: 0.8; }
}

@media (max-width: 767px) {
    .ml-header-inner { 
        padding: 8px 12px; 
        gap: 8px;
        flex-wrap: wrap;
    }
    .ml-logo {
        flex: 0 0 auto;
        min-width: fit-content;
    }
    .ml-logo-text    { font-size: 14px; }
    .ml-search-wrapper { 
        flex: 1;
        order: 3;
        width: 100%;
        max-width: none;
        min-width: 0;
    }
    .ml-search-input { height: 36px; font-size: 13px; }
    .ml-search-btn { height: 36px; width: 44px; }
    .ml-header-actions { 
        flex: 0 0 auto;
        gap: 2px;
    }
    .ml-nav-link span { display: none; }
    .ml-nav-link { padding: 4px 6px; font-size: 10px; }
    .ml-nav-link i { font-size: 18px; margin-bottom: 1px; }
    .ml-hero { padding: 24px 20px; }
    .ml-hero-title   { font-size: 22px; }
    .ml-hero-subtitle{ font-size: 14px; }
    .product-detail-panel { padding: 16px; }
    .product-detail-price { font-size: 28px; }
    .cart-table th:nth-child(3),
    .cart-table td:nth-child(3) { display: none; }
    .main-content { padding: 12px 0 32px; }
    
    /* Filtros toggle en móvil */
    .filters-panel {
        max-height: 0;
        overflow: hidden;
        padding: 0 20px;
        opacity: 0;
        transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
        border: none;
        box-shadow: none;
        margin-bottom: 20px;
    }
    .filters-panel.show {
        max-height: 1200px;
        padding: 20px;
        opacity: 1;
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);
        border-radius: 6px;
        background: #fff;
    }
    .filter-title {
        cursor: pointer;
        user-select: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .filter-title::after {
        content: '▼';
        font-size: 12px;
        transition: transform 0.3s ease;
        margin-left: 8px;
    }
    .filters-panel.show .filter-title::after {
        transform: rotate(180deg);
    }
    .filters-panel .filter-title {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 575px) {
    .ml-search-btn { width: 40px; font-size: 15px; }
    .ml-search-input { font-size: 12px; padding: 0 10px; }
    .ml-header-inner { padding: 6px 8px; gap: 6px; }
    .ml-nav-link { padding: 3px 4px; }
    .ml-nav-link span { display: none; }
    .checkout-step-body { padding: 16px; }
}