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

/* Быстрый переключатель рамки картинки:
   0px = рамка выключена
   1px = рамка включена
*/
:root {
    --item-image-border-width: 0px;
}

.site-title-link {
    color: inherit;
    text-decoration: none;
}

.item-page {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-sizing: border-box;
}

.item-top {
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 24px;
    align-items: start;
  /*    align-items: stretch; */
}

/* Левая часть: ссылка назад + картинка. Внешней рамки нет. */
.item-left {
    background: #fff;
    border: none;
    border-radius: 0;
    box-sizing: border-box;
    padding: 0px 30px 0 30px;
}

/* Правая карточка товара. Рамка остаётся только здесь. */
.item-card {
    background: #fff;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    box-sizing: border-box;
    padding: 18px;
    box-shadow: none;
}

/* Описание: не карточка, а блок после верхней линии. */
.item-description {
    margin-top: 20px;
    padding: 18px 30px 0 30px;
    background: #fff;
    border-top: 1px solid #E3E3E3;
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-radius: 0;
    box-sizing: border-box;
    border-radius: 6px;
}

/*.back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: #555;
    text-decoration: none;
}*/

/*.back-link {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 6px 14px;
    background: #F7F7F7;
    color: #464646;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 15px;
}*/

.back-link {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 4px 14px 6px 10px;
    background: #1ca252;
    color: #ffffff;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 15px;
    border-radius: 6px;
}

.back-link:hover {
   /*  text-decoration: underline; */
   color: #ffffff;
   background: #27AD5D;
}

.item-image-wrap {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;

    border: var(--item-image-border-width) solid #ddd;
    border-radius: 10px;
    box-sizing: border-box;
}

.item-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.item-code {
    color: #777;
    font-size: 14px;
    margin-bottom: 12px;
}

.item-title {
    margin: 0 0 16px 0;
    font-size: 22px;
    line-height: 1.25;
}

.item-meta {
    color: #666;
    margin-bottom: 8px;
}

.item-price {
    margin-top: 28px;
    font-size: 32px;
    font-weight: bold;
}

.item-price span {
    font-size: 18px;
    font-weight: normal;
    color: #555;
}

.item-stock {
    margin-top: 10px;
    color: #087a2f;
    font-weight: bold;
}

.item-cart-button {
    margin-top: 22px;
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 8px;
   /*  background: #222; */
    background: #1CA252;
    color: white;
    cursor: pointer;
    font-size: 17px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.item-cart-button:hover {
  /*   background: #444; */
  background: #29ad5e;
}

.item-cart-button-added {
    background: #1CA252;
}

.item-cart-button-added:hover {
    background: #1CA252;
}

.item-cart-button img {
    width: 28px;
    height: 28px;
    display: block;
}

.item-description h3 {
    margin-top: 0px;
    font-size: 22px;
}

.item-description-text {
    line-height: 1.55;
    color: #333;
}

@media (max-width: 1050px) {
    .item-page {
        max-width: none;
        margin: 12px;
    }

    .item-top {
        grid-template-columns: 1fr;
    }

    .item-left {
        padding: 18px 30px 0 30px;
    }

    .item-image-wrap {
        height: 400px;
    }

    .item-description {
        margin-top: 8px;
        padding: 18px 30px 0 30px;
    }
}

@media (max-width: 600px) {
    .item-page {
        margin: 8px;
        padding: 12px;
    }

    .item-left {
        padding: 12px 12px 0 12px;
    }

    .item-image-wrap {
        height: 320px;
    }

    .item-description {
        margin-top: 22px;
        padding: 16px 12px 0 12px;
    }

    .item-title {
        font-size: 20px;
    }

    .item-price {
        font-size: 28px;
    }
}


/* .item-top {
    align-items: stretch;
}

.item-card {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.item-cart-button {
    margin-top: auto;
} */