/* =========================================================
   TOUCHMEDICAL — HOME
========================================================= */

.tm-home {
    width: 100%;
}

.tm-home-content {
    width: 100%;
}


/* =========================================================
   HERO / BANNERS
========================================================= */

.tm-home-banners {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.tm-home-banners-track {
    position: relative;
    width: 100%;
}

.tm-home-banner {
    display: none;

    position: relative;
    width: 100%;
    height: 400px;
    min-height: 400px;

    overflow: hidden;

    background-color: #f4f8f3;
    background-image: var(--tm-banner-bg-desktop);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.tm-home-banner.is-active {
    display: block;
}


/* =========================================================
   BANNER CONTENT
========================================================= */

.tm-home-banner-content {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: var(--tm-container-width);
    height: 100%;

    margin-left: auto;
    margin-right: auto;

    padding-top: 28px;
    padding-right: var(--tm-container-padding);
    padding-bottom: 55px;
    padding-left: var(--tm-container-padding);
}


/* =========================================================
   BANNER OVERLINE
========================================================= */

.tm-home-banner-overline {
    display: inline-block;

    margin-bottom: 10px;

    color: var(--tm-color-accent);

    font-family: var(--tm-font);
    font-size: var(--tm-overline-size);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}


/* =========================================================
   BANNER TITLE
========================================================= */

.tm-home-banner-title {
    max-width: 560px;

    margin: 0 !important;
    padding: 0;

    color: var(--tm-color-text) !important;

    font-family: var(--tm-font) !important;
    font-size: 40px !important;
    font-weight: 600 !important;
    line-height: 1.08 !important;
}


/* =========================================================
   BANNER DESCRIPTION
========================================================= */

.tm-home-banner-description {
    max-width: 470px;

    margin-top: 16px;

    color: #66706a;

    font-family: var(--tm-font);
    font-size: var(--tm-text-size);
    font-weight: 400;
    line-height: 1.45;
}

.tm-home-banner-description p {
    margin: 0;

    color: #66706a;

    font-size: inherit;
    line-height: inherit;
}


/* =========================================================
   BANNER BUTTON
========================================================= */

.tm-home-banner-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-height: 42px;

    margin-top: 26px;
    padding: 0 17px;

    color: var(--tm-color-white) !important;
    background-color: var(--tm-color-button) !important;

    border: 0;
    border-radius: var(--tm-button-radius);

    box-shadow: 0 4px 10px var(--tm-color-shadow);

    font-family: var(--tm-font) !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;

    text-decoration: none !important;

    transition:
        transform var(--tm-transition),
        box-shadow var(--tm-transition);
}

.tm-home-banner-button:hover {
    color: var(--tm-color-white) !important;
    background-color: var(--tm-color-button) !important;

    transform: translateY(-2px);

    box-shadow: 0 6px 16px rgba(91, 135, 33, 0.4);
}

.tm-home-banner-button-arrow {
    display: inline-block;

    font-size: 18px;
    line-height: 1;
}


/* =========================================================
   BANNER ARROWS
========================================================= */

.tm-home-banner-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    padding: 0;
    margin: 0;

    color: var(--tm-color-text) !important;
    background: var(--tm-color-white) !important;

    border: none !important;
    border-radius: 50% !important;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08) !important;

    font-family: var(--tm-font) !important;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    transform: translateY(-50%) !important;
}

.tm-home-banner-arrow:hover {
    color: var(--tm-color-text) !important;
    background: var(--tm-color-white) !important;

    transform: translateY(-50%) scale(1.04) !important;
}

.tm-home-banner-arrow span {
    display: block;

    margin-top: -3px;
}

.tm-home-banner-arrow-prev {
    left: 40px;
}

.tm-home-banner-arrow-next {
    right: 40px;
}


/* =========================================================
   BANNER DOTS
========================================================= */

.tm-home-banner-dots {
    position: absolute;
    left: 50%;
    bottom: 12px;
    z-index: 5;

    display: flex;
    align-items: center;

    gap: 12px;

    transform: translateX(-50%);
}

.tm-home-banner-dot {
    display: block;

    width: 9px;
    height: 9px;

    padding: 0;
    margin: 0;

    background: #d8d8d8 !important;

    border: none !important;
    border-radius: 50% !important;

    box-shadow: none !important;

    cursor: pointer;
}

.tm-home-banner-dot:hover {
    background: #c7c7c7 !important;

    transform: none !important;

    box-shadow: none !important;
}

.tm-home-banner-dot.is-active {
    background: var(--tm-color-button) !important;

    transform: scale(1.15);
}


/* =========================================================
   SPECIAL OFFERS
========================================================= */

.tm-home-special-offers {
    width: 100%;

    padding-top: 64px;
    padding-bottom: 70px;

    background: #fff;
}


/* =========================================================
   SPECIAL OFFERS HEADER
========================================================= */

.tm-home-special-offers-header {
    text-align: center;
}

.tm-home-special-offers-overline {
    margin-bottom: 10px;

    color: var(--tm-color-accent);

    font-family: var(--tm-font);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tm-home-special-offers-title {
    margin: 0 !important;

    color: var(--tm-color-text) !important;

    font-family: var(--tm-font) !important;
    font-size: var(--tm-h2-size) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

.tm-home-special-offers-description {
    max-width: 650px;

    margin: 14px auto 0;

    color: #66706a;

    font-family: var(--tm-font);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
}


/* =========================================================
   SPECIAL OFFERS SLIDER
========================================================= */

.tm-home-special-offers-slider {
    position: relative;

    margin-top: 34px;
}

.tm-home-special-offers-viewport {
    width: 100%;

    overflow: hidden;
}

.tm-home-special-offers-track {
    display: flex;

    width: 100%;

    gap: 24px;

    transition: transform 0.35s ease;

    will-change: transform;
}

.tm-home-special-offers-slide {
    flex: 0 0 calc(
        (100% - 72px) / 4
    );

    min-width: 0;
}


/* =========================================================
   SPECIAL OFFERS ARROWS
========================================================= */

.tm-special-offers-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    padding: 0;
    margin: 0;

    color: var(--tm-color-text) !important;
    background: #fff !important;

    border: none !important;
    border-radius: 50% !important;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08) !important;

    font-family: var(--tm-font) !important;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    transform: translateY(-50%) !important;
}

.tm-special-offers-arrow:hover {
    color: var(--tm-color-text) !important;
    background: #fff !important;

    transform: translateY(-50%) scale(1.04) !important;
}

.tm-special-offers-arrow-prev {
    left: -42px;
}

.tm-special-offers-arrow-next {
    right: -42px;
}


/* =========================================================
   SPECIAL OFFERS DOTS
========================================================= */

.tm-home-special-offers-dots {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    margin-top: 28px;
}

.tm-home-special-offers-dots[hidden] {
    display: none !important;
}

.tm-special-offers-dot {
    display: block;

    width: 9px;
    height: 9px;

    padding: 0;
    margin: 0;

    background: #d8d8d8 !important;

    border: none !important;
    border-radius: 50% !important;

    box-shadow: none !important;

    cursor: pointer;
}

.tm-special-offers-dot:hover {
    background: #c7c7c7 !important;
}

.tm-special-offers-dot.is-active {
    background: var(--tm-color-button) !important;

    transform: scale(1.15);
}


/* =========================================================
   SPECIAL OFFERS CATALOG BUTTON
========================================================= */

.tm-home-special-offers-catalog {
    display: flex;
    justify-content: center;

    margin-top: 30px;
}

.tm-home-special-offers-catalog-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    min-height: 48px;

    padding: 0 22px;

    color: #fff !important;
    background: var(--tm-color-button) !important;

    border-radius: var(--tm-button-radius);

    box-shadow: 0 4px 10px var(--tm-color-shadow);

    font-family: var(--tm-font) !important;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;

    text-decoration: none !important;

    transition:
        transform var(--tm-transition),
        box-shadow var(--tm-transition);
}

.tm-home-special-offers-catalog-button:hover {
    color: #fff !important;
    background: var(--tm-color-button) !important;

    transform: translateY(-2px);

    box-shadow: 0 6px 16px rgba(91, 135, 33, 0.4);
}

.tm-home-special-offers-catalog-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tm-home-special-offers-catalog-icon img {
    display: block;

    width: 18px;
    height: 18px;

    filter: brightness(0) invert(1);
}


/* =========================================================
   CATALOG CATEGORIES
========================================================= */

.tm-home-catalog {
    width: 100%;

    padding-top: 68px;
    padding-bottom: 74px;

    background: #edf4ee;
}


/* =========================================================
   CATALOG HEADER
========================================================= */

.tm-home-catalog-header {
    max-width: 760px;

    margin: 0 auto;

    text-align: center;
}

.tm-home-catalog-overline {
    margin-bottom: 10px;

    color: var(--tm-color-accent);

    font-family: var(--tm-font);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tm-home-catalog-title {
    margin: 0 !important;

    color: var(--tm-color-text) !important;

    font-family: var(--tm-font) !important;
    font-size: var(--tm-h2-size) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

.tm-home-catalog-description {
    max-width: 620px;

    margin: 14px auto 0;

    color: #66706a;

    font-family: var(--tm-font);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
}


/* =========================================================
   CATALOG GRID
========================================================= */

.tm-home-catalog-grid {
    display: grid;

    grid-template-columns: repeat(
        3,
        minmax(0, 1fr)
    );

    gap: 24px;

    margin-top: 34px;
}


/* =========================================================
   HIDDEN CATEGORIES
========================================================= */

.tm-home-catalog-hidden {
    display: contents;
}

.tm-home-catalog-hidden .tm-category-card {
    display: none;
}

.tm-home-catalog-grid.is-expanded
.tm-home-catalog-hidden
.tm-category-card {
    display: block;
}


/* =========================================================
   EXPAND CARD
========================================================= */

.tm-home-catalog-expand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    position: relative;

    width: 100%;
    height: 100%;
    min-height: 100%;

    padding: 28px 30px;

    color: var(--tm-color-accent) !important;
    background: transparent !important;

    border: 2px solid var(--tm-color-accent) !important;
    border-radius: 12px !important;

    box-shadow: none !important;

    font-family: var(--tm-font) !important;

    text-align: left;

    cursor: pointer;

    transition:
        background-color var(--tm-transition),
        color var(--tm-transition);
}

.tm-home-catalog-expand:hover,
.tm-home-catalog-expand:focus,
.tm-home-catalog-expand:active {
    color: var(--tm-color-accent) !important;
    background: rgba(137, 196, 59, 0.06) !important;

    border-color: var(--tm-color-accent) !important;

    transform: none !important;
    box-shadow: none !important;

    outline: none;
}

.tm-home-catalog-expand-title {
    display: block;

    color: inherit;

    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;

    text-transform: uppercase;
}

.tm-home-catalog-expand-count {
    display: block;

    margin-top: 15px;

    color: #66706a;

    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
}


/* После раскрытия убираем карточку */

.tm-home-catalog-grid.is-expanded
.tm-home-catalog-expand {
    display: none;
}



/* =========================================================
   EXPAND CARD — HOVER BORDER
========================================================= */

.tm-home-catalog-expand::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;

    border: 3px solid var(--tm-color-accent);
    border-radius: 10px;

    opacity: 0;
    pointer-events: none;

    transition: opacity var(--tm-transition);
}

.tm-home-catalog-expand:hover::after,
.tm-home-catalog-expand:focus-visible::after {
    opacity: 1;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .tm-home-banner-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .tm-home-banner-arrow-prev {
        left: 20px;
    }

    .tm-home-banner-arrow-next {
        right: 20px;
    }


    .tm-home-special-offers-slide {
        flex-basis: calc(
            (100% - 48px) / 3
        );
    }


    .tm-special-offers-arrow-prev {
        left: -28px;
    }

    .tm-special-offers-arrow-next {
        right: -28px;
    }


    .tm-home-catalog-grid {
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );

        gap: 20px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {


    /* -----------------------------------------------------
       HERO
    ----------------------------------------------------- */

    .tm-home-banner {
        height: 360px;
        min-height: 360px;

        background-image: var(--tm-banner-bg-mobile);
        background-position: center center;
        background-size: cover;
    }

    .tm-home-banner-content {
        height: 268px;

        padding-top: 14px;
        padding-right: var(--tm-container-padding);
        padding-bottom: 42px;
        padding-left: var(--tm-container-padding);
    }

    .tm-home-banner-overline {
        margin-bottom: 7px;

        font-size: 10px;
    }

    .tm-home-banner-title {
        max-width: 240px;

        font-size: var(--tm-h1-size) !important;
        line-height: 1.08 !important;
    }

    .tm-home-banner-description {
        max-width: 205px;

        margin-top: 11px;

        font-size: var(--tm-text-size);
        line-height: 1.35;
    }

    .tm-home-banner-button {
        min-height: 36px;

        margin-top: 19px;
        padding: 0 14px;

        font-size: 11px;
    }

    .tm-home-banner-button-arrow {
        font-size: 15px;
    }


    /* Стрелки баннера на мобильном скрыты */

    .tm-home-banner-arrow {
        display: none !important;
    }

    .tm-home-banner-dots {
        bottom: 10px;

        gap: 10px;
    }

    .tm-home-banner-dot {
        width: 8px;
        height: 8px;
    }


    /* -----------------------------------------------------
       SPECIAL OFFERS
    ----------------------------------------------------- */

    .tm-home-special-offers {
        padding-top: 45px;
        padding-bottom: 50px;
    }

    .tm-home-special-offers-overline {
        font-size: 10px;
    }

    .tm-home-special-offers-title {
        font-size: var(--tm-h2-size) !important;
    }

    .tm-home-special-offers-description {
        margin-top: 10px;

        font-size: 13px;
    }

    .tm-home-special-offers-slider {
        margin-top: 25px;
    }

    .tm-home-special-offers-slide {
        flex: 0 0 100%;
    }


    /* Стрелки товаров на мобильном скрыты */

    .tm-special-offers-arrow {
        display: none !important;
    }


    .tm-home-special-offers-dots {
        gap: 10px;

        margin-top: 22px;
    }

    .tm-special-offers-dot {
        width: 8px;
        height: 8px;
    }

    .tm-home-special-offers-catalog {
        margin-top: 24px;
    }

    .tm-home-special-offers-catalog-button {
        min-height: 44px;

        padding: 0 18px;

        font-size: 13px;
    }

    .tm-home-special-offers-catalog-icon img {
        width: 16px;
        height: 16px;
    }




    /* -----------------------------------------------------
   CATALOG
----------------------------------------------------- */

.tm-home-catalog {
    padding-top: 0px;
    padding-bottom: 50px;

    background: #fff;
}

.tm-home-catalog-overline {
    font-size: 10px;
}

.tm-home-catalog-title {
    font-size: var(--tm-h2-size) !important;
}

.tm-home-catalog-description {
    margin-top: 10px;

    font-size: 13px;
}

.tm-home-catalog-grid {
    grid-template-columns: 1fr;

    gap: 16px;

    margin-top: 25px;
}


/* -----------------------------------------------------
   КНОПКА «РАЗВЕРНУТЬ ВСЕ»
----------------------------------------------------- */

.tm-home-catalog-expand {
    min-height: 72px;

    padding: 14px 18px;

    background: #edf4ee !important;

    border: 1px solid var(--tm-color-accent) !important;
    border-radius: 8px !important;

    justify-content: center;
}

.tm-home-catalog-expand-title {
    font-size: 16px;
    line-height: 1.3;
}

.tm-home-catalog-expand-count {
    margin-top: 6px;

    font-size: 14px;
    line-height: 1.35;
}
