/* =========================================================
   TOUCHMEDICAL — PRODUCT CARD
========================================================= */

.tm-product-card {
    position: relative;

    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;

    overflow: hidden;

    background: #fff;

    border: 1px solid #e2e2e2;
    border-radius: 9px;

    color: var(--tm-color-text);
}

.tm-product-card::after {
    content: "";

    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;

    height: 1px;

    background: #dcdcdc;

    pointer-events: none;
}


/* =========================================================
   IMAGE
========================================================= */

.tm-product-card-image {
    position: relative;

    display: block;

    width: 100%;
    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: #fff;

    text-decoration: none !important;
}

.tm-product-card-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

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

.tm-product-card:hover .tm-product-card-image img {
    transform: scale(1.02);
}


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

.tm-product-card-content {
    display: flex;
    flex-direction: column;

    flex: 1;

    padding: 17px 16px 13px;
}


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

.tm-product-card-category {
    margin-bottom: 11px;

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

    font-family: var(--tm-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}


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

.tm-product-card-title {
    display: -webkit-box;

    max-width: 100%;
    min-height: 42px;

    margin: 0;

    overflow: hidden;

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

    font-family: var(--tm-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;

    text-decoration: none !important;

    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tm-product-card-title:hover {
    color: var(--tm-color-button) !important;
}


/* =========================================================
   PRICE
========================================================= */

.tm-product-card-price {
    min-height: 29px;

    margin-top: 13px;

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

    font-family: var(--tm-font);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.tm-product-card-price del {
    margin-right: 5px;

    color: #999;

    font-size: 13px;
    font-weight: 400;
}

.tm-product-card-price ins {
    color: var(--tm-color-text);

    text-decoration: none;
}

.tm-product-card-price-request {
    display: inline-block;

    font-size: 17px;
    font-weight: 700;
}


/* =========================================================
   BOTTOM
========================================================= */

.tm-product-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-top: auto;
    padding-top: 10px;
}


/* =========================================================
   MORE LINK
========================================================= */

.tm-product-card-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;

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

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

    text-decoration: none !important;
}

.tm-product-card-more:hover {
    color: var(--tm-color-button) !important;
}


/* =========================================================
   CART BUTTON
========================================================= */

.tm-product-card-cart {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 44px;

    width: 44px;
    height: 44px;

    margin-left: auto;

    background: #fff;

    border: 1px solid #eeeeee;
    border-radius: 50%;

    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.09);

    text-decoration: none !important;

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

.tm-product-card-cart:hover {
    background: #fff;

    transform: translateY(-1px);

    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12);
}

.tm-product-card-cart img {
    display: block;

    width: 22px;
    height: 22px;

    object-fit: contain;
}


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

@media (max-width: 767px) {

    .tm-product-card-content {
        padding: 13px 12px 11px;
    }

    .tm-product-card-category {
        margin-bottom: 8px;

        font-size: 11px;
    }

    .tm-product-card-title {
        min-height: 39px;
        -webkit-line-clamp: 4;
        font-size: 13px;
    }

    .tm-product-card-price {
        margin-top: 10px;

        font-size: 16px;
    }

    .tm-product-card-price-request {
        font-size: 15px;
    }

    .tm-product-card-more {
        font-size: 11px;
    }

    .tm-product-card-cart {
        flex-basis: 34px;

        width: 34px;
        height: 34px;
    }

    .tm-product-card-cart img {
        width: 18px;
        height: 18px;
    }
}












/* =========================================================
   TOUCHMEDICAL — PRODUCT GRID
========================================================= */

.tm-product-grid {
    display: grid;

    width: 100%;

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

    gap: 24px;
}


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

@media (max-width: 1100px) {

    .tm-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
}


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

@media (max-width: 767px) {

    .tm-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}


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

@media (max-width: 420px) {

    .tm-product-grid {
        gap: 12px;
    }
}












/* =========================================================
   TOUCHMEDICAL — CATEGORY CARD
========================================================= */

.tm-category-card {
    position: relative;

    display: block;

    width: 100%;

    aspect-ratio: 2.35 / 1;

    overflow: hidden;

    border: 2px solid #D9D9D9;
    border-radius: 12px;
    
    transition: border-color var(--tm-transition);

    background: #f3f3f3;

    color: #fff !important;

    text-decoration: none !important;
}


.tm-category-card:hover,
.tm-category-card:focus-visible {
    border-color: var(--tm-color-accent);
}





/* Зелёная рамка при наведении */

.tm-category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 10;

    border: 3px solid #89C43B;
    border-radius: 10px;

    opacity: 0;
    pointer-events: none;

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

.tm-category-card:hover::after,
.tm-category-card:focus-visible::after {
    opacity: 1;
}





/* =========================================================
   IMAGE
========================================================= */

.tm-category-card-image {
    position: absolute;
    inset: 0;

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

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



/* =========================================================
   GRADIENT
========================================================= */

.tm-category-card-overlay {
    position: absolute;
    inset: 0;

    display: block;

    background: linear-gradient(
        to bottom left,
        rgba(49, 91, 120, 0) 0%,
        rgba(49, 91, 120, 0.4) 100%
    );

    pointer-events: none;
}


/* =========================================================
   NUMBER
========================================================= */

.tm-category-card-number {
    position: absolute;
    top: 12px;
    left: 13px;
    z-index: 2;

    color: #fff;

    font-family: var(--tm-font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}


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

.tm-category-card-title {
    position: absolute;
    right: 16px;
    bottom: 14px;
    left: 16px;
    z-index: 2;

    color: #fff !important;

    font-family: var(--tm-font);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;

    text-transform: uppercase;

    text-decoration: none !important;
}

.tm-category-card:hover .tm-category-card-title {
    color: #fff !important;
}


/* =========================================================
   NO IMAGE
========================================================= */

.tm-category-card--no-image {
    background: #315B78;
}


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

@media (max-width: 767px) {

    .tm-category-card {
        aspect-ratio: 2 / 1;
        border-radius: 10px;
    }

    .tm-category-card-number {
        top: 9px;
        left: 10px;

        font-size: 14px;
    }

    .tm-category-card-title {
        right: 11px;
        bottom: 10px;
        left: 11px;

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







/* =========================================================
   TOUCHMEDICAL — CATEGORY GRID
========================================================= */

.tm-category-grid {
    display: grid;

    width: 100%;

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

    gap: 24px;
}


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

@media (max-width: 1100px) {

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

        gap: 20px;
    }
}


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

@media (max-width: 767px) {

    .tm-category-grid {
        grid-template-columns: 1fr;

        gap: 16px;
    }
}









/* =========================================================
   TOUCHMEDICAL — SHOP PAGE
========================================================= */


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

.tm-shop-page {
    width: 100%;
}

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

    padding-top: 34px;
    padding-bottom: 20px;

    background: #fff;
}


/* =========================================================
   BREADCRUMBS
========================================================= */

.tm-shop-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 7px;

    margin: 0;

    color: #66706a;

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

.tm-shop-breadcrumbs a {
    color: #66706a !important;

    text-decoration: none !important;
}

.tm-shop-breadcrumbs a:hover {
    color: var(--tm-color-button) !important;
}

.tm-shop-breadcrumbs-separator {
    color: #aaa;
}

.tm-shop-breadcrumbs-current {
    color: #66706a;
}


/* =========================================================
   PAGE TITLE
========================================================= */

.tm-shop-catalog-header {
    margin-top: 10px;

    text-align: left;
}

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

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

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


/* =========================================================
   CATEGORY GRID
========================================================= */

.tm-shop-catalog-grid {
    margin-top: 34px;
}

.tm-shop-catalog-grid .tm-category-grid {
    width: 100%;
}


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

@media (max-width: 767px) {

    .tm-shop-catalog {
        padding-top: 24px;
        padding-bottom: 50px;

        background: #fff;
    }

    .tm-shop-breadcrumbs {
        font-size: 11px;
    }

    .tm-shop-catalog-header {
        margin-top: 18px;
    }

    .tm-shop-catalog-title {
        font-size: var(--tm-h2-size) !important;
        line-height: 1.2 !important;
    }

    .tm-shop-catalog-grid {
        margin-top: 24px;
    }
}









/* =========================================================
   TOUCHMEDICAL — SUBCATEGORY CARDS
========================================================= */


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

.tm-subcategory-grid {
    display: grid;

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

    gap: 20px 24px;

    width: 100%;
}


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

.tm-subcategory-card {
    display: flex;
    flex-direction: column;

    width: 100%;

    overflow: hidden;

    background: #fff;

    border: 1px solid #d9d9d9;
    border-radius: 12px;

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

    text-decoration: none !important;

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

.tm-subcategory-card:hover {
    border-color: #cfcfcf;

    box-shadow:
        0 5px 16px rgba(0, 0, 0, 0.07);

    transform: translateY(-2px);
}


/* =========================================================
   IMAGE
========================================================= */

.tm-subcategory-card-image {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 145px;

    padding: 14px 24px;

    background: #fff;

    overflow: hidden;
}

.tm-subcategory-card-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}


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

.tm-subcategory-card-title {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    min-height: 54px;

    padding: 8px 16px 14px;

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

    font-family: var(--tm-font);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;

    text-align: center;
}

.tm-subcategory-card-arrow {
    flex: 0 0 auto;

    color: inherit;

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


/* =========================================================
   NO IMAGE
========================================================= */

.tm-subcategory-card--no-image
.tm-subcategory-card-image {
    background: #f7f7f7;
}


/* =========================================================
   ARCHIVE CONTENT
========================================================= */

.tm-category-archive-content {
    margin-top: 30px;
}


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

@media (max-width: 767px) {

    .tm-subcategory-grid {
        grid-template-columns: 1fr;

        gap: 16px;
    }

    .tm-category-archive-content {
        margin-top: 24px;
    }

    .tm-subcategory-card-image {
        height: 155px;

        padding: 15px 28px;
    }

    .tm-subcategory-card-title {
        min-height: 52px;

        padding: 8px 14px 13px;

        font-size: 14px;
    }

    .tm-subcategory-card-arrow {
        font-size: 16px;
    }
}












/* Catalog pagination */
.tm-catalog-pagination {
    width: 100%;
    margin-top: 40px;
}

.tm-catalog-pagination ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tm-catalog-pagination ul li {
    margin: 0;
    padding: 0;
}

.tm-catalog-pagination a,
.tm-catalog-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #e0e5e1;
    border-radius: 6px;
    color: #242b28;
    background: #fff;
    text-decoration: none;
    font-size: 15px;
    transition: background .2s, color .2s, border-color .2s;
}

.tm-catalog-pagination a:hover,
.tm-catalog-pagination .current {
    color: #fff;
    background: #89C43B;
    border-color: #89C43B;
}

@media (max-width: 767px) {
    .tm-catalog-pagination {
        margin-top: 28px;
    }

    .tm-catalog-pagination ul {
        gap: 6px;
    }

    .tm-catalog-pagination a,
    .tm-catalog-pagination span {
        min-width: 36px;
        height: 36px;
        padding: 0 9px;
        font-size: 14px;
    }
}










/* =========================================================
   TOUCHMEDICAL — CATEGORY PRODUCTS GRID
   4 PRODUCTS PER ROW
========================================================= */

.tm-category-products-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 24px;
    width: 100%;
    min-width: 0;
}

/* Tablet */

@media (max-width: 1100px) {
    .tm-category-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 20px;
    }
}

/* Mobile */

@media (max-width: 767px) {
    .tm-category-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px;
    }
}

@media (max-width: 420px) {
    .tm-category-products-grid {
        gap: 12px;
    }
}







/* Количество товаров в категории */
.tm-products-count {
    margin-bottom: 20px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

@media (max-width: 767px) {
    .tm-products-count {
        margin-bottom: 16px;
        font-size: 13px;
    }
}