/* ===== CUSTOM SLIDER VISIBILITY - Only in Description Tab ===== */

/* Hide slider when reviews tab is active */
.woocommerce-Tabs-panel--reviews .custom-slider,
#tab-reviews .custom-slider {
    display: none !important;
}

/* Ensure slider is visible in description tab */
.woocommerce-Tabs-panel--description .custom-slider,
#tab-description .custom-slider {
    display: block;
}

/* ===== MODERN REVIEWS/COMMENTS SECTION STYLING ===== */

/* Reviews Container */
#reviews {
    background: var(--card-bg);
    padding: 0;
    margin: 0;
}

#reviews h2 {
    color: var(--text-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

#reviews h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 10px rgba(254, 185, 0, 0.5);
}

/* Comments List */
.woocommerce-Reviews {
    margin: 0;
}

.woocommerce-Reviews-title {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 25px;
    font-weight: 600;
}

.commentlist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.commentlist .comment {
    background: var(--review-comment-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.commentlist .comment:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(254, 185, 0, 0.1);
}

/* Comment Meta (Author & Date) */
.comment_container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.comment-text {
    flex: 1;
}

img.avatar {
    border-radius: 50%;
    border: 3px solid var(--review-avatar-border-color);
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.woocommerce-review__author {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.woocommerce-review__published-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: block;
}

.woocommerce-review__verified {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
}

/* Star Rating */
.star-rating {
    color: var(--primary-color);
    position: relative;
    font-size: 1rem;
    margin-bottom: 15px;
}

.star-rating::before {
    content: "★★★★★";
    color: var(--border-color);
}

.star-rating span {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    color: var(--primary-color);
}

.star-rating span::before {
    content: "★★★★★";
}

/* Comment Description */
.woocommerce-review__text .description {
    color: var(--text-color);
    line-height: 1.7;
    font-size: 1rem;
    margin-top: 10px;
}

.woocommerce-review__text p {
    margin: 0 0 10px 0;
}

/* Review Form */
#review_form_wrapper {
    margin-top: 40px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px !important;
}

.single-product.woocommerce #review_form {
    border: none !important;
    padding: 0 !important;
}

#respond .cf-turnstile {
    margin-bottom: 0 !important;
    margin-top: 20px;
}

.woocommerce #reviews #review_form #respond p.form-submit {
    margin-top: 0 !important;
}

.cf-turnstile div {
    border-radius: 10px;
    overflow: hidden;
    height: 67px;
    border: 1px solid #787878;
    border-bottom: 2px solid #787878;
}

.woocommerce .star-rating,
.woocommerce .comment-form-rating .stars a,
.woocommerce .star-rating::before {
    color: var(--primary-color) !important;
}

#reply-title {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.comment-reply-title {
    color: var(--text-color);
    font-size: 1.3rem;
    margin-bottom: 20px;
}

#commentform {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form Rating */
.comment-form-rating {
    display: flex;
    align-items: center;
    gap: 15px;
}

.comment-form-rating label {
    color: var(--text-color);
    font-weight: 600;
    margin: 0;
}

.stars {
    display: flex;
    gap: 5px;
}

.stars a {
    color: var(--border-color);
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.stars a:hover,
.stars a.active {
    color: var(--primary-color);
    transform: scale(1.2);
}

/* Form Fields */
.comment-form-comment,
.comment-form-author,
.comment-form-email {
    margin: 0;
}

.comment-form-comment label,
.comment-form-author label,
.comment-form-email label {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

#comment,
#author,
#email {
    width: 100%;
    padding: 15px;
    background: var(--review-form-input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--review-form-input-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

#comment:focus,
#author:focus,
#email:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(254, 185, 0, 0.1);
}

#comment {
    min-height: 150px;
    resize: vertical;
}

/* Submit Button */
.form-submit {
    margin: 0;
}

#submit {
    background: var(--primary-color);
    color: #000;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(254, 185, 0, 0.3);
}

#submit:hover {
    background: #fff;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(254, 185, 0, 0.5);
}

.woocommerce-Tabs-panel--reviews {
    margin-bottom: 5px !important;
}

@media (max-width: 768px) {
    .comment_container {
        flex-direction: column;
        gap: 15px;
    }

    img.avatar {
        width: 50px;
        height: 50px;
    }

    #reviews h2 {
        font-size: 1.5rem;
    }

    .commentlist .comment {
        padding: 20px;
    }

    #review_form_wrapper {
        padding: 20px !important;
    }
}

@media (max-width: 440px) {
    .woocommerce-js #reviews .comment-form-rating {
        flex-direction: column;
    }
}