/*********************************/
/*  полоса для разделения блоков */
/*********************************/

.product-page {
    width: 100%;
    padding: 0 50px 15px 35px;
    box-sizing: border-box;
}

.product-page__divider {
    width: 100%;
    height: 1px;
    margin: 2px 0;
    

    background-color: #CAC0A8;
}

/*********************************/
/*      Категории каталога       */
/*********************************/

.catalog-categories {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 15px;

    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    padding: 0 85px 0 70px;
    box-sizing: border-box;
}

.catalog-category-card {
    position: relative;

    display: flex;
    align-items: flex-end;

    width: 100%;
    min-width: 0;
    height: 120px;
    overflow: hidden;

    color: #000;
    text-decoration: none;

    background-color: transparent;
    
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    border-radius: 6px;
}

.catalog-category-card:hover {
    text-decoration: underline;
}

.catalog-category-card__title {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 25%;
    padding: 5px 4px;

    box-sizing: border-box;

    color: #3c250f;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;

    background: rgba(237, 229, 211, 0.82);
}

@media (max-width: 1100px) {
    .catalog-categories {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .catalog-categories {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .catalog-category-card {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .catalog-categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/*********************************/
/*    основной блок каталога     */
/*********************************/

.catalog-layout {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) minmax(180px, 240px);
    gap: 24px;

    width: 100%;
    max-width: 100%;
    margin: 30px 0;
    padding: 0 20px;
    box-sizing: border-box;
}

.catalog-products {
    min-width: 0;
}

.catalog-products__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.catalog-product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;

    color: #3c250f;
    text-decoration: none;

    background: #fffaf4;
    border: 1px solid rgba(60, 37, 15, 0.2);
    border-radius: 8px;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.catalog-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(60, 37, 15, 0.2);
}

.catalog-product-card__image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #ead8c3;
}

.catalog-product-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.catalog-product-card__title {
    margin: 0 0 8px;

    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.catalog-product-card__price {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.catalog-filter {
    min-width: 0;
    padding: 16px;

    background: #f7eadb;
    border: 1px solid rgba(60, 37, 15, 0.18);
    border-radius: 8px;
}

.catalog-sidebar__title {
    margin: 0 0 16px;

    color: #3c250f;
    font-size: 20px;
}
.catalog-filter__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.catalog-filter__label {
    color: #3c250f;
    font-size: 13px;
}

.catalog-filter__input {
    width: 100%;
    padding: 9px 10px;
    box-sizing: border-box;

    border: 1px solid rgba(60, 37, 15, 0.3);
    border-radius: 5px;
    background: #fff;
}

.catalog-filter__button {
    padding: 9px 12px;

    color: #fff;
    border: 0;
    border-radius: 5px;
    background: #8b5e3c;
    cursor: pointer;
}

.catalog-info {
    min-width: 0;
    padding: 16px;

    color: #3c250f;
    background: #f7eadb;
    border: 1px solid rgba(60, 37, 15, 0.18);
    border-radius: 8px;
}

.catalog-info p {
    font-size: 14px;
    line-height: 1.5;
}

.catalog-info__image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 14px 0;
    border-radius: 6px;
}

.catalog-pagination {
    margin-top: 24px;
    text-align: center;
}

.catalog-pagination ul {
    display: flex;
    justify-content: center;
    gap: 6px;

    margin: 0;
    padding: 0;
    list-style: none;
}

.catalog-pagination a,
.catalog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    box-sizing: border-box;

    color: #3c250f;
    text-decoration: none;
    border: 1px solid rgba(60, 37, 15, 0.25);
    border-radius: 4px;
}

.catalog-pagination .active a {
    color: #fff;
    background: #8b5e3c;
}

@media (max-width: 1200px) {
    .catalog-layout {
        grid-template-columns: 180px minmax(0, 1fr);
    }

    .catalog-info {
        grid-column: 1 / -1;
    }

    .catalog-products__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .catalog-filter,
    .catalog-products,
    .catalog-info {
        grid-column: auto;
    }

    .catalog-products__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .catalog-products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .catalog-layout {
        padding: 0 10px;
    }
}

/*********************************/
/*        страница товара        */
/*********************************/

.product-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: start;
    gap: 32px;

    width: 100%;
    margin: 0;
    padding: 20px 35px 20px 35px;
    box-sizing: border-box;
}

.product-details__main {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.15fr);
    align-items: start;
    gap: 35px;
    

    min-width: 0;
}

.product-gallery {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    align-items: start;
    gap: 20px;

    min-width: 0;
    width: 100%;
}

.product-gallery__thumbs {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.product-gallery__thumb {
    width: 100px;
    height: 135px;

    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
    
    transition: border-color 0.2s ease;
}

.product-gallery__thumb.is-active {
    border-color: #B85458;
    box-shadow: none;
}

.product-gallery__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery__main {
    display: flex;
    align-items: center;
    justify-content: center;

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

    background: transparent;
    border-radius: 0;
}

.product-gallery__main img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 850px;
    object-fit: contain;
    border-radius: 8px;
}

.product-description {
    min-width: 0;
}

.product-details__title {
    margin: 0 0 16px;

    color: #3c250f;
    font-size: 34px;
    line-height: 1.15;
}

.product-details__price {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 24px;

    color: #8b5e3c;
    font-size: 26px;
    font-weight: 700;
}

.product-details__currency {
    display: inline-block;
    width: 18px;
    height: 18px;

    object-fit: contain;
}

.product-details__text {
    margin-bottom: 28px;

    color: #4f4033;
    font-size: 15px;
    line-height: 1.6;
}

.product-details__subtitle {
    margin: 0 0 10px;

    color: #3c250f;
    font-size: 20px;
}

.product-characteristics__list {
    margin: 0;
}

.product-characteristics__row {
    display: block;
    margin: 0 0 2px;
    line-height: 1.2;
}

.product-characteristics__row dt,
.product-characteristics__row dd {
    display: inline;
    margin: 0;
}

.product-characteristics__row dt {
    color: #3c250f;
    font-weight: 600;
}

.product-characteristics__row dd {
    color: #3c250f;
    font-weight: 400;
}

.product-reference {
    position: sticky;
    top: 100px;
    align-self: start;
    width: 100%;

    padding: 16px;
    border-left: 1px solid #CAC0A8;
}

.product-reference__title {
    margin: 0 0 18px;

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

.product-reference__item {
    display: flex;
    flex-direction: column;
    gap: 4px;

    padding: 11px 0;
}

.product-reference__label {
    color: #766454;
    font-size: 12px;
}

.product-reference__value {
    font-size: 13px;
    line-height: 1.35;
}

.product-reference__link {
    display: block;
    margin-top: 18px;
    padding: 10px;

    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    background: #8b5e3c;
}