/* Product Reviews Component Styles */

.reviews-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.reviews-section h2 {
    font-size: 2rem;
    color: var(--primary-purple, #8b4598);
    margin-bottom: 2rem;
    text-align: center;
}

/* Rating Summary */
.rating-summary {
    margin-bottom: 3rem;
}

.rating-overview {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    align-items: start;
}

.average-rating {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(139, 69, 152, 0.1), rgba(233, 30, 99, 0.1));
    border-radius: 12px;
}

.rating-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-purple, #8b4598);
    line-height: 1;
}

.rating-stars {
    font-size: 1.5rem;
    color: #ffa500;
    margin: 0.5rem 0;
}

.rating-count {
    font-size: 1rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Rating Distribution */
.rating-distribution {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rating-bar {
    display: grid;
    grid-template-columns: 60px 1fr 50px;
    align-items: center;
    gap: 1rem;
}

.star-label {
    font-size: 1rem;
    color: #666;
}

.bar-container {
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffa500, #ff8c00);
    transition: width 0.3s ease;
}

.rating-bar .count {
    text-align: right;
    font-size: 0.9rem;
    color: #999;
}

/* Review Form */
.review-form-wrapper {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(139, 69, 152, 0.05);
    border-radius: 12px;
}

.login-prompt {
    text-align: center;
    padding: 2rem;
}

.login-prompt a {
    color: var(--primary-purple, #8b4598);
    font-weight: 600;
    text-decoration: none;
}

.login-prompt a:hover {
    text-decoration: underline;
}

.already-reviewed {
    text-align: center;
    padding: 1rem;
    color: #4caf50;
    font-weight: 600;
}

#write-review-btn {
    display: block;
    margin: 0 auto;
}

.review-form {
    margin-top: 1rem;
}

.review-form h3 {
    font-size: 1.5rem;
    color: var(--primary-purple, #8b4598);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-purple, #8b4598);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

/* Star Rating Input */
.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.25rem;
    font-size: 2rem;
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    cursor: pointer;
    color: #ddd;
    transition: color 0.2s ease;
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input:checked ~ label {
    color: #ffa500;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Sort Controls */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(139, 69, 152, 0.05);
    border-radius: 8px;
}

.sort-controls label {
    font-weight: 600;
    color: #666;
}

.sort-controls select {
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    background: white;
}

.sort-controls select:focus {
    outline: none;
    border-color: var(--primary-purple, #8b4598);
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-card {
    padding: 1.5rem;
    background: white;
    border: 2px solid #eee;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.review-card:hover {
    border-color: var(--primary-purple, #8b4598);
    box-shadow: 0 4px 12px rgba(139, 69, 152, 0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reviewer-name {
    font-weight: 600;
    color: #333;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: #4caf50;
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.review-date {
    color: #999;
    font-size: 0.9rem;
}

.review-rating {
    margin-bottom: 0.75rem;
}

.review-rating .stars {
    color: #ffa500;
    font-size: 1.25rem;
}

.review-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.review-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.review-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.helpful-btn,
.report-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.helpful-btn:hover {
    border-color: var(--primary-purple, #8b4598);
    color: var(--primary-purple, #8b4598);
}

.helpful-btn.active {
    background: var(--primary-purple, #8b4598);
    color: white;
    border-color: var(--primary-purple, #8b4598);
}

.report-btn:hover {
    border-color: #dc3545;
    color: #dc3545;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .reviews-section {
        padding: 1rem;
        margin: 2rem 0;
    }
    
    .rating-overview {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .average-rating {
        padding: 1.5rem;
    }
    
    .rating-number {
        font-size: 3rem;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .review-actions {
        flex-wrap: wrap;
    }
    
    .sort-controls {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Button Styles (if not defined elsewhere) */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-purple, #8b4598), var(--magenta, #e91e63));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 152, 0.3);
}

.btn-outline {
    background: white;
    border: 2px solid var(--primary-purple, #8b4598);
    color: var(--primary-purple, #8b4598);
}

.btn-outline:hover {
    background: var(--primary-purple, #8b4598);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

