/* Базові стилі та сітка */
.rounded-10 { border-radius: 10px; }
.rounded-20 { border-radius: 20px !important; }
.shadow-blue { box-shadow: 0 10px 20px rgba(0, 117, 255, 0.2); }

/* Галерея Swiper */
.product-gallery { position: relative; }

.product-gallery .mainSwiper,
.product-gallery .thumbsSwiper {
    width: 100%;
    margin: auto;
    position: relative;
    overflow: hidden;
    list-style: none;
    padding: 5px !important;
    z-index: 1;
    display: block !important;
    background: #fff;
    height: fit-content;
}

.mainSwiper .swiper-slide {
    width: 100% !important;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.product-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Мініатюри */
.product-gallery .thumbsSwiper {
    height: 120px;
    box-sizing: border-box;
    padding: 10px 0 !important;
}

.thumbsSwiper .swiper-slide {
    width: 25%;
    height: 100%;
    opacity: 0.4;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.thumbsSwiper .swiper-slide-thumb-active { opacity: 1; }

.thumbsSwiper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
}

.thumbsSwiper .swiper-slide-thumb-active img { border-color: #0075FF; }

/* Стрілки навігації */
.mainSwiper .swiper-button-next,
.mainSwiper .swiper-button-prev {
    opacity: 0;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    color: #0075FF !important;
}

.mainSwiper .swiper-button-next::after,
.mainSwiper .swiper-button-prev::after {
    font-size: 18px;
    font-weight: bold;
}

.mainSwiper:hover .swiper-button-next,
.mainSwiper:hover .swiper-button-prev { opacity: 1; }

.mainSwiper .swiper-button-next:hover,
.mainSwiper .swiper-button-prev:hover {
    background: #0075FF;
    color: #fff !important;
}

/* Інфо про товар та бейджі */
.badges-box { position: absolute; top: 10px; left: 10px; z-index: 10; display: flex; gap: 10px; }
.badge-sale { background: #ff3b30; color: #fff; padding: 4px 12px; border-radius: 50px; font-weight: 700; font-size: 14px; }

.brand-label { color: #888; font-size: 12px; letter-spacing: 2px; }
.product-title { font-size: 2rem; font-weight: 800; color: #333; }
.text-through { text-decoration: line-through; }

/* Селектор кількості */
.quantity-selector {
    display: flex;
    align-items: center;
    background: #f0f2f5;
    border-radius: 50px;
    padding: 5px;
    width: fit-content;
}
.qty-btn {
    border: none;
    background: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.qty-btn:hover { background: #0075FF; color: #fff; }
.qty-input { width: 40px; border: none; background: transparent; text-align: center; font-weight: 700; }

/* Таби */
.tabs-modern .nav-pills .nav-link { color: #555; font-weight: 600; padding: 10px 25px; margin-right: 10px; border-radius: 50px; }
.tabs-modern .nav-pills .nav-link.active { background-color: #0075FF; color: #fff; }
.star-rating-input {
    font-size: 24px;
    color: #ddd; /* Колір порожніх зірок */
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    cursor: pointer;
    transition: color 0.2s ease;
    margin-right: 5px;
}

/* Підсвічування при наведенні та виборі */
.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label {
    color: #ffc107; /* Золотий колір вибраних зірок */
}
.comment-form-container {
    background: #fff !important;
}

.rounded-15 { border-radius: 15px; }


/* Підсвічування при наведенні та виборі */
.rating__star:hover,
.rating__star:hover ~ .rating__star,
.rating__input:checked ~ .rating__star {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffc107'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
}

.rating__star:hover {
    transform: scale(1.2);
}

.input_name_response, .input_body_response {
    border: 1px solid #e1e1e1;
    padding: 10px 20px;
}

.input_name_response:focus, .input_body_response:focus {
    border-color: #0075FF;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 117, 255, 0.1);
}

/* Повна ізоляція від інших стилів */
.rating-v2 .rating__group {
    display: flex !important;
    flex-direction: row-reverse !important;
    justify-content: flex-end !important;
    width: fit-content !important;
    height: auto !important;
    background: none !important; /* Прибираємо старі фонові зірки */
    position: relative !important;
}

.rating-v2 .rating__input {
    display: none !important;
}

.rating-v2 .rating__star {
    /* Скидаємо всі можливі налітання */
    position: static !important;
    float: none !important;
    margin: 0 2px !important;
    padding: 0 !important;

    width: 20px !important;
    height: 20px !important;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23cccccc'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 26px !important;
    transition: transform 0.2s !important;
}

/* Стан при наведенні та виборі */
.rating-v2 .rating__star:hover,
.rating-v2 .rating__star:hover ~ .rating__star,
.rating-v2 .rating__input:checked ~ .rating__star {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffc107'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") !important;
}

.rating-v2 .rating__star:hover {
    transform: scale(1.1);
}
@media (max-width: 991px) {
    .mainSwiper .swiper-button-next,
    .mainSwiper .swiper-button-prev { display: none; }
}
@media (max-width: 768px) {
    .mainSwiper {
        height: 280px;
    }
    .mainSwiper .swiper-slide img {
        max-height: 100%;
        object-fit: contain;
    }

    .mainSwiper .swiper-button-next,
    .mainSwiper .swiper-button-prev {
        display: none;
    }

    .product-title {
        font-size: 1.3rem !important;
    }

    .tab-content {
        padding: 20px 15px !important;
    }

    .breadcrumb {
        font-size: 10px;
        padding: 0;
        background: transparent;
    }

    .btn-buy-now {
        padding: 15px !important;
        font-size: 1.1rem;
    }
    .mainSwiper .swiper-slide{
        height: max-content;
    }
}
