.product-page {
    display: flex;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    gap: 20px;
}

.product-gallery {
    flex: 1;
    max-width: 50%;
}

.product-gallery iframe {
    width: 100%;
    padding-top: 40px;
}

.main-image {
    width: 100%;
    height: 0;
    padding-top: 100%; /* Square aspect ratio */
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background-color: #e0e0e0;
}

.main-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.primary-image {
    transition: opacity 0.3s ease;
}

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    margin-top: 10px;
    width: 100%;
}

.thumbnail {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    max-width: 60px;
    border: 2px solid transparent; /* Прозрачная обводка по умолчанию */
}

.thumbnail:hover {
    opacity: 0.8;
}

.thumbnail.active {
    border: 2px solid #28a745; /* Зеленая обводка для активной миниатюры */
}

.product-details {
    padding: 20px 0;
    flex: 1;
}

.product-details h1 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: left;
}

.product-details h3 {
    padding: 20px 0;
}

.product-delivery ul, .product-payment ul {
    list-style-type:none ;
}

.product-delivery li, .product-payment li {
    padding: 5px 0 5px 40px;
    list-style-type:none ;
}

.product-description {
    line-height: 1.5;
    margin-top: 0;
}

.product-description ul, .product-description ol {
    margin: 0 0 0 40px;
    padding: 0 0 20px 0;
}

.product-description p {
    padding-bottom: 20px;
}

.nova-icon {
    background: url("/uploads/icons/nova-icon.svg") left/30px no-repeat;
}

.ukrp-icon {
    background: url("/uploads/icons/ukrp-icon.svg") left/30px no-repeat;
}

.rztk-icon {
    background: url("/uploads/icons/rztk-icon.svg") left/30px no-repeat;
}

.gpay-icon {
    background: url("/uploads/icons/gpay-icon.svg") left/30px no-repeat;
}

.half-icon {
    background: url("/uploads/icons/half-icon.svg") left/30px no-repeat;
}

.stock-info {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.breadcrumbs {
    font-size: 1rem;
    margin: 20px;
    text-align: center;
    line-height: 30px;
}

.breadcrumbs a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    margin: 0 5px;
}

/* Иконка для открытия галереи */
.sale-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    font-weight: bold;
    background: rgba(255, 255, 0, 0.8);
    font-size: 1rem;
    color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

.sale-icon:hover {
    background: rgba(255, 255, 0, 1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .thumbnail-gallery {
        grid-template-columns: repeat(6, 1fr);
    }

    .product-page {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }

    .product-gallery {
        max-width: 100%;
    }

    .product-details {
        padding: 20px 0;
    }

    .sale-icon {
        padding: 10px;
    }
}