/* home-new v2.3.0 — usmall.ru homepage structure with smart.md components */

@font-face {
    font-family: "VelaSans";
    src: url("/catalog/view/smartv3/fonts/VelaSans/Static/Web/VelaSans-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "VelaSans";
    src: url("/catalog/view/smartv3/fonts/VelaSans/Static/Web/VelaSans-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --hn-header-h: 120px;
    --hn-font: "VelaSans", "Vela Sans", Roboto, Arial, sans-serif;
}

.hn-page {
    background: #ffffff;
    padding-top: calc(var(--hn-header-h) + 16px);
    padding-bottom: 48px;
    color: #12100b;
    font-family: var(--hn-font);
    font-weight: 400;
}

.hn-page h2,
.hn-page h4,
.hn-page a,
.hn-page span,
.hn-page button,
.hn-page input,
.hn-page .custom_product_title h4,
.hn-page .custom_product_price,
.hn-page .custom_product_credit,
.hn-page .custom_product_delivery {
    font-family: var(--hn-font);
}

.hn-wrapper {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 16px;
}

.hn-block {
    margin: 0 0 40px;
}

.hn-block--tight {
    margin-bottom: 28px;
}

.hn-block__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 20px;
}

.hn-block__head h2 {
    margin: 0;
    font-size: 28px;
    line-height: 32px;
    font-weight: 600;
    color: #12100b;
}

.hn-block__nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.hn-block__all {
    font-size: 14px;
    font-weight: 600;
    color: #4a4a4a;
    text-decoration: none;
    margin-right: 4px;
}

.hn-block__all:hover {
    color: #12100b;
}

.hn-arrow {
    width: 36px;
    height: 36px;
    border: 1px solid #e6e6e6;
    background: #ffffff;
    color: #12100b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: background .15s ease, border-color .15s ease;
}

.hn-arrow:hover {
    background: #f4f4f4;
    border-color: #d4d4d4;
}

/* ---------- info strip ---------- */

.hn-infobar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #f4f4f4;
    padding: 18px 24px;
    margin: 0 0 24px;
    border-radius: 1.2rem;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.hn-infobar a {
    color: #12100b;
    text-decoration: underline;
    text-transform: none;
    font-weight: 600;
    letter-spacing: 0;
}

/* ---------- banners ---------- */

.hn-banner {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 1.2rem;
    text-decoration: none;
    color: inherit;
}

.hn-banner img {
    display: block;
    width: 100%;
    height: auto;
}

.hn-banner__fill {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    padding: 32px 40px;
}

.hn-banner__fill--yellow {
    background: linear-gradient(120deg, #ffd23b 0%, #ffb02e 100%);
    color: #12100b;
}

.hn-banner__fill--dark {
    background: linear-gradient(120deg, #232323 0%, #4a4a4a 100%);
    color: #ffffff;
}

.hn-banner__fill--mint {
    background: linear-gradient(120deg, #b2f2bb 0%, #63d297 100%);
    color: #12100b;
}

.hn-banner__fill--blue {
    background: linear-gradient(120deg, #a5d8ff 0%, #4dabf7 100%);
    color: #12100b;
}

.hn-banner__title {
    font-size: 32px;
    line-height: 1.1;
    font-weight: 600;
}

.hn-banner__subtitle {
    font-size: 16px;
    line-height: 1.35;
    opacity: .85;
    max-width: 26ch;
}

.hn-banner--third .hn-banner__title {
    font-size: 26px;
}

.hn-banner--third .hn-banner__fill {
    padding: 28px;
}

.hn-banner-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 29px;
}

.hn-banner-grid { display: grid; gap: 12px; }
.hn-banner-grid--1 { grid-template-columns: minmax(0, 1fr); }
.hn-banner-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hn-banner-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hn-banner-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hn-banner-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hn-banner-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* ---------- hero slider ---------- */

.hn-hero {
    position: relative;
}

.hn-hero__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hn-hero__track::-webkit-scrollbar {
    display: none;
}

.hn-hero__slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

.hn-hero__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.hn-hero__dots button,
.hn-hero__dots i {
    position: relative;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.hn-hero__dots button::after,
.hn-hero__dots i::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .45);
    transform: translate(-50%, -50%);
}

.hn-hero__dots button.on::after,
.hn-hero__dots i.on::after {
    background: #fff;
}

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

.hn-hero__arrow {
    display: none;
}

/* ---------- tiles (brands + categories) ---------- */

.hn-tiles {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hn-tiles::-webkit-scrollbar {
    display: none;
}

.hn-tile {
    display: block;
    flex: 0 0 auto;
    text-decoration: none;
    color: #12100b;
}

.hn-tile__figure {
    display: block;
    overflow: hidden;
    background: #f4f4f4;
}

.hn-tile__figure img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.hn-tile:hover .hn-tile__figure img {
    transform: scale(1.04);
}

.hn-tile__name {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    line-height: 18px;
    font-weight: 600;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* brand strip: logo tiles, not cropped photos */
.hn-tiles--sm .hn-tile { width: 128px; }
.hn-tiles--sm .hn-tile__figure { width: 128px; height: 128px; background: #f4f4f4; border-radius: 1.2rem; }
.hn-tiles--sm .hn-tile__figure img { object-fit: cover; padding: 0; }
.hn-tiles--sm .hn-tile__name { display: none; }

/* category strip: photos blend into the grey tile */
.hn-tiles--lg .hn-tile { width: 180px; }
.hn-tiles--lg .hn-tile__figure { width: 180px; height: 180px; isolation: isolate; border-radius: 1.2rem; }
.hn-tiles--lg .hn-tile__figure img { object-fit: contain; padding: 12px; mix-blend-mode: multiply; }

/* ---------- product rails ---------- */
/* Cards keep the exact category.css markup and 195px column width. */

.custom_products .custom_products_content.hn-rail {
    display: flex;
    grid-template-columns: none;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 8px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.custom_products .custom_products_content.hn-rail::-webkit-scrollbar {
    display: none;
}

.custom_products .custom_products_content.hn-rail > .custom_product_content {
    flex: 0 0 195px;
    width: 195px;
    max-width: 195px;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
    .hn-banner-row { gap: 16px; }
    .hn-block__head h2 { font-size: 24px; }
}

@media (max-width: 767px) {
    .hn-page {
        padding-top: calc(var(--hn-header-h) + 8px);
        padding-bottom: 32px;
    }

    .hn-wrapper { padding: 0 12px; }

    .hn-block { margin-bottom: 28px; }

    .hn-block__head { margin-bottom: 14px; }

    .hn-block__head h2 { font-size: 20px; line-height: 24px; }

    .hn-arrow { display: none; }

    .hn-infobar {
        padding: 14px 16px;
        font-size: 12px;
    }

    .hn-banner__title { font-size: 22px; }
    .hn-banner__subtitle { font-size: 14px; }
    .hn-banner__fill { padding: 20px; }

    .hn-banner-row {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .hn-banner-row::-webkit-scrollbar { display: none; }

    .hn-banner-row > .hn-banner {
        flex: 0 0 72%;
    }

    .hn-banner-grid--3,
    .hn-banner-grid--4,
    .hn-banner-grid--5,
    .hn-banner-grid--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .hn-tiles { gap: 14px; }

    .hn-tiles--sm .hn-tile { width: 96px; }
    .hn-tiles--sm .hn-tile__figure { width: 96px; height: 96px; }

    .hn-tiles--lg .hn-tile { width: 132px; }
    .hn-tiles--lg .hn-tile__figure { width: 132px; height: 132px; }

    .hn-tile__name { font-size: 12px; line-height: 16px; }

    .custom_products .custom_products_content.hn-rail { gap: 12px; }

    .custom_products .custom_products_content.hn-rail > .custom_product_content {
        flex: 0 0 47vw;
        width: 47vw;
        max-width: 47vw;
    }
}
