﻿/* =========================================================
   SIKMART - PRODUCT REVIEWS
   ========================================================= */

.product-reviews {
    width: 100%;
    margin: 45px 0 50px;
    padding: 32px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-sizing: border-box;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}


/* =========================================================
   HEADER
   ========================================================= */

.reviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 22px;
    margin-bottom: 25px;
    border-bottom: 1px solid #e5e7eb;
}

    .reviews-header h2 {
        margin: 0;
        color: #111827;
        font-size: 28px;
        font-weight: 700;
    }

.reviews-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6b7280;
    font-size: 14px;
}

.reviews-average {
    color: #111827;
    font-size: 24px;
    font-weight: 700;
}

.reviews-summary-stars {
    display: flex;
    gap: 2px;
}


/* =========================================================
   GENERAL DISPLAY STARS
   ========================================================= */

.rating-star {
    display: inline-block;
    color: #d1d5db;
    font-size: 21px;
    line-height: 1;
}

    .rating-star.filled {
        color: #f59e0b;
    }


/* Product information rating */

.product-rating-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 18px;
    flex-wrap: wrap;
}

.rating-stars-display {
    display: flex;
    gap: 2px;
}

.rating-number {
    color: #374151;
    font-size: 15px;
    font-weight: 700;
}

.rating-count {
    color: #6b7280;
    font-size: 14px;
}


/* =========================================================
   SUCCESS / ERROR
   ========================================================= */

.review-message {
    padding: 14px 17px;
    margin-bottom: 22px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
}

.review-success {
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.review-error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}


/* =========================================================
   WRITE REVIEW
   ========================================================= */

.write-review {
    padding: 25px;
    margin-bottom: 35px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

    .write-review h3 {
        margin: 0 0 8px;
        color: #111827;
        font-size: 21px;
        font-weight: 700;
    }

.review-instruction {
    margin: 0 0 15px;
    color: #64748b;
    font-size: 14px;
}


/* =========================================================
   LOGIN BOX
   ========================================================= */

.review-login-box {
    padding: 10px;
    text-align: center;
}

    .review-login-box h3 {
        margin-bottom: 8px;
    }

    .review-login-box p {
        margin: 0 0 18px;
        color: #64748b;
        font-size: 14px;
    }

.review-login-button {
    display: inline-block;
    padding: 11px 23px;
    color: #fff;
    background: #2563eb;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: all .2s ease;
}

    .review-login-button:hover {
        color: #fff;
        background: #1d4ed8;
        transform: translateY(-1px);
    }


/* =========================================================
   CLICKABLE STAR RATING
   ========================================================= */

.star-rating-input {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 8px 0 8px;
}

.rating-select-star {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    margin: 0;
    border: 0 !important;
    outline: none;
    background: transparent !important;
    color: #cbd5e1;
    font-family: Arial, sans-serif;
    font-size: 38px;
    line-height: 1;
    cursor: pointer !important;
    pointer-events: auto !important;
    user-select: none;
    transition: color 0.15s ease, transform 0.15s ease;
}

    .rating-select-star:hover {
        color: #f59e0b !important;
        transform: scale(1.12);
    }

    .rating-select-star.selected {
        color: #f59e0b !important;
    }

    .rating-select-star:focus {
        outline: none;
        box-shadow: none;
    }


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .rating-select-star {
        width: 36px;
        height: 36px;
        font-size: 33px;
    }
}

/* =========================================================
   COMMENT BOX
   ========================================================= */

.review-comment-box {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 18px;
}

    .review-comment-box label {
        color: #374151;
        font-size: 14px;
        font-weight: 700;
    }

    .review-comment-box textarea {
        width: 100%;
        min-height: 125px;
        padding: 13px 15px;
        box-sizing: border-box;
        border: 1px solid #cbd5e1;
        border-radius: 9px;
        background: #fff;
        color: #111827;
        font-family: inherit;
        font-size: 14px;
        line-height: 1.6;
        resize: vertical;
        outline: none;
        transition: border-color .2s ease, box-shadow .2s ease;
    }

        .review-comment-box textarea:focus {
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
        }

    .review-comment-box small {
        color: #64748b;
        font-size: 12px;
    }


/* =========================================================
   SUBMIT BUTTON
   ========================================================= */

.submit-review-button {
    display: inline-block;
    padding: 12px 24px;
    border: 0;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s ease;
}

    .submit-review-button:hover {
        background: #2563eb;
        transform: translateY(-1px);
    }


/* =========================================================
   EXISTING USER REVIEW
   ========================================================= */

.existing-user-review {
    padding: 5px 0;
}

    .existing-user-review h3 {
        margin-bottom: 12px;
        color: #111827;
    }

.your-rating {
    display: flex;
    gap: 2px;
    margin-bottom: 12px;
}

.your-review-comment {
    margin: 0 0 10px;
    color: #374151;
    font-size: 15px;
    line-height: 1.65;
}

.existing-user-review small {
    color: #64748b;
    font-size: 12px;
}


/* =========================================================
   CUSTOMER REVIEWS LIST
   ========================================================= */

.reviews-list {
    width: 100%;
}

.customer-review {
    padding: 22px 0;
    border-bottom: 1px solid #e5e7eb;
}

    .customer-review:first-child {
        padding-top: 0;
    }

    .customer-review:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

.review-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 8px;
}

.reviewer-name {
    color: #111827;
    font-size: 15px;
    font-weight: 700;
}

.review-date {
    color: #94a3b8;
    font-size: 12px;
}

.customer-review-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 10px;
}

    .customer-review-stars .rating-star {
        font-size: 19px;
    }

.customer-review-comment {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.7;
}


/* =========================================================
   NO REVIEWS
   ========================================================= */

.no-reviews {
    padding: 28px 10px;
    text-align: center;
}

    .no-reviews h3 {
        margin: 0 0 7px;
        color: #374151;
        font-size: 18px;
    }

    .no-reviews p {
        margin: 0;
        color: #64748b;
        font-size: 14px;
    }


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .product-reviews {
        margin-top: 30px;
        padding: 22px 16px;
        border-radius: 12px;
    }

    .reviews-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

        .reviews-header h2 {
            font-size: 23px;
        }

    .write-review {
        padding: 20px 16px;
    }

    .star-rating-input label {
        width: 34px;
        height: 34px;
        font-size: 34px;
    }

    .review-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
    @media (max-width: 700px) {

        .rating-select-star {
            width: 35px;
            height: 35px;
            font-size: 34px;
        }
    }
}


@media (max-width: 400px) {

    .product-reviews {
        padding: 18px 12px;
    }

    .write-review {
        padding: 18px 12px;
    }

    .star-rating-input {
        gap: 1px;
    }

        .star-rating-input label {
            width: 31px;
            height: 31px;
            font-size: 31px;
        }
}
