﻿
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.product-container {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


.gallery-container {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.description-container {
    padding-top: 20px;
    border-top: 2px solid #A4D4B4;
    margin-top: 20px;
}

.thumbnail-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px;
}

.thumbnail-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 400px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: border 0.3s;
}

    .thumbnail:hover,
    .thumbnail.active {
        border: 2px solid #0073e6;
    }

/*.main-image {
            
            border: 1px solid #ccc;
            border-radius: 8px;
            cursor: pointer;

            display: block;
            max-width: 100%;*/ /* fit container width */
/*height: auto;

        }*/

/* Бокс под основную картинку (десктоп/планшет) */
.main-image-box {
    /*width: 420px;*/ /* подгони под свою вёрстку */
    max-width: 600px;
    width: 100%;
    height: 550px; /* логично = max-height превьюшек */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #ccc;
    border-radius: 8px;
}

    /* Сама картинка */
    .main-image-box .main-image {
        max-width: 100%;
        max-height: 100%;
        width: auto; /* важно: не растягиваем */
        height: auto; /* важно: не растягиваем */
        object-fit: contain; /* сохраняем пропорции */
        cursor: pointer;
        display: block;
        border-image-width: 0px;
    }


.thumbnail-button {
    background-repeat: no-repeat;
    background-position: center;
    background-color: initial;
    width: 32px;
    height: 20px;
    border: none;
    border-radius: 8px;
    padding: 5px 10px;
    margin: 5px 0;
    cursor: pointer;
    font-size: 14px;
    display: none;
}

    .thumbnail-button:disabled {
        background-color: #ccc;
        cursor: not-allowed;
    }


.up-button {
    background-image: url("myimages/arrowup.png");
}

.down-button {
    background-image: url("myimages/arrowdown.png");
}

.carousel {
    display: none;
}

.product-details {
    margin-left: 20px;
    max-width: 600px;
}

    .product-details h2 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .product-details p {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .product-details button {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        padding: 10px;
        font-size: 16px;
        margin-top: 20px;
    }

/* RTL (heb): отступ должен быть между картинкой и текстом */
[dir="rtl"] .product-details {
    margin-left: 0;
    margin-right: 20px;
}

/* RTL (heb): панель миниатюр тоже “зеркалим” по отступам */
[dir="rtl"] .thumbnail-panel {
    margin-right: 0;
    margin-left: 20px;
}

.popup {
    display: none; /* Ensure the popup is hidden initially */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark overlay */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

    .popup img {
        max-width: 90%;
        max-height: 90%;
        border-radius: 8px;
    }

.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.thumbnail-container {
    overflow: hidden;
}

.div-variations {
    display: flex;
    margin-bottom: 20px;
}

.variant {
    min-width: 64px;
    height: 40px;
    border: #d7cecb 1px solid;
    align-content: center;
    padding-left: 10px;
    padding-right: 10px;
    margin: 5px;
    cursor: pointer;
}

.param-name {
    margin-left: 5px;
}

.variant:hover {
    border: #000 1px solid;
}

.variant.active {
    border: #000 2px solid;
}

.strikethrough:before {
    border-top-color: #ff3f40;
}

.price-current {
    font-size: 18px;
}

.price-catalog {
    display: none;
}

.div-prices {
    font-size: 18px;
    margin-bottom: 20px;
}

.yousave {
    text-align: center;
    font-size: 14px;
    display: none;
}

.prod-price-a {
    color: inherit;
}



/* Responsive styles for screen width < 768px */
@media (max-width: 768px) {
    .gallery-container {
        flex-direction: column;
        align-items: center;
    }

    .thumbnail-panel,
    .main-image-box {
        display: none;
    }

    .carousel {
        display: block;
        width: 100%;
        max-width: 600px;
        overflow: hidden;
        position: relative;
        height: 60vh;
        min-height: 260px;
    }

    .carousel-images {
        display: flex;
        transition: transform 0.3s ease-in-out;
        height: 100%;
    }

        .carousel-images img {
            width: 100%;
            flex-shrink: 0;
            border-radius: 8px;
            height: 100%;
            object-fit: contain; /* сохраняем пропорции, не обрезаем */
            display: block;
            flex: 0 0 100%; /* один слайд на экран */
        }

    .carousel-buttons {
        position: absolute;
        top: 50%;
        width: 100%;
        display: flex;
        justify-content: space-between;
        transform: translateY(-50%);
    }




    .carousel-button {
        background-color: rgba(0, 0, 0, 0.5);
        color: #fff;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product-details {
        margin-top: 20px;
        margin-left: 0;
        text-align: center;
    }
}



.prodcard-page-title {
    max-width: 1200px;
    margin: 8px auto 0 auto;
    padding: 0 0 6px 0;
    color: #555;
    font-size: 20px;
    line-height: 28px;
    font-weight: 400;
}

    .prodcard-page-title label {
        font-weight: 400;
        margin: 0;
    }

[dir="rtl"] .prodcard-page-title {
    text-align: right;
}

