:root {
    color-scheme: light;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.red-legacy {
    margin: 0;
    background: var(--red-color-background, #fff);
    color: var(--red-color-text, #191919);
    font-family: "Inter var", var(--red-font-family, "Segoe UI", Arial, sans-serif);
    font-size: 13px;
    line-height: 1.5;
}

.red-legacy img {
    display: block;
    max-width: 100%;
}

.red-container {
    width: min(calc(100% - 32px), 1680px);
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.legacy-topbar {
    position: relative;
    z-index: 40;
    min-height: 38px;
    background: var(--red-color-topper-bg, #151515);
    color: var(--red-color-topper-text, #fff);
    font-size: 12px;
    font-weight: 700;
}

.legacy-topbar__inner {
    min-height: 38px;
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    align-items: center;
    gap: 20px;
}

.legacy-topbar a {
    text-decoration: none;
}

.legacy-topbar i {
    margin-right: 7px;
    font-size: 16px;
}

.legacy-topbar__social,
.legacy-topbar__account {
    display: flex;
    align-items: center;
    gap: 22px;
}

.legacy-topbar__social {
    justify-content: center;
}

.legacy-topbar__social a {
    display: inline-grid;
    place-items: center;
}

.legacy-topbar__social i {
    margin: 0;
}

.legacy-topbar__account {
    justify-content: flex-end;
}

.legacy-header {
    background: var(--red-color-header-bg, #0e0e0e);
    color: var(--red-color-header-text, #fff);
}

.legacy-header__inner {
    min-height: 84px;
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(360px, 610px) minmax(130px, 1fr);
    align-items: center;
    gap: 32px;
}

.legacy-brand {
    justify-self: start;
    display: inline-flex;
    min-width: 88px;
    min-height: 58px;
    align-items: center;
}

.legacy-brand img {
    width: auto;
    height: auto;
    max-height: 70px;
    object-fit: contain;
}

.legacy-search {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 65px;
}

.legacy-search input {
    min-width: 0;
    height: 42px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px 0 0 999px;
    outline: 0;
    background: #f4f4f4;
    color: #333;
    font: inherit;
}

.legacy-search input:focus {
    box-shadow: inset 0 0 0 2px var(--red-color-primary, #e50914);
}

.legacy-search button {
    height: 42px;
    border: 0;
    border-radius: 0 999px 999px 0;
    background: var(--red-color-search-button-bg, var(--red-color-primary, #e50914));
    color: #fff;
    cursor: pointer;
    font-size: 20px;
}

.legacy-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 29px;
}

.legacy-actions a {
    text-decoration: none;
    font-size: 18px;
    transition: color .2s ease, transform .2s ease;
}

.legacy-actions a:hover,
.legacy-actions a:focus-visible {
    color: var(--red-color-primary, #e50914);
    transform: translateY(-1px);
}

.legacy-navigation {
    position: relative;
    z-index: 30;
    min-height: 60px;
    background: #fff;
    color: var(--red-color-menu-text, #111);
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .04);
}

.legacy-navigation__inner {
    min-height: 60px;
    display: flex;
    align-items: stretch;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: none;
}

.legacy-navigation__inner::-webkit-scrollbar,
.legacy-media-grid::-webkit-scrollbar {
    display: none;
}

.legacy-navigation__inner > a,
.legacy-navigation__item > a {
    height: 60px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 17px;
    color: var(--red-color-menu-text, #111);
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .01em;
    border-bottom: 3px solid transparent;
}

.legacy-navigation__inner > a:hover,
.legacy-navigation__item > a:hover,
.legacy-navigation__inner > a:focus-visible,
.legacy-navigation__item > a:focus-visible {
    color: var(--red-color-primary, #e50914);
    border-bottom-color: var(--red-color-primary, #e50914);
}

.legacy-navigation__item {
    position: relative;
    flex: 0 0 auto;
}

.legacy-navigation__submenu {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    min-width: 230px;
    display: none;
    padding: 8px 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 14px 35px rgba(0, 0, 0, .14);
}

.legacy-navigation__item:hover .legacy-navigation__submenu,
.legacy-navigation__item:focus-within .legacy-navigation__submenu {
    display: grid;
}

.legacy-navigation__submenu a {
    padding: 10px 18px;
    text-decoration: none;
    white-space: nowrap;
}

.legacy-navigation__submenu a:hover,
.legacy-navigation__submenu a:focus-visible {
    color: var(--red-color-primary, #e50914);
    background: #f8f8f8;
}

.red-main {
    min-height: 60vh;
    overflow: hidden;
    background-color: #fff;
    background-image: radial-gradient(circle at 15% 18%, rgba(126, 135, 145, .25) 0 1.5px, transparent 2px), radial-gradient(circle at 80% 35%, rgba(126, 135, 145, .2) 0 1.5px, transparent 2px);
    background-size: 320px 260px, 380px 300px;
}

.legacy-home-module,
.legacy-catalog-section {
    margin-block: 36px;
}

.legacy-home-module--full {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.legacy-home-module__inner {
    width: min(calc(100% - 32px), 1680px);
    margin-inline: auto;
    padding-block: 0 2px;
}

.legacy-home-module--full .legacy-home-module__inner {
    width: 100%;
}

.legacy-home-module--full .legacy-section-title {
    padding-inline: max(16px, calc((100vw - 1680px) / 2));
}

.legacy-section-title {
    margin: 0 0 24px;
    padding: 10px 14px;
    color: var(--red-color-primary, #e50914);
    text-align: center;
    text-transform: uppercase;
    font-size: clamp(18px, 1.4vw, 23px);
    line-height: 1.25;
    letter-spacing: .02em;
    border-bottom: 1px solid #e9e9e9;
}

.legacy-media-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--module-columns, 4) - 1) * 28px) / var(--module-columns, 4));
    gap: 28px;
    padding: 22px max(16px, calc((100vw - 1680px) / 2)) 2px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
}

.legacy-media-card {
    aspect-ratio: 1 / 1;
    display: block;
    overflow: hidden;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .08);
    scroll-snap-align: start;
}

.legacy-media-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.red-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.red-card {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: var(--red-radius, 4px);
}

.red-product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.red-product-card {
    min-width: 0;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.red-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .1);
}

.red-product-card__image {
    aspect-ratio: 1.15 / 1;
    display: grid;
    place-items: center;
    padding: 14px;
    overflow: hidden;
    text-decoration: none;
    background: #fff;
}

.red-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.red-product-card__body {
    min-height: 128px;
    padding: 12px 14px 17px;
}

.red-product-card__code {
    display: block;
    min-height: 18px;
    margin-bottom: 5px;
    color: #8d8d8d;
    font-size: 11px;
    font-style: italic;
}

.red-product-card h3 {
    min-height: 43px;
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.red-product-card h3 a {
    text-decoration: none;
}

.red-product-card h3 a:hover,
.red-product-card h3 a:focus-visible {
    color: var(--red-color-primary, #e50914);
}

.red-product-card__price {
    margin: 0;
    color: var(--red-color-primary, #e50914);
    font-size: 17px;
    font-weight: 800;
}

.legacy-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.legacy-category-card {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: var(--red-radius, 4px);
    text-decoration: none;
    font-weight: 600;
    transition: color .2s ease, border-color .2s ease, transform .2s ease;
}

.legacy-category-card:hover,
.legacy-category-card:focus-visible {
    color: var(--red-color-primary, #e50914);
    border-color: var(--red-color-primary, #e50914);
    transform: translateY(-2px);
}

.legacy-rich-content {
    padding: 16px;
}

.legacy-rich-content iframe,
.legacy-rich-content video {
    max-width: 100%;
}

.red-button {
    display: inline-block;
    padding: 11px 18px;
    border: 0;
    border-radius: var(--red-radius, 4px);
    background: var(--red-color-primary, #e50914);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.red-form {
    display: grid;
    gap: 16px;
    max-width: 680px;
}

.red-form input,
.red-form select,
.red-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: var(--red-radius, 4px);
    font: inherit;
}

.legacy-breadcrumb {
    margin: 34px 0 26px;
    color: #6f7c8d;
    font-size: 12px;
    text-transform: lowercase;
}

.legacy-breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.legacy-breadcrumb li + li::before {
    content: "›";
    margin-right: 10px;
    color: #9ba4af;
    font-size: 18px;
    vertical-align: -1px;
}

.legacy-breadcrumb a {
    text-decoration: none;
}

.red-events-page {
    min-height: 380px;
    margin-bottom: 72px;
}

.red-events-page__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e9edf2;
}

.red-events-page__eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--red-color-primary, #e50914);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.red-events-page__header h1 {
    margin: 0;
    color: #101828;
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.1;
}

.red-events-page__count {
    flex: 0 0 auto;
    padding: 6px 10px;
    border: 1px solid #e4e7ec;
    border-radius: 999px;
    background: #fff;
    color: #667085;
    font-size: 11px;
    font-weight: 750;
}

.red-events-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

.legacy-event-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .09);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(15, 23, 42, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.legacy-event-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 23, 42, .14);
    box-shadow: 0 14px 36px rgba(15, 23, 42, .10);
}

.legacy-event-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.legacy-event-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    margin: 0;
    overflow: hidden;
    background: #f2f4f7;
}

.legacy-event-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transition: transform .28s ease;
}

.legacy-event-card:hover .legacy-event-card__media img {
    transform: scale(1.025);
}

.legacy-event-card__media-action {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .52);
    border-radius: 50%;
    background: rgba(15, 23, 42, .72);
    color: #fff;
    font-size: 14px;
    opacity: 0;
    backdrop-filter: blur(6px);
    transition: opacity .18s ease, transform .18s ease;
}

.legacy-event-card:hover .legacy-event-card__media-action {
    opacity: 1;
    transform: translateY(-2px);
}

.legacy-event-card__body {
    padding: 17px 18px 16px;
}

.legacy-event-card__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
}

.legacy-event-card__type {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--red-color-primary, #e50914) 8%, white);
    color: var(--red-color-primary, #e50914);
    font-size: 10px;
    font-weight: 800;
}

.legacy-event-card__arrow {
    color: #98a2b3;
    font-size: 17px;
}

.legacy-event-card h2 {
    margin: 0;
    color: #101828;
    font-size: clamp(18px, 1.45vw, 22px);
    line-height: 1.22;
    letter-spacing: -.01em;
}

.legacy-event-card__description {
    display: -webkit-box;
    overflow: hidden;
    margin: 10px 0 0;
    color: #475467;
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.legacy-event-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.legacy-event-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 27px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    font-size: 10px;
    font-weight: 650;
}

.legacy-event-card__meta i {
    color: var(--red-color-primary, #e50914);
}

.legacy-event-card__footer {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
    padding-top: 13px;
    border-top: 1px solid #eef1f4;
}

.legacy-event-card__price {
    display: grid;
    gap: 1px;
}

.legacy-event-card__price small {
    color: #98a2b3;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.legacy-event-card__price strong {
    color: #101828;
    font-size: 16px;
}

.legacy-event-card__free {
    color: #667085;
    font-size: 11px;
    font-weight: 700;
}

.legacy-event-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--red-color-primary, #e50914);
    font-size: 11px;
    font-weight: 850;
}

.red-events-empty {
    min-height: 280px;
    display: grid;
    place-content: center;
    justify-items: center;
    color: #6b7280;
}

.red-events-empty i {
    font-size: 40px;
}

.red-event-detail {
    display: grid;
    grid-template-columns: minmax(280px, 42%) minmax(0, 1fr);
    gap: 32px;
    margin-block: 38px 70px;
    padding: 24px;
}

.red-event-detail__banner {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--red-radius, 4px);
    background: #080808;
}

.red-event-detail__banner object,
.red-event-detail__banner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.red-event-detail__banner img {
    padding: clamp(24px, 8%, 48px);
    filter: brightness(0) invert(1);
}

.red-event-detail__content h1 {
    margin-top: 5px;
}

.red-event-detail__type {
    margin: 0;
    color: var(--red-color-primary, #e50914);
    font-weight: 700;
}

.red-event-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.legacy-footer {
    border-top: 6px solid var(--red-color-primary, #e50914);
    background: var(--red-color-footer-bg, #111);
    color: var(--red-color-footer-text, #fff);
}

.legacy-footer__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    padding-block: 48px;
}

.legacy-footer__copy {
    max-width: 430px;
}

.legacy-footer h2 {
    margin: 0 0 16px;
    color: var(--red-color-footer-title, #fff);
    font-size: 18px;
    text-transform: uppercase;
}

.legacy-footer p {
    margin: 7px 0;
}

.legacy-footer form {
    display: flex;
    gap: 8px;
    max-width: 520px;
    margin: 0 !important;
}

.legacy-footer label {
    min-width: 0;
    flex: 1;
    font-size: 0;
}

.legacy-footer input {
    min-width: 0;
    flex: 1;
    padding: 11px 13px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: var(--red-radius, 4px);
    background: #303030;
    color: #fff;
    font-size: 14px;
}

.legacy-footer button {
    padding: 11px 16px;
    border: 0;
    border-radius: var(--red-radius, 4px);
    background: var(--red-color-primary, #e50914);
    color: #fff;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 700;
}

.legacy-copyright {
    padding: 15px 0;
    background: var(--red-color-copyright-bg, #151515);
    color: var(--red-color-copyright-text, #fff);
    font-size: 13px;
}

@media (max-width: 1100px) {
    .legacy-topbar__inner {
        grid-template-columns: 1fr auto;
    }

    .legacy-topbar__social {
        display: none;
    }

    .legacy-header__inner {
        grid-template-columns: 120px 1fr auto;
        gap: 20px;
    }

    .red-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .legacy-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .red-events-grid {
        grid-template-columns: 1fr;
    }

    .legacy-event-card {
        max-width: 780px;
    }
}

@media (max-width: 760px) {
    .red-container,
    .legacy-home-module__inner {
        width: min(calc(100% - 24px), 1680px);
    }

    .legacy-topbar__inner {
        min-height: 42px;
        display: flex;
        justify-content: space-between;
    }

    .legacy-topbar__account a:first-child,
    .legacy-topbar__account a span {
        display: none;
    }

    .legacy-topbar__account {
        gap: 14px;
    }

    .legacy-topbar__account i {
        margin: 0;
        font-size: 18px;
    }

    .legacy-header__inner {
        grid-template-columns: 82px 1fr;
        min-height: 116px;
        gap: 14px;
        padding-block: 12px;
    }

    .legacy-brand img {
        max-width: 78px;
        max-height: 54px;
    }

    .legacy-actions {
        position: absolute;
        top: 52px;
        right: 12px;
        gap: 18px;
    }

    .legacy-search {
        align-self: end;
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .legacy-navigation__inner > a,
    .legacy-navigation__item > a {
        height: 52px;
        padding-inline: 12px;
        font-size: 13px;
    }

    .legacy-navigation,
    .legacy-navigation__inner {
        min-height: 52px;
    }

    .legacy-home-module,
    .legacy-catalog-section {
        margin-block: 24px;
    }

    .legacy-media-grid {
        grid-auto-columns: min(78vw, 320px);
        gap: 14px;
        padding-inline: 12px;
    }

    .red-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .legacy-category-grid {
        grid-template-columns: 1fr 1fr;
    }

    .legacy-footer__content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-block: 34px;
    }

    .legacy-event-card__main,
    .red-event-detail {
        grid-template-columns: 1fr;
    }

    .legacy-event-card__image {
        width: min(100%, 320px);
    }

    .legacy-event-card__footer {
        flex-direction: column;
        gap: 5px;
    }

    .legacy-footer form {
        max-width: none;
    }
}

@media (max-width: 430px) {
    .legacy-topbar__contact span {
        display: none;
    }

    .legacy-category-grid {
        grid-template-columns: 1fr;
    }

    .red-product-card__body {
        padding-inline: 10px;
    }
}

/* ===== Legacy v2: mejoras CI4 sin cambiar template_code ni paleta existente ===== */
.legacy-mobile-trigger,
.legacy-action-button,
.legacy-categories-trigger {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.legacy-mobile-trigger { display:none; font-size:22px; padding:8px; }
.legacy-action-button { position:relative; padding:0; font-size:22px; }
.legacy-cart-action { position:relative; }
.legacy-cart-action .red-badge { top:-9px; right:-10px; }
.legacy-categories-trigger {
    min-height:52px;
    padding-inline:16px;
    background:var(--red-color-side-menu-item-bg,#0e0e0e);
    color:#fff;
    font-weight:700;
}
.legacy-drawer { background:var(--red-color-mobile-menu-bg,#0e0e0e); color:var(--red-color-mobile-menu-text,#fff); }
.legacy-drawer .red-drawer__header { border-color:rgba(255,255,255,.14); }
.legacy-drawer .red-drawer__header button { color:inherit; font-size:28px; }
.legacy-drawer .red-category-tree__row>a,
.legacy-drawer .red-mobile-menu>a { color:inherit; }
.legacy-drawer .red-category-tree__row>a:hover,
.legacy-drawer .red-mobile-menu>a:hover { background:color-mix(in srgb,var(--red-color-mobile-menu-text,#fff) 10%,transparent); }
.red-legacy .red-bottom-nav {
    background:color-mix(in srgb,var(--red-color-mobile-menu-bg,#0e0e0e) 96%,transparent);
    border-top-color:color-mix(in srgb,var(--red-color-mobile-menu-text,#fff) 18%,transparent);
}
.red-legacy .red-bottom-nav__item { color:var(--red-color-mobile-menu-text,#fff); }
.red-legacy .red-bottom-nav__item:hover { color:var(--red-color-primary,#e50914); }
.red-legacy .red-home-module { border-radius:var(--red-radius,4px); }
.red-legacy .red-module-slide--image { border-radius:var(--red-radius,4px); }
.red-legacy .red-carousel-nav { border-radius:50%; color:var(--red-color-menu-text,#111); }

@media (max-width:760px) {
    .red-legacy { padding-bottom:calc(59px + env(safe-area-inset-bottom)); }
    .legacy-mobile-trigger { display:block; }
    .legacy-header__inner { grid-template-columns:auto 82px 1fr; min-height:116px; }
    .legacy-brand { grid-column:2; }
    .legacy-search { grid-column:1 / -1; }
    .legacy-actions { top:51px; }
    .legacy-navigation { display:none; }
    .red-legacy .red-bottom-nav {
        display:flex; position:fixed; z-index:70; left:0; right:0; bottom:0;
        align-items:stretch; justify-content:space-around;
        padding:7px 6px calc(7px + env(safe-area-inset-bottom));
        backdrop-filter:blur(16px); box-shadow:0 -8px 30px rgba(0,0,0,.18);
    }
    .red-legacy .red-bottom-nav__item {
        flex:1; min-width:0; display:flex; flex-direction:column; align-items:center;
        gap:2px; padding:3px 2px; text-decoration:none; font-size:10px;
    }
    .red-legacy .red-bottom-nav__icon { position:relative; }
    .red-legacy .red-bottom-nav .red-badge { top:-6px; right:-10px; }
    .legacy-footer { padding-bottom:4px; }
}

/* Fase 3: paridad catálogo / navegación CI3 */
@media (min-width: 781px) {
    .legacy-navigation,
    .legacy-navigation__inner {
        overflow: visible;
    }

    .legacy-navigation__submenu {
        z-index: 90;
    }
}

.legacy-navigation__submenu--categories {
    min-width: 280px;
    max-height: min(68vh, 560px);
    overflow-y: auto;
}

.legacy-navigation__submenu--categories > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.legacy-navigation__submenu--categories small {
    color: #8a8a8a;
    font-size: 11px;
}

.legacy-navigation__all-categories {
    width: 100%;
    padding: 11px 18px;
    border: 0;
    border-top: 1px solid #ececec;
    background: #fafafa;
    color: var(--red-color-primary, #e50914);
    text-align: left;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.red-catalog-layout {
    display: grid;
    grid-template-columns: minmax(235px, 330px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding-block: 28px 12px;
}

.red-catalog-sidebar {
    position: sticky;
    top: 14px;
    display: grid;
    gap: 16px;
    min-width: 0;
}

.red-catalog-filter-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: var(--red-radius, 4px);
}

.red-catalog-filter-card__title {
    padding: 15px 16px;
    border-bottom: 1px solid #ececec;
    color: #333;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 700;
}

.red-catalog-filter-card > .red-category-tree {
    padding: 8px 5px 13px;
}

.red-catalog-filter-card--placeholder {
    padding-bottom: 12px;
}

.red-catalog-filter-card--placeholder p {
    margin: 12px 16px 4px;
    color: #777;
    font-size: 12px;
}

.red-catalog-results {
    min-width: 0;
}

.red-catalog-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.red-catalog-heading h1 {
    margin: 0;
    font-size: clamp(24px, 2.2vw, 34px);
}

.red-catalog-heading span {
    color: #888;
    font-size: 12px;
}

.red-catalog-sidebar .red-category-tree__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border-bottom: 1px solid #eeeeee;
}

.red-catalog-sidebar .red-category-tree__row > a {
    min-width: 0;
    border-radius: 0;
    padding: 9px 7px;
}

.red-catalog-sidebar .red-category-tree__item.is-active > .red-category-tree__row {
    background: color-mix(in srgb, var(--red-color-primary, #e50914) 8%, white);
    border-left: 3px solid var(--red-color-primary, #e50914);
}

.red-catalog-sidebar .red-category-tree__item.is-active > .red-category-tree__row > a {
    color: var(--red-color-primary, #e50914);
    font-weight: 700;
}

.red-category-tree__toggle {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #222;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.red-category-tree__toggle[aria-expanded="true"] span {
    transform: rotate(45deg);
}

.red-category-tree__toggle span {
    display: block;
    transition: transform .16s ease;
}

.red-catalog-sidebar .red-category-tree--nested {
    padding-left: 10px;
}

.red-catalog-sidebar .red-category-tree--nested .red-category-tree__row > a {
    padding-left: 14px;
    font-size: 13px;
}

@media (max-width: 980px) {
    .red-catalog-layout {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 12px;
    }
}

@media (max-width: 780px) {
    .red-catalog-layout {
        display: block;
        padding-top: 18px;
    }

    .red-catalog-sidebar {
        display: none;
    }
}

.red-page-module {
    margin: 24px 0;
    padding: 18px 0;
    overflow: hidden;
}

.red-page-module__inner {
    width: 100%;
}

.red-page-module--full {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding-inline: max(16px, calc((100vw - 1680px) / 2));
}

.red-page-module__content {
    min-width: 0;
}

/* Fase 3.2 - ancho real de módulos */
.red-page-module--content-width{width:100%;margin-inline:0}
.red-page-module--fullscreen,.red-page-module--fullscreen-background{position:relative;width:100vw;left:50%;margin-left:-50vw;margin-right:-50vw;border-radius:0}
.red-page-module--fullscreen{padding-inline:0}
.red-page-module--fullscreen>.red-page-module__inner{width:100%;max-width:none}
.red-page-module--fullscreen-background{padding-inline:0}
.red-page-module__inner--constrained{width:min(calc(100% - 32px),var(--red-content-width,1360px));margin-inline:auto}
.red-catalog-results .red-page-module--content-width{margin-block:18px}
.red-catalog-menu-content{margin:22px 0;min-width:0}

/* Sidebar configurable */
.red-catalog-layout--sidebar-right{grid-template-columns:minmax(0,1fr) minmax(235px,330px)}
.red-catalog-layout--sidebar-right .red-catalog-results{order:1}
.red-catalog-layout--sidebar-right .red-catalog-sidebar{order:2}
.red-category-tree__toggle[aria-expanded="true"] span{transform:none}
.red-category-tree__item.is-open>.red-category-tree__row>a{font-weight:650}

/* Tarjetas de producto con acciones comerciales básicas */
.red-product-card__media{position:relative;min-width:0}
.red-product-card__discount{position:absolute;z-index:3;top:10px;left:10px;padding:3px 7px;border-radius:5px;background:#43b859;color:#fff;font-size:12px;font-weight:800}
.red-product-card__quick{position:absolute;left:8px;right:8px;bottom:8px;padding:6px 8px;border-radius:6px;background:rgba(17,17,17,.88);color:#fff;text-align:center;text-decoration:none;font-size:11px;font-weight:700;opacity:0;transform:translateY(4px);transition:.16s ease}
.red-product-card:hover .red-product-card__quick,.red-product-card:focus-within .red-product-card__quick{opacity:1;transform:none}
.red-product-card__commerce{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-top:8px}
.red-product-card__pricing{display:flex;min-width:0;flex-direction:column;align-items:flex-start}
.red-product-card__old-price{color:#999;font-size:11px;text-decoration:line-through}
.red-product-card__price.is-discounted{color:#00b619}
.red-product-card__actions{display:flex;align-items:center;justify-content:flex-end;gap:4px;margin-left:auto}
.red-product-card__cart-form{margin:0}
.red-product-action{display:inline-flex;min-width:30px;height:30px;align-items:center;justify-content:center;gap:5px;padding:0 8px;border:0;border-radius:5px;text-decoration:none;font:inherit;font-size:12px;font-weight:750;cursor:pointer}
.red-product-action--cart{background:var(--red-color-primary,#e50914);color:#fff}
.red-product-action--quote{background:#222;color:#fff}
.red-product-action--info{background:var(--red-color-secondary,#ff5722);color:#fff}
.red-product-action__text{display:none}

/* Vista lista compacta configurada desde arm_menu.display_mode */
.red-product-compact-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;border:1px solid #e9e9e9}
.red-product-card--compact{display:grid;grid-template-columns:112px minmax(0,1fr);min-height:154px;border:0;border-radius:0;box-shadow:none;background:#fff;overflow:visible}
.red-product-card--compact:hover{transform:none;box-shadow:none}
.red-product-card--compact .red-product-card__media{padding:8px}
.red-product-card--compact .red-product-card__image{height:118px;aspect-ratio:auto;padding:2px;border-radius:10px}
.red-product-card--compact .red-product-card__quick{top:8px;right:8px;bottom:auto;left:auto;width:28px;height:28px;padding:0;overflow:hidden;color:transparent;opacity:1;background:#fff;border:1px solid #ddd}
.red-product-card--compact .red-product-card__quick::after{content:'↗';display:grid;place-items:center;width:100%;height:100%;color:#555;font-size:16px}
.red-product-card--compact .red-product-card__body{display:flex;min-width:0;flex-direction:column;padding:12px 10px 10px 0}
.red-product-card--compact .red-product-card__body h3{margin:2px 0 7px;font-size:16px;line-height:1.18;font-weight:500}
.red-product-card--compact .red-product-card__code{font-size:10px;color:#999}
.red-product-card--compact .red-product-card__commerce{margin-top:auto}
.red-product-card--compact .red-product-card__price{font-size:20px;color:#111}
.red-product-card--compact .red-product-action__text{display:none}
.red-product-card--compact .red-product-card__discount{top:6px;left:6px}
.red-catalog-products-carousel{padding:16px;border:1px solid #ececec;border-radius:var(--red-radius,4px);background:#fff}
.red-catalog-products-carousel .legacy-section-title{text-align:center;color:var(--red-color-primary,#e50914);text-transform:uppercase;font-size:20px}

@media(max-width:1180px){.red-product-compact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:980px){.red-catalog-layout--sidebar-right{grid-template-columns:minmax(0,1fr) 220px}}
@media(max-width:780px){.red-catalog-layout--sidebar-right{display:block}.red-product-compact-grid{grid-template-columns:1fr}}
@media(max-width:480px){.red-product-card--compact{grid-template-columns:96px minmax(0,1fr)}.red-product-card--compact .red-product-card__image{height:104px}.red-product-card--compact .red-product-card__body h3{font-size:14px}.red-product-card--compact .red-product-card__price{font-size:17px}}


/* =========================================================
   Fase 3.3 - catálogo: sticky, favoritos, IVA y rama activa
   ========================================================= */

/* El topbar puede salir de pantalla; el header negro (carrito/buscador) queda accesible. */
.red-legacy .legacy-header{
    position:sticky;
    top:0;
    z-index:75;
    box-shadow:0 5px 18px rgba(0,0,0,.10);
}

/* El sidebar acompaña el scroll por debajo del header fijo. */
.red-legacy .red-catalog-sidebar{
    top:98px;
    max-height:calc(100vh - 112px);
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    padding-right:3px;
}
.red-legacy .red-catalog-sidebar::-webkit-scrollbar{width:5px}
.red-legacy .red-catalog-sidebar::-webkit-scrollbar-thumb{background:#cfcfcf;border-radius:10px}

/* Ancestros de la categoría activa permanecen visualmente identificables. */
.red-legacy .red-catalog-sidebar .red-category-tree__item.is-open>.red-category-tree__row>a{
    font-weight:700;
    color:#333;
}
.red-legacy .red-catalog-sidebar .red-category-tree__item.is-active>.red-category-tree__row>a{
    color:var(--red-color-primary,#e50914);
}
.red-legacy .red-category-tree__toggle[aria-expanded="true"] span{transform:none}

/* Se elimina quick-view. Favoritos ocupa la acción secundaria en la imagen. */
.red-legacy .red-product-card__quick{display:none!important}
.red-product-card__wishlist{
    position:absolute;
    z-index:4;
    top:9px;
    right:9px;
    margin:0;
    display:grid;
    place-items:center;
    width:31px;
    height:31px;
    padding:0;
    border:1px solid #dedede;
    border-radius:50%;
    background:rgba(255,255,255,.94);
    color:#555;
    text-decoration:none;
    box-shadow:0 3px 12px rgba(0,0,0,.06);
}
.red-product-card__wishlist button{
    width:100%;
    height:100%;
    padding:0;
    border:0;
    border-radius:inherit;
    background:transparent;
    color:inherit;
    cursor:pointer;
}
.red-product-card__wishlist:hover,
.red-product-card__wishlist:focus-within,
.red-product-card__wishlist.is-active{
    color:var(--red-color-primary,#e50914);
    border-color:color-mix(in srgb,var(--red-color-primary,#e50914) 45%,#ddd);
}
.red-product-card__discount~.red-product-card__wishlist{right:9px}

/* Leyendas tributarias heredadas de CI3. */
.red-product-card__tax{
    display:inline-flex;
    align-items:center;
    gap:4px;
    margin-top:2px;
    font-size:10px;
    font-style:italic;
    line-height:1.15;
    white-space:nowrap;
}
.red-product-card__tax--included{color:#00a318}
.red-product-card__tax--excluded{color:#00a318}
.red-product-card__tax .fa{font-size:9px}

/* Compacta: favorito fijo arriba a la derecha, sin quick view. */
.red-product-card--compact .red-product-card__wishlist{
    top:8px;
    right:8px;
    width:27px;
    height:27px;
}
.red-product-card--compact .red-product-card__body{padding-right:38px}
.red-product-card--compact .red-product-card__tax{font-size:9px}

/* Carruseles de un solo item usan todo el espacio editorial disponible. */
.red-module-carousel[data-items="1"] .red-module-slide--image img{
    width:100%;
    max-width:100%;
    max-height:none;
}
.red-page-module--fullscreen .red-module-carousel[data-items="1"] .red-module-slide--image img{
    width:100vw;
    object-fit:contain;
}

/* En escritorio el panel lateral es sticky. En móvil manda el drawer/bottom-nav. */
@media(max-width:780px){
    .red-legacy .legacy-header{top:0}
    .red-legacy .red-catalog-sidebar{position:static;max-height:none;overflow:visible}
}

/* =========================================================
   Fase 3.4 - compactación, sticky real y árbol suave
   ========================================================= */

/* overflow:hidden en .red-main impedía que position:sticky usara el viewport. */
.red-legacy .red-main{
    overflow-x:clip;
    overflow-y:visible;
    padding-top:12px;
    padding-bottom:38px;
}
.red-legacy .red-catalog-layout{
    overflow:visible;
    padding-top:10px;
}
.red-legacy .red-page-module{
    margin-block:10px;
    padding-block:8px;
}
.red-legacy .red-catalog-results .red-page-module--content-width{margin-block:10px}
.red-legacy .red-catalog-menu-content{margin-block:12px}
.red-legacy .red-catalog-heading{margin-bottom:12px}

/* Offset calculado por JS según la altura real del header sticky. */
.red-legacy .red-catalog-sidebar{
    position:sticky !important;
    top:var(--red-sticky-header-offset,96px) !important;
    align-self:start;
    z-index:12;
    max-height:calc(100vh - var(--red-sticky-header-offset,96px) - 12px);
    overflow-y:auto;
}

/* Árbol: transición sin display:none/hidden para que el despliegue sea suave. */
.red-legacy .red-category-tree__branch{
    display:grid;
    grid-template-rows:1fr;
    opacity:1;
    transition:grid-template-rows .24s cubic-bezier(.2,.7,.2,1),opacity .20s ease;
}
.red-legacy .red-category-tree__branch>.red-category-tree{
    min-height:0;
    overflow:hidden;
}
.red-legacy .red-category-tree__branch.is-collapsed{
    grid-template-rows:0fr;
    opacity:0;
    pointer-events:none;
}
.red-legacy .red-category-tree__row>a{
    transition:background-color .18s ease,color .18s ease,padding-left .18s ease;
}
.red-legacy .red-category-tree__item.is-current-trail>.red-category-tree__row>a{
    color:var(--red-color-primary,#e50914);
    font-weight:700;
}
.red-legacy .red-category-tree__item.is-active>.red-category-tree__row{
    background:color-mix(in srgb,var(--red-color-primary,#e50914) 10%,white);
}
.red-legacy .red-category-tree__item.is-active>.red-category-tree__row>a{
    padding-left:10px;
}
.red-category-tree__image{
    flex:0 0 auto;
    display:block;
    width:26px;
    height:26px;
    object-fit:contain;
    border-radius:6px;
    background:#fff;
}
.red-category-tree__image--level-0{width:30px;height:30px}
.red-category-tree__image--level-1,
.red-category-tree__image--level-2,
.red-category-tree__image--level-3{width:22px;height:22px}

/* Drawer móvil: más aire, iconos y transición un poco más fina. */
.red-legacy .red-drawer{
    transition:transform .28s cubic-bezier(.22,.72,.22,1),visibility .28s ease;
}
.red-legacy .red-drawer-overlay{
    animation:redLegacyOverlayIn .20s ease both;
}
@keyframes redLegacyOverlayIn{from{opacity:0}to{opacity:1}}
.red-legacy .legacy-drawer .red-category-tree__row>a{gap:11px}
.red-legacy .legacy-drawer .red-category-tree__item.is-active>.red-category-tree__row{
    background:rgba(255,255,255,.08);
    border-left:3px solid var(--red-color-primary,#e50914);
}
.red-legacy .legacy-drawer .red-category-tree__item.is-current-trail>.red-category-tree__row>a{
    color:#fff;
}

/* Dropdown superior: imagen y raíz activa. */
.red-legacy .legacy-navigation__submenu--categories>a{
    display:flex;
    align-items:center;
    gap:9px;
}
.red-legacy .legacy-navigation__submenu--categories>a img{
    width:24px;height:24px;object-fit:contain;border-radius:5px;flex:0 0 24px;
}
.red-legacy .legacy-navigation__submenu--categories>a.is-current-trail{
    color:var(--red-color-primary,#e50914);
    font-weight:800;
    background:#fafafa;
}

/* Reset instantáneo del carrusel: la clase elimina transición/snap sólo durante 1 frame. */
.red-module-carousel__track.is-loop-resetting{
    scroll-behavior:auto !important;
    scroll-snap-type:none !important;
}

/* CKEditor: evita que un párrafo vacío agregue un bloque enorme. */
.dynamic-content-root>p:empty,
.dynamic-content-root>p:has(>br:only-child){margin-block:.35rem}

@media(max-width:780px){
    .red-legacy .red-main{padding-top:8px;padding-bottom:28px}
    .red-legacy .red-page-module{margin-block:7px;padding-block:5px}
    .red-legacy .red-catalog-layout{padding-top:8px}
    .red-legacy .red-catalog-sidebar{position:static!important;max-height:none;overflow:visible}
}



/* ===== Fase 3.5: categoría profunda / navegación ===== */

/* El enlace y el toggle siempre comparten la misma fila, también en drawer móvil. */
.red-legacy .red-category-tree__row{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    align-items:center;
    min-width:0;
}
.red-legacy .red-category-tree__row.has-toggle{
    grid-template-columns:minmax(0,1fr) 30px;
}
.red-legacy .red-category-tree__row>a{
    min-width:0;
}
.red-legacy .red-category-tree__toggle{
    align-self:center;
    justify-self:center;
    margin:0;
}

/* Guías verticales: cada nivel deja una referencia visual de jerarquía. */
.red-legacy .red-category-tree--nested{
    margin-left:13px;
    padding-left:13px;
    border-left:1px solid color-mix(in srgb,var(--red-color-primary,#e50914) 24%,#d7d7d7);
}
.red-legacy .red-category-tree__item.is-current-trail>.red-category-tree__branch>.red-category-tree--nested{
    border-left-color:var(--red-color-primary,#e50914);
}
.red-legacy .red-category-tree__item.is-active>.red-category-tree__row{
    box-shadow:inset 3px 0 0 var(--red-color-primary,#e50914);
    background:color-mix(in srgb,var(--red-color-primary,#e50914) 9%,#fff);
}
.red-legacy .red-category-tree__item.is-active>.red-category-tree__row>a{
    color:var(--red-color-primary,#e50914);
    font-weight:800;
}
.red-legacy .legacy-drawer .red-category-tree--nested{
    border-left-color:rgba(255,255,255,.20);
}
.red-legacy .legacy-drawer .red-category-tree__item.is-current-trail>.red-category-tree__branch>.red-category-tree--nested{
    border-left-color:var(--red-color-primary,#e50914);
}

/* Línea inferior animada del menú superior. */
.red-legacy .legacy-navigation__item>a,
.red-legacy .legacy-navigation__inner>a{
    position:relative;
}
.red-legacy .legacy-navigation__item>a::after,
.red-legacy .legacy-navigation__inner>a::after{
    content:"";
    position:absolute;
    left:12px;
    right:12px;
    bottom:3px;
    height:2px;
    border-radius:999px;
    background:var(--red-color-primary,#e50914);
    transform:scaleX(0);
    transform-origin:left center;
    transition:transform .22s cubic-bezier(.2,.7,.2,1);
}
.red-legacy .legacy-navigation__item:hover>a::after,
.red-legacy .legacy-navigation__item:focus-within>a::after,
.red-legacy .legacy-navigation__item.is-current>a::after,
.red-legacy .legacy-navigation__inner>a:hover::after,
.red-legacy .legacy-navigation__inner>a:focus-visible::after{
    transform:scaleX(1);
}

/* El drawer conserva una apertura suave sin desplazar los toggles debajo. */
.red-legacy .legacy-drawer .red-category-tree__row>a{
    padding-block:9px;
}

/* =========================================================
   Fase 3.6 - navegación activa, títulos y header móvil
   ========================================================= */

/* Una sola línea animada: las versiones antiguas usaban border-bottom + ::after. */
.red-legacy .legacy-navigation__inner > a,
.red-legacy .legacy-navigation__item > a{
    border-bottom:0 !important;
}
.red-legacy .legacy-navigation__item>a::after,
.red-legacy .legacy-navigation__inner>a::after{
    bottom:0;
    height:3px;
}
.red-legacy .legacy-navigation__item.is-current>a,
.red-legacy .legacy-navigation__inner>a.is-current{
    color:var(--red-color-primary,#e50914);
}
.red-legacy .legacy-navigation__item.is-current>a::after,
.red-legacy .legacy-navigation__inner>a.is-current::after{
    transform:scaleX(1);
}
.red-legacy .legacy-navigation__submenu a.is-current,
.red-legacy .legacy-navigation__submenu a[aria-current="page"]{
    color:var(--red-color-primary,#e50914);
    font-weight:800;
    background:color-mix(in srgb,var(--red-color-primary,#e50914) 7%,#fff);
}
.red-legacy .red-mobile-menu>a.is-current,
.red-legacy .red-mobile-menu>a[aria-current="page"]{
    color:#fff;
    background:color-mix(in srgb,var(--red-color-primary,#e50914) 28%,transparent);
    box-shadow:inset 3px 0 0 var(--red-color-primary,#e50914);
}

/* Todos los parámetros de título guardados desde Admin se representan en frontend. */
.red-module-title,
.legacy-section-title.red-module-title{
    position:relative;
    isolation:isolate;
    border:0 !important;
}
.red-module-title::before,
.red-module-title::after{
    content:"";
    position:absolute;
    z-index:-1;
    pointer-events:none;
    border-color:var(--red-module-title-border-color,#ececec);
    border-style:var(--red-module-title-border-style,solid);
    border-width:0;
}
.red-module-title[data-red-title-border="none"]::before,
.red-module-title[data-red-title-border="none"]::after{display:none}
.red-module-title[data-red-title-border="bottom"]::after{
    left:0;right:0;bottom:0;border-width:0 0 var(--red-module-title-border-width,1px) 0;
}
.red-module-title[data-red-title-border="top"]::before{
    left:0;right:0;top:0;border-width:var(--red-module-title-border-width,1px) 0 0 0;
}
.red-module-title[data-red-title-border="left-half"]::after{
    left:0;width:50%;bottom:0;border-width:0 0 var(--red-module-title-border-width,1px) 0;
}
.red-module-title[data-red-title-border="right-half"]::after{
    right:0;width:50%;bottom:0;border-width:0 0 var(--red-module-title-border-width,1px) 0;
}
.red-module-title[data-red-title-border="middle"]::after{
    left:0;right:0;top:50%;border-width:var(--red-module-title-border-width,1px) 0 0 0;
}
.red-module-title[data-red-title-border="top-left"]::before,
.red-module-title[data-red-title-border="top-right"]::before,
.red-module-title[data-red-title-border="bottom-left"]::after,
.red-module-title[data-red-title-border="bottom-right"]::after{width:50%}
.red-module-title[data-red-title-border="top-left"]::before{left:0;top:0;border-width:var(--red-module-title-border-width,1px) 0 0 0}
.red-module-title[data-red-title-border="top-right"]::before{right:0;top:0;border-width:var(--red-module-title-border-width,1px) 0 0 0}
.red-module-title[data-red-title-border="bottom-left"]::after{left:0;bottom:0;border-width:0 0 var(--red-module-title-border-width,1px) 0}
.red-module-title[data-red-title-border="bottom-right"]::after{right:0;bottom:0;border-width:0 0 var(--red-module-title-border-width,1px) 0}

.legacy-home-featured .red-module-carousel{
    padding:4px 0 2px;
}

@media(max-width:760px){
    /* En móvil el bottom-nav ya contiene carrito/favoritos/alertas. Al desplazarse
       dejamos únicamente el buscador sticky para ganar espacio útil. */
    .red-legacy .legacy-header__inner{
        transition:min-height .22s ease,padding .22s ease;
    }
    .red-legacy .legacy-mobile-trigger,
    .red-legacy .legacy-brand,
    .red-legacy .legacy-actions{
        transition:opacity .18s ease,transform .22s ease,max-height .22s ease;
    }
    .red-legacy .legacy-header.is-mobile-condensed .legacy-mobile-trigger,
    .red-legacy .legacy-header.is-mobile-condensed .legacy-brand,
    .red-legacy .legacy-header.is-mobile-condensed .legacy-actions{
        opacity:0;
        pointer-events:none;
        transform:translateY(-8px);
        max-height:0;
        overflow:hidden;
    }
    .red-legacy .legacy-header.is-mobile-condensed .legacy-header__inner{
        min-height:62px;
        padding-block:8px;
        grid-template-columns:1fr;
    }
    .red-legacy .legacy-header.is-mobile-condensed .legacy-search{
        grid-column:1;
        grid-row:1;
        align-self:center;
    }
}

/* Fase 3.7 — menú categorías: icono y texto juntos, sin space-between heredado. */
.red-legacy .legacy-navigation__submenu--categories>a{
    justify-content:flex-start;
    gap:9px;
}
.red-legacy .legacy-navigation__submenu--categories>a>span{
    flex:0 1 auto;
    min-width:0;
}

/* Módulo inline dentro de layoutmanager: apariencia equivalente a CI3. */
.red-legacy .dynamic-content-root .red-page-module--inline{
    border-radius:0;
    padding:0;
}
.red-legacy .dynamic-content-root .red-page-module--inline .red-module-title{
    margin-bottom:10px;
}

@media(max-width:575.98px){
    /* Bootstrap 3 col-xs debe conservar proporción, pero hacemos respiración mínima. */
    .red-legacy .dynamic-content-root .layout-row{margin-left:-6px;margin-right:-6px}
    .red-legacy .dynamic-content-root .layout-column{padding-left:6px;padding-right:6px}
}

/* ==========================================================
   Fase 3.8 — header móvil optimizado
   - Arriba: menú + logo centrado + búsqueda, sin acciones duplicadas.
   - Scroll: menú + búsqueda en una sola fila.
   - Favoritos/alertas/carrito viven en bottom-nav en móvil.
   ========================================================== */
@media (max-width:760px){
    .red-legacy .legacy-header{
        box-shadow:0 5px 18px rgba(0,0,0,.12);
    }

    .red-legacy .legacy-header__inner{
        position:relative;
        display:grid;
        grid-template-columns:44px minmax(0,1fr) 44px;
        grid-template-rows:64px 44px;
        gap:8px 10px;
        min-height:124px;
        padding-block:8px 10px;
        align-items:center;
        transition:box-shadow .18s ease;
    }

    /* Los accesos ya están en la navegación inferior. */
    .red-legacy .legacy-actions{
        display:none !important;
        position:static !important;
    }

    .red-legacy .legacy-mobile-trigger{
        grid-column:1;
        grid-row:1;
        justify-self:start;
        align-self:center;
        display:inline-grid;
        place-items:center;
        width:44px;
        height:44px;
        padding:0;
        border-radius:10px;
        font-size:22px;
        opacity:1;
        transform:none;
        max-height:none;
        overflow:visible;
        transition:background-color .18s ease,transform .18s ease,color .18s ease;
    }
    .red-legacy .legacy-mobile-trigger:active{
        transform:scale(.94);
    }
    .red-legacy .legacy-mobile-trigger:hover,
    .red-legacy .legacy-mobile-trigger:focus-visible{
        background:rgba(255,255,255,.08);
    }

    .red-legacy .legacy-brand{
        grid-column:2;
        grid-row:1;
        justify-self:center;
        align-self:center;
        min-width:0;
        min-height:0;
        opacity:1;
        transform:none;
        max-height:64px;
        overflow:visible;
        transition:opacity .14s ease,transform .16s ease;
    }
    .red-legacy .legacy-brand img{
        max-width:104px;
        max-height:58px;
        width:auto;
        height:auto;
        object-fit:contain;
    }

    .red-legacy .legacy-search{
        grid-column:1 / -1;
        grid-row:2;
        align-self:center;
        width:100%;
        min-width:0;
        transition:transform .2s ease;
    }
    .red-legacy .legacy-search input,
    .red-legacy .legacy-search button{
        height:40px;
    }
    .red-legacy .legacy-search input{
        padding-inline:18px;
        font-size:13px;
    }
    .red-legacy .legacy-search button{
        font-size:18px;
    }

    /* En scroll dejamos sólo lo que realmente sirve para navegar:
       hamburguesa + buscador. */
    .red-legacy .legacy-header.is-mobile-condensed .legacy-header__inner{
        grid-template-columns:44px minmax(0,1fr);
        grid-template-rows:44px;
        gap:8px;
        min-height:60px;
        padding-block:8px;
    }
    .red-legacy .legacy-header.is-mobile-condensed .legacy-mobile-trigger{
        grid-column:1;
        grid-row:1;
        opacity:1;
        pointer-events:auto;
        transform:none;
        max-height:none;
        overflow:visible;
    }
    .red-legacy .legacy-header.is-mobile-condensed .legacy-brand{
        opacity:0;
        pointer-events:none;
        transform:translateY(-7px) scale(.96);
        max-height:0;
        overflow:hidden;
    }
    .red-legacy .legacy-header.is-mobile-condensed .legacy-actions{
        display:none !important;
    }
    .red-legacy .legacy-header.is-mobile-condensed .legacy-search{
        grid-column:2;
        grid-row:1;
        align-self:center;
        width:100%;
        min-width:0;
    }

    /* Slot visual reservado para Mall: luego podrá alojar ubicación o
       segundo logo sin reconstruir la geometría base del header. */
    .red-legacy.red-mode-mall .legacy-brand,
    .red-legacy.red-mode-store .legacy-brand{
        isolation:isolate;
    }
}

@media (max-width:420px){
    .red-legacy .legacy-header__inner{
        grid-template-columns:40px minmax(0,1fr) 40px;
        gap:6px 8px;
    }
    .red-legacy .legacy-mobile-trigger{
        width:40px;
        height:40px;
    }
    .red-legacy .legacy-brand img{
        max-width:94px;
        max-height:54px;
    }
    .red-legacy .legacy-header.is-mobile-condensed .legacy-header__inner{
        grid-template-columns:40px minmax(0,1fr);
    }
}


/* ==========================================================
   Fase 3.9 — pulido responsive / tipografía / títulos
   ========================================================== */
.red-legacy{
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    text-rendering:optimizeLegibility;
}

/* El pseudo inactivo no debe crear el cuadrito 6x6 cuando el borde usa 3px. */
.red-legacy .red-module-title::before,
.red-legacy .red-module-title::after{
    width:auto;
    height:auto;
}

@media (max-width:760px){
    /* El cambio compacto no anima la altura del contenedor: evita reflow continuo
       durante scroll. Sólo se suavizan elementos visuales. */
    .red-legacy .legacy-header__inner{
        transition:none;
    }
    .red-legacy .legacy-header.is-mobile-condensed .legacy-brand{
        transition:opacity .12s ease,transform .14s ease;
    }

    /* Dos cards son preferibles a una card gigante en móvil cuando el módulo
       fue configurado con más de un item. JS decide finalmente según ancho/item. */
    .red-legacy .red-module-carousel__track{
        --red-carousel-gap:10px;
    }
    .red-legacy .red-module-carousel .red-product-card__body{
        padding:10px;
    }
    .red-legacy .red-module-carousel .red-product-card__body h3{
        font-size:13px;
        line-height:1.3;
    }
    .red-legacy .red-module-carousel .red-product-card__price{
        font-size:16px;
    }
    .red-legacy .red-module-carousel .red-product-card__image{
        min-height:0;
    }
}

@media (min-width:761px) and (max-width:1180px){
    .red-legacy .red-module-carousel__track{
        --red-carousel-gap:14px;
    }
}
\n\n/* ==========================================================\n   Fase 3.10 — navegación responsive intermedia + Home activo\n   ========================================================== */\n\n/* Desktop pequeño / laptop: compactar antes de que un menú largo desborde. */\n@media (min-width:981px) and (max-width:1280px){\n    .red-legacy .legacy-header__inner{\n        grid-template-columns:104px minmax(300px,1fr) auto;\n        gap:14px;\n    }\n    .red-legacy .legacy-brand img{\n        max-width:92px;\n        max-height:56px;\n    }\n    .red-legacy .legacy-actions{gap:18px}\n    .red-legacy .legacy-navigation__inner{\n        gap:0;\n        overflow-x:auto;\n        overflow-y:visible;\n        scrollbar-width:none;\n    }\n    .red-legacy .legacy-navigation__inner>a,\n    .red-legacy .legacy-navigation__item>a{\n        padding-inline:clamp(8px,1vw,13px);\n        font-size:clamp(11px,.95vw,13px);\n        letter-spacing:0;\n    }\n}\n\n/* En tablet/viewport estrecho usamos ya la experiencia móvil. Mantener la\n   navegación desktop hasta 760px obligaba a comprimir demasiado el contenido. */\n@media (max-width:980px){\n    .red-legacy{padding-bottom:calc(70px + env(safe-area-inset-bottom))}\n    .red-legacy .legacy-topbar{display:none}\n    .red-legacy .legacy-navigation{display:none!important}\n    .red-legacy .legacy-mobile-trigger{display:inline-grid}\n    .red-legacy .red-bottom-nav{\n        display:flex;\n        position:fixed;\n        z-index:70;\n        left:0;right:0;bottom:0;\n        align-items:stretch;\n        justify-content:space-around;\n        padding:7px 6px calc(7px + env(safe-area-inset-bottom));\n        backdrop-filter:blur(16px);\n        box-shadow:0 -8px 30px rgba(0,0,0,.18);\n    }\n    .red-legacy .red-bottom-nav__item{\n        flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;\n        gap:2px;padding:3px 2px;text-decoration:none;font-size:10px;\n    }\n    .red-legacy .legacy-footer{padding-bottom:78px}\n\n    .red-legacy .legacy-header__inner{\n        position:relative;\n        display:grid;\n        grid-template-columns:44px minmax(0,1fr) 44px;\n        grid-template-rows:64px 44px;\n        gap:8px 10px;\n        min-height:124px;\n        padding-block:8px 10px;\n        align-items:center;\n    }\n    .red-legacy .legacy-actions{display:none!important;position:static!important}\n    .red-legacy .legacy-mobile-trigger{\n        grid-column:1;grid-row:1;justify-self:start;align-self:center;\n        place-items:center;width:44px;height:44px;padding:0;border-radius:10px;\n        font-size:22px;opacity:1;transform:none;max-height:none;overflow:visible;\n    }\n    .red-legacy .legacy-brand{\n        grid-column:2;grid-row:1;justify-self:center;align-self:center;\n        min-width:0;min-height:0;opacity:1;transform:none;max-height:64px;overflow:visible;\n    }\n    .red-legacy .legacy-brand img{\n        max-width:104px;max-height:58px;width:auto;height:auto;object-fit:contain;\n    }\n    .red-legacy .legacy-search{\n        grid-column:1/-1;grid-row:2;align-self:center;width:100%;min-width:0;\n    }\n    .red-legacy .legacy-search input,\n    .red-legacy .legacy-search button{height:40px}\n\n    .red-legacy .legacy-header.is-mobile-condensed .legacy-header__inner{\n        grid-template-columns:44px minmax(0,1fr);\n        grid-template-rows:44px;gap:8px;min-height:60px;padding-block:8px;\n    }\n    .red-legacy .legacy-header.is-mobile-condensed .legacy-mobile-trigger{\n        grid-column:1;grid-row:1;opacity:1;pointer-events:auto;transform:none;max-height:none;overflow:visible;\n    }\n    .red-legacy .legacy-header.is-mobile-condensed .legacy-brand{\n        opacity:0;pointer-events:none;transform:translateY(-7px) scale(.96);max-height:0;overflow:hidden;\n    }\n    .red-legacy .legacy-header.is-mobile-condensed .legacy-search{\n        grid-column:2;grid-row:1;align-self:center;width:100%;min-width:0;\n    }\n}\n\n/* El item activo usa el mismo subrayado animado del hover. */\n.red-legacy .legacy-navigation__item.is-current>a,\n.red-legacy .legacy-navigation__inner>a.is-current{\n    color:var(--red-color-primary,#e50914);\n}\n
/* =========================================================
   Fase 3.11 - cantidad + cotización + consulta de producto
   ========================================================= */
.red-product-card__quote-description{
    display:inline-flex;
    align-items:center;
    gap:5px;
    color:#f08a00;
    font-size:11px;
    font-weight:750;
    line-height:1.15;
}
.red-product-card__consult{
    display:inline-flex;
    align-items:center;
    gap:5px;
    margin-top:5px;
    padding:4px 7px;
    border-radius:5px;
    background:#1f1f1f;
    color:#fff;
    text-decoration:none;
    font-size:10px;
    font-weight:750;
    line-height:1.1;
    white-space:nowrap;
    transition:transform .16s ease,background-color .16s ease,box-shadow .16s ease;
}
.red-product-card__consult:hover,
.red-product-card__consult:focus-visible{
    color:#fff;
    background:#111;
    transform:translateY(-1px);
    box-shadow:0 4px 10px rgba(0,0,0,.14);
}
.red-product-card__consult .fa-whatsapp{color:#35c65a;font-size:12px}
.red-product-card__consult--fallback{background:#555}

.red-product-card__cart-form{
    display:inline-flex;
    align-items:center;
    justify-content:flex-end;
    gap:4px;
    min-width:0;
}
.red-product-qty{
    display:inline-grid;
    grid-template-columns:24px 31px 24px;
    align-items:center;
    height:30px;
    overflow:hidden;
    border:1px solid #e2e6ea;
    border-radius:15px;
    background:#fff;
    box-shadow:0 1px 4px rgba(0,0,0,.04);
}
.red-product-qty button,
.red-product-qty input{
    width:100%;
    height:28px;
    margin:0;
    border:0;
    background:transparent;
    color:#151515;
    font:inherit;
    font-size:12px;
    line-height:28px;
    text-align:center;
}
.red-product-qty button{
    padding:0;
    cursor:pointer;
    font-size:17px;
    font-weight:600;
    transition:background-color .14s ease,color .14s ease;
}
.red-product-qty button:hover,
.red-product-qty button:focus-visible{
    background:#f3f4f6;
    color:var(--red-color-primary,#e50914);
    outline:none;
}
.red-product-qty input{
    appearance:textfield;
    -moz-appearance:textfield;
    font-weight:700;
}
.red-product-qty input::-webkit-outer-spin-button,
.red-product-qty input::-webkit-inner-spin-button{
    margin:0;
    -webkit-appearance:none;
}
.red-product-action--cart.is-quote{
    background:#f08a00;
}
.red-product-card.is-quote-product .red-product-card__pricing{
    min-width:110px;
}

/* En la lista compacta los controles se mantienen pequeños sin tapar el precio. */
.red-product-card--compact .red-product-card__commerce{
    align-items:flex-end;
    flex-wrap:wrap;
}
.red-product-card--compact .red-product-card__actions{
    flex:0 0 auto;
}
.red-product-card--compact .red-product-qty{
    grid-template-columns:22px 27px 22px;
    height:28px;
}
.red-product-card--compact .red-product-qty button,
.red-product-card--compact .red-product-qty input{height:26px;line-height:26px}
.red-product-card--compact .red-product-action{height:28px;min-width:28px;padding-inline:7px}
.red-product-card--compact .red-product-card__consult{font-size:9px;padding:3px 5px}

/* Carrusel responsive de dos cards: controles compactos y posibilidad de wrap. */
.red-module-slide .red-product-card__commerce,
.red-catalog-products-carousel .red-product-card__commerce{
    flex-wrap:wrap;
}
.red-module-slide .red-product-card__actions,
.red-catalog-products-carousel .red-product-card__actions{
    max-width:100%;
}

@media(max-width:680px){
    .red-product-card__commerce{gap:6px}
    .red-product-qty{grid-template-columns:21px 27px 21px;height:28px}
    .red-product-qty button,.red-product-qty input{height:26px;line-height:26px;font-size:11px}
    .red-product-qty button{font-size:15px}
    .red-product-action{height:28px;min-width:28px;padding:0 7px}
    .red-product-card__consult{font-size:9px;padding:3px 5px}
    .red-product-card__quote-description{font-size:9px}
}

@media(max-width:390px){
    .red-product-card__actions{gap:3px}
    .red-product-qty{grid-template-columns:20px 25px 20px}
    .red-product-action--info{display:none}
}

/* ========================================================================== */
/* Mall Core 4.1                                                             */
/* ========================================================================== */
.red-mall{padding:18px 0 34px}
.red-mall-location{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 24px;padding:22px 24px;border:1px solid #e5e7eb;border-radius:14px;background:linear-gradient(135deg,#fff 0%,#fff8eb 100%);box-shadow:0 10px 28px rgba(15,23,42,.06)}
.red-mall-location.has-location{background:linear-gradient(135deg,#fff 0%,#f0fdf4 100%)}
.red-mall-location__copy{min-width:0;max-width:760px}
.red-mall-location__eyebrow,.red-mall-content__eyebrow{display:inline-flex;align-items:center;gap:7px;margin-bottom:6px;color:var(--red-color-primary,#ef1b23);font-size:.76rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.red-mall-location h1{margin:0 0 6px;font-size:clamp(1.25rem,2.2vw,1.8rem);line-height:1.2;color:var(--red-color-text,#111827)}
.red-mall-location p{margin:0;color:#667085;line-height:1.55}
.red-mall-location__actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex:0 0 auto}
.red-mall-location__actions form{margin:0}
.red-mall-location__status{margin:8px 0 0!important;font-size:.78rem;color:#475467}
.red-mall-location__status.is-error{color:#b42318}
.red-mall-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:0 16px;border:1px solid transparent;border-radius:9px;font:inherit;font-size:.84rem;font-weight:750;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background-color .16s ease}
.red-mall-button:hover{transform:translateY(-1px)}
.red-mall-button--primary{background:var(--red-color-primary,#ef1b23);color:#fff;box-shadow:0 7px 18px color-mix(in srgb,var(--red-color-primary,#ef1b23) 25%,transparent)}
.red-mall-button--ghost{background:#fff;border-color:#d0d5dd;color:#344054}
.red-mall-layout{display:grid;grid-template-columns:minmax(210px,260px) minmax(0,1fr);gap:22px;align-items:start}
.red-mall-sidebar{position:sticky;top:calc(var(--red-sticky-header-offset,0px) + 14px);max-height:calc(100vh - var(--red-sticky-header-offset,0px) - 28px);overflow:auto;border:1px solid #e5e7eb;border-radius:10px;background:#fff;scrollbar-width:thin}
.red-mall-sidebar__heading{padding:15px 16px;border-bottom:1px solid #e5e7eb;font-size:.84rem;font-weight:800;text-transform:uppercase;color:#344054}
.red-mall-category-list{display:flex;flex-direction:column;padding:4px 0}
.red-mall-category-list a{display:grid;grid-template-columns:34px minmax(0,1fr) 16px;align-items:center;gap:9px;min-height:48px;padding:7px 13px;color:#344054;text-decoration:none;border-left:3px solid transparent;transition:background-color .18s ease,color .18s ease,border-color .18s ease,padding-left .18s ease}
.red-mall-category-list a:hover,.red-mall-category-list a.is-active{background:#fff5f5;color:var(--red-color-primary,#ef1b23);border-left-color:var(--red-color-primary,#ef1b23);padding-left:16px}
.red-mall-category-list img{width:30px;height:30px;object-fit:contain;border-radius:7px}
.red-mall-category-list i{justify-self:end;opacity:.55}
.red-mall-content{min-width:0}
.red-mall-content__header{display:flex;align-items:end;justify-content:space-between;gap:18px;margin:0 0 14px;padding:2px 2px 12px;border-bottom:1px solid #e5e7eb}
.red-mall-content__header h2{margin:0;font-size:clamp(1.25rem,2vw,1.65rem);line-height:1.2}
.red-mall-clear-filter{font-size:.82rem;font-weight:700;color:var(--red-color-primary,#ef1b23);text-decoration:none}
.red-mall-store-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-top:1px solid #e5e7eb;border-left:1px solid #e5e7eb;background:#fff}
.red-mall-store-card{position:relative;display:grid;grid-template-columns:126px minmax(0,1fr) 30px;gap:13px;align-items:center;min-height:178px;padding:18px;border-right:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;transition:box-shadow .18s ease,transform .18s ease,background-color .18s ease}
.red-mall-store-card:hover{z-index:1;background:#fff;box-shadow:0 12px 28px rgba(15,23,42,.08);transform:translateY(-1px)}
.red-mall-store-card__logo{display:flex;align-items:center;justify-content:center;width:126px;height:112px;border-radius:10px;background:#f8fafc;overflow:hidden}
.red-mall-store-card__logo img{width:100%;height:100%;object-fit:contain;padding:8px}
.red-mall-store-card__body{min-width:0}
.red-mall-store-card__title{display:inline-block;margin-bottom:7px;color:#9f151b;font-size:1.05rem;font-weight:800;line-height:1.2;text-decoration:none;text-transform:uppercase}
.red-mall-store-card__body p{display:-webkit-box;margin:0 0 10px;overflow:hidden;color:#475467;font-size:.82rem;line-height:1.45;-webkit-line-clamp:3;-webkit-box-orient:vertical}
.red-mall-store-card__schedule{display:flex;flex-wrap:wrap;align-items:center;gap:5px 9px;margin:0 0 8px;font-size:.7rem;font-weight:750;line-height:1.25}
.red-mall-store-card__schedule-status{display:inline-flex;align-items:center;gap:5px}
.red-mall-store-card__schedule.is-open .red-mall-store-card__schedule-status{color:#067647}
.red-mall-store-card__schedule.is-closed .red-mall-store-card__schedule-status{color:#b42318}
.red-mall-store-card__schedule-hours{color:#667085;font-weight:650}
.red-mall-store-card__meta{display:flex;flex-wrap:wrap;gap:5px 12px;color:#667085;font-size:.71rem;line-height:1.35}
.red-mall-store-card__meta span{display:inline-flex;align-items:center;gap:5px}
.red-mall-store-card__go{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;color:var(--red-color-primary,#ef1b23);text-decoration:none;transition:background-color .18s ease,transform .18s ease}
.red-mall-store-card__go:hover{background:#fff1f2;transform:translateX(2px)}
.red-mall-empty{padding:50px 24px;text-align:center;border:1px dashed #d0d5dd;border-radius:12px;background:#fcfcfd;color:#667085}
.red-mall-empty>i{font-size:2rem;color:#98a2b3}.red-mall-empty h3{margin:10px 0 5px;color:#344054}.red-mall-empty p{margin:0}
.red-mall-featured{margin-top:28px}
.red-mode-mall .legacy-search input{min-width:0}

@media(max-width:1180px){
  .red-mall-layout{grid-template-columns:220px minmax(0,1fr);gap:16px}
  .red-mall-store-card{grid-template-columns:96px minmax(0,1fr) 26px;padding:14px;min-height:158px}
  .red-mall-store-card__logo{width:96px;height:94px}
}
@media(max-width:980px){
  .red-mall{padding-top:10px}
  .red-mall-location{align-items:flex-start;flex-direction:column;padding:17px 18px;margin-bottom:14px}
  .red-mall-location__actions{width:100%;justify-content:flex-start;flex-wrap:wrap}
  .red-mall-layout{display:block}
  .red-mall-sidebar{display:none}
  .red-mall-store-grid{grid-template-columns:1fr}
  .red-mall-content__header{margin-top:6px}
}
@media(max-width:560px){
  .red-mall-location{border-radius:10px;padding:15px}
  .red-mall-location__actions,.red-mall-location__actions form{width:100%}
  .red-mall-button{width:100%}
  .red-mall-store-card{grid-template-columns:78px minmax(0,1fr) 24px;gap:10px;padding:12px 10px;min-height:136px}
  .red-mall-store-card__logo{width:78px;height:78px}
  .red-mall-store-card__title{font-size:.91rem}
  .red-mall-store-card__body p{font-size:.76rem;-webkit-line-clamp:2}
  .red-mall-store-card__meta{font-size:.66rem;gap:4px 8px}
}


/* ==========================================================
   Fase 4.1.1 — contexto Mall, doble identidad y cards comida
   ========================================================== */

/* En subcomercio se conserva visible la relación Mall -> comercio. */
.red-legacy .legacy-brand-group{
    justify-self:start;
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
}
.red-legacy .legacy-brand-group .legacy-brand{
    min-width:0;
    min-height:54px;
    justify-self:auto;
}
.red-legacy .legacy-brand-group .legacy-brand--main img{
    max-width:98px;
    max-height:58px;
}
.red-legacy .legacy-brand-group .legacy-brand--child{
    position:relative;
    padding-left:10px;
}
.red-legacy .legacy-brand-group .legacy-brand--child::before{
    content:'';
    position:absolute;
    left:0;
    top:16%;
    bottom:16%;
    width:1px;
    background:color-mix(in srgb,var(--red-color-header-text,#fff) 24%,transparent);
}
.red-legacy .legacy-brand-group .legacy-brand--child img{
    max-width:78px;
    max-height:58px;
}

/* Drawer general = Mall principal; drawer categorías = comercio actual. */
.red-legacy .red-drawer__identity{
    display:inline-flex;
    min-width:0;
    align-items:center;
    gap:10px;
}
.red-legacy .red-drawer__identity img{
    width:38px;
    height:38px;
    flex:0 0 38px;
    object-fit:contain;
    border-radius:8px;
    background:rgba(255,255,255,.06);
}
.red-legacy .red-drawer__identity strong{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.red-legacy .red-drawer__identity--link{
    color:inherit;
    text-decoration:none;
}

/* Descripción breve en el listado compacto de subtiendas Mall (comidas, etc.). */
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__summary{
    display:-webkit-box;
    margin:0 0 8px;
    overflow:hidden;
    color:#667085;
    font-size:11px;
    line-height:1.35;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
}
.red-legacy.red-mall-child .red-product-card--compact{
    min-height:178px;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__body{
    padding-top:10px;
}

/* Cuando ocultamos el título visual \"Productos\" mantenemos el contador limpio. */
.red-legacy .red-catalog-heading--count-only{
    min-height:22px;
    justify-content:flex-end;
    margin-bottom:8px;
    border-bottom:0;
}

/* Laptop/tablet horizontal: reservar espacio real para los dos logos. */
@media (min-width:981px) and (max-width:1280px){
    .red-legacy.red-mall-child .legacy-header__inner{
        grid-template-columns:minmax(178px,210px) minmax(300px,1fr) auto;
        gap:12px;
    }
    .red-legacy.red-mall-child .legacy-brand-group{
        gap:7px;
    }
    .red-legacy.red-mall-child .legacy-brand-group .legacy-brand--main img{
        max-width:86px;
        max-height:52px;
    }
    .red-legacy.red-mall-child .legacy-brand-group .legacy-brand--child img{
        max-width:66px;
        max-height:52px;
    }
}

/* Móvil: ambos logos caben en la cabecera inicial; al hacer scroll queda sólo
   hamburguesa + buscador, igual que el header compacto ya definido. */
@media (max-width:980px){
    .red-legacy.red-mall-child .legacy-brand-group{
        grid-column:2;
        grid-row:1;
        justify-self:center;
        max-width:190px;
        gap:7px;
        transition:opacity .18s ease,transform .18s ease;
    }
    .red-legacy.red-mall-child .legacy-brand-group .legacy-brand{
        max-height:54px;
    }
    .red-legacy.red-mall-child .legacy-brand-group .legacy-brand--main img{
        max-width:78px;
        max-height:48px;
    }
    .red-legacy.red-mall-child .legacy-brand-group .legacy-brand--child img{
        max-width:64px;
        max-height:48px;
    }
    .red-legacy.red-mall-child .legacy-header.is-mobile-condensed .legacy-brand-group{
        opacity:0;
        pointer-events:none;
        transform:translateY(-7px) scale(.96);
        max-height:0;
        overflow:hidden;
    }
}

@media (max-width:520px){
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__summary{
        font-size:10px;
        -webkit-line-clamp:2;
    }
}

/* =========================================================
   Fase 4.2 — Mall location UX
   ========================================================= */
.red-legacy .legacy-location-chip{
    display:inline-flex;
    min-width:0;
    max-width:260px;
    align-items:center;
    gap:7px;
    padding:9px 12px;
    border:0;
    border-radius:8px;
    background:#66b719;
    color:#fff;
    font:inherit;
    font-size:.76rem;
    font-weight:800;
    line-height:1.15;
    text-decoration:none;
    cursor:pointer;
    box-shadow:0 6px 16px rgba(16,24,40,.08);
}
.red-legacy .legacy-location-chip:hover{filter:brightness(.96);color:#fff}
.red-legacy .legacy-location-chip span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.red-location-modal[hidden]{display:none!important}
body.red-location-modal-open{overflow:hidden}
.red-location-modal{
    position:fixed;
    inset:0;
    z-index:10060;
    display:grid;
    place-items:center;
    padding:22px;
    opacity:0;
    visibility:hidden;
    transition:opacity .18s ease,visibility .18s ease;
}
.red-location-modal.is-open{opacity:1;visibility:visible}
.red-location-modal__backdrop{position:absolute;inset:0;background:rgba(15,23,42,.68);backdrop-filter:blur(2px)}
.red-location-modal__dialog{
    position:relative;
    z-index:1;
    width:min(940px,100%);
    max-height:min(90vh,860px);
    overflow:auto;
    padding:26px;
    border-radius:16px;
    background:#fff;
    color:#101828;
    box-shadow:0 28px 80px rgba(15,23,42,.28);
    transform:translateY(12px) scale(.985);
    transition:transform .18s ease;
}
.red-location-modal.is-open .red-location-modal__dialog{transform:none}
.red-location-modal__close{
    position:absolute;top:14px;right:14px;z-index:3;width:38px;height:38px;border:0;border-radius:50%;background:#f2f4f7;color:#344054;font-size:24px;line-height:1;cursor:pointer
}
.red-location-modal__header{padding-right:44px;text-align:center}
.red-location-modal__eyebrow{display:inline-flex;align-items:center;gap:6px;color:var(--red-color-primary,#ef1b23);font-size:.74rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.red-location-modal__header h2{margin:7px 0 5px;font-size:clamp(1.35rem,2.6vw,2rem);line-height:1.15}
.red-location-modal__header p{max-width:680px;margin:0 auto;color:#667085;line-height:1.5}
.red-location-modal__account-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:18px 0 4px}
.red-location-account-pill{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 13px;border:1px solid #e4e7ec;border-radius:999px;background:#fff;color:#344054;font-size:.76rem;font-weight:700;text-decoration:none;cursor:pointer}
.red-location-account-pill.is-active,.red-location-account-pill:hover{border-color:color-mix(in srgb,var(--red-color-primary,#ef1b23) 42%,#e4e7ec);background:color-mix(in srgb,var(--red-color-primary,#ef1b23) 7%,#fff);color:var(--red-color-primary,#ef1b23)}
.red-location-saved{margin-top:18px;padding:14px;border:1px solid #e4e7ec;border-radius:12px;background:#f9fafb}
.red-location-saved__title{margin-bottom:9px;font-size:.8rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#475467}
.red-location-saved__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.red-location-saved__item{display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:9px;align-items:center;padding:11px;border:1px solid #e4e7ec;border-radius:10px;background:#fff;text-align:left;color:#101828;cursor:pointer}
.red-location-saved__item:hover,.red-location-saved__item.is-default{border-color:color-mix(in srgb,var(--red-color-primary,#ef1b23) 35%,#e4e7ec)}
.red-location-saved__item span{min-width:0}.red-location-saved__item strong,.red-location-saved__item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.red-location-saved__item small{margin-top:2px;color:#667085}.red-location-saved__item em{font-size:.66rem;font-style:normal;color:var(--red-color-primary,#ef1b23);font-weight:800}
.red-location-modal__detect{display:flex;align-items:center;justify-content:center;gap:12px;margin:18px 0;color:#98a2b3;font-size:.76rem}
.red-location-form{display:grid;gap:13px}
.red-location-form label{display:grid;gap:6px;color:#344054;font-size:.78rem;font-weight:700}.red-location-form label>span{color:var(--red-color-primary,#ef1b23)}
.red-location-form input,.red-location-form select{width:100%;height:44px;padding:0 11px;border:1px solid #d0d5dd;border-radius:8px;background:#fff;color:#101828;font:inherit;outline:0;transition:border-color .16s ease,box-shadow .16s ease}
.red-location-form input:focus,.red-location-form select:focus{border-color:var(--red-color-primary,#ef1b23);box-shadow:0 0 0 3px color-mix(in srgb,var(--red-color-primary,#ef1b23) 12%,transparent)}
.red-location-form__geo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.red-location-form__address input{font-size:.9rem}
.red-location-map-wrap{overflow:hidden;border:1px solid #e4e7ec;border-radius:12px;background:#f2f4f7}
.red-location-map{height:310px;width:100%}
.red-location-map__hint{margin:0;padding:8px 11px;background:#fff;color:#667085;font-size:.72rem}
.red-location-form__status{margin:0;padding:9px 11px;border-radius:8px;background:#ecfdf3;color:#027a48;font-size:.77rem}.red-location-form__status.is-error{background:#fef3f2;color:#b42318}
.red-location-form__actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;margin-top:2px}
.red-mall-button{border-radius:8px}

@media (min-width:981px){
    .red-legacy.red-mode-mall .legacy-header__inner,.red-legacy.red-mall-child .legacy-header__inner{grid-template-columns:auto minmax(280px,1fr) auto auto}
}
@media (max-width:1100px) and (min-width:981px){
    .red-legacy .legacy-location-chip{max-width:180px;padding-inline:10px}
}
@media (max-width:980px){
    .red-legacy .legacy-location-chip{display:none}
    .red-location-modal{padding:0;place-items:end center}
    .red-location-modal__dialog{width:100%;max-height:92dvh;border-radius:18px 18px 0 0;padding:20px 16px 18px;transform:translateY(28px)}
    .red-location-form__geo-grid{grid-template-columns:1fr 1fr}
    .red-location-form__geo-grid label:first-child{grid-column:1/-1}
    .red-location-map{height:260px}
}
@media (max-width:620px){
    .red-location-saved__grid{grid-template-columns:1fr}
    .red-location-modal__detect{align-items:stretch;flex-direction:column;text-align:center}
    .red-location-modal__detect .red-mall-button{width:100%}
    .red-location-form__geo-grid{grid-template-columns:1fr}
    .red-location-form__geo-grid label:first-child{grid-column:auto}
    .red-location-form__actions{display:grid;grid-template-columns:1fr}.red-location-form__actions .red-mall-button{width:100%}
    .red-location-map{height:225px}
}

.red-location-form__remember{display:flex!important;align-items:flex-start;gap:9px;padding:10px 12px;border:1px solid #e4e7ec;border-radius:10px;background:#f8fafc;color:#475467;font-size:.8rem;font-weight:600}
.red-location-form__remember input{width:16px!important;height:16px!important;min-width:16px;margin:1px 0 0;accent-color:var(--red-color-primary,#ef1b23)}
.red-location-form__remember span{line-height:1.4}

/* Google Places autocomplete dentro del modal de ubicación. */
.pac-container{
    z-index:10180!important;
    margin-top:6px;
    border:1px solid #e4e7ec;
    border-radius:10px;
    overflow:hidden;
    box-shadow:0 14px 36px rgba(15,23,42,.18);
    font-family:var(--red-font-family,Inter,Arial,sans-serif);
}
.pac-item{
    min-height:44px;
    padding:8px 12px;
    border-top:1px solid #f2f4f7;
    color:#475467;
    font-size:.8rem;
    line-height:1.35;
    cursor:pointer;
}
.pac-item:first-child{border-top:0}
.pac-item:hover,.pac-item-selected{background:#f8fafc}
.pac-item-query{color:#101828;font-size:.82rem}
.pac-matched{font-weight:800;color:var(--red-color-primary,#ef1b23)}

/* Fase 4.2.2: Google Places (New) - el desplegable vive dentro del componente y acompaña el scroll del modal. */
.red-location-place-host{
    position:relative;
    z-index:6;
    min-width:0;
}
.red-location-place-autocomplete{
    display:block;
    width:100%;
    min-height:44px;
    border:1px solid #d0d5dd;
    border-radius:8px;
    background:#fff;
    color:#101828;
    color-scheme:light;
    font-family:var(--red-font-family,Inter,Arial,sans-serif);
    font-size:.9rem;
    line-height:1.35;
    box-sizing:border-box;
}
.red-location-place-autocomplete:focus-within{
    border-color:var(--red-color-primary,#ef1b23);
    box-shadow:0 0 0 3px color-mix(in srgb,var(--red-color-primary,#ef1b23) 12%,transparent);
}
.red-location-place-autocomplete::part(input){
    min-height:42px;
    padding:0 11px;
    color:#101828;
    font-family:var(--red-font-family,Inter,Arial,sans-serif);
    font-size:.9rem;
}
.red-location-place-autocomplete::part(prediction-list){
    z-index:20;
    margin-top:6px;
    border:1px solid #e4e7ec;
    border-radius:10px;
    background:#fff;
    box-shadow:0 14px 36px rgba(15,23,42,.18);
    overflow:hidden;
}
.red-location-place-autocomplete::part(prediction-item){
    min-height:46px;
    padding:9px 12px;
    color:#475467;
    font-family:var(--red-font-family,Inter,Arial,sans-serif);
    font-size:.8rem;
    line-height:1.35;
}
.red-location-place-autocomplete::part(prediction-item-selected){
    background:#f8fafc;
}
.red-location-place-autocomplete::part(prediction-item-main-text){
    color:#101828;
    font-weight:700;
}
.red-location-place-autocomplete::part(prediction-item-secondary-text){
    color:#667085;
}
.red-location-place-autocomplete::part(prediction-item-match){
    color:var(--red-color-primary,#ef1b23);
    font-weight:800;
}
@media (max-width:620px){
    .red-location-place-autocomplete::part(prediction-item){
        min-height:50px;
        padding:10px 11px;
        font-size:.78rem;
    }
}

/* ========================================================================== */
/* Fase 4.3 — Mall comercios: prioridad al directorio + cards compactas       */
/* ========================================================================== */

/* --- Cards compactas de subcomercio ------------------------------------- */
.red-legacy.red-mall-child .red-product-card--compact{
    grid-template-columns:112px minmax(0,1fr);
    grid-template-rows:minmax(0,1fr) auto;
    min-height:190px;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__media{
    grid-column:1;
    grid-row:1;
    align-self:start;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__body{
    grid-column:2;
    grid-row:1;
    padding:10px 12px 7px 0;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__body h3{
    margin-bottom:5px;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__summary{
    margin:0;
    font-size:11px;
    line-height:1.4;
    -webkit-line-clamp:4;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__commerce--compact-split{
    grid-column:1 / -1;
    grid-row:2;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    width:100%;
    margin:0;
    padding:7px 9px 8px;
    border-top:1px solid #f0f1f3;
    background:#fff;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__pricing{
    display:flex;
    flex-direction:row;
    align-items:center;
    align-content:center;
    flex-wrap:wrap;
    gap:3px 8px;
    min-width:0;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__old-price{
    flex:0 0 auto;
    font-size:9px;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__price{
    flex:0 0 auto;
    font-size:17px;
    line-height:1.05;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__tax,
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__stock{
    display:inline-flex;
    align-items:center;
    gap:4px;
    margin:0;
    color:#475467;
    font-size:9px;
    font-style:normal;
    line-height:1.15;
    white-space:nowrap;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__tax{
    color:#00a318;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__stock .fa{
    font-size:7px;
    color:#101828;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__stock--2 .fa{
    color:#f79009;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__stock--3 .fa{
    color:#d92d20;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__consult{
    margin:0;
    flex:0 0 auto;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:nowrap;
    gap:5px;
    margin:0;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__wishlist--inline{
    position:static;
    flex:0 0 auto;
    width:28px;
    height:28px;
    border-radius:50%;
    box-shadow:none;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__wishlist--inline button{
    display:grid;
    place-items:center;
}

/* --- Mall raíz: el listado de comercios manda --------------------------- */
.red-legacy.red-mode-mall .red-mall{
    padding-top:10px;
}
.red-legacy.red-mode-mall .red-mall-location--pending{
    min-height:76px;
    margin-bottom:14px;
    padding:14px 16px;
    border-radius:11px;
}
.red-legacy.red-mode-mall .red-mall-location--pending h1{
    margin-bottom:3px;
    font-size:1.05rem;
}
.red-legacy.red-mode-mall .red-mall-location--pending p{
    font-size:.8rem;
}
.red-legacy.red-mode-mall .red-mall-layout{
    grid-template-columns:minmax(285px,310px) minmax(0,1fr);
    gap:18px;
}
.red-legacy.red-mode-mall .red-mall-sidebar{
    top:calc(var(--red-sticky-header-offset,0px) + 10px);
    max-height:calc(100vh - var(--red-sticky-header-offset,0px) - 20px);
    overflow-y:auto;
    overflow-x:hidden;
    border-radius:12px;
    scrollbar-width:thin;
}
.red-legacy.red-mode-mall .red-mall-sidebar__section + .red-mall-sidebar__section{
    border-top:1px solid #e8eaee;
}
.red-legacy.red-mode-mall .red-mall-sidebar__heading{
    padding:12px 14px;
    font-size:.76rem;
}
.red-legacy.red-mode-mall .red-mall-category-list{
    padding:3px 0 7px;
}
.red-legacy.red-mode-mall .red-mall-category-list a{
    grid-template-columns:38px minmax(0,1fr) 14px;
    min-height:43px;
    gap:8px;
    padding:5px 12px;
    font-size:.8rem;
    line-height:1.25;
}
.red-legacy.red-mode-mall .red-mall-category-list a:hover,
.red-legacy.red-mode-mall .red-mall-category-list a.is-active{
    padding-left:14px;
}
.red-legacy.red-mode-mall .red-mall-category-list img,
.red-legacy.red-mode-mall .red-mall-category-list__fallback{
    width:34px;
    height:34px;
    border-radius:9px;
}
.red-legacy.red-mode-mall .red-mall-category-list img{
    object-fit:cover;
}
.red-legacy.red-mode-mall .red-mall-category-list__fallback{
    display:grid;
    place-items:center;
    background:#f5f6f8;
    color:var(--red-color-primary,#ef1b23);
}
.red-legacy.red-mode-mall .red-mall-content__header{
    margin-bottom:10px;
    padding-bottom:9px;
}
.red-legacy.red-mode-mall .red-mall-store-card{
    min-height:150px;
    grid-template-columns:108px minmax(0,1fr) 28px;
    padding:8px;
}
.red-legacy.red-mode-mall .red-mall-store-card__logo{
    width:108px;
    height:96px;
}

/* --- Destacados laterales ---------------------------------------------- */
.red-mall-sidebar-featured{
    background:#fff;
}
.red-mall-sidebar-featured__head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:11px 14px 9px;
}
.red-mall-sidebar-featured__head span{
    display:block;
    color:var(--red-color-primary,#ef1b23);
    font-size:9px;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
}
.red-mall-sidebar-featured__head strong{
    display:block;
    margin-top:1px;
    color:#101828;
    font-size:.78rem;
}
.red-module-carousel--mall-sidebar{
    padding:0 8px 10px;
}
.red-module-carousel--mall-sidebar .red-carousel-nav{
    top:24px;
    width:27px;
    height:27px;
    font-size:18px;
}
.red-module-carousel--mall-sidebar .red-carousel-nav--prev{left:auto;right:40px}
.red-module-carousel--mall-sidebar .red-carousel-nav--next{right:8px}
.red-mall-sidebar-featured__track{
    gap:0;
    padding:0;
}
.red-mall-sidebar-featured__page{
    flex:0 0 100%;
    display:grid;
    gap:7px;
    min-width:100%;
    padding:2px 0;
}
.red-product-card--mall-sidebar{
    display:grid;
    grid-template-columns:72px minmax(0,1fr);
    min-height:96px;
    border:1px solid #eceef2;
    border-radius:10px;
    box-shadow:none;
    overflow:hidden;
}
.red-product-card--mall-sidebar:hover{
    transform:none;
    box-shadow:0 6px 16px rgba(15,23,42,.06);
}
.red-product-card--mall-sidebar .red-product-card__media{
    padding:6px;
}
.red-product-card--mall-sidebar .red-product-card__image{
    height:68px;
    aspect-ratio:auto;
    padding:2px;
}
.red-product-card--mall-sidebar .red-product-card__wishlist{
    top:4px;
    right:4px;
    width:23px;
    height:23px;
}
.red-product-card--mall-sidebar .red-product-card__discount{
    top:4px;
    left:4px;
    padding:2px 4px;
    font-size:8px;
}
.red-product-card--mall-sidebar .red-product-card__body{
    min-width:0;
    padding:8px 7px 7px 0;
}
.red-product-card--mall-sidebar .red-product-card__code{
    font-size:8px;
}
.red-product-card--mall-sidebar .red-product-card__body h3{
    margin:2px 0 5px;
    font-size:10px;
    line-height:1.22;
    display:-webkit-box;
    overflow:hidden;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
}
.red-product-card--mall-sidebar .red-product-card__commerce{
    align-items:center;
    gap:5px;
    margin-top:3px;
}
.red-product-card--mall-sidebar .red-product-card__pricing{
    gap:1px;
}
.red-product-card--mall-sidebar .red-product-card__old-price{
    font-size:8px;
}
.red-product-card--mall-sidebar .red-product-card__price{
    font-size:12px;
}
.red-product-card--mall-sidebar .red-product-card__tax,
.red-product-card--mall-sidebar .red-product-card__stock,
.red-product-card--mall-sidebar .red-product-card__consult{
    display:none;
}
.red-product-card--mall-sidebar .red-product-qty{
    grid-template-columns:18px 21px 18px;
    height:24px;
}
.red-product-card--mall-sidebar .red-product-qty button,
.red-product-card--mall-sidebar .red-product-qty input{
    height:22px;
    line-height:22px;
    font-size:9px;
}
.red-product-card--mall-sidebar .red-product-action{
    min-width:24px;
    height:24px;
    padding:0 5px;
    font-size:10px;
}
.red-product-card--mall-sidebar .red-product-action--info{
    display:none;
}

/* --- Categorías estilo delivery: solo móvil/tablet estrecha ------------- */
.red-mall-category-strip{
    display:none;
}

@media(max-width:1180px){
    .red-legacy.red-mode-mall .red-mall-layout{
        grid-template-columns:260px minmax(0,1fr);
        gap:14px;
    }
}

@media(max-width:980px){
    .red-legacy.red-mode-mall .red-mall-layout{
        display:block;
    }
    .red-legacy.red-mode-mall .red-mall-sidebar{
        display:none;
    }
    .red-mall-category-strip{
        display:flex;
        width:100%;
        gap:11px;
        margin:0 0 12px;
        padding:4px 2px 10px;
        overflow-x:auto;
        overflow-y:hidden;
        scroll-behavior:smooth;
        scroll-snap-type:x mandatory;
        scrollbar-width:none;
        -webkit-overflow-scrolling:touch;
    }
    .red-mall-category-strip::-webkit-scrollbar{
        display:none;
    }
    .red-mall-category-strip__item{
        flex:0 0 82px;
        min-width:0;
        color:#344054;
        text-align:center;
        text-decoration:none;
        scroll-snap-align:start;
    }
    .red-mall-category-strip__media{
        display:grid;
        place-items:center;
        width:62px;
        height:62px;
        margin:0 auto 6px;
        overflow:hidden;
        border:1px solid #e7e9ed;
        border-radius:17px;
        background:#f7f8fa;
        transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
    }
    .red-mall-category-strip__media img{
        width:100%;
        height:100%;
        object-fit:cover;
    }
    .red-mall-category-strip__media--fallback{
        color:var(--red-color-primary,#ef1b23);
        font-size:20px;
    }
    .red-mall-category-strip__label{
        display:-webkit-box;
        overflow:hidden;
        color:#344054;
        font-size:10px;
        font-weight:700;
        line-height:1.15;
        -webkit-box-orient:vertical;
        -webkit-line-clamp:2;
    }
    .red-mall-category-strip__item.is-active .red-mall-category-strip__media{
        border-color:var(--red-color-primary,#ef1b23);
        box-shadow:0 0 0 2px color-mix(in srgb,var(--red-color-primary,#ef1b23) 10%,transparent);
    }
    .red-mall-category-strip__item.is-active .red-mall-category-strip__label{
        color:var(--red-color-primary,#ef1b23);
    }
    .red-legacy.red-mode-mall .red-mall-content__header{
        margin-top:0;
    }
}

@media(max-width:760px){
    .red-legacy.red-mall-child .red-product-card--compact{
        grid-template-columns:96px minmax(0,1fr);
    }
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__commerce--compact-split{
        grid-template-columns:minmax(0,1fr) auto;
        gap:6px;
        padding-inline:7px;
    }
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__pricing{
        gap:2px 6px;
    }
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__price{
        font-size:15px;
    }
}

@media(max-width:520px){
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__summary{
        -webkit-line-clamp:3;
    }
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__commerce--compact-split{
        grid-template-columns:1fr;
        align-items:start;
    }
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__actions{
        width:100%;
        justify-content:flex-end;
    }
    .red-legacy.red-mode-mall .red-mall-location--pending{
        align-items:stretch;
    }
}

/* ========================================================================== */
/* Fase 4.3.1 — cards compactas universales + breadcrumb                     */
/* ========================================================================== */

/* La vista compacta usa una sola franja inferior en Tienda, Marketplace y Mall. */
.red-legacy .red-product-card--compact{
    position:relative;
    grid-template-columns:112px minmax(0,1fr);
    grid-template-rows:minmax(0,1fr) auto;
    min-height:190px;
}
.red-legacy .red-product-card--compact .red-product-card__media{
    grid-column:1;
    grid-row:1;
    align-self:start;
}
.red-legacy .red-product-card--compact .red-product-card__body{
    grid-column:2;
    grid-row:1;
    min-width:0;
    padding:10px 12px 7px 0;
}
.red-legacy .red-product-card--compact .red-product-card__body h3{
    margin:2px 0 6px;
    padding-right:0;
    font-size:15px;
    line-height:1.2;
}
.red-legacy .red-product-card--compact .red-product-card__summary{
    display:-webkit-box;
    margin:0;
    overflow:hidden;
    color:#667085;
    font-size:10px;
    line-height:1.36;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
}

/* Barra inferior: metadatos a la izquierda, controles a la derecha. */
.red-legacy .red-product-card--compact .red-product-card__commerce--compact-split{
    grid-column:1 / -1;
    grid-row:2;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:8px;
    width:100%;
    margin:0;
    padding:7px 8px 8px;
    border-top:1px solid #f0f1f3;
    background:#fff;
}
.red-legacy .red-product-card--compact .red-product-card__pricing{
    display:flex;
    flex-direction:row;
    align-items:center;
    align-content:center;
    flex-wrap:wrap;
    gap:2px 6px;
    min-width:0;
    margin:0;
}
.red-legacy .red-product-card--compact .red-product-card__old-price{
    flex:0 0 auto;
    margin:0;
    font-size:8px;
    line-height:1;
    white-space:nowrap;
}
.red-legacy .red-product-card--compact .red-product-card__price{
    flex:0 0 auto;
    max-width:100%;
    margin:0;
    color:#111;
    font-size:clamp(14px,1.12vw,18px);
    line-height:1;
    letter-spacing:-.025em;
    white-space:nowrap;
}
.red-legacy .red-product-card--compact .red-product-card__tax,
.red-legacy .red-product-card--compact .red-product-card__stock{
    display:inline-flex;
    align-items:center;
    gap:3px;
    margin:0;
    font-size:8px;
    font-style:normal;
    line-height:1.08;
    white-space:nowrap;
}
.red-legacy .red-product-card--compact .red-product-card__tax{
    color:#00a318;
}
.red-legacy .red-product-card--compact .red-product-card__tax .fa,
.red-legacy .red-product-card--compact .red-product-card__stock .fa{
    font-size:6px;
}
.red-legacy .red-product-card--compact .red-product-card__stock{
    color:#475467;
}
.red-legacy .red-product-card--compact .red-product-card__stock--1 .fa{color:#101828}
.red-legacy .red-product-card--compact .red-product-card__stock--2 .fa{color:#f79009}
.red-legacy .red-product-card--compact .red-product-card__stock--3 .fa{color:#d92d20}

/* Consultar stock: legible y compacto; WhatsApp también blanco. */
.red-legacy .red-product-card--compact .red-product-card__consult{
    flex:0 0 auto;
    margin:0;
    padding:3px 6px;
    border:1px solid #087a27;
    background:#087a27;
    color:#fff!important;
    font-size:8px;
    line-height:1.05;
}
.red-legacy .red-product-card--compact .red-product-card__consult:hover,
.red-legacy .red-product-card--compact .red-product-card__consult:focus-visible{
    border-color:#06651f;
    background:#06651f;
    color:#fff!important;
}
.red-legacy .red-product-card--compact .red-product-card__consult .fa,
.red-legacy .red-product-card--compact .red-product-card__consult .fa-whatsapp{
    color:#fff!important;
    font-size:9px;
}
.red-legacy .red-product-card--compact .red-product-card__consult--fallback{
    border-color:#555;
    background:#555;
}

.red-legacy .red-product-card--compact .red-product-card__actions{
    display:flex;
    flex:0 0 auto;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:nowrap;
    gap:4px;
    min-width:max-content;
    margin:0;
}
.red-legacy .red-product-card--compact .red-product-card__cart-form{
    gap:4px;
}
.red-legacy .red-product-card--compact .red-product-qty{
    grid-template-columns:20px 25px 20px;
    height:27px;
}
.red-legacy .red-product-card--compact .red-product-qty button,
.red-legacy .red-product-card--compact .red-product-qty input{
    height:25px;
    line-height:25px;
    font-size:10px;
}
.red-legacy .red-product-card--compact .red-product-qty button{
    font-size:14px;
}
.red-legacy .red-product-card--compact .red-product-action{
    min-width:27px;
    height:27px;
    padding-inline:6px;
}
.red-legacy .red-product-card--compact .red-product-action__text{
    display:none;
}

/* Tienda/Marketplace: corazón arriba para no competir con precios largos. */
.red-legacy:not(.red-mall-child) .red-product-card--compact .red-product-card__wishlist{
    top:7px;
    right:7px;
    width:27px;
    height:27px;
}

/* Mall child: conserva el corazón al final, como en la vista ya aprobada. */
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__wishlist--inline{
    position:static;
    width:27px;
    height:27px;
}
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__summary{
    -webkit-line-clamp:4;
}

/* Si el espacio baja, primero se apilan metadatos/acciones; nunca truncamos precio. */
@media(max-width:1280px){
    .red-legacy .red-product-card--compact .red-product-card__commerce--compact-split{
        grid-template-columns:1fr;
        align-items:start;
        gap:5px;
    }
    .red-legacy .red-product-card--compact .red-product-card__actions{
        width:100%;
        justify-content:flex-end;
    }
}
@media(max-width:780px){
    .red-legacy .red-product-card--compact{
        grid-template-columns:100px minmax(0,1fr);
    }
    .red-legacy .red-product-card--compact .red-product-card__summary{
        -webkit-line-clamp:3;
    }
}
@media(max-width:480px){
    .red-legacy .red-product-card--compact{
        grid-template-columns:92px minmax(0,1fr);
        min-height:180px;
    }
    .red-legacy .red-product-card--compact .red-product-card__body{
        padding-right:9px;
    }
    .red-legacy .red-product-card--compact .red-product-card__body h3{
        font-size:13px;
    }
    .red-legacy .red-product-card--compact .red-product-card__price{
        font-size:15px;
    }
}

/* --- Breadcrumb de categorías: HTML estático, sin costo de JS/query ------- */
.red-catalog-breadcrumb{
    margin:0 0 10px;
    color:#667085;
    font-size:11px;
    line-height:1.35;
}
.red-catalog-breadcrumb ol{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:4px;
    margin:0;
    padding:0;
    list-style:none;
}
.red-catalog-breadcrumb li{
    display:inline-flex;
    align-items:center;
    min-width:0;
}
.red-catalog-breadcrumb li:not(:last-child)::after{
    content:'›';
    margin-left:4px;
    color:#b0b7c3;
}
.red-catalog-breadcrumb a{
    color:#667085;
    text-decoration:none;
}
.red-catalog-breadcrumb a:hover,
.red-catalog-breadcrumb a:focus-visible{
    color:var(--red-color-primary,#e50914);
    text-decoration:underline;
    text-underline-offset:2px;
}
.red-catalog-breadcrumb li[aria-current="page"] span{
    color:#344054;
    font-weight:700;
}
@media(max-width:640px){
    .red-catalog-breadcrumb{
        margin-bottom:8px;
        font-size:10px;
    }
}
/* ========================================================================== */
/* Fase 4.3.2 — micro polish cards: favorito + leyendas + consulta WhatsApp   */
/* ========================================================================== */

/*
 * COMPACTA:
 * media deja de ser el contexto posicionado para que descuento y favorito
 * queden anclados a la tarjeta completa (.red-product-card--compact).
 * Descuento: extremo superior izquierdo.
 * Favorito: extremo superior derecho.
 */
.red-legacy .red-product-card--compact .red-product-card__media{
    position:static;
}
.red-legacy .red-product-card--compact .red-product-card__discount{
    top:7px;
    left:7px;
    right:auto;
}
.red-legacy .red-product-card--compact .red-product-card__wishlist,
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__wishlist{
    position:absolute;
    top:7px;
    right:7px;
    left:auto;
    width:27px;
    height:27px;
    z-index:6;
}
/* Reservamos solo la primera zona de texto para que el corazón no tape el título. */
.red-legacy .red-product-card--compact .red-product-card__body h3{
    padding-right:32px;
}

/*
 * CAROUSEL / GRID / MÓDULOS DINÁMICOS:
 * Consulta stock adopta el mismo tratamiento verde/white de la compacta.
 * El fallback sin WhatsApp continúa neutro.
 */
.red-legacy .red-product-card:not(.red-product-card--compact) .red-product-card__consult{
    margin-top:4px;
    padding:3px 6px;
    border:1px solid #087a27;
    border-radius:5px;
    background:#087a27;
    color:#fff!important;
    font-size:9px;
    font-weight:750;
    line-height:1.05;
}
.red-legacy .red-product-card:not(.red-product-card--compact) .red-product-card__consult:hover,
.red-legacy .red-product-card:not(.red-product-card--compact) .red-product-card__consult:focus-visible{
    border-color:#06651f;
    background:#06651f;
    color:#fff!important;
}
.red-legacy .red-product-card:not(.red-product-card--compact) .red-product-card__consult .fa,
.red-legacy .red-product-card:not(.red-product-card--compact) .red-product-card__consult .fa-whatsapp{
    color:#fff!important;
    font-size:9px;
}
.red-legacy .red-product-card:not(.red-product-card--compact) .red-product-card__consult--fallback{
    border-color:#555;
    background:#555;
}

/* Leyendas más discretas: IVA / stock / modo cotización. */
.red-legacy .red-product-card:not(.red-product-card--compact) .red-product-card__tax,
.red-legacy .red-product-card:not(.red-product-card--compact) .red-product-card__stock{
    gap:3px;
    margin-top:2px;
    font-size:9px;
    line-height:1.08;
}
.red-legacy .red-product-card:not(.red-product-card--compact) .red-product-card__tax .fa,
.red-legacy .red-product-card:not(.red-product-card--compact) .red-product-card__stock .fa{
    font-size:7px;
}
.red-legacy .red-product-card:not(.red-product-card--compact) .red-product-card__quote-description{
    gap:4px;
    font-size:9px;
    line-height:1.08;
}
.red-legacy .red-product-card:not(.red-product-card--compact) .red-product-card__quote-description .fa{
    font-size:9px;
}

/* En la compacta, "Producto para cotizar" también debe comportarse como leyenda. */
.red-legacy .red-product-card--compact .red-product-card__quote-description{
    gap:3px;
    margin:0;
    font-size:8px;
    line-height:1.08;
}
.red-legacy .red-product-card--compact .red-product-card__quote-description .fa{
    font-size:8px;
}

/* Precios largos: no deben invadir los controles de la franja inferior. */
.red-legacy .red-product-card--compact .red-product-card__pricing{
    min-width:0;
}
.red-legacy .red-product-card--compact .red-product-card__price{
    max-width:100%;
    font-variant-numeric:tabular-nums;
}
@media(max-width:1180px){
    .red-legacy .red-product-card--compact .red-product-card__price{
        font-size:clamp(13px,1.35vw,17px);
    }
}

/* ========================================================================== */
/* FASE 4.4 — MINI CART / CART DRAWER                                        */
/* ========================================================================== */

.red-cart-drawer-overlay{
    position:fixed;
    inset:0;
    z-index:1180;
    background:rgba(15,23,42,.48);
    -webkit-backdrop-filter:blur(2px);
    backdrop-filter:blur(2px);
}
.red-cart-drawer-overlay[hidden]{
    display:none!important;
}

.red-cart-drawer{
    position:fixed;
    z-index:1190;
    top:0;
    right:0;
    bottom:0;
    width:min(94vw,430px);
    background:#fff;
    color:#101828;
    box-shadow:-20px 0 60px rgba(15,23,42,.18);
    display:grid;
    grid-template-rows:auto minmax(0,1fr) auto;
    transform:translateX(105%);
    visibility:hidden;
    transition:transform .22s ease,visibility .22s step-end;
}
.red-cart-drawer.is-open{
    transform:translateX(0);
    visibility:visible;
    transition:transform .22s ease,visibility 0s;
}
.red-cart-drawer.is-busy::after{
    content:"";
    position:absolute;
    inset:0;
    z-index:5;
    background:rgba(255,255,255,.22);
    pointer-events:none;
}

.red-cart-drawer__header{
    min-height:82px;
    padding:16px 18px;
    border-bottom:1px solid #eaecf0;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    background:#fff;
}
.red-cart-drawer__header>div{
    min-width:0;
}
.red-cart-drawer__eyebrow{
    display:block;
    margin-bottom:2px;
    color:var(--red-color-primary,#b00000);
    font-size:9px;
    line-height:1.1;
    font-weight:800;
    letter-spacing:.07em;
    text-transform:uppercase;
}
.red-cart-drawer__header strong{
    display:block;
    color:#101828;
    font-size:20px;
    line-height:1.15;
}
.red-cart-drawer__header small{
    display:block;
    margin-top:3px;
    color:#667085;
    font-size:11px;
}
.red-cart-drawer__close{
    flex:0 0 38px;
    width:38px;
    height:38px;
    padding:0;
    border:1px solid #e4e7ec;
    border-radius:50%;
    background:#fff;
    color:#344054;
    display:grid;
    place-items:center;
    cursor:pointer;
}
.red-cart-drawer__close:hover,
.red-cart-drawer__close:focus-visible{
    border-color:#cdd3dc;
    background:#f8fafc;
}

.red-cart-drawer__body{
    min-height:0;
    padding:0 16px 22px;
    overflow:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
}
.red-cart-drawer__loading,
.red-cart-drawer__empty{
    min-height:300px;
    padding:44px 24px;
    color:#667085;
    text-align:center;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:8px;
}
.red-cart-drawer__loading .fa,
.red-cart-drawer__empty>.fa{
    color:var(--red-color-primary,#b00000);
    font-size:28px;
}
.red-cart-drawer__empty strong{
    margin-top:4px;
    color:#101828;
    font-size:15px;
}
.red-cart-drawer__empty p{
    max-width:300px;
    margin:0;
    font-size:12px;
    line-height:1.45;
}
.red-cart-drawer__empty--error>.fa{
    color:#b42318;
}
.red-cart-drawer__retry{
    margin-top:8px;
    min-height:34px;
    padding:7px 12px;
    border:1px solid #d0d5dd;
    border-radius:9px;
    background:#fff;
    color:#344054;
    font:inherit;
    font-size:11px;
    font-weight:700;
    cursor:pointer;
}

/* Producto del mini-cart */
.red-cart-drawer__item{
    position:relative;
    min-width:0;
    padding:14px 0;
    border-bottom:1px solid #eef0f3;
    display:grid;
    grid-template-columns:72px minmax(0,1fr);
    gap:11px;
}
.red-cart-drawer__item:last-child{
    border-bottom:0;
}
.red-cart-drawer__item-media{
    width:72px;
    height:72px;
    padding:4px;
    border:1px solid #eef0f3;
    border-radius:11px;
    background:#fff;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
}
.red-cart-drawer__item-media img{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
}
.red-cart-drawer__item-content{
    min-width:0;
}
.red-cart-drawer__item-name{
    display:-webkit-box;
    overflow:hidden;
    color:#101828;
    font-size:12px;
    line-height:1.28;
    font-weight:750;
    text-decoration:none;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
}
.red-cart-drawer__item-name:hover{
    color:var(--red-color-primary,#b00000);
}
.red-cart-drawer__item-meta{
    min-width:0;
    margin-top:5px;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:4px 7px;
}
.red-cart-drawer__item-price{
    color:#101828;
    font-size:14px;
    line-height:1.1;
    font-weight:850;
    font-variant-numeric:tabular-nums;
}
.red-cart-drawer__item-price.is-quote{
    color:#475467;
    font-size:10px;
}
.red-cart-drawer__item-mode{
    padding:2px 5px;
    border-radius:999px;
    background:#fff4e5;
    color:#934000;
    font-size:8px;
    line-height:1.15;
    font-weight:700;
}
.red-cart-drawer__unavailable{
    display:block;
    margin-top:4px;
    color:#b42318;
    font-size:9px;
}
.red-cart-drawer__item-controls{
    margin-top:9px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
}
.red-cart-drawer__qty{
    height:30px;
    border:1px solid #dfe3e8;
    border-radius:999px;
    background:#fff;
    display:inline-grid;
    grid-template-columns:28px 32px 28px;
    align-items:center;
    overflow:hidden;
}
.red-cart-drawer__qty button{
    height:100%;
    padding:0;
    border:0;
    background:transparent;
    color:#101828;
    font:inherit;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
}
.red-cart-drawer__qty button:hover:not(:disabled){
    background:#f2f4f7;
}
.red-cart-drawer__qty button:disabled,
.red-cart-drawer__qty input:disabled{
    opacity:.45;
    cursor:not-allowed;
}
.red-cart-drawer__qty input{
    width:32px;
    height:100%;
    padding:0;
    border:0;
    outline:0;
    background:transparent;
    color:#101828;
    font:inherit;
    font-size:11px;
    font-weight:750;
    text-align:center;
    appearance:textfield;
    -moz-appearance:textfield;
}
.red-cart-drawer__qty input::-webkit-outer-spin-button,
.red-cart-drawer__qty input::-webkit-inner-spin-button{
    margin:0;
    -webkit-appearance:none;
}
.red-cart-drawer__remove{
    width:30px;
    height:30px;
    padding:0;
    border:1px solid #f1d4d2;
    border-radius:9px;
    background:#fff;
    color:#b42318;
    display:grid;
    place-items:center;
    cursor:pointer;
}
.red-cart-drawer__remove:hover{
    background:#fff5f4;
}

/* Agrupación por comercio en Mall root */
.red-cart-drawer__group{
    margin-top:14px;
    border:1px solid #e4e7ec;
    border-radius:13px;
    background:#fff;
    overflow:hidden;
}
.red-cart-drawer__group-head{
    min-height:52px;
    padding:10px 12px;
    border-bottom:1px solid #eef0f3;
    background:#f9fafb;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.red-cart-drawer__group-identity{
    min-width:0;
}
.red-cart-drawer__group-identity>a{
    display:block;
    overflow:hidden;
    color:#101828;
    font-size:12px;
    line-height:1.2;
    font-weight:800;
    text-overflow:ellipsis;
    white-space:nowrap;
    text-decoration:none;
}
.red-cart-drawer__group-identity small{
    display:block;
    margin-top:3px;
    color:#667085;
    font-size:9px;
}
.red-cart-drawer__group-head>.fa{
    color:#98a2b3;
}
.red-cart-drawer__group-items{
    padding:0 12px;
}
.red-cart-drawer__group-action{
    min-height:38px;
    padding:8px 12px;
    border-top:1px solid #eef0f3;
    color:var(--red-color-primary,#b00000);
    font-size:10px;
    font-weight:800;
    text-decoration:none;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:6px;
}
.red-cart-drawer__group-action:hover{
    background:#fff8f7;
}

/* Footer */
.red-cart-drawer__footer{
    padding:13px 16px max(16px,env(safe-area-inset-bottom));
    border-top:1px solid #e4e7ec;
    background:#fff;
    box-shadow:0 -8px 28px rgba(15,23,42,.045);
}
.red-cart-drawer__footer[hidden]{
    display:none!important;
}
.red-cart-drawer__total{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:14px;
}
.red-cart-drawer__total span{
    color:#475467;
    font-size:11px;
    font-weight:650;
}
.red-cart-drawer__total strong{
    min-width:0;
    color:#101828;
    font-size:19px;
    line-height:1.1;
    font-weight:900;
    font-variant-numeric:tabular-nums;
    overflow-wrap:anywhere;
    text-align:right;
}
.red-cart-drawer__note{
    display:block;
    min-height:12px;
    margin-top:4px;
    color:#667085;
    font-size:9px;
    line-height:1.35;
}
.red-cart-drawer__footer-actions{
    margin-top:11px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}
.red-cart-drawer__view,
.red-cart-drawer__checkout{
    min-height:40px;
    padding:9px 10px;
    border-radius:9px;
    font-size:11px;
    font-weight:800;
    text-align:center;
    text-decoration:none;
    display:flex;
    align-items:center;
    justify-content:center;
}
.red-cart-drawer__view{
    border:1px solid #d0d5dd;
    background:#fff;
    color:#344054;
}
.red-cart-drawer__checkout{
    border:1px solid var(--red-color-primary,#b00000);
    background:var(--red-color-primary,#b00000);
    color:#fff;
}

@media(max-width:560px){
    .red-cart-drawer{
        width:100vw;
        max-width:none;
    }
    .red-cart-drawer__header{
        min-height:72px;
        padding:13px 14px;
    }
    .red-cart-drawer__body{
        padding-inline:13px;
    }
    .red-cart-drawer__group{
        margin-top:11px;
    }
    .red-cart-drawer__item{
        grid-template-columns:64px minmax(0,1fr);
        gap:9px;
        padding:12px 0;
    }
    .red-cart-drawer__item-media{
        width:64px;
        height:64px;
    }
    .red-cart-drawer__footer{
        padding-inline:14px;
    }
}
/* ========================================================================== */
/* Fase 4.5 — ViewCart                                                        */
/* ========================================================================== */

.red-legacy .red-viewcart{
    width:100%;
    max-width:100%;
}
.red-legacy .red-viewcart.is-busy{
    pointer-events:none;
}
.red-legacy .red-viewcart.is-busy::after{
    content:"";
    position:fixed;
    z-index:120;
    inset:0;
    background:rgba(255,255,255,.28);
    cursor:progress;
}
.red-legacy .red-viewcart__breadcrumb{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
    margin:0 0 14px;
    color:#7b8494;
    font-size:11px;
}
.red-legacy .red-viewcart__breadcrumb a{
    color:inherit;
    text-decoration:none;
}
.red-legacy .red-viewcart__breadcrumb a:hover{
    color:var(--red-color-primary,#b00000);
}
.red-legacy .red-viewcart__header{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:20px;
    margin:0 0 20px;
}
.red-legacy .red-viewcart__eyebrow,
.red-legacy .red-viewcart-summary__eyebrow{
    display:block;
    margin-bottom:3px;
    color:var(--red-color-primary,#b00000);
    font-size:9px;
    font-weight:850;
    letter-spacing:.07em;
    text-transform:uppercase;
}
.red-legacy .red-viewcart__header h1{
    margin:0;
    color:#101828;
    font-size:clamp(24px,3vw,34px);
    line-height:1.08;
}
.red-legacy .red-viewcart__header p{
    margin:6px 0 0;
    color:#667085;
    font-size:12px;
}
.red-legacy .red-viewcart__count{
    flex:0 0 auto;
    padding:7px 11px;
    border:1px solid #e6e9ee;
    border-radius:999px;
    background:#fff;
    color:#667085;
    font-size:10px;
}
.red-legacy .red-viewcart__count strong{
    color:#101828;
}
.red-legacy .red-viewcart__alert{
    display:flex;
    align-items:flex-start;
    gap:9px;
    margin:0 0 14px;
    padding:11px 13px;
    border:1px solid #f3c8c8;
    border-radius:11px;
    background:#fff7f7;
    color:#9f1d1d;
    font-size:11px;
}
.red-legacy .red-viewcart__layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(285px,340px);
    gap:20px;
    align-items:start;
}
.red-legacy .red-viewcart__content{
    min-width:0;
}
.red-legacy .red-viewcart-store{
    overflow:hidden;
    margin-bottom:16px;
    border:1px solid #e5e9ef;
    border-radius:14px;
    background:#fff;
    box-shadow:0 7px 24px rgba(16,24,40,.035);
}
.red-legacy .red-viewcart-store__header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:13px 15px;
    border-bottom:1px solid #edf0f3;
    background:#fbfcfd;
}
.red-legacy .red-viewcart-store__label{
    display:block;
    margin-bottom:2px;
    color:var(--red-color-primary,#b00000);
    font-size:8px;
    font-weight:850;
    letter-spacing:.07em;
    text-transform:uppercase;
}
.red-legacy .red-viewcart-store__identity h2{
    margin:0;
    font-size:14px;
    line-height:1.2;
}
.red-legacy .red-viewcart-store__identity h2 a{
    color:#101828;
    text-decoration:none;
}
.red-legacy .red-viewcart-store__identity small{
    display:block;
    margin-top:3px;
    color:#7b8494;
    font-size:9px;
}
.red-legacy .red-viewcart-store__subtotal{
    flex:0 0 auto;
    text-align:right;
}
.red-legacy .red-viewcart-store__subtotal span{
    display:block;
    color:#7b8494;
    font-size:8px;
}
.red-legacy .red-viewcart-store__subtotal strong{
    color:#101828;
    font-size:14px;
}
.red-legacy .red-viewcart-store__items{
    display:grid;
}
.red-legacy .red-viewcart-item{
    position:relative;
    display:grid;
    grid-template-columns:92px minmax(170px,1fr) minmax(100px,130px) 122px minmax(105px,135px) 34px;
    gap:13px;
    align-items:center;
    min-width:0;
    padding:13px 14px;
    border-bottom:1px solid #edf0f3;
}
.red-legacy .red-viewcart-item:last-child{
    border-bottom:0;
}
.red-legacy .red-viewcart-item.is-unavailable{
    background:#fff8f8;
}
.red-legacy .red-viewcart-item__image{
    display:flex;
    align-items:center;
    justify-content:center;
    width:92px;
    height:92px;
    overflow:hidden;
    border:1px solid #edf0f3;
    border-radius:10px;
    background:#fff;
}
.red-legacy .red-viewcart-item__image img{
    width:100%;
    height:100%;
    object-fit:contain;
}
.red-legacy .red-viewcart-item__main{
    min-width:0;
}
.red-legacy .red-viewcart-item__code{
    display:block;
    margin-bottom:3px;
    color:#98a2b3;
    font-size:8px;
    font-style:italic;
}
.red-legacy .red-viewcart-item__main h3{
    margin:0;
    font-size:12px;
    font-weight:750;
    line-height:1.28;
}
.red-legacy .red-viewcart-item__main h3 a{
    color:#101828;
    text-decoration:none;
}
.red-legacy .red-viewcart-item__main h3 a:hover{
    color:var(--red-color-primary,#b00000);
}
.red-legacy .red-viewcart-item__badges{
    display:flex;
    flex-wrap:wrap;
    gap:4px 7px;
    margin-top:7px;
}
.red-legacy .red-viewcart-item__badge{
    display:inline-flex;
    align-items:center;
    gap:3px;
    color:#667085;
    font-size:8px;
    line-height:1.1;
}
.red-legacy .red-viewcart-item__badge.is-tax{
    color:#13a538;
    font-style:italic;
}
.red-legacy .red-viewcart-item__badge.is-stock .fa{
    color:#17324d;
    font-size:6px;
}
.red-legacy .red-viewcart-item__badge.is-stock.is-unavailable{
    color:#b42318;
}
.red-legacy .red-viewcart-item__badge.is-stock.is-unavailable .fa{
    color:#b42318;
}
.red-legacy .red-viewcart-item__badge.is-quote{
    color:#8a4b00;
}
.red-legacy .red-viewcart-item__unit,
.red-legacy .red-viewcart-item__total,
.red-legacy .red-viewcart-item__quantity{
    min-width:0;
}
.red-legacy .red-viewcart-item__unit>span,
.red-legacy .red-viewcart-item__total>span,
.red-legacy .red-viewcart-item__quantity>span{
    display:block;
    margin-bottom:4px;
    color:#98a2b3;
    font-size:8px;
}
.red-legacy .red-viewcart-item__unit strong,
.red-legacy .red-viewcart-item__total strong{
    display:block;
    max-width:100%;
    color:#101828;
    font-size:12px;
    line-height:1.1;
    font-variant-numeric:tabular-nums;
    overflow-wrap:anywhere;
}
.red-legacy .red-viewcart-item__total strong{
    font-size:14px;
}
.red-legacy .red-viewcart-item__unit small{
    display:block;
    margin-top:4px;
    color:#667085;
    font-size:8px;
}
.red-legacy .red-viewcart-item__quantity form{
    margin:0;
}
.red-legacy .red-viewcart-qty{
    display:inline-grid;
    grid-template-columns:28px 40px 28px;
    align-items:center;
    height:31px;
    overflow:hidden;
    border:1px solid #dde3ea;
    border-radius:999px;
    background:#fff;
}
.red-legacy .red-viewcart-qty button{
    width:28px;
    height:29px;
    padding:0;
    border:0;
    background:transparent;
    color:#101828;
    font-size:15px;
    line-height:1;
    cursor:pointer;
}
.red-legacy .red-viewcart-qty button:hover{
    background:#f3f5f7;
}
.red-legacy .red-viewcart-qty input{
    width:40px;
    height:29px;
    padding:0;
    border:0;
    outline:0;
    background:transparent;
    color:#101828;
    text-align:center;
    font-size:10px;
    font-weight:750;
    appearance:textfield;
    -moz-appearance:textfield;
}
.red-legacy .red-viewcart-qty input::-webkit-outer-spin-button,
.red-legacy .red-viewcart-qty input::-webkit-inner-spin-button{
    margin:0;
    -webkit-appearance:none;
}
.red-legacy .red-viewcart-item__remove-form{
    margin:0;
}
.red-legacy .red-viewcart-item__remove{
    display:grid;
    place-items:center;
    width:31px;
    height:31px;
    padding:0;
    border:1px solid #f2d1d1;
    border-radius:9px;
    background:#fff;
    color:#d92d20;
    cursor:pointer;
}
.red-legacy .red-viewcart-item__remove:hover{
    background:#fff3f2;
}
.red-legacy .red-viewcart-item__mobile-price{
    display:none;
}
.red-legacy .red-viewcart-store__footer{
    padding:9px 13px;
    border-top:1px solid #edf0f3;
    background:#fbfcfd;
    text-align:right;
}
.red-legacy .red-viewcart-store__footer a{
    display:inline-flex;
    align-items:center;
    gap:7px;
    color:#101828;
    font-size:9px;
    font-weight:750;
    text-decoration:none;
}
.red-legacy .red-viewcart-store__footer a:hover{
    color:var(--red-color-primary,#b00000);
}
.red-legacy .red-viewcart-summary{
    position:sticky;
    top:calc(var(--red-sticky-header-offset,94px) + 16px);
}
.red-legacy .red-viewcart-summary__card{
    padding:18px;
    border:1px solid #e5e9ef;
    border-radius:14px;
    background:#fff;
    box-shadow:0 8px 30px rgba(16,24,40,.055);
}
.red-legacy .red-viewcart-summary__card h2{
    margin:0 0 17px;
    color:#101828;
    font-size:17px;
}
.red-legacy .red-viewcart-summary__totals{
    margin:0;
}
.red-legacy .red-viewcart-summary__totals>div{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:7px 0;
    color:#667085;
    font-size:10px;
}
.red-legacy .red-viewcart-summary__totals dt,
.red-legacy .red-viewcart-summary__totals dd{
    margin:0;
}
.red-legacy .red-viewcart-summary__totals dd{
    color:#344054;
    font-weight:700;
    text-align:right;
}
.red-legacy .red-viewcart-summary__totals dd.is-pending{
    color:#98a2b3;
    font-size:9px;
    font-weight:600;
}
.red-legacy .red-viewcart-summary__grand-total{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:14px;
    margin-top:10px;
    padding-top:13px;
    border-top:1px solid #e7eaee;
}
.red-legacy .red-viewcart-summary__grand-total span{
    color:#101828;
    font-size:11px;
    font-weight:750;
}
.red-legacy .red-viewcart-summary__grand-total strong{
    max-width:62%;
    color:#101828;
    font-size:20px;
    line-height:1;
    text-align:right;
    font-variant-numeric:tabular-nums;
    overflow-wrap:anywhere;
}
.red-legacy .red-viewcart-summary__notice{
    display:flex;
    align-items:flex-start;
    gap:8px;
    margin-top:14px;
    padding:10px;
    border-radius:10px;
    background:#f7f8fa;
    color:#667085;
    font-size:9px;
    line-height:1.4;
}
.red-legacy .red-viewcart-summary__notice p{
    margin:0;
}
.red-legacy .red-viewcart-summary__notice--quote{
    background:#fff7e8;
    color:#8a4b00;
}
.red-legacy .red-viewcart__primary-button,
.red-legacy .red-viewcart__secondary-button{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    width:100%;
    min-height:42px;
    margin-top:14px;
    padding:9px 13px;
    border:1px solid var(--red-color-primary,#b00000);
    border-radius:9px;
    background:var(--red-color-primary,#b00000);
    color:#fff;
    font-size:10px;
    font-weight:800;
    text-decoration:none;
}
.red-legacy .red-viewcart__primary-button:hover{
    filter:brightness(.93);
    color:#fff;
}
.red-legacy .red-viewcart__secondary-button{
    border-color:#d9dee5;
    background:#fff;
    color:#101828;
}
.red-legacy .red-viewcart__secondary-button:hover{
    border-color:#b6bec9;
    color:#101828;
}
.red-legacy .red-viewcart-summary__login-note{
    display:block;
    margin-top:8px;
    color:#98a2b3;
    font-size:8px;
    line-height:1.35;
    text-align:center;
}
.red-legacy .red-viewcart__below-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-top:4px;
    padding:3px 2px;
}
.red-legacy .red-viewcart__below-actions form{
    margin:0;
}
.red-legacy .red-viewcart__continue-shopping,
.red-legacy .red-viewcart__clear{
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:6px 0;
    border:0;
    background:transparent;
    color:#667085;
    font:inherit;
    font-size:9px;
    font-weight:700;
    text-decoration:none;
    cursor:pointer;
}
.red-legacy .red-viewcart__continue-shopping:hover{
    color:#101828;
}
.red-legacy .red-viewcart__clear{
    color:#b42318;
}
.red-legacy .red-viewcart__empty{
    display:grid;
    justify-items:center;
    max-width:600px;
    margin:35px auto;
    padding:45px 24px;
    border:1px solid #e7eaee;
    border-radius:16px;
    background:#fff;
    text-align:center;
}
.red-legacy .red-viewcart__empty-icon{
    display:grid;
    place-items:center;
    width:58px;
    height:58px;
    margin-bottom:13px;
    border-radius:50%;
    background:#f4f5f7;
    color:#667085;
    font-size:22px;
}
.red-legacy .red-viewcart__empty h2{
    margin:0;
    color:#101828;
    font-size:18px;
}
.red-legacy .red-viewcart__empty p{
    max-width:450px;
    margin:8px 0 0;
    color:#667085;
    font-size:11px;
}
.red-legacy .red-viewcart__empty .red-viewcart__primary-button{
    width:auto;
    min-width:180px;
}

/* Desktop reducido: ocultamos precio unitario antes de apretar la tarjeta. */
@media(max-width:1180px){
    .red-legacy .red-viewcart__layout{
        grid-template-columns:minmax(0,1fr) 285px;
        gap:14px;
    }
    .red-legacy .red-viewcart-item{
        grid-template-columns:82px minmax(150px,1fr) 116px minmax(100px,130px) 32px;
        gap:10px;
    }
    .red-legacy .red-viewcart-item__image{
        width:82px;
        height:82px;
    }
    .red-legacy .red-viewcart-item__unit{
        display:none;
    }
}

/* Tablet */
@media(max-width:900px){
    .red-legacy .red-viewcart__layout{
        grid-template-columns:1fr;
    }
    .red-legacy .red-viewcart-summary{
        position:static;
    }
    .red-legacy .red-viewcart-item{
        grid-template-columns:78px minmax(0,1fr) 110px 32px;
    }
    .red-legacy .red-viewcart-item__image{
        width:78px;
        height:78px;
    }
    .red-legacy .red-viewcart-item__total{
        display:none;
    }
    .red-legacy .red-viewcart-item__mobile-price{
        display:block;
        margin-top:7px;
    }
    .red-legacy .red-viewcart-item__mobile-price strong{
        color:#101828;
        font-size:13px;
        font-variant-numeric:tabular-nums;
    }
}

/* Mobile */
@media(max-width:620px){
    .red-legacy .red-viewcart__breadcrumb{
        margin-bottom:10px;
    }
    .red-legacy .red-viewcart__header{
        align-items:flex-start;
        margin-bottom:14px;
    }
    .red-legacy .red-viewcart__header p{
        font-size:10px;
    }
    .red-legacy .red-viewcart__count{
        display:none;
    }
    .red-legacy .red-viewcart-store{
        margin-inline:-2px;
        border-radius:11px;
    }
    .red-legacy .red-viewcart-store__header{
        padding:11px;
    }
    .red-legacy .red-viewcart-store__subtotal strong{
        font-size:12px;
    }
    .red-legacy .red-viewcart-item{
        grid-template-columns:70px minmax(0,1fr) 31px;
        gap:10px;
        padding:11px;
    }
    .red-legacy .red-viewcart-item__image{
        width:70px;
        height:70px;
        align-self:start;
    }
    .red-legacy .red-viewcart-item__quantity{
        grid-column:2 / 3;
    }
    .red-legacy .red-viewcart-item__quantity>span{
        display:none;
    }
    .red-legacy .red-viewcart-item__remove-form{
        grid-column:3 / 4;
        grid-row:1 / 3;
        align-self:center;
    }
    .red-legacy .red-viewcart-item__unit,
    .red-legacy .red-viewcart-item__total{
        display:none;
    }
    .red-legacy .red-viewcart-item__main h3{
        font-size:11px;
    }
    .red-legacy .red-viewcart-item__badges{
        gap:3px 6px;
        margin-top:5px;
    }
    .red-legacy .red-viewcart-summary__card{
        padding:15px;
    }
    .red-legacy .red-viewcart__below-actions{
        padding-inline:3px;
    }
}
/* ========================================================================== */
/* Fase 4.5.1 — Cupones + require_impuestos                                  */
/* ========================================================================== */

.red-legacy .red-viewcart__alert--success{
    border-color:#bde8c9;
    background:#f3fff6;
    color:#187a35;
}
.red-legacy .red-viewcart-coupon-pending{
    display:flex;
    align-items:flex-start;
    gap:12px;
    margin:0 0 16px;
    padding:13px 14px;
    border:1px dashed #e4b65e;
    border-radius:12px;
    background:#fffaf0;
}
.red-legacy .red-viewcart-coupon-pending__icon{
    display:grid;
    place-items:center;
    flex:0 0 34px;
    width:34px;
    height:34px;
    border-radius:50%;
    background:#fff0c8;
    color:#9a5d00;
}
.red-legacy .red-viewcart-coupon-pending span{
    display:block;
    color:#9a5d00;
    font-size:8px;
    font-weight:850;
    letter-spacing:.06em;
    text-transform:uppercase;
}
.red-legacy .red-viewcart-coupon-pending strong{
    display:block;
    margin-top:2px;
    color:#101828;
    font-size:12px;
}
.red-legacy .red-viewcart-coupon-pending p{
    margin:4px 0 0;
    color:#667085;
    font-size:9px;
}
.red-legacy .red-viewcart-coupon-pending small{
    display:block;
    margin-top:5px;
    color:#7b8494;
    font-size:8px;
}
.red-legacy .red-viewcart-store__coupon-badge{
    display:inline-flex!important;
    align-items:center;
    gap:4px;
    width:max-content;
    margin-top:6px!important;
    padding:3px 6px;
    border-radius:999px;
    background:#fff2cc;
    color:#8a5700!important;
    font-size:7px!important;
    font-weight:800;
}
.red-legacy .red-viewcart-summary__totals .is-discount dt,
.red-legacy .red-viewcart-summary__totals .is-discount dd{
    color:#15933a;
}
.red-legacy .red-viewcart-summary__totals dd.is-free{
    color:#15933a;
    font-size:9px;
    font-weight:800;
}
.red-legacy .red-viewcart-coupon{
    margin-top:15px;
    padding-top:14px;
    border-top:1px solid #e8ebef;
}
.red-legacy .red-viewcart-coupon__heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:9px;
}
.red-legacy .red-viewcart-coupon__heading span{
    display:block;
    color:#98a2b3;
    font-size:7px;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
}
.red-legacy .red-viewcart-coupon__heading strong{
    display:block;
    margin-top:1px;
    color:#344054;
    font-size:10px;
}
.red-legacy .red-viewcart-coupon__heading>.fa{
    color:var(--red-color-primary,#b00000);
}
.red-legacy .red-viewcart-coupon__form{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:6px;
    margin:0;
}
.red-legacy .red-viewcart-coupon__form input{
    min-width:0;
    height:36px;
    padding:0 10px;
    border:1px solid #dce1e7;
    border-radius:8px;
    outline:0;
    background:#fff;
    color:#101828;
    font:inherit;
    font-size:10px;
    text-transform:uppercase;
}
.red-legacy .red-viewcart-coupon__form input:focus{
    border-color:var(--red-color-primary,#b00000);
    box-shadow:0 0 0 3px color-mix(in srgb,var(--red-color-primary,#b00000) 10%,transparent);
}
.red-legacy .red-viewcart-coupon__form button{
    height:36px;
    padding:0 12px;
    border:0;
    border-radius:8px;
    background:#101828;
    color:#fff;
    font-size:9px;
    font-weight:800;
    cursor:pointer;
}
.red-legacy .red-viewcart-coupon__form button:hover{
    background:#000;
}
.red-legacy .red-viewcart-coupon__message{
    display:flex;
    align-items:flex-start;
    gap:5px;
    margin-bottom:8px;
    padding:7px 8px;
    border-radius:7px;
    background:#fff2f1;
    color:#b42318;
    font-size:8px;
    line-height:1.35;
}
.red-legacy .red-viewcart-coupon__message.is-pending{
    background:#fff8e6;
    color:#8a5700;
}
.red-legacy .red-viewcart-coupon__applied{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
    padding:10px;
    border:1px solid #bfe8cb;
    border-radius:9px;
    background:#f4fff7;
}
.red-legacy .red-viewcart-coupon__applied>div{
    min-width:0;
}
.red-legacy .red-viewcart-coupon__applied span{
    display:block;
    color:#15933a;
    font-size:7px;
    font-weight:850;
    letter-spacing:.05em;
    text-transform:uppercase;
}
.red-legacy .red-viewcart-coupon__applied strong{
    color:#101828;
}
.red-legacy .red-viewcart-coupon__applied>div>strong{
    display:block;
    margin-top:1px;
    font-size:13px;
}
.red-legacy .red-viewcart-coupon__applied small{
    display:block;
    margin-top:2px;
    color:#667085;
    font-size:8px;
}
.red-legacy .red-viewcart-coupon__applied p{
    margin:5px 0 0;
    color:#267a3f;
    font-size:8px;
}
.red-legacy .red-viewcart-coupon__applied form{
    margin:0;
}
.red-legacy .red-viewcart-coupon__applied button{
    padding:4px 7px;
    border:1px solid #cfd5dc;
    border-radius:7px;
    background:#fff;
    color:#667085;
    font-size:8px;
    font-weight:750;
    cursor:pointer;
}
.red-legacy .red-viewcart-coupon__applied button:hover{
    color:#b42318;
    border-color:#edc4c1;
}
/* ========================================================================== */
/* Fase 4.6 — Cobertura / domicilio previo al Checkout                        */
/* ========================================================================== */

.red-legacy .red-viewcart-store__coverage-badge{
    display:inline-flex!important;
    align-items:center;
    gap:4px;
    width:max-content;
    margin-top:5px!important;
    padding:3px 6px;
    border-radius:999px;
    font-size:7px!important;
    font-weight:800;
}
.red-legacy .red-viewcart-store__coverage-badge.is-covered{
    background:#eaf9ee;
    color:#16843a!important;
}
.red-legacy .red-viewcart-store__coverage-badge.is-outside{
    background:#fff0ef;
    color:#b42318!important;
}
.red-legacy .red-viewcart-store__coverage-badge.is-pending{
    background:#fff7e6;
    color:#8a5700!important;
}
.red-legacy .red-viewcart-delivery{
    margin-top:15px;
    padding:11px;
    border:1px solid #e2e7ed;
    border-radius:10px;
    background:#fbfcfd;
}
.red-legacy .red-viewcart-delivery--covered{
    border-color:#bfe6c9;
    background:#f6fff8;
}
.red-legacy .red-viewcart-delivery--outside_coverage{
    border-color:#efc6c3;
    background:#fff7f6;
}
.red-legacy .red-viewcart-delivery--needs_location{
    border-color:#edd8aa;
    background:#fffbf1;
}
.red-legacy .red-viewcart-delivery__head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
}
.red-legacy .red-viewcart-delivery__head span{
    display:block;
    color:#98a2b3;
    font-size:7px;
    font-weight:850;
    letter-spacing:.06em;
    text-transform:uppercase;
}
.red-legacy .red-viewcart-delivery__head strong{
    display:block;
    margin-top:1px;
    color:#101828;
    font-size:10px;
}
.red-legacy .red-viewcart-delivery__head>.fa{
    color:#667085;
}
.red-legacy .red-viewcart-delivery--covered .red-viewcart-delivery__head>.fa{
    color:#15933a;
}
.red-legacy .red-viewcart-delivery--outside_coverage .red-viewcart-delivery__head>.fa{
    color:#b42318;
}
.red-legacy .red-viewcart-delivery--needs_location .red-viewcart-delivery__head>.fa{
    color:#a56600;
}
.red-legacy .red-viewcart-delivery__location{
    display:flex;
    align-items:flex-start;
    gap:5px;
    margin:7px 0 0;
    color:#344054;
    font-size:8px;
    font-weight:700;
    line-height:1.3;
}
.red-legacy .red-viewcart-delivery__message{
    margin:5px 0 0;
    color:#667085;
    font-size:8px;
    line-height:1.4;
}
.red-legacy .red-viewcart-delivery__facts{
    display:flex;
    flex-wrap:wrap;
    gap:5px 8px;
    margin-top:7px;
}
.red-legacy .red-viewcart-delivery__facts span{
    display:inline-flex;
    align-items:center;
    gap:3px;
    color:#52606d;
    font-size:7px;
    font-weight:700;
}
.red-legacy .red-viewcart-delivery__facts .is-free{
    color:#15933a;
}
.red-legacy .red-viewcart-delivery__change{
    display:inline-flex;
    align-items:center;
    gap:5px;
    margin-top:8px;
    padding:6px 8px;
    border:1px solid #d8dee6;
    border-radius:7px;
    background:#fff;
    color:#344054;
    font-size:8px;
    font-weight:800;
    text-decoration:none;
}
.red-legacy .red-viewcart-delivery__change:hover{
    border-color:var(--red-color-primary,#b00000);
    color:var(--red-color-primary,#b00000);
}
.red-legacy .red-viewcart-delivery__pickup-note{
    display:block;
    margin-top:7px;
    padding-top:7px;
    border-top:1px dashed #dfe4ea;
    color:#7b8494;
    font-size:7px;
    line-height:1.35;
}
.red-legacy .red-viewcart__checkout-button.is-disabled{
    border-color:#c9cfd7;
    background:#aeb6c1;
    color:#fff;
    cursor:not-allowed;
    filter:none;
}
.red-legacy .red-viewcart-summary__coverage-note{
    display:block;
    margin-top:7px;
    color:#b42318;
    font-size:8px;
    line-height:1.35;
    text-align:center;
}
/* ========================================================================== */
/* Fase 4.6.1 — Header actions + iconos de categorías                         */
/* ========================================================================== */

.red-legacy .legacy-actions{
    gap:8px;
}

.red-legacy .legacy-actions>a,
.red-legacy .legacy-actions>.legacy-action-button{
    position:relative;
    display:inline-grid;
    place-items:center;
    flex:0 0 38px;
    width:38px;
    height:38px;
    min-width:38px;
    min-height:38px;
    padding:0;
    border:1px solid #e8ebef;
    border-radius:12px;
    background:#f8f9fb;
    color:#344054;
    line-height:1;
    box-shadow:0 1px 2px rgba(16,24,40,.035);
    transition:
        color .16s ease,
        background-color .16s ease,
        border-color .16s ease,
        box-shadow .16s ease,
        transform .16s ease;
}

.red-legacy .legacy-actions>a:hover,
.red-legacy .legacy-actions>a:focus-visible,
.red-legacy .legacy-actions>.legacy-action-button:hover,
.red-legacy .legacy-actions>.legacy-action-button:focus-visible{
    border-color:color-mix(in srgb,var(--red-color-primary,#e50914) 24%,#e8ebef);
    background:color-mix(in srgb,var(--red-color-primary,#e50914) 7%,#fff);
    color:var(--red-color-primary,#e50914);
    box-shadow:0 5px 14px rgba(16,24,40,.08);
    transform:translateY(-1px);
    outline:0;
}

.red-legacy .legacy-actions>a:active,
.red-legacy .legacy-actions>.legacy-action-button:active{
    transform:translateY(0) scale(.97);
}

.red-legacy .legacy-actions>a>i,
.red-legacy .legacy-actions>.legacy-action-button>i{
    display:grid;
    place-items:center;
    width:18px;
    height:18px;
    margin:0;
    font-size:17px;
    line-height:18px;
    text-align:center;
}

.red-legacy .legacy-actions .legacy-cart-action .red-badge{
    top:-5px;
    right:-5px;
    display:grid;
    place-items:center;
    min-width:17px;
    height:17px;
    padding:0 4px;
    border-radius:999px;
    font-size:8px;
    font-weight:850;
    line-height:1;
}

/* Solicitado: centrar los iconos de la lista lateral del Mall. */
.red-legacy .red-mall-category-list i{
    justify-self:center;
    opacity:.55;
}

/* Fallback genérico de categorías en el carrusel superior. */
.red-legacy .red-mall-category-strip__media--fallback{
    font-size:18px;
}

.red-legacy .red-mall-category-strip__media--fallback>i{
    display:grid;
    place-items:center;
    width:24px;
    height:24px;
    margin:0;
    line-height:1;
}

@media (min-width:981px) and (max-width:1280px){
    .red-legacy .legacy-actions{
        gap:7px;
    }

    .red-legacy .legacy-actions>a,
    .red-legacy .legacy-actions>.legacy-action-button{
        flex-basis:36px;
        width:36px;
        height:36px;
        min-width:36px;
        min-height:36px;
        border-radius:11px;
    }
}
/* ========================================================================== */
/* Fase 4.6.2 — SVG UI icons sin dependencia adicional                        */
/* ========================================================================== */

/*
 * Header principal.
 * SVG outline con currentColor: hereda automáticamente color normal/hover
 * y elimina la dependencia de que Font Awesome tenga una variante concreta.
 */
.red-legacy .legacy-actions .red-ui-icon{
    display:block;
    width:18px;
    height:18px;
    margin:0;
    overflow:visible;
    fill:none;
    stroke:currentColor;
    stroke-width:2.8;
    stroke-linecap:round;
    stroke-linejoin:round;
    pointer-events:none;
}

/*
 * Neutraliza el tamaño antiguo pensado para <i>.
 * Los SVG quedan siempre centrados dentro de los botones 38x38.
 */
.red-legacy .legacy-actions>a>.red-ui-icon,
.red-legacy .legacy-actions>.legacy-action-button>.red-ui-icon{
    width:18px;
    height:18px;
}

/*
 * Topbar: PQR y Crear cuenta.
 * Mismo lenguaje outline, un poco más pequeño para no competir con el texto.
 */
.red-legacy .legacy-topbar .red-topbar-icon{
    display:inline-block;
    width:15px;
    height:15px;
    margin:0 7px 0 0;
    overflow:visible;
    fill:none;
    stroke:currentColor;
    stroke-width:2.8;
    stroke-linecap:round;
    stroke-linejoin:round;
    vertical-align:-3px;
    pointer-events:none;
}

/* Evita que la regla legacy de .legacy-topbar i afecte al nuevo SVG. */
.red-legacy .legacy-topbar__account a{
    display:inline-flex;
    align-items:center;
}

/* Un toque más contenido en pantallas medianas. */
@media (min-width:981px) and (max-width:1280px){
    .red-legacy .legacy-actions .red-ui-icon{
        width:17px;
        height:17px;
    }
}


/* Fase 4.9.0 — eventos responsive */
@media (max-width: 900px) {
    .red-events-grid {
        grid-template-columns: 1fr;
        max-width: 680px;
    }
}

@media (max-width: 620px) {
    .red-events-page {
        margin-bottom: 42px;
    }

    .red-events-page__header {
        align-items: flex-start;
        margin-top: 12px;
    }

    .red-events-page__count {
        display: none;
    }

    .legacy-event-card {
        border-radius: 13px;
    }

    .legacy-event-card__body {
        padding: 13px 13px 14px;
    }

    .legacy-event-card__media-action {
        display: none;
    }

    .legacy-event-card__description {
        -webkit-line-clamp: 2;
    }

    .legacy-event-card__footer {
        align-items: center;
    }
}


/* =========================================================
   Fase 4.9.1 — pulido responsive post-reunión (V18)
   - 1 card sólo hasta 359px; desde 360px se priorizan 2.
   - cards y módulos con altura visual uniforme y acciones al pie.
   - identidad del drawer basada en logo, no en nombre repetido.
   - logos del header móvil con mayor presencia.
   ========================================================= */

/* Grid de catálogo: dos columnas en móvil moderno; una sólo en teléfonos
   extremadamente estrechos. El límite de 359px coincide con el carrusel JS. */
@media (min-width:360px) and (max-width:760px){
    .red-legacy .red-product-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:7px;
    }
}
@media (max-width:359px){
    .red-legacy .red-product-grid{
        grid-template-columns:1fr;
    }
}

/* Cards uniformes: imagen arriba, contenido flexible y bloque comercial
   anclado al extremo inferior. No toca la vista lista/compacta. */
.red-legacy .red-product-grid .red-product-card:not(.red-product-card--compact),
.red-legacy .red-module-slide .red-product-card:not(.red-product-card--compact){
    display:flex;
    height:100%;
    flex-direction:column;
}
.red-legacy .red-product-grid .red-product-card:not(.red-product-card--compact) .red-product-card__body,
.red-legacy .red-module-slide .red-product-card:not(.red-product-card--compact) .red-product-card__body{
    display:flex;
    flex:1 1 auto;
    min-height:0;
    flex-direction:column;
}
.red-legacy .red-product-grid .red-product-card:not(.red-product-card--compact) .red-product-card__commerce,
.red-legacy .red-module-slide .red-product-card:not(.red-product-card--compact) .red-product-card__commerce{
    margin-top:auto;
    padding-top:8px;
}
.red-legacy .red-product-grid .red-product-card:not(.red-product-card--compact) h3,
.red-legacy .red-module-slide .red-product-card:not(.red-product-card--compact) h3{
    display:-webkit-box;
    overflow:hidden;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
}

/* Módulos de imágenes con más de una columna: misma caja visual aunque las
   imágenes originales tengan proporciones distintas. Los banners de 1 item
   conservan su proporción editorial original. */
.red-legacy .red-module-carousel:not([data-items="1"]) .red-module-slide--image{
    aspect-ratio:16/9;
    align-items:center;
}
.red-legacy .red-module-carousel:not([data-items="1"]) .red-module-slide--image>a{
    height:100%;
    align-items:center;
}
.red-legacy .red-module-carousel:not([data-items="1"]) .red-module-slide--image img{
    width:100%;
    height:100%;
    max-height:none;
    object-fit:contain;
}

/* Drawer principal: el logo reemplaza visualmente el nombre. El texto queda
   disponible para lectores de pantalla y como fallback si no existe imagen. */
.red-legacy .red-drawer__identity--menu-brand{
    flex:1 1 auto;
    min-height:54px;
    justify-content:flex-start;
}
.red-legacy .red-drawer__identity--menu-brand img{
    width:auto;
    height:auto;
    max-width:190px;
    max-height:54px;
    flex:0 1 auto;
    border-radius:0;
    background:transparent;
}
@media (max-width:520px){
    .red-legacy .legacy-drawer[data-red-drawer="menu"] .red-drawer__header{
        padding-block:12px;
    }
    .red-legacy .red-drawer__identity--menu-brand img{
        max-width:164px;
        max-height:58px;
    }
}

/* Header móvil: mayor jerarquía del logo de la empresa. En subcomercio Mall
   el logo del comercio gana un poco más de peso sin ocultar la marca del Mall. */
@media (max-width:980px){
    .red-legacy:not(.red-mall-child) .legacy-brand img{
        max-width:128px;
        max-height:64px;
    }
    .red-legacy.red-mall-child .legacy-brand-group{
        max-width:216px;
        gap:8px;
    }
    .red-legacy.red-mall-child .legacy-brand-group .legacy-brand--main img{
        max-width:80px;
        max-height:50px;
    }
    .red-legacy.red-mall-child .legacy-brand-group .legacy-brand--child img{
        max-width:92px;
        max-height:56px;
    }
}

/* En dos columnas móviles comprimimos sólo lo necesario; las acciones siguen
   alineadas abajo y el botón WhatsApp no compite con la leyenda de stock. */
@media (min-width:360px) and (max-width:520px){
    .red-legacy .red-product-grid .red-product-card:not(.red-product-card--compact) .red-product-card__image{
        padding:7px;
    }
    .red-legacy .red-product-grid .red-product-card:not(.red-product-card--compact) .red-product-card__body{
        padding:9px 8px 10px;
    }
    .red-legacy .red-product-grid .red-product-card:not(.red-product-card--compact) h3{
        min-height:48px;
        margin-bottom:7px;
        font-size:12px;
        line-height:1.3;
    }
    .red-legacy .red-product-grid .red-product-card:not(.red-product-card--compact) .red-product-card__price{
        font-size:15px;
    }
}


/* =========================================================
   Fase 4.9.2 — cierre responsive/layout post-reunión (V18)
   ========================================================= */

/* Desktop: Categorías deja de duplicar el árbol como dropdown. El icono abre
   directamente el drawer completo, que ya es la fuente única de navegación. */
@media (min-width:981px){
    .red-legacy .legacy-navigation__item--drawer-only{
        display:flex;
        align-items:stretch;
    }
    .red-legacy .legacy-navigation__category-drawer-trigger{
        position:relative;
        display:inline-grid;
        width:54px;
        height:60px;
        place-items:center;
        padding:0;
        border:0;
        background:transparent;
        color:var(--red-color-menu-text,#111);
        cursor:pointer;
        font:inherit;
        font-size:18px;
    }
    .red-legacy .legacy-navigation__category-drawer-trigger::after{
        content:"";
        position:absolute;
        left:10px;
        right:10px;
        bottom:0;
        height:3px;
        border-radius:999px;
        background:var(--red-color-primary,#e50914);
        transform:scaleX(0);
        transform-origin:center;
        transition:transform .2s ease;
    }
    .red-legacy .legacy-navigation__category-drawer-trigger:hover,
    .red-legacy .legacy-navigation__category-drawer-trigger:focus-visible,
    .red-legacy .legacy-navigation__item--drawer-only.is-current .legacy-navigation__category-drawer-trigger{
        color:var(--red-color-primary,#e50914);
        outline:0;
    }
    .red-legacy .legacy-navigation__category-drawer-trigger:hover::after,
    .red-legacy .legacy-navigation__category-drawer-trigger:focus-visible::after,
    .red-legacy .legacy-navigation__item--drawer-only.is-current .legacy-navigation__category-drawer-trigger::after{
        transform:scaleX(1);
    }
}

/* 360px ya es una vista de dos columnas cuando el módulo fue configurado con
   2+ items. JS confirma el número real; esta regla evita el salto visual inicial. */
@media (min-width:360px) and (max-width:679px){
    .red-legacy .red-module-carousel:not([data-items="1"]) .red-module-carousel__track{
        --red-carousel-visible:2;
        --red-carousel-gap:8px;
    }
}

/* V18.3 — identidad de usuario visible en storefront autenticado. */
.red-legacy .legacy-account-link{
    min-width:0;
    max-width:min(330px,50vw);
    gap:5px;
}
.red-legacy .legacy-account-link .legacy-account-avatar{
    margin:0;
}
.red-legacy .legacy-account-link .legacy-account-greeting{
    display:block;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.red-legacy .red-drawer__account-greeting{
    display:inline-flex;
    min-width:0;
    max-width:150px;
    align-items:center;
    gap:7px;
    padding:7px 9px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:10px;
    color:inherit;
    text-decoration:none;
    font-size:11px;
    font-weight:750;
    line-height:1.2;
}
.red-legacy .red-drawer__account-greeting i{
    flex:0 0 auto;
    font-size:14px;
}
.red-legacy .red-drawer__account-greeting span{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.red-legacy .red-drawer__account-greeting:hover,
.red-legacy .red-drawer__account-greeting:focus-visible{
    background:rgba(255,255,255,.09);
}
@media (max-width:760px){
    /* La regla legacy ocultaba todos los textos del bloque de cuenta. Si el
       topbar está visible en una variante/tema, conservar el saludo junto al icono. */
    .red-legacy .legacy-topbar__account .legacy-account-link .legacy-account-greeting{
        display:block!important;
        max-width:148px;
        font-size:11px;
        text-transform:none;
    }
    .red-legacy .legacy-topbar__account .legacy-account-link{
        gap:5px;
    }
}
@media (max-width:520px){
    .red-legacy .red-drawer__identity--menu-brand{
        min-width:0;
    }
    .red-legacy .red-drawer__identity--menu-brand img{
        max-width:132px;
    }
    .red-legacy .red-drawer__account-greeting{
        max-width:168px;
        padding-inline:7px;
        font-size:10px;
    }
}

/* V20.3 — avatar optimizado del cliente en identidad superior/drawer.
   No se duplica en la navegación inferior móvil: una sola imagen WEBP de 300x300
   queda cacheada por el navegador y se usa únicamente donde aporta contexto. */
.red-legacy .legacy-account-avatar,
.red-legacy .red-drawer__account-avatar{
    display:block;
    flex:0 0 auto;
    object-fit:cover;
    object-position:center;
    border-radius:999px;
    background:rgba(255,255,255,.12);
    border:1px solid rgba(255,255,255,.28);
}
.red-legacy .legacy-account-avatar{
    width:24px;
    height:24px;
}
.red-legacy .red-drawer__account-avatar{
    width:26px;
    height:26px;
}
@media (max-width:760px){
    .red-legacy .legacy-account-avatar{
        width:22px;
        height:22px;
    }
}

/* V20.5 — fallback liviano cuando una foto histórica ya no existe o la URL externa falla. */
.red-legacy .legacy-account-avatar-fallback,
.red-legacy .red-drawer__account-avatar-fallback{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    border-radius:999px;
    background:rgba(255,255,255,.12);
    border:1px solid rgba(255,255,255,.28);
    color:inherit;
}
.red-legacy .legacy-account-avatar-fallback{
    width:24px;
    height:24px;
    font-size:12px;
}
.red-legacy .red-drawer__account-avatar-fallback{
    width:26px;
    height:26px;
    font-size:12px;
}
@media (max-width:760px){
    .red-legacy .legacy-account-avatar-fallback{
        width:22px;
        height:22px;
        font-size:11px;
    }
}

/* V20.7 — avatar/fallback mutuamente excluyentes.
   Las reglas de display:inline-flex del fallback no deben sobreescribir [hidden]. */
.red-legacy .legacy-account-avatar-fallback[hidden],
.red-legacy .red-drawer__account-avatar-fallback[hidden]{
    display:none!important;
}


/* V20.8 — cierre de sesión visible en desktop junto a la identidad.
   En móvil/tablet el topbar ya se oculta y la acción permanece dentro del drawer. */
.red-legacy .legacy-topbar__account .legacy-topbar-logout{
    display:inline-flex;
    align-items:center;
    gap:5px;
    flex:0 0 auto;
    padding-left:14px;
    margin-left:-7px;
    border-left:1px solid rgba(255,255,255,.28);
    white-space:nowrap;
    opacity:.92;
    transition:opacity .18s ease, transform .18s ease;
}
.red-legacy .legacy-topbar__account .legacy-topbar-logout i{
    margin:0;
    font-size:14px;
}
.red-legacy .legacy-topbar__account .legacy-topbar-logout:hover,
.red-legacy .legacy-topbar__account .legacy-topbar-logout:focus-visible{
    opacity:1;
    transform:translateY(-1px);
}
@media (max-width:980px){
    .red-legacy .legacy-topbar__account .legacy-topbar-logout{
        display:none!important;
    }
}

/* ========================================================================== */
/* CATALOGO_COMPACTO_RESPONSIVE_V29                                           */
/* Vista lista: jerarquia comercial limpia solo en tablet/movil.              */
/* ========================================================================== */
@media(max-width:780px){
    /* Un solo contenedor; cada producto se separa con una linea sutil. */
    .red-legacy .red-product-compact-grid{
        gap:0;
        overflow:hidden;
        border:1px solid #e4e7ec;
        border-radius:12px;
        background:#fff;
    }
    .red-legacy .red-product-compact-grid>.red-product-card--compact{
        grid-template-columns:94px minmax(0,1fr);
        grid-template-rows:minmax(0,1fr) auto;
        min-height:160px;
        border:0!important;
        border-bottom:1px solid #eaecf0!important;
        border-radius:0!important;
        box-shadow:none!important;
        background:#fff;
    }
    .red-legacy .red-product-compact-grid>.red-product-card--compact:last-child{
        border-bottom:0!important;
    }

    .red-legacy .red-product-card--compact .red-product-card__media{
        padding:8px 5px 4px 8px;
    }
    .red-legacy .red-product-card--compact .red-product-card__image{
        height:96px;
        padding:2px;
        border-radius:8px;
    }
    .red-legacy .red-product-card--compact .red-product-card__body{
        padding:8px 34px 4px 4px;
    }
    .red-legacy .red-product-card--compact .red-product-card__code{
        font-size:9px;
        line-height:1.05;
    }
    .red-legacy .red-product-card--compact .red-product-card__body h3{
        margin:2px 0 5px;
        font-size:13px;
        line-height:1.17;
        font-weight:650;
    }
    .red-legacy .red-product-card--compact .red-product-card__summary{
        margin:0;
        color:#667085;
        font-size:9px;
        line-height:1.3;
        -webkit-line-clamp:2;
    }

    /* Footer comercial: metadatos primero, acciones siempre abajo/derecha. */
    .red-legacy .red-product-card--compact .red-product-card__commerce--compact-split{
        grid-column:1 / -1;
        grid-row:2;
        display:grid;
        grid-template-columns:minmax(0,1fr);
        align-items:start;
        gap:4px;
        width:100%;
        margin:0;
        padding:4px 7px 7px;
        border-top:0;
        background:#fff;
    }
    .red-legacy .red-product-card--compact .red-product-card__pricing{
        display:flex;
        width:100%;
        min-width:0;
        flex-flow:row wrap;
        align-items:baseline;
        gap:2px 5px;
        margin:0;
    }
    .red-legacy .red-product-card--compact .red-product-card__old-price{
        margin:0;
        font-size:7px;
        line-height:1;
    }
    .red-legacy .red-product-card--compact .red-product-card__price{
        margin:0;
        color:#101828;
        font-size:clamp(14px,4.3vw,17px);
        line-height:1;
        font-weight:850;
        letter-spacing:-.025em;
    }
    .red-legacy .red-product-card--compact .red-product-card__tax{
        margin:0;
        font-size:7px;
        line-height:1.05;
    }

    /* Stock deja de competir con precio/IVA y baja a su propia linea. */
    .red-legacy .red-product-card--compact .red-product-card__stock{
        flex:0 0 100%;
        width:100%;
        margin:1px 0 0;
        font-size:7.5px;
        line-height:1.08;
    }
    .red-legacy .red-product-card--compact .red-product-card__stock .fa,
    .red-legacy .red-product-card--compact .red-product-card__tax .fa{
        font-size:5px;
    }
    .red-legacy .red-product-card--compact .red-product-card__consult{
        margin:0;
        padding:3px 6px;
        font-size:7.5px;
        line-height:1;
    }

    .red-legacy .red-product-card--compact .red-product-card__actions{
        width:100%;
        min-width:0;
        justify-content:flex-end;
        gap:4px;
        margin:0;
        padding-top:1px;
    }
    .red-legacy .red-product-card--compact .red-product-card__cart-form{
        display:flex;
        align-items:center;
        gap:4px;
        margin:0;
    }
    .red-legacy .red-product-card--compact .red-product-qty{
        grid-template-columns:19px 24px 19px;
        height:25px;
    }
    .red-legacy .red-product-card--compact .red-product-qty button,
    .red-legacy .red-product-card--compact .red-product-qty input{
        height:23px;
        line-height:23px;
        font-size:9px;
    }
    .red-legacy .red-product-card--compact .red-product-action{
        min-width:25px;
        height:25px;
        padding-inline:6px;
        border-radius:5px;
    }
    .red-legacy:not(.red-mall-child) .red-product-card--compact .red-product-card__wishlist{
        top:7px;
        right:7px;
        width:25px;
        height:25px;
    }

    /* Toolbar responsive mas compacta sin ocultar funciones. */
    .red-legacy .red-catalog-tools{
        gap:5px;
        margin-bottom:8px;
        padding:6px 7px;
        border-radius:10px;
    }
    .red-legacy .red-catalog-tools__primary{
        gap:7px;
    }
    .red-legacy .red-catalog-filter-trigger{
        min-height:32px;
        padding:5px 9px;
        border-radius:8px;
        font-size:8px;
    }
    .red-legacy .red-catalog-filter-trigger svg{
        width:13px;
        height:13px;
    }
    .red-legacy .red-catalog-result-count{
        font-size:8px;
    }
    .red-legacy .red-catalog-sort{
        gap:6px;
    }
    .red-legacy .red-catalog-sort label{
        font-size:7.5px;
    }
    .red-legacy .red-catalog-sort select{
        min-height:32px;
        max-width:none;
        padding:5px 28px 5px 9px;
        border-radius:8px;
        font-size:8px;
    }
}

@media(max-width:420px){
    .red-legacy .red-product-card--compact .red-product-card__body h3{
        font-size:12.5px;
    }
    .red-legacy .red-product-card--compact .red-product-card__summary{
        -webkit-line-clamp:2;
    }
    .red-legacy .red-catalog-tools{
        padding:6px;
    }
}

/* ========================================================================== */
/* CATALOGO_COMPACTO_RESPONSIVE_V29_FINAL                                     */
/* Ultimo override: densidad alta sin alterar logica ni markup.               */
/* ========================================================================== */
@media(max-width:780px){
    /* ------------------------------------------------------------------ */
    /* Toolbar: Filtrar + Ordenar en UNA sola fila.                       */
    /* El total ya se muestra debajo como "X resultados" y no se duplica. */
    /* ------------------------------------------------------------------ */
    .red-legacy .red-catalog-tools{
        display:grid;
        grid-template-columns:auto minmax(0,1fr);
        align-items:center;
        gap:6px;
        margin:0 0 6px;
        padding:5px 6px;
        border-radius:9px;
    }
    .red-legacy .red-catalog-tools__primary{
        display:flex;
        align-items:center;
        min-width:0;
        gap:0;
    }
    .red-legacy .red-catalog-result-count{
        display:none;
    }
    .red-legacy .red-catalog-filter-trigger{
        min-height:29px;
        padding:4px 8px;
        gap:5px;
        border-radius:7px;
        font-size:8px;
        line-height:1;
        white-space:nowrap;
    }
    .red-legacy .red-catalog-filter-trigger svg{
        width:12px;
        height:12px;
    }
    .red-legacy .red-catalog-filter-trigger b{
        min-width:15px;
        height:15px;
        padding:0 4px;
        font-size:6.5px;
    }
    .red-legacy .red-catalog-sort{
        display:grid;
        grid-template-columns:auto minmax(0,1fr);
        align-items:center;
        width:100%;
        min-width:0;
        gap:5px;
        margin:0;
    }
    .red-legacy .red-catalog-sort label{
        margin:0;
        font-size:7px;
        line-height:1;
        white-space:nowrap;
    }
    .red-legacy .red-catalog-sort select{
        width:100%;
        min-width:0;
        max-width:none;
        min-height:29px;
        padding:4px 25px 4px 8px;
        border-radius:7px;
        font-size:8px;
        line-height:1;
    }

    /* Menos aire entre toolbar, titulo/conteo y productos. */
    .red-legacy .red-catalog-heading{
        margin-top:4px;
        margin-bottom:6px;
    }
    .red-legacy .red-catalog-heading--count-only{
        min-height:16px;
        margin-top:2px;
        margin-bottom:4px;
    }

    /* ------------------------------------------------------------------ */
    /* Lista compacta: menos alto por producto sin sacrificar lectura.    */
    /* ------------------------------------------------------------------ */
    .red-legacy .red-product-compact-grid{
        gap:0;
    }
    .red-legacy .red-product-compact-grid>.red-product-card--compact{
        grid-template-columns:88px minmax(0,1fr);
        grid-template-rows:auto auto;
        min-height:0;
    }
    .red-legacy .red-product-card--compact .red-product-card__media{
        padding:6px 4px 2px 7px;
    }
    .red-legacy .red-product-card--compact .red-product-card__image{
        height:86px;
        padding:1px;
        border-radius:7px;
    }
    .red-legacy .red-product-card--compact .red-product-card__body{
        padding:6px 31px 3px 4px;
    }
    .red-legacy .red-product-card--compact .red-product-card__code{
        font-size:8px;
        line-height:1;
    }
    .red-legacy .red-product-card--compact .red-product-card__body h3{
        margin:2px 0 4px;
        font-size:12.25px;
        line-height:1.15;
        font-weight:650;
    }
    .red-legacy .red-product-card--compact .red-product-card__summary{
        margin:0;
        font-size:8.5px;
        line-height:1.24;
        -webkit-line-clamp:2;
    }
    .red-legacy:not(.red-mall-child) .red-product-card--compact .red-product-card__wishlist{
        top:6px;
        right:6px;
        width:24px;
        height:24px;
    }

    /* ------------------------------------------------------------------ */
    /* Franja comercial: pricing IZQUIERDA / acciones DERECHA.            */
    /* IVA, stock y consultar bajan SOLO si el ancho real no alcanza.     */
    /* ------------------------------------------------------------------ */
    .red-legacy .red-product-card--compact .red-product-card__commerce--compact-split{
        grid-column:1 / -1;
        grid-row:2;
        display:grid;
        grid-template-columns:minmax(0,1fr) auto;
        align-items:center;
        gap:5px;
        width:100%;
        min-width:0;
        margin:0;
        padding:3px 6px 5px;
        border-top:1px solid #f2f4f7;
        background:#fff;
    }
    .red-legacy .red-product-card--compact .red-product-card__pricing{
        display:flex;
        flex-flow:row wrap;
        align-items:baseline;
        align-content:center;
        gap:1px 4px;
        width:auto;
        min-width:0;
        margin:0;
    }
    .red-legacy .red-product-card--compact .red-product-card__old-price{
        flex:0 0 auto;
        margin:0;
        font-size:7px;
        line-height:1;
        white-space:nowrap;
    }
    .red-legacy .red-product-card--compact .red-product-card__price{
        flex:0 0 auto;
        max-width:100%;
        margin:0;
        font-size:clamp(14px,4.1vw,16px);
        line-height:1;
        font-weight:850;
        white-space:nowrap;
    }
    .red-legacy .red-product-card--compact .red-product-card__tax,
    .red-legacy .red-product-card--compact .red-product-card__stock{
        flex:0 1 auto;
        width:auto;
        max-width:100%;
        margin:0;
        font-size:7px;
        line-height:1.02;
        white-space:nowrap;
    }
    .red-legacy .red-product-card--compact .red-product-card__tax .fa,
    .red-legacy .red-product-card--compact .red-product-card__stock .fa{
        font-size:5px;
    }
    .red-legacy .red-product-card--compact .red-product-card__consult{
        flex:0 0 auto;
        margin:0;
        padding:2px 5px;
        border-radius:4px;
        font-size:7px;
        line-height:1;
        white-space:nowrap;
    }

    .red-legacy .red-product-card--compact .red-product-card__actions{
        display:flex;
        align-items:center;
        justify-content:flex-end;
        flex-wrap:nowrap;
        width:auto;
        min-width:max-content;
        gap:3px;
        margin:0 0 0 auto;
        padding:0;
    }
    .red-legacy .red-product-card--compact .red-product-card__cart-form{
        display:flex;
        align-items:center;
        gap:3px;
        margin:0;
    }
    .red-legacy .red-product-card--compact .red-product-qty{
        grid-template-columns:18px 22px 18px;
        height:24px;
    }
    .red-legacy .red-product-card--compact .red-product-qty button,
    .red-legacy .red-product-card--compact .red-product-qty input{
        height:22px;
        line-height:22px;
        font-size:8.5px;
    }
    .red-legacy .red-product-card--compact .red-product-qty button{
        font-size:12px;
    }
    .red-legacy .red-product-card--compact .red-product-action{
        min-width:24px;
        width:auto;
        height:24px;
        padding-inline:5px;
        border-radius:5px;
    }
    .red-legacy .red-product-card--compact .red-product-action__text{
        display:none;
    }
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__wishlist--inline{
        width:24px;
        height:24px;
    }
}

@media(max-width:360px){
    .red-legacy .red-catalog-tools{
        gap:4px;
        padding:4px 5px;
    }
    .red-legacy .red-catalog-sort{
        gap:4px;
    }
    .red-legacy .red-catalog-sort label{
        font-size:6.5px;
    }
    .red-legacy .red-product-compact-grid>.red-product-card--compact{
        grid-template-columns:84px minmax(0,1fr);
    }
    .red-legacy .red-product-card--compact .red-product-card__image{
        height:82px;
    }
    .red-legacy .red-product-card--compact .red-product-card__body h3{
        font-size:12px;
    }
    .red-legacy .red-product-card--compact .red-product-card__commerce--compact-split{
        gap:4px;
        padding-inline:5px;
    }
    .red-legacy .red-product-card--compact .red-product-card__price{
        font-size:14px;
    }
    .red-legacy .red-product-card--compact .red-product-qty{
        grid-template-columns:17px 21px 17px;
    }
}

/* ========================================================================== */
/* CATALOGO_MALL_CIERRE_V29                                                   */
/* Cierre visual: compacta universal + sidebar destacados Mall.               */
/* ========================================================================== */

/* -------------------------------------------------------------------------- */
/* 1) Compacta universal: footer siempre horizontal.                          */
/* Esta especificidad corrige las reglas históricas red-mall-child <=520px    */
/* y <=1280px que apilaban pricing/actions.                                   */
/* -------------------------------------------------------------------------- */
.red-legacy .red-product-card--compact .red-product-card__commerce--compact-split,
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__commerce--compact-split{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:6px;
    width:100%;
    min-width:0;
    margin:0;
    border-top:1px solid #e4e7ec;
    background:#fff;
}
.red-legacy .red-product-card--compact .red-product-card__pricing,
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__pricing{
    display:flex;
    min-width:0;
    width:auto;
    flex-flow:row wrap;
    align-items:baseline;
    align-content:center;
    gap:2px 5px;
    margin:0;
}
.red-legacy .red-product-card--compact .red-product-card__actions,
.red-legacy.red-mall-child .red-product-card--compact .red-product-card__actions{
    display:flex;
    flex:0 0 auto;
    width:auto;
    min-width:max-content;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:nowrap;
    gap:3px;
    margin:0 0 0 auto;
}

/* Grid desktop: una sola caja de catálogo con separadores claros, no cards   */
/* flotantes. La franja comercial conserva su borde superior.                 */
.red-legacy .red-product-compact-grid{
    gap:1px;
    overflow:hidden;
    border:1px solid #dfe3e8;
    border-radius:10px;
    background:#e4e7ec;
}
.red-legacy .red-product-compact-grid>.red-product-card--compact{
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#fff;
}

/* -------------------------------------------------------------------------- */
/* 2) Responsive realmente denso.                                             */
/* Imagen suficiente para reconocer producto, resumen máximo 2 líneas y       */
/* footer de una sola franja. IVA/stock/consulta sólo saltan si no caben.      */
/* -------------------------------------------------------------------------- */
@media(max-width:780px){
    .red-legacy .red-product-compact-grid{
        display:grid;
        grid-template-columns:1fr;
        gap:0;
        border-radius:9px;
        background:#fff;
    }
    .red-legacy .red-product-compact-grid>.red-product-card--compact,
    .red-legacy.red-mall-child .red-product-compact-grid>.red-product-card--compact{
        grid-template-columns:76px minmax(0,1fr);
        grid-template-rows:auto auto;
        min-height:0;
        border-bottom:1px solid #e4e7ec!important;
    }
    .red-legacy .red-product-compact-grid>.red-product-card--compact:last-child,
    .red-legacy.red-mall-child .red-product-compact-grid>.red-product-card--compact:last-child{
        border-bottom:0!important;
    }
    .red-legacy .red-product-card--compact .red-product-card__media,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__media{
        padding:6px 3px 3px 6px;
    }
    .red-legacy .red-product-card--compact .red-product-card__image,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__image{
        height:72px;
        padding:1px;
        border-radius:7px;
    }
    .red-legacy .red-product-card--compact .red-product-card__body,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__body{
        min-width:0;
        padding:5px 30px 3px 3px;
    }
    .red-legacy .red-product-card--compact .red-product-card__code,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__code{
        font-size:7.5px;
        line-height:1;
    }
    .red-legacy .red-product-card--compact .red-product-card__body h3,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__body h3{
        margin:2px 0 3px;
        padding-right:0;
        font-size:11.5px;
        line-height:1.14;
        font-weight:650;
    }
    .red-legacy .red-product-card--compact .red-product-card__summary,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__summary{
        margin:0;
        font-size:8px;
        line-height:1.22;
        -webkit-line-clamp:2;
    }
    .red-legacy .red-product-card--compact .red-product-card__commerce--compact-split,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__commerce--compact-split{
        grid-template-columns:minmax(0,1fr) auto;
        align-items:center;
        gap:4px;
        padding:3px 5px 4px;
    }
    .red-legacy .red-product-card--compact .red-product-card__price,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__price{
        flex:0 0 auto;
        margin:0;
        font-size:14px;
        line-height:1;
        font-weight:850;
        white-space:nowrap;
    }
    .red-legacy .red-product-card--compact .red-product-card__old-price,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__old-price{
        font-size:6.5px;
        line-height:1;
        white-space:nowrap;
    }
    .red-legacy .red-product-card--compact .red-product-card__tax,
    .red-legacy .red-product-card--compact .red-product-card__stock,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__tax,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__stock{
        flex:0 1 auto;
        width:auto;
        max-width:100%;
        margin:0;
        font-size:6.5px;
        line-height:1;
        white-space:nowrap;
    }
    .red-legacy .red-product-card--compact .red-product-card__consult,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__consult{
        flex:0 0 auto;
        margin:0;
        padding:2px 4px;
        border-radius:4px;
        font-size:6.5px;
        line-height:1;
        white-space:nowrap;
    }
    .red-legacy .red-product-card--compact .red-product-qty,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-qty{
        grid-template-columns:17px 21px 17px;
        height:23px;
    }
    .red-legacy .red-product-card--compact .red-product-qty button,
    .red-legacy .red-product-card--compact .red-product-qty input,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-qty button,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-qty input{
        height:21px;
        line-height:21px;
        font-size:8px;
    }
    .red-legacy .red-product-card--compact .red-product-action,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-action{
        min-width:23px;
        height:23px;
        padding-inline:4px;
        border-radius:4px;
    }
    .red-legacy:not(.red-mall-child) .red-product-card--compact .red-product-card__wishlist,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__wishlist{
        top:5px;
        right:5px;
        width:23px;
        height:23px;
    }

    /* Toolbar: Filtrar + Ordenar permanecen en la misma fila. */
    .red-legacy .red-catalog-tools{
        display:grid;
        grid-template-columns:auto minmax(0,1fr);
        align-items:center;
        gap:5px;
        margin-bottom:5px;
        padding:4px 5px;
    }
    .red-legacy .red-catalog-tools__primary{
        min-width:0;
    }
    .red-legacy .red-catalog-result-count{
        display:none;
    }
    .red-legacy .red-catalog-sort{
        display:grid;
        grid-template-columns:auto minmax(0,1fr);
        align-items:center;
        min-width:0;
        width:100%;
        gap:4px;
    }
    .red-legacy .red-catalog-sort select{
        width:100%;
        min-width:0;
        max-width:none;
    }
}

/* -------------------------------------------------------------------------- */
/* 3) Mall raíz: destacados del sidebar recuperan SU variante horizontal.     */
/* Fase 4.9.1 convirtió genéricamente todo .red-module-slide en flex-column;   */
/* este bloque excluye visualmente la variante mall-sidebar sin tocar otros    */
/* carruseles del storefront.                                                  */
/* -------------------------------------------------------------------------- */
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-module-slide .red-product-card--mall-sidebar{
    display:grid!important;
    grid-template-columns:72px minmax(0,1fr)!important;
    grid-template-rows:auto!important;
    min-height:96px;
    height:auto!important;
    border:1px solid #e5e7eb;
    border-radius:9px;
    box-shadow:none;
    overflow:hidden;
    background:#fff;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-product-card--mall-sidebar .red-product-card__media{
    position:relative;
    grid-column:1;
    grid-row:1;
    min-width:0;
    padding:6px;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-product-card--mall-sidebar .red-product-card__image{
    display:block;
    width:100%;
    height:68px;
    padding:2px;
    border-radius:7px;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-product-card--mall-sidebar .red-product-card__image img{
    width:100%;
    height:100%;
    object-fit:contain;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-module-slide .red-product-card--mall-sidebar .red-product-card__body{
    display:flex;
    grid-column:2;
    grid-row:1;
    flex:1 1 auto;
    min-width:0;
    flex-direction:column;
    padding:7px 6px 6px 0;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-module-slide .red-product-card--mall-sidebar .red-product-card__body h3{
    display:-webkit-box;
    margin:2px 0 4px;
    padding-right:21px;
    overflow:hidden;
    font-size:9.5px;
    line-height:1.18;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-product-card--mall-sidebar .red-product-card__code{
    font-size:7.5px;
    line-height:1;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-module-slide .red-product-card--mall-sidebar .red-product-card__commerce{
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:nowrap;
    gap:4px;
    margin-top:auto;
    padding-top:2px;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-product-card--mall-sidebar .red-product-card__pricing{
    min-width:0;
    gap:1px;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-product-card--mall-sidebar.is-quote-product .red-product-card__pricing{
    min-width:0;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-product-card--mall-sidebar .red-product-card__price{
    font-size:11px;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-product-card--mall-sidebar .red-product-card__old-price{
    font-size:7px;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-product-card--mall-sidebar .red-product-card__actions{
    flex:0 0 auto;
    max-width:none;
    gap:2px;
    margin-left:auto;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-product-card--mall-sidebar .red-product-qty{
    grid-template-columns:16px 19px 16px;
    height:22px;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-product-card--mall-sidebar .red-product-qty button,
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-product-card--mall-sidebar .red-product-qty input{
    height:20px;
    line-height:20px;
    font-size:8px;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-product-card--mall-sidebar .red-product-action{
    min-width:22px;
    height:22px;
    padding:0 4px;
    font-size:9px;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-product-card--mall-sidebar .red-product-card__wishlist{
    top:4px;
    right:4px;
    width:22px;
    height:22px;
}
.red-legacy.red-mode-mall .red-mall-sidebar-featured .red-product-card--mall-sidebar .red-product-card__discount{
    top:4px;
    left:4px;
    padding:2px 4px;
    font-size:7px;
}

/* El sidebar sólo existe en desktop/tablet ancho; respetamos el corte Mall. */
@media(max-width:980px){
    .red-legacy.red-mode-mall .red-mall-sidebar{
        display:none;
    }
}


/* V33 CRM UI — vista compacta de Eventos/Servicios */
.red-events-grid--lista {
    grid-template-columns: 1fr;
    gap: 12px;
}
.red-events-grid--lista .legacy-event-card__link {
    display: grid;
    grid-template-columns: clamp(180px, 18vw, 220px) minmax(0, 1fr);
    align-items: stretch;
    min-height: 0;
}
.red-events-grid--lista .legacy-event-card__media {
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 4;
}
.red-events-grid--lista .legacy-event-card__body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 13px 16px;
}
.red-events-grid--lista .legacy-event-card h2 {
    font-size: clamp(16px, 1.3vw, 20px);
}
.red-events-grid--lista .legacy-event-card__description {
    margin-top: 6px;
    -webkit-line-clamp: 2;
}
.red-events-grid--lista .legacy-event-card__meta {
    margin-top: 8px;
}
.red-events-grid--lista .legacy-event-card__footer {
    margin-top: 9px;
}
@media (max-width: 620px) {
    .red-events-page {
        margin-bottom: 38px;
    }
    .red-events-grid--lista {
        gap: 9px;
    }
    .red-events-grid--lista .legacy-event-card {
        border-radius: 13px;
    }
    .red-events-grid--lista .legacy-event-card__link {
        grid-template-columns: 84px minmax(0, 1fr);
        align-items: stretch;
        min-height: 0;
    }
    .red-events-grid--lista .legacy-event-card__media {
        min-height: 0;
        aspect-ratio: 3 / 4;
    }
    .red-events-grid--lista .legacy-event-card__media-action,
    .red-events-grid--lista .legacy-event-card__arrow,
    .red-events-grid--lista .legacy-event-card__cta {
        display: none;
    }
    .red-events-grid--lista .legacy-event-card__body {
        padding: 9px 10px;
    }
    .red-events-grid--lista .legacy-event-card__topline {
        margin-bottom: 4px;
    }
    .red-events-grid--lista .legacy-event-card__type {
        min-height: 20px;
        padding: 3px 7px;
        font-size: 8px;
    }
    .red-events-grid--lista .legacy-event-card h2 {
        font-size: 14px;
        line-height: 1.2;
    }
    .red-events-grid--lista .legacy-event-card__description {
        margin-top: 4px;
        font-size: 10px;
        line-height: 1.35;
        -webkit-line-clamp: 2;
    }
    .red-events-grid--lista .legacy-event-card__meta {
        gap: 4px;
        margin-top: 6px;
    }
    .red-events-grid--lista .legacy-event-card__meta span {
        min-height: 20px;
        padding: 3px 6px;
        font-size: 8px;
    }
    .red-events-grid--lista .legacy-event-card__footer {
        margin-top: 5px;
    }
    .red-events-grid--lista .legacy-event-card__price small,
    .red-events-grid--lista .legacy-event-card__price strong,
    .red-events-grid--lista .legacy-event-card__free {
        font-size: 9px;
    }
}


/* V33.1 CRM-only — sin hueco reservado para buscador ecommerce */
@media(max-width:980px){
    .red-legacy.red-mode-crm .legacy-search{display:none!important}
    .red-legacy.red-mode-crm .legacy-header__inner{
        grid-template-columns:44px minmax(0,1fr) 44px;
        grid-template-rows:64px;
        min-height:80px;
        padding-block:8px;
    }
    .red-legacy.red-mode-crm .legacy-mobile-trigger{grid-column:1;grid-row:1}
    .red-legacy.red-mode-crm .legacy-brand{grid-column:2;grid-row:1}
    .red-legacy.red-mode-crm .legacy-header.is-mobile-condensed .legacy-header__inner{
        grid-template-columns:44px minmax(0,1fr);
        grid-template-rows:44px;
        min-height:60px;
    }
}

/* ========================================================================== */
/* V35 — CRM-only: acciones del header siempre al extremo derecho              */
/* ========================================================================== */
@media (min-width:981px){
    .red-legacy.red-mode-crm .legacy-header__inner{
        grid-template-columns:auto minmax(0,1fr) auto;
    }
    .red-legacy.red-mode-crm .legacy-brand,
    .red-legacy.red-mode-crm .legacy-brand-group{
        grid-column:1;
    }
    .red-legacy.red-mode-crm .legacy-actions{
        grid-column:3;
        justify-self:end;
    }
}
/* V38_4_4_EVENT_COMPACT_RESPONSIVE
   Lista compacta: la imagen conserva 3:4, pero su tamaño visual se adapta.
   Desktop usa la variante 720x960; móvil usa 360x480 mediante <picture>. */
.red-events-grid--lista .legacy-event-card__link {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: stretch;
    min-height: 200px;
}
.red-events-grid--lista .legacy-event-card__media {
    width: 150px;
    height: 200px;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 3 / 4;
    align-self: center;
    overflow: hidden;
}
.red-events-grid--lista .legacy-event-card__media picture {
    display: block;
    width: 100%;
    height: 100%;
}
.red-events-grid--lista .legacy-event-card__media picture img,
.red-events-grid--lista .legacy-event-card__media > img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
}
.red-events-grid--lista .legacy-event-card__body {
    min-width: 0;
    overflow: hidden;
    justify-content: center;
    padding: 14px 16px;
}
.red-events-grid--lista .legacy-event-card__description {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 6px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

@media (max-width: 900px) and (min-width: 621px) {
    .red-events-grid--lista .legacy-event-card__link {
        grid-template-columns: 132px minmax(0, 1fr);
        min-height: 176px;
    }
    .red-events-grid--lista .legacy-event-card__media {
        width: 132px;
        height: 176px;
    }
}

@media (max-width: 620px) {
    .red-events-grid--lista {
        gap: 9px;
    }
    .red-events-grid--lista .legacy-event-card__link {
        grid-template-columns: 82px minmax(0, 1fr);
        align-items: center;
        min-height: 126px;
    }
    .red-events-grid--lista .legacy-event-card__media {
        width: 70px;
        height: 94px;
        margin: 8px 4px 8px 8px;
        align-self: center;
        border-radius: 12px;
    }
    .red-events-grid--lista .legacy-event-card__body {
        min-width: 0;
        overflow: hidden;
        padding: 8px 9px 8px 6px;
    }
    .red-events-grid--lista .legacy-event-card__topline {
        min-width: 0;
        margin-bottom: 3px;
    }
    .red-events-grid--lista .legacy-event-card__type {
        max-width: 100%;
        min-height: 18px;
        padding: 2px 6px;
        overflow: hidden;
        font-size: 7px;
        line-height: 1.1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .red-events-grid--lista .legacy-event-card h2 {
        overflow: hidden;
        font-size: 13px;
        line-height: 1.18;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .red-events-grid--lista .legacy-event-card__description {
        margin-top: 3px;
        font-size: 9px;
        line-height: 1.28;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
    .red-events-grid--lista .legacy-event-card__meta {
        gap: 3px;
        margin-top: 5px;
    }
    .red-events-grid--lista .legacy-event-card__meta span {
        min-height: 18px;
        padding: 2px 5px;
        font-size: 7px;
    }
    .red-events-grid--lista .legacy-event-card__footer {
        margin-top: 4px;
        padding-top: 5px;
    }
    .red-events-grid--lista .legacy-event-card__free {
        font-size: 8px;
    }
}

@media (max-width: 380px) {
    .red-events-grid--lista .legacy-event-card__link {
        grid-template-columns: 74px minmax(0, 1fr);
    }
    .red-events-grid--lista .legacy-event-card__media {
        width: 62px;
        height: 83px;
        margin-left: 7px;
    }
    .red-events-grid--lista .legacy-event-card__body {
        padding-right: 7px;
    }
}

/* ========================================================================== */
/* V40.3 — cards compactas intermedias + ubicación/WhatsApp móvil             */
/* ========================================================================== */

.red-legacy .legacy-whatsapp-contact{
    display:inline-flex;
    align-items:center;
    gap:5px;
    min-width:0;
}
.red-legacy .legacy-whatsapp-contact i{margin-right:2px}
.red-legacy .legacy-whatsapp-contact__label{
    font-size:10px;
    font-weight:800;
    white-space:nowrap;
}
.red-legacy .legacy-whatsapp-contact__number{
    font-size:11px;
    font-weight:800;
    white-space:nowrap;
}

.red-legacy .legacy-mobile-contextbar{display:none}

@media(max-width:980px){
    .red-legacy .legacy-mobile-contextbar{
        display:flex;
        align-items:stretch;
        gap:6px;
        width:min(calc(100% - 24px),var(--red-content-width,1360px));
        margin:0 auto 7px;
    }
    .red-legacy .legacy-mobile-contextbar__location,
    .red-legacy .legacy-mobile-contextbar__whatsapp{
        min-width:0;
        min-height:36px;
        border:1px solid #e4e7ec;
        border-radius:8px;
        background:#fff;
        color:#344054;
        text-decoration:none;
        box-shadow:0 2px 8px rgba(16,24,40,.04);
    }
    .red-legacy .legacy-mobile-contextbar__location{
        display:grid;
        grid-template-columns:18px minmax(0,1fr) 12px;
        align-items:center;
        gap:6px;
        flex:1 1 auto;
        padding:5px 8px;
        font:inherit;
        text-align:left;
        cursor:pointer;
    }
    .red-legacy .legacy-mobile-contextbar__whatsapp{
        display:grid;
        grid-template-columns:18px minmax(0,auto);
        align-items:center;
        gap:5px;
        flex:0 1 auto;
        max-width:43%;
        padding:5px 8px;
    }
    .red-legacy .legacy-mobile-contextbar i{
        color:var(--red-color-primary,#e11d2e);
        font-size:15px;
        text-align:center;
    }
    .red-legacy .legacy-mobile-contextbar__whatsapp>i{color:#16a34a}
    .red-legacy .legacy-mobile-contextbar span{display:block;min-width:0}
    .red-legacy .legacy-mobile-contextbar small,
    .red-legacy .legacy-mobile-contextbar strong{
        display:block;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
    }
    .red-legacy .legacy-mobile-contextbar small{
        color:#667085;
        font-size:7px;
        font-weight:700;
        line-height:1.05;
    }
    .red-legacy .legacy-mobile-contextbar strong{
        margin-top:1px;
        color:#101828;
        font-size:9px;
        font-weight:800;
        line-height:1.15;
    }
    .red-legacy .legacy-mobile-contextbar__chevron{
        color:#98a2b3!important;
        font-size:11px!important;
    }
}

@media(max-width:780px){
    .red-legacy .red-product-compact-grid{
        gap:6px;
        overflow:visible;
        border:0;
        border-radius:0;
        background:transparent;
    }
    .red-legacy .red-product-compact-grid>.red-product-card--compact,
    .red-legacy.red-mall-child .red-product-compact-grid>.red-product-card--compact{
        grid-template-columns:94px minmax(0,1fr);
        grid-template-rows:auto auto;
        min-height:112px;
        overflow:hidden!important;
        border:1px solid #e1e5ea!important;
        border-radius:10px!important;
        background:#fff;
        box-shadow:0 2px 8px rgba(16,24,40,.035)!important;
    }
    .red-legacy .red-product-compact-grid>.red-product-card--compact:last-child,
    .red-legacy.red-mall-child .red-product-compact-grid>.red-product-card--compact:last-child{
        border-bottom:1px solid #e1e5ea!important;
    }
    .red-legacy .red-product-card--compact .red-product-card__media,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__media{
        grid-column:1;
        grid-row:1 / span 2;
        align-self:start;
        padding:7px 4px 7px 7px;
    }
    .red-legacy .red-product-card--compact .red-product-card__image,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__image{
        height:88px;
        padding:1px;
        border-radius:8px;
    }
    .red-legacy .red-product-card--compact .red-product-card__body,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__body{
        grid-column:2;
        grid-row:1;
        min-width:0;
        padding:7px 29px 2px 5px;
    }
    .red-legacy .red-product-card--compact .red-product-card__code,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__code{
        font-size:7px;
        line-height:1;
        color:#98a2b3;
    }
    .red-legacy .red-product-card--compact .red-product-card__body h3,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__body h3{
        margin:2px 0 3px;
        font-size:12.5px;
        line-height:1.16;
        font-weight:750;
    }
    .red-legacy .red-product-card--compact .red-product-card__summary,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__summary{
        margin:0;
        color:#667085;
        font-size:8.8px;
        line-height:1.25;
        -webkit-line-clamp:2;
    }
    .red-legacy .red-product-card--compact .red-product-card__commerce--compact-split,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__commerce--compact-split{
        grid-column:2;
        grid-row:2;
        align-self:end;
        grid-template-columns:minmax(0,1fr) auto;
        gap:4px;
        min-width:0;
        padding:3px 6px 6px 5px;
        border-top:0;
        background:#fff;
    }
    .red-legacy .red-product-card--compact .red-product-card__pricing,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__pricing{
        gap:2px 4px;
    }
    .red-legacy .red-product-card--compact .red-product-card__price,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__price{
        font-size:14.5px;
        line-height:1.05;
    }
    .red-legacy .red-product-card--compact .red-product-card__tax,
    .red-legacy .red-product-card--compact .red-product-card__stock,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__tax,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__stock{
        font-size:6.8px;
        line-height:1.05;
    }
    .red-legacy .red-product-card--compact .red-product-card__consult,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__consult{
        padding:2px 5px;
        font-size:6.8px;
    }
    .red-legacy:not(.red-mall-child) .red-product-card--compact .red-product-card__wishlist,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__wishlist{
        top:6px;
        right:6px;
    }
}

@media(max-width:360px){
    .red-legacy .red-product-compact-grid>.red-product-card--compact,
    .red-legacy.red-mall-child .red-product-compact-grid>.red-product-card--compact{
        grid-template-columns:88px minmax(0,1fr);
    }
    .red-legacy .red-product-card--compact .red-product-card__image,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__image{
        height:82px;
    }
    .red-legacy .legacy-mobile-contextbar__whatsapp{
        max-width:40%;
        padding-inline:6px;
    }
    .red-legacy .legacy-mobile-contextbar__whatsapp small{display:none}
}

/* ========================================================================== */
/* V40.4 — ubicación integrada al header + card compacta de lectura continua  */
/* ========================================================================== */
.red-legacy .legacy-mobile-header-location{display:none}

@media(max-width:980px){
    .red-legacy .legacy-header__inner{
        grid-template-rows:64px 40px 28px;
        gap:6px 10px;
        min-height:150px;
        padding-block:8px 7px;
    }
    .red-legacy .legacy-mobile-header-location{
        grid-column:1/-1;
        grid-row:3;
        display:grid;
        grid-template-columns:15px minmax(0,1fr) 10px;
        align-items:center;
        gap:5px;
        width:100%;
        min-width:0;
        height:28px;
        padding:0 8px;
        border:1px solid #e4e7ec;
        border-radius:7px;
        background:#fff;
        color:#344054;
        font:inherit;
        text-align:left;
        cursor:pointer;
        box-shadow:0 1px 4px rgba(16,24,40,.025);
    }
    .red-legacy .legacy-mobile-header-location>i:first-child{
        color:var(--red-color-primary,#e11d2e);
        font-size:12px;
        text-align:center;
    }
    .red-legacy .legacy-mobile-header-location span{
        display:flex;
        min-width:0;
        align-items:baseline;
        gap:4px;
        overflow:hidden;
        white-space:nowrap;
    }
    .red-legacy .legacy-mobile-header-location small{
        flex:0 0 auto;
        color:#667085;
        font-size:7px;
        font-weight:700;
        line-height:1;
    }
    .red-legacy .legacy-mobile-header-location strong{
        min-width:0;
        overflow:hidden;
        color:#101828;
        font-size:8.5px;
        font-weight:800;
        line-height:1.1;
        text-overflow:ellipsis;
        white-space:nowrap;
    }
    .red-legacy .legacy-mobile-header-location__chevron{
        color:#98a2b3;
        font-size:9px;
        text-align:right;
    }
    .red-legacy .legacy-header.is-mobile-condensed .legacy-mobile-header-location{
        display:none!important;
    }
    .red-legacy .legacy-header.is-mobile-condensed .legacy-header__inner{
        grid-template-rows:44px;
        min-height:60px;
    }
    .red-legacy .legacy-mobile-contextbar{display:none!important}
}

@media(max-width:780px){
    .red-legacy .red-product-compact-grid{gap:5px}
    .red-legacy .red-product-compact-grid>.red-product-card--compact,
    .red-legacy.red-mall-child .red-product-compact-grid>.red-product-card--compact{
        grid-template-columns:88px minmax(0,1fr);
        grid-template-rows:auto auto;
        min-height:0;
    }
    .red-legacy .red-product-card--compact .red-product-card__media,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__media{
        grid-column:1;
        grid-row:1;
        align-self:start;
        padding:6px 3px 2px 6px;
    }
    .red-legacy .red-product-card--compact .red-product-card__image,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__image{
        height:82px;
        padding:1px;
        border-radius:8px;
    }
    .red-legacy .red-product-card--compact .red-product-card__body,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__body{
        grid-column:2;
        grid-row:1;
        min-width:0;
        padding:5px 28px 1px 4px;
    }
    .red-legacy .red-product-card--compact .red-product-card__code,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__code{
        font-size:6.8px;
        line-height:1;
    }
    .red-legacy .red-product-card--compact .red-product-card__body h3,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__body h3{
        margin:1px 0 2px;
        font-size:12px;
        line-height:1.13;
        font-weight:750;
    }
    .red-legacy .red-product-card--compact .red-product-card__summary,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__summary{
        display:-webkit-box;
        margin:0;
        overflow:hidden;
        color:#667085;
        font-size:8.4px;
        line-height:1.22;
        -webkit-box-orient:vertical;
        -webkit-line-clamp:3;
        line-clamp:3;
    }
    .red-legacy .red-product-card--compact .red-product-card__commerce--compact-split,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__commerce--compact-split{
        grid-column:1/-1;
        grid-row:2;
        align-self:end;
        grid-template-columns:minmax(0,1fr) auto;
        gap:4px;
        min-width:0;
        margin:0;
        padding:3px 6px 5px;
        border-top:1px solid #edf0f3;
        background:#fff;
    }
    .red-legacy .red-product-card--compact .red-product-card__pricing,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__pricing{gap:2px 4px}
    .red-legacy .red-product-card--compact .red-product-card__price,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__price{
        margin:0;
        font-size:14.5px;
        line-height:1;
    }
    .red-legacy .red-product-card--compact .red-product-card__actions,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__actions{gap:2px}
    .red-legacy .red-product-card--compact .red-product-card__consult,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__consult{
        padding:2px 4px;
        font-size:6.6px;
    }
}

@media(max-width:360px){
    .red-legacy .red-product-compact-grid>.red-product-card--compact,
    .red-legacy.red-mall-child .red-product-compact-grid>.red-product-card--compact{
        grid-template-columns:82px minmax(0,1fr);
    }
    .red-legacy .red-product-card--compact .red-product-card__image,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__image{height:76px}
    .red-legacy .red-product-card--compact .red-product-card__body h3,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__body h3{font-size:11.5px}
    .red-legacy .red-product-card--compact .red-product-card__summary,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__summary{font-size:8px}
}


/* ========================================================================== */
/* V40.4.1 — compacta: eliminar alturas heredadas del bloque de información  */
/* ========================================================================== */
@media(max-width:780px){
    /* La card base reservaba 128px en body, 18px en código y 43px en título.
       En vista compacta esas alturas fijas dejan un vacío grande debajo del texto. */
    .red-legacy .red-product-card--compact .red-product-card__body,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__body{
        min-height:0;
        align-self:start;
        padding-top:3px;
        padding-bottom:1px;
    }

    .red-legacy .red-product-card--compact .red-product-card__code,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__code{
        min-height:0;
        margin:0 0 1px;
    }

    .red-legacy .red-product-card--compact .red-product-card__body h3,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__body h3{
        min-height:0;
        margin:0 0 2px;
    }

    .red-legacy .red-product-card--compact .red-product-card__summary,
    .red-legacy.red-mall-child .red-product-card--compact .red-product-card__summary{
        margin:0;
        -webkit-line-clamp:3;
        line-clamp:3;
    }
}

/* ========================================================================== */
/* V43.2 · Directorio Mall: filtro abiertos + horarios compactos              */
/* ========================================================================== */
.red-legacy #categorias-comercios,
.red-legacy #comercios{scroll-margin-top:118px}
.red-legacy .red-mall-content__tools{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.red-legacy .red-mall-open-filter{display:inline-flex;align-items:center;gap:3px;padding:3px;border:1px solid #e5e7eb;border-radius:999px;background:#f8fafc;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.red-legacy .red-mall-open-filter button{display:inline-flex;align-items:center;gap:5px;min-height:28px;padding:5px 9px;border:0;border-radius:999px;background:transparent;color:#667085;font:inherit;font-size:.7rem;font-weight:800;line-height:1;cursor:pointer;white-space:nowrap}
.red-legacy .red-mall-open-filter button span{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#e5e7eb;color:#475467;font-size:.62rem}
.red-legacy .red-mall-open-filter button.is-active{background:#fff;color:var(--red-color-primary,#ef1b23);box-shadow:0 1px 5px rgba(15,23,42,.10)}
.red-legacy .red-mall-open-filter button.is-active span{background:color-mix(in srgb,var(--red-color-primary,#ef1b23) 10%,#fff);color:var(--red-color-primary,#ef1b23)}
.red-legacy .red-mall-store-card{align-items:center}
.red-legacy .red-mall-store-card__hours-row{grid-column:1/-1;display:flex;align-items:center;gap:7px 16px;flex-wrap:wrap;margin:2px -18px -18px;padding:7px 18px;border-top:1px solid #edf0f3;background:#fafbfc;color:#667085;font-size:.64rem;line-height:1.25}
.red-legacy .red-mall-store-card__hours-item{display:inline-flex;align-items:center;gap:5px;min-width:0}
.red-legacy .red-mall-store-card__hours-item strong{font-size:.64rem;white-space:nowrap}
.red-legacy .red-mall-store-card__hours-item small{font-size:.62rem;color:#667085;white-space:nowrap}
.red-legacy .red-mall-store-card__hours-item.is-open>i,
.red-legacy .red-mall-store-card__hours-item.is-open>strong{color:#15803d}
.red-legacy .red-mall-store-card__hours-item.is-closed>i,
.red-legacy .red-mall-store-card__hours-item.is-closed>strong{color:#b42318}
.red-legacy .red-mall-open-empty{display:grid;place-items:center;gap:5px;min-height:170px;padding:28px;text-align:center;border:1px dashed #d0d5dd;border-radius:12px;background:#fcfcfd;color:#667085}
.red-legacy .red-mall-open-empty[hidden]{display:none!important}
.red-legacy .red-mall-open-empty>i{font-size:1.6rem;color:#98a2b3}
.red-legacy .red-mall-open-empty strong{color:#344054}
.red-legacy .red-mall-open-empty span{font-size:.8rem}
.red-legacy .red-mall-open-empty button{margin-top:5px;border:0;border-radius:999px;padding:7px 12px;background:#fff1f2;color:var(--red-color-primary,#ef1b23);font-weight:800;cursor:pointer}
@media(max-width:1180px){
  .red-legacy .red-mall-store-card__hours-row{margin:2px -14px -14px;padding-inline:14px}
}
@media(max-width:980px){
  .red-legacy #categorias-comercios,.red-legacy #comercios{scroll-margin-top:98px}
  .red-legacy .red-mall-content__header{align-items:center}
}
@media(max-width:560px){
  .red-legacy .red-mall-content__header{align-items:flex-start;gap:8px}
  .red-legacy .red-mall-content__tools{gap:6px}
  .red-legacy .red-mall-open-filter button{min-height:26px;padding:4px 7px;font-size:.64rem}
  .red-legacy .red-mall-open-filter button span{min-width:16px;height:16px;font-size:.58rem}
  .red-legacy .red-mall-store-card{padding-bottom:42px}
  .red-legacy .red-mall-store-card__hours-row{position:absolute;left:0;right:0;bottom:0;margin:0;padding:6px 10px;gap:5px 10px;min-height:32px;overflow:hidden}
  .red-legacy .red-mall-store-card__hours-item{gap:4px}
  .red-legacy .red-mall-store-card__hours-item strong{font-size:.61rem}
  .red-legacy .red-mall-store-card__hours-item small{font-size:.59rem;max-width:135px;overflow:hidden;text-overflow:ellipsis}
}

/* ========================================================================== */
/* V43.3 · Directorio Mall + navegación móvil                                 */
/* ========================================================================== */
.red-legacy .red-mall-content__header--root{
    justify-content:flex-end;
    margin-bottom:8px;
    padding:0 2px 8px;
}
.red-legacy .red-mall-content__header--root .red-mall-content__tools{
    width:100%;
}
.red-legacy .red-mall-content__heading h2{
    font-size:clamp(1rem,1.5vw,1.25rem);
}
.red-legacy .red-mall-content__heading .red-mall-content__eyebrow{
    margin-bottom:2px;
    font-size:.68rem;
}
.red-legacy .red-mall-store-card__hours-row{
    gap:5px 12px;
    padding-top:6px;
    padding-bottom:6px;
}
.red-legacy .red-mall-store-card__hours-item{
    white-space:nowrap;
}
.red-legacy .red-mall-store-card__hours-item strong{
    font-size:.61rem;
}
.red-legacy .red-mall-store-card__hours-item small{
    font-size:.59rem;
}
@media(max-width:980px){
    .red-legacy .red-bottom-nav__item:hover,
    .red-legacy .red-bottom-nav__item:focus,
    .red-legacy .red-bottom-nav__item:focus-visible{
        color:var(--red-color-mobile-menu-text,#fff);
    }
    .red-legacy .red-bottom-nav__item:active{
        color:var(--red-color-mobile-menu-text,#fff);
        opacity:.78;
    }
}
@media(max-width:560px){
    .red-legacy #categorias-comercios,
    .red-legacy #comercios{
        scroll-margin-top:108px;
    }
    .red-legacy .red-mall-content__header{
        margin:0 0 7px;
        padding:0 0 7px;
    }
    .red-legacy .red-mall-content__header--root{
        justify-content:flex-end;
    }
    .red-legacy .red-mall-content__heading h2{
        font-size:1rem;
        line-height:1.12;
    }
    .red-legacy .red-mall-content__heading .red-mall-content__eyebrow{
        font-size:.61rem;
    }
    .red-legacy .red-mall-store-card{
        align-items:start;
        min-height:0;
        padding:10px 9px 0;
    }
    .red-legacy .red-mall-store-card__logo{
        align-self:start;
    }
    .red-legacy .red-mall-store-card__body{
        padding-bottom:5px;
    }
    .red-legacy .red-mall-store-card__body p{
        margin-bottom:6px;
        -webkit-line-clamp:2;
    }
    .red-legacy .red-mall-store-card__meta{
        margin-bottom:5px;
    }
    .red-legacy .red-mall-store-card__hours-row{
        position:static;
        grid-column:1/-1;
        left:auto;
        right:auto;
        bottom:auto;
        margin:1px -9px 0;
        padding:5px 9px;
        min-height:28px;
        overflow:visible;
        flex-wrap:wrap;
        gap:3px 9px;
    }
    .red-legacy .red-mall-store-card__hours-item{
        gap:3px;
        max-width:100%;
    }
    .red-legacy .red-mall-store-card__hours-item strong{
        font-size:.58rem;
    }
    .red-legacy .red-mall-store-card__hours-item small{
        max-width:none;
        overflow:visible;
        text-overflow:clip;
        font-size:.56rem;
    }
}


/* ========================================================================== */
/* V43.4 · Mall directory finish + checkout/mobile polish                     */
/* ========================================================================== */

/* El atributo hidden puede quedar neutralizado por reglas display:grid más
   específicas en ciertos WebViews. La clase garantiza el filtro Abiertos. */
.red-legacy .red-mall-store-card.is-filtered-out,
.red-legacy .red-mall-store-card[hidden],
.red-legacy .red-mall-open-empty[hidden]{
    display:none!important;
}

/* Tarjetas del directorio: lenguaje visual de card, no tabla. */
.red-legacy.red-mode-mall .red-mall-store-grid{
    gap:12px;
    border:0;
    background:transparent;
}
.red-legacy.red-mode-mall .red-mall-store-card{
    overflow:hidden;
    border:1px solid #e5e7eb;
    border-radius:14px;
    background:#fff;
    box-shadow:0 3px 12px rgba(15,23,42,.035);
}
.red-legacy.red-mode-mall .red-mall-store-card:hover{
    border-color:color-mix(in srgb,var(--red-color-primary,#ef1b23) 22%,#e5e7eb);
    box-shadow:0 10px 26px rgba(15,23,42,.075);
}

/* El horario forma parte de la tarjeta y queda pegado a su borde inferior. */
.red-legacy.red-mode-mall .red-mall-store-card__hours-row{
    grid-column:1/-1;
    margin:6px -14px -14px;
    padding:6px 14px;
    border-top:1px solid #edf0f3;
    border-radius:0 0 14px 14px;
    background:#fafbfc;
    flex-wrap:nowrap;
    overflow:hidden;
}
.red-legacy.red-mode-mall .red-mall-store-card__hours-item{
    min-width:0;
}
.red-legacy.red-mode-mall .red-mall-store-card__hours-item small{
    overflow:hidden;
    text-overflow:ellipsis;
}

/* Categoría seleccionada: visible pero compacta. */
.red-legacy .red-mall-content__heading h2{
    font-size:clamp(.9rem,1.05vw,1.05rem);
    line-height:1.12;
}
.red-legacy .red-mall-content__heading .red-mall-content__eyebrow{
    margin-bottom:1px;
    font-size:.58rem;
}
.red-legacy .red-mall-content__header:not(.red-mall-content__header--root){
    align-items:center;
    padding-bottom:7px;
    margin-bottom:9px;
}

@media(max-width:980px){
    .red-legacy.red-mode-mall .red-mall-store-grid{
        gap:9px;
    }
}

@media(max-width:560px){
    .red-legacy.red-mode-mall .red-mall-store-card{
        border-radius:12px;
        box-shadow:0 2px 9px rgba(15,23,42,.035);
    }
    .red-legacy.red-mode-mall .red-mall-store-card__hours-row{
        position:static;
        margin:1px -9px 0;
        padding:5px 9px;
        border-radius:0 0 12px 12px;
        flex-wrap:wrap;
        overflow:visible;
    }
    .red-legacy .red-mall-content__heading h2{
        font-size:.9rem;
    }
}

/* V43.4: el dock inferior es la referencia visual del CTA de checkout.
   Dejamos sólo una separación mínima para que parezcan un mismo bloque. */
@media(max-width:850px){
    .red-legacy .red-checkout__mobile-cta,
    .red-legacy .red-review__mobile-cta,
    .red-legacy .red-order-status__mobile-cta{
        bottom:calc(56px + env(safe-area-inset-bottom,0px))!important;
    }
}
/* ========================================================================== */
/* V43.4.1 · Directorio Mall: horario 12 h + mejor aprovechamiento horizontal */
/* ========================================================================== */
.red-legacy.red-mode-mall .red-mall-store-card{
    grid-template-columns:126px minmax(0,1fr);
}
.red-legacy.red-mode-mall .red-mall-store-card__body{
    width:100%;
    min-width:0;
    padding-right:32px;
}
.red-legacy.red-mode-mall .red-mall-store-card__body p,
.red-legacy.red-mode-mall .red-mall-store-card__meta{
    width:100%;
    max-width:none;
}
.red-legacy.red-mode-mall .red-mall-store-card__meta{
    align-items:center;
    column-gap:12px;
}
.red-legacy.red-mode-mall .red-mall-store-card__go{
    position:absolute;
    top:calc(50% - 15px);
    right:2px;
    z-index:2;
    transform:translateY(-50%);
}
.red-legacy.red-mode-mall .red-mall-store-card__go:hover{
    transform:translate(2px,-50%);
}
.red-legacy.red-mode-mall .red-mall-store-card__hours-item small{
    text-overflow:clip;
}
@media(max-width:980px){
    .red-legacy.red-mode-mall .red-mall-store-card{
        grid-template-columns:96px minmax(0,1fr);
    }
}
@media(max-width:560px){
    .red-legacy.red-mode-mall .red-mall-store-card{
        grid-template-columns:78px minmax(0,1fr);
    }
    .red-legacy.red-mode-mall .red-mall-store-card__body{
        padding-right:16px;
    }
    .red-legacy.red-mode-mall .red-mall-store-card__meta{
        column-gap:8px;
    }
    .red-legacy.red-mode-mall .red-mall-store-card__go{
        top:calc(50% - 14px);
        right:8px;
    }
    .red-legacy.red-mode-mall .red-mall-store-card__hours-item small{
        font-size:.57rem;
    }
}

/* ========================================================================== */
/* V43.4.2 · Directorio Mall móvil: aire entre logo e información             */
/* ========================================================================== */
@media(max-width:560px){
    .red-legacy.red-mode-mall .red-mall-store-card{
        column-gap:14px;
    }
    .red-legacy.red-mode-mall .red-mall-store-card__body{
        padding-left:27px;
    }
}
