/* ==================== REVIEWS SYSTEM STYLES ==================== */

/* Product Reviews Summary */
.product-reviews-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars i {
    font-size: 0.875rem;
}

.star-filled {
    color: #fbbf24;
}

.star-empty {
    color: #d1d5db;
}

.rating-number {
    font-weight: 700;
    color: #1f2937;
    font-size: 0.9rem;
}

.review-count {
    font-size: 0.75rem;
    color: #6b7280;
    cursor: pointer;
}

.review-count:hover {
    color: #b6aa8e;
    text-decoration: underline;
}

/* Review Button */
.view-reviews-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
}

.view-reviews-btn:hover {
    background: #f5f3ef;
    border-color: #b6aa8e;
    color: #b6aa8e;
}

/* Review Modal */
.review-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.review-modal {
    background: white;
    border-radius: 1.5rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.review-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.review-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.review-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    transition: all 0.3s ease;
}

.review-modal-close:hover {
    background: #e5e7eb;
    transform: rotate(90deg);
}

.review-modal-close i {
    font-size: 1.25rem;
    color: #6b7280;
}

.review-modal-body {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.product-review-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #faf9f7;
    border-radius: 1rem;
}

.review-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.product-review-info h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
    font-size: 0.9375rem;
}

.rating-input {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.rating-input i {
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #d1d5db;
}

.rating-input i:hover,
.rating-input i.star-hover {
    color: #fbbf24;
    transform: scale(1.2);
}

.rating-input i.star-selected {
    color: #fbbf24;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #b6aa8e;
    box-shadow: 0 0 0 3px rgba(182, 170, 142, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-review-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #b6aa8e, #c9bfa8);
    color: white;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(182, 170, 142, 0.2);
}

.submit-review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(182, 170, 142, 0.3);
}

.submit-review-btn:active {
    transform: translateY(0);
}

/* Reviews List */
.review-modal-reviews {
    padding: 1.5rem;
}

.review-modal-reviews h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
}

#reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.no-reviews {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.no-reviews i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.no-reviews p {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.no-reviews-sub {
    font-size: 0.875rem;
    color: #9ca3af;
}

.review-item {
    background: #faf9f7;
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.review-item:hover {
    border-color: #b6aa8e;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.review-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.review-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b6aa8e, #c9bfa8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
}

.review-user-info {
    display: flex;
    flex-direction: column;
}

.review-user-info strong {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1f2937;
}

.review-date {
    font-size: 0.75rem;
    color: #9ca3af;
}

.review-rating-stars {
    display: flex;
    gap: 2px;
}

.review-rating-stars i {
    font-size: 0.875rem;
}

.review-comment {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.review-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.helpful-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #6b7280;
    transition: all 0.3s ease;
}

.helpful-btn:hover {
    background: #f3f4f6;
    color: #b6aa8e;
    border-color: #b6aa8e;
}

.helpful-btn i {
    font-size: 0.875rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .review-modal {
        max-height: 95vh;
        margin: 0.5rem;
    }
    
    .review-modal-header,
    .review-modal-body,
    .review-modal-reviews {
        padding: 1rem;
    }
    
    .product-review-info {
        flex-direction: column;
        text-align: center;
    }
    
    .review-product-image {
        width: 100px;
        height: 100px;
    }
    
    .rating-input {
        justify-content: center;
    }
    
    .rating-input i {
        font-size: 1.75rem;
    }
    
    .review-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .review-rating-stars {
        align-self: flex-start;
    }
}

/* Review Modal Loading */
.review-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #6b7280;
}

.review-modal-loading i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #b6aa8e;
}

/* Review Statistics */
.review-modal-stats {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #faf9f7, #f5f3ef);
    border-bottom: 1px solid #e5e7eb;
}

.overall-rating {
    text-align: center;
    padding: 1rem;
}

.rating-number-large {
    font-size: 3.5rem;
    font-weight: 800;
    color: #b6aa8e;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.rating-stars-large {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 0.5rem;
}

.star-large {
    font-size: 1.5rem !important;
}

.review-count-text {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Rating Distribution */
.rating-distribution {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.distribution-row {
    display: grid;
    grid-template-columns: 60px 1fr 40px;
    gap: 0.75rem;
    align-items: center;
}

.distribution-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.distribution-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.distribution-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    transition: width 0.5s ease;
}

.distribution-count {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: right;
}

/* Write Review Button */
.write-review-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #b6aa8e, #c9bfa8);
    color: white;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(182, 170, 142, 0.2);
    margin-bottom: 1rem;
}

.write-review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(182, 170, 142, 0.3);
}

@media (max-width: 768px) {
    .review-modal-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .rating-number-large {
        font-size: 2.5rem;
    }
    
    .distribution-row {
        grid-template-columns: 55px 1fr 35px;
        gap: 0.5rem;
    }
}
