/* ============================================
   REVIEWS MODERN CSS - Life-Time Watch Store
   Version: 1.0.0
   ============================================ */

/* ===== RATING STATISTICS SECTION ===== */
.rating-statistics {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.rating-overview {
    text-align: center;
    margin-bottom: 2rem;
}

.average-rating {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.rating-stars {
    font-size: 1.5rem;
    color: #ffc107;
    margin-bottom: 0.5rem;
}

.total-reviews {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Rating Distribution Bars */
.rating-bars {
    margin-top: 1.5rem;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.rating-bar-label {
    min-width: 80px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.rating-bar-container {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
    border-radius: 10px;
    transition: width 0.6s ease;
}

.rating-bar-count {
    min-width: 40px;
    text-align: right;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===== FILTER & SORT SECTION ===== */
.reviews-controls {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.reviews-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.filter-btn,
.sort-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover,
.sort-btn:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    transform: translateY(-2px);
}

.filter-btn.active,
.sort-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.filter-btn .badge {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.filter-btn.active .badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ===== REVIEW ITEM CARD ===== */
.review-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.review-item:hover {
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

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

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

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.review-author-info h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.review-rating-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-stars {
    color: #ffc107;
    font-size: 1.1rem;
}

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

/* Verified Purchase Badge */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.verified-badge::before {
    content: "✓";
    font-weight: 700;
}

/* Review Content */
.review-subject {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.review-text {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Review Images Gallery */
.review-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.review-image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.review-image-item:hover {
    transform: scale(1.05);
}

.review-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Review Actions */
.review-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.helpful-btn:hover {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.helpful-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: transparent;
}

.unhelpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unhelpful-btn:hover {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.unhelpful-btn.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-color: transparent;
}

.helpful-count,
.unhelpful-count {
    font-weight: 600;
}

/* ===== ADMIN REPLY SECTION ===== */
.admin-reply {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
}

.admin-reply-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #92400e;
}

.admin-reply-header::before {
    content: "🏪";
    font-size: 1.2rem;
}

.admin-reply-text {
    color: #78350f;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.admin-reply-date {
    font-size: 0.85rem;
    color: #92400e;
    opacity: 0.8;
}

/* ===== REVIEW FORM SECTION ===== */
.review-form-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.review-form-header {
    margin-bottom: 1.5rem;
}

.review-form-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.review-form-description {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Star Rating Input */
.star-rating-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.star-rating-input input[type="radio"] {
    display: none;
}

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

.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input[type="radio"]:checked ~ label {
    color: #ffc107;
    transform: scale(1.1);
}

/* Image Upload Preview */
.image-upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.image-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    border: 2px dashed #d1d5db;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.image-preview-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* ===== EMPTY STATE ===== */
.reviews-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    border: 2px dashed #d1d5db;
}

.reviews-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.reviews-empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.reviews-empty-text {
    color: #9ca3af;
    margin-bottom: 1.5rem;
}

.reviews-empty-cta {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.reviews-empty-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

/* ===== PAGINATION ===== */
.reviews-pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 0.5rem;
}

.reviews-pagination .page-link {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.3s ease;
}

.reviews-pagination .page-link:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
}

.reviews-pagination .page-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .rating-statistics {
        padding: 1.5rem;
    }

    .average-rating {
        font-size: 2.5rem;
    }

    .rating-bars {
        font-size: 0.85rem;
    }

    .reviews-controls {
        padding: 1rem;
    }

    .reviews-filters {
        flex-direction: column;
    }

    .filter-btn,
    .sort-btn {
        width: 100%;
        justify-content: center;
    }

    .review-item {
        padding: 1rem;
    }

    .review-header {
        flex-direction: column;
    }

    .review-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .review-images {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .review-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .helpful-btn,
    .unhelpful-btn {
        width: 100%;
        justify-content: center;
    }

    .review-form-container {
        padding: 1.5rem;
    }

    .star-rating-input label {
        font-size: 1.5rem;
    }
}

/* ===== LOADING STATE ===== */
.reviews-loading {
    text-align: center;
    padding: 3rem;
}

.reviews-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== ANIMATIONS ===== */
.review-item-enter {
    animation: slideIn 0.4s ease;
}

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

/* ===== IMAGE LIGHTBOX (for future implementation) ===== */
.review-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.review-lightbox.active {
    display: flex;
}

.review-lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.review-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    color: #1f2937;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.review-lightbox-close:hover {
    transform: scale(1.1);
}