﻿/* =====================================
   ЗАГАЛЬНІ НАЛАШТУВАННЯ
   ===================================== */

html {
    scroll-behavior: smooth;
}

#top {
    position: absolute;
    top: 0;
}


/* =====================================
   ВСТУПНИЙ БЛОК
   ===================================== */
.catalog-hero {
    padding: 32px 0 26px;
    background-color: #f7f6f2;
}

.catalog-hero-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.catalog-eyebrow {
    margin-bottom: 6px;
    color: #8a6752;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.catalog-title {
    margin: 0 0 8px;
    color: #171717;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.05;
}

.catalog-subtitle {
    max-width: 620px;
    margin: 0 auto;
    color: #6c6c6c;
    font-size: 16px;
    line-height: 1.45;
}


/* =====================================
   НАВІГАЦІЯ ЗА КАТЕГОРІЯМИ
   ===================================== */

.catalog-navigation {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 16px 0;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e8e3dc;
    box-shadow: 0 6px 22px rgba(35, 27, 22, 0.05);
    backdrop-filter: blur(12px);
}

.catalog-navigation-list {
    display: flex;
    justify-content: center;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 0 7px;
    scrollbar-width: thin;
}

.catalog-navigation-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 9px 17px;
    color: #27211d;
    background-color: #ffffff;
    border: 1px solid #cfc5bb;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

    .catalog-navigation-button:hover {
        color: #ffffff;
        background-color: #72503d;
        border-color: #72503d;
        transform: translateY(-1px);
    }

.catalog-navigation-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 23px;
    height: 23px;
    padding: 0 7px;
    color: #72503d;
    background-color: #eee6df;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.catalog-navigation-button:hover .catalog-navigation-count {
    color: #72503d;
    background-color: #ffffff;
}


/* =====================================
   КАТАЛОГ І ГРУПИ ТОВАРІВ
   ===================================== */

.catalog-content {
    background-color: #ffffff;
}

.catalog-group {
    padding: 72px 0;
    scroll-margin-top: 88px;
}

    .catalog-group:nth-child(even) {
        background-color: #f7f6f2;
    }

.catalog-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.catalog-group-title {
    margin: 0 0 5px;
    color: #171717;
    font-size: clamp(27px, 3vw, 38px);
    font-weight: 800;
    line-height: 1.15;
}

.catalog-group-count {
    margin: 0;
    color: #7a7a7a;
    font-size: 14px;
}

.catalog-to-top {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    color: #2a231f;
    background-color: #ffffff;
    border: 1px solid #cfc5bb;
    border-radius: 50%;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

    .catalog-to-top:hover {
        color: #ffffff;
        background-color: #72503d;
        border-color: #72503d;
        transform: translateY(-2px);
    }


/* =====================================
   СІТКА ТОВАРІВ
   ===================================== */

.catalog-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 34px 22px;
}


/* =====================================
   КАРТКА ТОВАРУ
   ===================================== */

.catalog-product-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid #e5ded7;
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(52, 39, 30, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .catalog-product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 16px 38px rgba(52, 39, 30, 0.12);
    }


/* =====================================
   ЗОБРАЖЕННЯ
   ===================================== */

.catalog-product-image-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.catalog-product-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background-color: #f6f4f1;
}

.catalog-product-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    transition: transform 0.35s ease;
}

.catalog-product-card:hover .catalog-product-image {
    transform: scale(1.035);
}

.catalog-no-image {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #9a928b;
}

    .catalog-no-image i {
        font-size: 35px;
    }

    .catalog-no-image span {
        font-size: 13px;
    }


/* =====================================
   ПОЗНАЧКИ НА ФОТО
   ===================================== */

.catalog-availability,
.catalog-discount {
    position: absolute;
    z-index: 2;
    top: 13px;
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 5px 9px;
    border-radius: 6px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.catalog-availability {
    left: 13px;
}

.catalog-availability-in-stock {
    background-color: #178c54;
}

.catalog-availability-out {
    background-color: #747474;
}

.catalog-discount {
    right: 13px;
    background-color: #e53246;
}


/* =====================================
   ВМІСТ КАРТКИ
   ===================================== */

.catalog-product-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

.catalog-product-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    margin-bottom: 13px;
    color: #171717;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.45;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

    .catalog-product-title:hover {
        color: #72503d;
    }

.catalog-product-details {
    display: flex;
    min-height: 65px;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
    color: #6f6f6f;
    font-size: 13px;
    line-height: 1.4;
}

    .catalog-product-details div {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .catalog-product-details span {
        color: #908780;
    }


/* =====================================
   ЦІНА
   ===================================== */

.catalog-product-price {
    display: flex;
    min-height: 36px;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    margin-bottom: 17px;
}

.catalog-current-price {
    color: #171717;
    font-size: 21px;
    font-weight: 800;
    line-height: 1;
}

.catalog-current-price-discount {
    color: #e53246;
}

.catalog-old-price {
    position: relative;
    color: #8b8b8b;
    font-size: 14px;
    line-height: 1;
    text-decoration: line-through;
}


/* =====================================
   КНОПКА КАРТКИ
   ===================================== */

.catalog-product-button {
    display: flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 18px;
    color: #25201c;
    background-color: transparent;
    border: 1px solid #302a26;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

    .catalog-product-button i {
        transition: transform 0.2s ease;
    }

    .catalog-product-button:hover {
        color: #ffffff;
        background-color: #72503d;
        border-color: #72503d;
    }

        .catalog-product-button:hover i {
            transform: translateX(4px);
        }


/* =====================================
   ПЕРЕВАГИ
   ===================================== */

.catalog-benefits {
    padding: 48px 0;
    background-color: #f1ede8;
    border-top: 1px solid #e4ddd5;
}

.catalog-benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.catalog-benefit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

    .catalog-benefit > i {
        color: #72503d;
        font-size: 27px;
    }

    .catalog-benefit div {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .catalog-benefit strong {
        color: #211c19;
        font-size: 16px;
    }

    .catalog-benefit span {
        color: #76706b;
        font-size: 13px;
        line-height: 1.4;
    }


/* =====================================
   ПОРОЖНІЙ КАТАЛОГ
   ===================================== */

.catalog-empty {
    min-height: 420px;
    padding: 70px 0;
    background-color: #f7f6f2;
}

.catalog-empty-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 55px 30px;
    background-color: #ffffff;
    border: 1px solid #e3ddd6;
    border-radius: 24px;
    text-align: center;
}

    .catalog-empty-card i {
        display: block;
        margin-bottom: 18px;
        color: #72503d;
        font-size: 44px;
    }

    .catalog-empty-card h2 {
        margin-bottom: 10px;
        font-size: 25px;
        font-weight: 800;
    }

    .catalog-empty-card p {
        margin: 0;
        color: #77716c;
    }


/* =====================================
   ПЛАНШЕТ
   ===================================== */

@media (max-width: 991.98px) {
    .catalog-hero {
        padding: 64px 0 44px;
    }

    .catalog-navigation-list {
        justify-content: flex-start;
    }

    .catalog-group {
        padding: 58px 0;
    }

    .catalog-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 26px 18px;
    }

    .catalog-benefits-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .catalog-benefit {
        justify-content: flex-start;
        max-width: 420px;
        width: 100%;
        margin: 0 auto;
    }
}

/* =====================================
   ТЕЛЕФОН — 2 ТОВАРИ В РЯД
   ===================================== */

@media (max-width: 575.98px) {
    .catalog-hero {
        padding: 25px 0 21px;
    }

    .catalog-title {
        font-size: 32px;
    }

    .catalog-subtitle {
        font-size: 14px;
    }


    .catalog-navigation {
        padding: 11px 0;
    }

    .catalog-navigation-list {
        margin-right: -12px;
        padding-right: 12px;
    }

    .catalog-navigation-button {
        min-height: 39px;
        padding: 8px 14px;
        font-size: 13px;
    }


    .catalog-group {
        padding: 45px 0;
        scroll-margin-top: 74px;
    }

    .catalog-group-header {
        margin-bottom: 22px;
    }

    .catalog-group-title {
        font-size: 25px;
    }

    .catalog-to-top {
        width: 39px;
        height: 39px;
    }


    /* Дві картки в одному ряді */

    .catalog-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .catalog-product-card {
        width: 100%;
        min-width: 0;
        max-width: none;
        margin: 0;
    }


    /* Фото */

    .catalog-product-image-wrapper {
        aspect-ratio: 1 / 1;
        min-height: 0;
    }

    .catalog-product-image {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }


    /* Інформація про товар */

    .catalog-product-body {
        padding: 12px 10px;
    }

    .catalog-product-title {
        min-height: 2.5em;
        font-size: 14px;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .catalog-product-details {
        min-height: 4.1em;
        font-size: 11px;
        line-height: 1.35;
    }


    /* Ціна */

    .catalog-product-price {
        margin-top: 10px;
        margin-bottom: 12px;
    }

    .catalog-current-price {
        font-size: 17px;
    }

    .catalog-old-price {
        font-size: 11px;
        margin-left: 3px;
    }


    /* Кнопка */

    .catalog-product-button {
        padding: 8px 4px;
        font-size: 12px;
        gap: 4px;
    }


    /* Позначки */

    .catalog-availability,
    .catalog-discount {
        padding: 4px 5px;
        font-size: 9px;
    }


    .catalog-benefits {
        padding: 38px 0;
    }
}