/* Общий фон и отступы под шапку */
.product-main {
    padding-top: 90px;
    padding-bottom: 60px;
    background-color: #f7f9fc;
    min-height: 700px;
}
@media (max-width: 1100px) {
    .product-main {
        padding-top: 40px;

    }
}
@media (max-width: 768px) {
    .product-main {
        padding-top: 60px;

    }
}

.product-page {
    padding: 24px 0 40px;
}

.product-container {
    max-width: 1410px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Лейаут: галерея + инфо */
.product-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Галерея товара */
.product-gallery {
    width: 100%;
}

.product-gallery__main {
    position: relative;           /* для стрелок */
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #e0e4ee;
    padding: 12px;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;

    cursor: grab;                 /* рука-драг на десктопе */
    user-select: none;            /* не выделяем текст/картинку при драге */
}

.product-gallery__main.is-dragging {
    cursor: grabbing;
}


.product-gallery__main img {
    display: block;
    max-width: 100%;
    max-height: 420px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-gallery__main--empty {
    font-size: 14px;
    color: #888;
}

.product-gallery__thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    padding-bottom: 4px;
}


.product-thumb {
    flex: 0 0 72px;
    margin-top: 4px;
    height: 72px;
    padding: 4px;
    border-radius: 4px;
    border: 1px solid #dde2ef;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.product-thumb:hover {
    border-color: #f9c115;
    box-shadow: 0 0 0 1px rgb(249 193 21);
    transform: translateY(-1px);
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Блок информации о товаре */
.product-info {
    width: 100%;
}

.product-title {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 12px;
    font-weight: 700;
    color: #202233;
}

.product-short {
    font-size: 18px;
    line-height: 1.5;
    color: #4d4f5e;
    margin-bottom: 16px;
}

/* Цена */
.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.product-price__value {
    font-size: 28px;
    font-weight: 700;
    color: #2e519f;
}

.product-price__unit {
    font-size: 14px;
    color: #6b6f82;
}

/* Кнопки */
.product-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.product-buttons .btn-yellow,
.product-buttons .btn-outline {
    min-width: 160px;
    text-align: center;
}

/* Секции "Описание" и "Характеристики" */
.product-section {
    margin-top: 24px;
}

.product-section h2 {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #2e519f;
}

.product-section p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

/* Таблица характеристик */
.product-specs {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.product-specs tr:nth-child(odd) {
    background-color: #f5f7fb;
}

.product-specs td {
    padding: 8px 12px;
    border-bottom: 1px solid #e3e6f0;
}

.product-specs td:first-child {
    width: 40%;
    color: #555b70;
    font-weight: 500;
}

@media (min-width: 768px) {
    .product-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 32px;
    }

    .product-gallery {
        margin-top: 25px;
        flex: 0 0 45%;
        min-width: 0;   /* <- разрешаем блоку сжаться, не растягивать страницу */
    }

    .product-info {
        flex: 1;
        min-width: 0;   /* <- на всякий случай, если описание длинное */
    }

    .product-title {
        font-size: 28px;
    }

    .product-price__value {
        font-size: 32px;
    }
}


@media (max-width: 767.98px) {
    .product-main {

        padding-bottom: 40px;
    }

    .product-page {
        padding-top: 16px;
    }

    .product-title {
        font-size: 20px;
    }

    .product-price__value {
        font-size: 24px;
    }
}

/* Совсем маленькие экраны */
@media (max-width: 480px) {
    .product-container {
        padding: 0 12px;
    }

    .product-specs td {
        padding: 6px 8px;
    }

    .product-buttons .btn-yellow,
    .product-buttons .btn-outline {
        flex: 1 1 100%;
    }
}

.product-buttons .btn-yellow.is-disabled,
.product-buttons .btn-yellow[disabled] {
    opacity: 0.7;
    cursor: default;
    pointer-events: none;
}



/* Скроллбар только у блока с миниатюрами */
.product-gallery__thumbs {
    scrollbar-color: #ffc107 transparent; /* Firefox */
    scrollbar-width: thin;
}

/* WebKit-браузеры (Chrome, Edge, Safari, Opera) */
.product-gallery__thumbs::-webkit-scrollbar {
    height: 6px;              /* высота горизонтального скролла */
}

.product-gallery__thumbs::-webkit-scrollbar-track {
    background: transparent;  /* фон дорожки */
}

.product-gallery__thumbs::-webkit-scrollbar-thumb {
    background-color: #ffc107; /* жёлтый бегунок */
    border-radius: 999px;
}



/* ============ КНОПКИ (общие) ============ */

.btn-yellow-3 {
    gap: 5px;
    display: grid;
    /* max-width: 40%; */
    align-items: center;
    /* justify-content: left; */
    padding: 5px;
    border: none;
    background: #f9c115;
    padding: 8px;
    border-radius: 3px;
    color: #000;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.btn-yellow-3:hover {

}

.btn-outline-3 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 4px;
    border: 1px solid #ffcc00;
    background: #fff;
    color: #000;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.btn-outline-3:hover {
    background: #ffcc00;
    color: #000;
}









/* Стрелки в галерее товара */
.pg-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 20px;
    line-height: 1;
    z-index: 2;
    transition: background 0.15s ease, transform 0.1s ease;
}

.pg-arrow:hover {
    background: rgba(0, 0, 0, 0.65);
    transform: translateY(-50%) scale(1.05);
}

.pg-arrow--prev {
    left: 8px;
}

.pg-arrow--next {
    right: 8px;
}

/* активная миниатюра */
.product-thumb.is-active {
    border-color: #f9c115;
    box-shadow: 0 0 0 1px rgb(249 193 21);
}
