.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.5s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.tab-btn.active { border-bottom-color: #a7144c; color: #a7144c; }

/* WooCommerce overrides for single product */
.woocommerce-product-gallery { opacity: 1 !important; }

/* Responsive Table Container */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

/* Table Styles inside Tabs */
.tab-content table {
    width: 100%;
    min-width: 600px; /* Force scroll on small screens */
    border-collapse: collapse;
    background-color: #fff;
    font-size: 0.9rem;
    text-align: left;
}

.tab-content table th,
.tab-content table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.tab-content table th {
    background-color: #f9fafb;
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.tab-content table tr:last-child td {
    border-bottom: none;
}

.tab-content table tr:nth-child(even) {
    background-color: #f9fafb;
}

.tab-content table tr:hover {
    background-color: #f3f4f6;
}

.product-reviews-tab {
    max-width: 920px;
}

.product-reviews-section {
    width: 100%;
    margin-top: 2rem;
}

.product-reviews-heading {
    margin-bottom: 2rem;
    text-align: center;
}

.product-reviews-heading h2 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 800;
    color: #111827;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Layout container for reviews and form */
.product-reviews-tab {
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Fallback for when there are no reviews */
.product-reviews-tab #reviews {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 992px) {
    .product-reviews-tab #reviews {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------
   Reviews List (Left Column)
-----------------------------------*/
.product-reviews-heading h2{
    font-size: 25px!important;
}
#comments .woocommerce-Reviews-title{
    font-size: 20px!important;
}
.product-reviews-tab .woocommerce-Reviews-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
    font-family: 'Montserrat', sans-serif;
}

.product-reviews-tab #comments {
    margin-bottom: 0;
}

/* Reset WC defaults that mess up the layout */
.product-reviews-tab #comments ol.commentlist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-reviews-tab #comments ol.commentlist li.review {
    margin: 0;
    padding: 2rem;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-reviews-tab #comments ol.commentlist li.review:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.product-reviews-tab #comments ol.commentlist li.review .comment_container {
    display: flex;
    flex-direction: row;
    gap: 1.25rem;
    align-items: flex-start;
    height: 100%;
}

.product-reviews-tab #comments ol.commentlist li.review img.avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    float: none;
    margin: 0;
    flex-shrink: 0;
}

.product-reviews-tab #comments ol.commentlist li.review .comment-text {
    margin: 0;
    border: none;
    padding: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-reviews-tab #comments ol.commentlist li.review .meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.product-reviews-tab #comments ol.commentlist li.review .meta .woocommerce-review__author {
    color: #111827;
    font-weight: 800;
    font-size: 1.1rem;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.5px;
}

.product-reviews-tab #comments ol.commentlist li.review .meta .woocommerce-review__published-date {
    color: #9ca3af;
    font-size: 0.85rem;
}

.product-reviews-tab #comments ol.commentlist li.review .meta .woocommerce-review__verified {
    font-size: 0.8rem;
    color: #059669; /* Green for verified */
    font-style: normal;
    font-weight: 600;
}

.product-reviews-tab #comments ol.commentlist li.review .meta .woocommerce-review__dash {
    display: none;
}

.product-reviews-tab .star-rating {
    color: #f59e0b;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    letter-spacing: 2px;
}

.product-reviews-tab .description {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ---------------------------------
   Review Form (Right Column)
-----------------------------------*/
.product-reviews-tab #review_form_wrapper {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 2rem;
}

.product-reviews-tab #reply-title {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1.5rem;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

.product-reviews-tab .comment-form-rating,
.product-reviews-tab .comment-form-comment,
.product-reviews-tab .comment-form-author,
.product-reviews-tab .comment-form-email {
    margin-bottom: 1.5rem;
}

.product-reviews-tab .comment-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.product-reviews-tab .comment-form input[type="text"],
.product-reviews-tab .comment-form input[type="email"],
.product-reviews-tab .comment-form textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    background: #f9fafb;
    color: #1f2937;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.product-reviews-tab .comment-form input[type="text"]:focus,
.product-reviews-tab .comment-form input[type="email"]:focus,
.product-reviews-tab .comment-form textarea:focus {
    outline: none;
    background: #fff;
    border-color: #a7144c;
    box-shadow: 0 0 0 3px rgba(167, 20, 76, 0.15);
}

.product-reviews-tab .comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.product-reviews-tab .comment-form .form-submit {
    margin-top: 2rem;
    margin-bottom: 0;
}

.product-reviews-tab .comment-form .submit,
#review_form #respond input#submit {
    border: none !important;
    border-radius: 8px !important;
    background: #111827 !important; /* Dark almost black color */
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    font-family: 'Oswald', sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 14px 28px !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-top: 1rem !important;
}

.product-reviews-tab .comment-form .submit:hover,
#review_form #respond input#submit:hover {
    background: #a7144c !important; /* Brand color on hover */
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 15px -3px rgba(167, 20, 76, 0.3) !important;
}

.product-reviews-tab p.woocommerce-noreviews {
    margin: 0;
    padding: 2rem;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    color: #6b7280;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
}

@media (max-width: 992px) {
    .product-reviews-tab {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-reviews-tab #review_form_wrapper {
        position: static;
    }
}

@media (max-width: 767px) {
    .product-reviews-heading h2 {
        font-size: 1.8rem;
    }

    .product-reviews-tab #comments ol.commentlist li.review .comment_container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .product-reviews-tab #comments ol.commentlist li.review img.avatar {
        margin: 0 0 1rem 0;
    }

    .product-reviews-tab #review_form_wrapper {
        padding: 1.5rem;
    }
}

/* ---------------------------------
   Interactive Star Rating
-----------------------------------*/
.product-reviews-tab .comment-form-rating {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-reviews-tab p.stars a {
    position: relative;
    height: 1em;
    width: 1em;
    text-indent: -999em;
    display: inline-block;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.product-reviews-tab p.stars a::before {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 1em;
    height: 1em;
    line-height: 1;
    font-family: WooCommerce;
    content: "\e021";
    text-indent: 0;
    color: #e5e7eb;
    font-size: 1.5rem;
    transition: color 0.2s ease;
}

.product-reviews-tab p.stars a:hover::before,
.product-reviews-tab p.stars a.active::before {
    content: "\e020";
    color: #f59e0b;
}

.product-reviews-tab p.stars a:hover {
    transform: scale(1.1);
}

/* Fix WC star rating generic styles override */
.product-reviews-tab p.stars.selected a.active::before,
.product-reviews-tab p.stars:hover a::before {
    content: "\e020";
    color: #f59e0b;
}

.product-reviews-tab p.stars.selected a:not(.active)::before,
.product-reviews-tab p.stars:hover a:hover ~ a::before {
    content: "\e021";
    color: #e5e7eb;
}
