.er-categories-bar,
.vb-categories-bar {
    position: sticky;
    top: var(--er-header-height);
    z-index: 700;
    background: rgba(254, 254, 253, 0.96);
    border-bottom: 1px solid rgba(0, 36, 105, 0.1);
    box-shadow: 0 10px 24px rgba(0, 36, 105, 0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.er-categories-bar__inner {
    padding-top: 9px;
    padding-bottom: 9px;
}

.er-categories,
.vb-categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 9px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 4px 7px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.er-categories::-webkit-scrollbar,
.vb-categories::-webkit-scrollbar {
    height: 6px;
}

.er-categories::-webkit-scrollbar-track,
.vb-categories::-webkit-scrollbar-track {
    background: rgba(0, 36, 105, 0.06);
    border-radius: 999px;
}

.er-categories::-webkit-scrollbar-thumb,
.vb-categories::-webkit-scrollbar-thumb {
    background: rgba(0, 36, 105, 0.26);
    border-radius: 999px;
}

.er-category,
.vb-category {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--er-gray-700);
    background: #ffffff;
    border: 1px solid rgba(0, 36, 105, 0.11);
    font-size: 13px;
    font-weight: 1000;
    white-space: nowrap;
    box-shadow: var(--er-shadow-sm);
    transition: var(--transition-normal);
}

.er-category i,
.vb-category i {
    color: var(--er-primary);
    font-size: 12px;
}

.er-category:hover,
.er-category.is-active,
.vb-category:hover,
.vb-category.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--er-primary), var(--er-accent));
    border-color: transparent;
    box-shadow: 0 14px 30px rgba(0, 36, 105, 0.16);
    transform: translateY(-1px);
}

.er-category:hover i,
.er-category.is-active i,
.vb-category:hover i,
.vb-category.is-active i {
    color: #ffffff;
}

.er-section--products {
    padding: 24px 0 48px;
}

.er-section-head {
    margin-bottom: 16px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.er-section-head h1 {
    margin: 6px 0 0;
    color: var(--er-gray-900);
    font-size: clamp(24px, 3vw, 38px);
    font-weight: 1000;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.er-products-grid,
.vb-products-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.vb-product-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(0, 36, 105, 0.1);
    box-shadow: var(--er-shadow-sm);
    cursor: pointer;
    transition: var(--transition-normal);
}

.vb-product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--er-shadow-lg);
}

.vb-product-card__image {
    position: relative;
    aspect-ratio: 1 / 1;
    display: block;
    overflow: hidden;
    background:
        radial-gradient(
            circle at top left,
            rgba(0, 36, 105, 0.08),
            transparent 42%
        ),
        linear-gradient(135deg, #f8fafc, #ffffff);
}

.vb-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.vb-product-card:hover .vb-product-card__image img {
    transform: scale(1.04);
}

.vb-product-card__empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--er-gray-400);
    background: var(--er-gray-100);
}

.vb-product-card__body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.vb-product-card__category {
    display: block;
    min-height: 15px;
    margin-bottom: 5px;
    color: var(--er-primary);
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: 0.07em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vb-product-card__title {
    min-height: 40px;
    margin: 0 0 10px;
    color: var(--er-gray-900);
    font-size: 14.5px;
    font-weight: 1000;
    line-height: 1.28;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-wrap: balance;
}

.vb-product-card__bottom {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.vb-product-card__price {
    margin: 0;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    color: var(--er-primary);
    line-height: 1;
}

.vb-product-card__price span {
    font-size: 12px;
    font-weight: 1000;
}

.vb-product-card__price strong {
    color: var(--er-primary);
    font-size: 21px;
    font-weight: 1000;
    letter-spacing: -0.04em;
}

.vb-product-card__cart-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border: 0;
    border-radius: 14px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(
        135deg,
        var(--er-accent),
        var(--er-accent-dark)
    );
    box-shadow: 0 12px 26px rgba(var(--er-accent-rgb), 0.24);
    transition: var(--transition-normal);
}

.vb-product-card__cart-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(var(--er-accent-rgb), 0.3);
}

.vb-product-card__cart-btn i {
    font-size: 15px;
    line-height: 1;
}

.er-load-wrap,
.vb-load-wrap--auto {
    min-height: 92px;
    padding: 26px 0 8px;
    display: grid;
    place-items: center;
}

.vb-products-sentinel {
    width: 100%;
    height: 2px;
}

.er-loader,
.er-products-end,
.vb-loader,
.vb-products-end {
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 1000;
    box-shadow: var(--er-shadow-sm);
}

.er-loader,
.vb-loader {
    color: var(--er-primary);
    background: rgba(0, 36, 105, 0.07);
    border: 1px solid rgba(0, 36, 105, 0.12);
}

.er-products-end,
.vb-products-end {
    color: var(--er-gray-600);
    background: #ffffff;
    border: 1px solid rgba(0, 36, 105, 0.1);
}

/* Safari/iOS preventivo */
.er-categories-bar,
.vb-product-card,
.vb-product-card__image,
.vb-product-card__cart-btn {
    -webkit-tap-highlight-color: transparent;
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
}

.vb-product-card img {
    -webkit-user-drag: none;
    user-select: none;
}

@media (max-width: 1320px) {
    .er-products-grid,
    .vb-products-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .er-products-grid,
    .vb-products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .er-products-grid,
    .vb-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .er-categories-bar,
    .vb-categories-bar {
        top: 116px;
    }

    .er-categories-bar__inner {
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .er-categories,
    .vb-categories {
        gap: 8px;
        padding-bottom: 5px;
    }

    .er-category,
    .vb-category {
        min-height: 34px;
        padding: 0 11px;
        font-size: 12px;
    }

    .er-section--products {
        padding-top: 16px;
        padding-bottom: 28px;
    }

    .er-section-head {
        margin-bottom: 12px;
    }

    .er-section-head h1 {
        font-size: 22px;
    }

    .er-products-grid,
    .vb-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .vb-product-card {
        border-radius: 16px;
    }

    .vb-product-card__body {
        padding: 10px;
    }

    .vb-product-card__category {
        font-size: 10.5px;
    }

    .vb-product-card__title {
        min-height: 38px;
        margin-bottom: 8px;
        font-size: 13px;
        line-height: 1.25;
    }

    .vb-product-card__price strong {
        font-size: 19px;
    }

    .vb-product-card__cart-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
        border-radius: 13px;
    }

    .er-load-wrap,
    .vb-load-wrap--auto {
        min-height: 76px;
        padding-top: 18px;
    }

    .er-loader,
    .er-products-end,
    .vb-loader,
    .vb-products-end {
        min-height: 42px;
        padding: 10px 14px;
        font-size: 13px;
    }
}

.er-categories-shell {
    position: relative;
    min-width: 0;
    display: flex;
    align-items: center;
}

.er-categories-shell::before,
.er-categories-shell::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 44px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.er-categories-shell::before {
    left: 0;
    background: linear-gradient(
        90deg,
        rgba(254, 254, 253, 0.98),
        rgba(254, 254, 253, 0)
    );
}

.er-categories-shell::after {
    right: 0;
    background: linear-gradient(
        270deg,
        rgba(254, 254, 253, 0.98),
        rgba(254, 254, 253, 0)
    );
}

.er-categories-shell.has-left::before,
.er-categories-shell.has-right::after {
    opacity: 1;
}

.er-categories-shell .er-categories,
.er-categories-shell .vb-categories {
    width: 100%;
    padding-left: 48px;
    padding-right: 48px;
    scrollbar-width: none;
}

.er-categories-shell .er-categories::-webkit-scrollbar,
.er-categories-shell .vb-categories::-webkit-scrollbar {
    display: none;
}

.er-categories-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--er-primary);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 36, 105, 0.16);
    cursor: pointer;
    transition: 0.18s ease;
}

.er-categories-nav:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--er-primary), var(--er-accent));
    transform: translateY(-50%) scale(1.04);
}

.er-categories-nav:disabled {
    opacity: 0;
    pointer-events: none;
}

.er-categories-nav--left {
    left: 4px;
    transform: translateY(-50%);
}

.er-categories-nav--right {
    right: 4px;
    transform: translateY(-50%);
}

@media (max-width: 760px) {
    .er-categories-shell .er-categories,
    .er-categories-shell .vb-categories {
        padding-left: 38px;
        padding-right: 38px;
    }

    .er-categories-nav {
        width: 30px;
        height: 30px;
        font-size: 12px;
        box-shadow: 0 8px 18px rgba(0, 36, 105, 0.14);
    }

    .er-categories-shell::before,
    .er-categories-shell::after {
        width: 36px;
    }
}

.er-categories-nav {
    position: absolute;
    top: 43%;
    z-index: 8;
    width: 42px;
    height: 42px;
    border: 2px solid rgba(0, 36, 105, 0.16);
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--er-primary), var(--er-accent));
    box-shadow:
        0 14px 30px rgba(0, 36, 105, 0.24),
        0 0 0 5px rgba(255, 255, 255, 0.88);
    cursor: pointer;
    transition: 0.18s ease;
}

.er-categories-nav i {
    font-size: 15px;
    line-height: 1;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22));
}

.er-categories-nav:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--er-accent), var(--er-primary));
    box-shadow:
        0 18px 36px rgba(0, 36, 105, 0.3),
        0 0 0 6px rgba(255, 255, 255, 0.95);
}

.er-categories-nav:active {
    transform: translateY(-50%) scale(0.96);
}

.er-categories-nav:disabled {
    opacity: 0;
    pointer-events: none;
}

.er-categories-nav--left {
    left: 6px;
    transform: translateY(-50%);
}

.er-categories-nav--right {
    right: 6px;
    transform: translateY(-50%);
}

@media (max-width: 760px) {
    .er-categories-shell .er-categories,
    .er-categories-shell .vb-categories {
        padding-left: 44px;
        padding-right: 44px;
    }

    .er-categories-nav {
        top: 42%;
        width: 38px;
        height: 38px;
        border-width: 2px;
        box-shadow:
            0 12px 24px rgba(0, 36, 105, 0.22),
            0 0 0 4px rgba(255, 255, 255, 0.9);
    }

    .er-categories-nav i {
        font-size: 14px;
    }

    .er-categories-nav--left {
        left: 4px;
    }

    .er-categories-nav--right {
        right: 4px;
    }

    .er-categories-shell::before,
    .er-categories-shell::after {
        width: 42px;
    }
}

.vb-product-card__price-wrap {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.vb-product-card__old-price {
    width: fit-content;
    position: relative;
    color: var(--er-gray-400);
    font-size: 14.5px;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1;
}

.vb-product-card__old-price::after {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    top: 52%;
    height: 1px;
    background: rgba(239, 68, 68, 0.68);
    transform: rotate(-3deg);
    border-radius: 999px;
}

@media (max-width: 760px) {
    .vb-product-card__price-wrap {
        gap: 3px;
    }

    .vb-product-card__old-price {
        font-size: 13.5px;
    }
}

/*
|--------------------------------------------------------------------------
| Store banners
|--------------------------------------------------------------------------
*/

.er-banners-section {
    padding: 14px 0 18px;
    background: transparent;
}

.er-banners-slider {
    position: relative;
    width: 100%;
    border-radius: 22px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.08),
        0 2px 8px rgba(15, 23, 42, 0.04);
}

.er-banners-track {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 5;
    overflow: hidden;
}

.er-banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.015);
    pointer-events: none;
    transition:
        opacity 0.55s ease,
        transform 0.75s ease;
}

.er-banner-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    z-index: 2;
}

.er-banner-slide picture,
.er-banner-slide img {
    width: 100%;
    height: 100%;
    display: block;
}

.er-banner-slide img {
    object-fit: cover;
    object-position: center;
    -webkit-user-drag: none;
    user-select: none;
}

/*
|--------------------------------------------------------------------------
| Banner navigation
|--------------------------------------------------------------------------
*/

.er-banners-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    cursor: pointer;
    transform: translateY(-50%);
    transition: 0.18s ease;
}

.er-banners-nav:hover {
    background: rgba(15, 23, 42, 0.58);
    transform: translateY(-50%) scale(1.04);
}

.er-banners-nav:active {
    transform: translateY(-50%) scale(0.96);
}

.er-banners-nav--prev {
    left: 14px;
}

.er-banners-nav--next {
    right: 14px;
}

.er-banners-nav i {
    font-size: 13px;
    line-height: 1;
}

/*
|--------------------------------------------------------------------------
| Banner dots
|--------------------------------------------------------------------------
*/

.er-banners-dots {
    position: absolute;
    left: 50%;
    bottom: 13px;
    z-index: 6;
    padding: 6px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(8px);
    transform: translateX(-50%);
}

.er-banners-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    cursor: pointer;
    transition: 0.18s ease;
}

.er-banners-dots button.is-active {
    width: 20px;
    background: #ffffff;
}

/*
|--------------------------------------------------------------------------
| Responsive banners
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {
    .er-banners-section {
        padding: 10px 0 14px;
    }

    .er-banners-slider {
        border-radius: 16px;
    }

    .er-banners-track {
        aspect-ratio: 18 / 7;
    }

    .er-banners-nav {
        width: 26px;
        height: 26px;
        color: rgba(255, 255, 255, 0.88);
        background: rgba(15, 23, 42, 0.18);
        border: 1px solid rgba(255, 255, 255, 0.32);
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
        opacity: 0.72;
    }

    .er-banners-nav:hover {
        opacity: 1;
        background: rgba(15, 23, 42, 0.34);
        transform: translateY(-50%) scale(1.03);
    }

    .er-banners-nav--prev {
        left: 6px;
    }

    .er-banners-nav--next {
        right: 6px;
    }

    .er-banners-nav i {
        font-size: 9px;
    }

    .er-banners-dots {
        bottom: 7px;
        padding: 4px 6px;
        gap: 5px;
        background: rgba(15, 23, 42, 0.2);
    }

    .er-banners-dots button {
        width: 5px;
        height: 5px;
        background: rgba(255, 255, 255, 0.55);
    }

    .er-banners-dots button.is-active {
        width: 14px;
        background: rgba(255, 255, 255, 0.9);
    }
}

/*
|--------------------------------------------------------------------------
| Safari / iOS support - Store banners
|--------------------------------------------------------------------------
*/

.er-banners-slider,
.er-banners-track,
.er-banner-slide,
.er-banner-slide picture,
.er-banner-slide img {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.er-banners-slider {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.er-banner-slide {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: opacity, transform;
}

.er-banner-slide img {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.er-banners-nav,
.er-banners-dots {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

@supports not (
    (-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))
) {
    .er-banners-nav {
        background: rgba(15, 23, 42, 0.55);
    }

    .er-banners-dots {
        background: rgba(15, 23, 42, 0.42);
    }
}

@supports not (aspect-ratio: 16 / 5) {
    .er-banners-track {
        height: 0;
        padding-bottom: 31.25%;
    }

    @media (max-width: 768px) {
        .er-banners-track {
            padding-bottom: 38.8889%;
        }
    }
}
