/* ============================================================
   Profile Page Redesign
   ============================================================ */

/* Profile Header */
.profile-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 15px 0 5px;
    border-bottom: 1px solid #eee;
}
.profile-header h1 {
    margin: 0;
    font-size: 1.8rem;
    flex: 1;
}
.profile-header .rating-badge {
    background: #f5f5f5;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.profile-header .action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.profile-header .action-buttons button {
    background: #8B0000;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}
.profile-header .action-buttons button:hover {
    background: #f5f5f5;
}
.profile-header .action-buttons .favorite-btn.faved {
    border-color: #8B0000;
    background: #fff0f0;
}

/* Profile Description */
.profile-description {
    padding: 15px 0;
    font-size: 1rem;
    line-height: 1.6;
    border-bottom: 1px solid #eee;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    margin: 20px 0 0;
    border-bottom: 2px solid #eee;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tab-btn {
    padding: 10px 18px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}
.tab-btn.active {
    color: #ffffff;
    border-bottom-color: #8B0000;
}
.tab-content {
     display: none;
}
.tab-content.active {
    display: block;
}

/* ---- Feedback Summary Card ---- */
.feedback-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    align-items: center;
}
.feedback-summary .avg-score {
    flex: 0 0 auto;
    text-align: center;
    padding-right: 20px;
    border-right: 1px solid #e0e0e0;
}
.feedback-summary .avg-score .number {
    font-size: 2.8rem;
    font-weight: bold;
    line-height: 1;
    color: #8B0000;
}
.feedback-summary .avg-score .total {
    font-size: 0.85rem;
    color: #888;
}
.feedback-summary .stars-breakdown {
    flex: 1;
    min-width: 150px;
}
.feedback-summary .stars-breakdown .star-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    padding: 2px 0;
}
.feedback-summary .stars-breakdown .star-row .label {
    width: 30px;
    text-align: right;
    color: #555;
}
.feedback-summary .stars-breakdown .star-row .bar-track {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}
.feedback-summary .stars-breakdown .star-row .bar-fill {
    height: 100%;
    background: #8B0000;
    border-radius: 3px;
}
.feedback-summary .stars-breakdown .star-row .count {
    width: 30px;
    color: #555;
    font-size: 0.75rem;
}

/* ---- Review Cards ---- */
.review-card {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}
.review-card:last-child {
    border-bottom: none;
}
.review-card .review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.review-card .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    background: #8B0000;
    flex-shrink: 0;
}
.review-card .avatar span {
    font-size: 1.2rem;
    text-transform: uppercase;
}
.review-card .review-meta {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}
.review-card .review-meta .username {
    font-weight: bold;
    color: #222;
}
.review-card .review-meta .rating-stars {
    color: #f5b342;
    font-size: 0.9rem;
    letter-spacing: 1px;
}
.review-card .review-meta .date {
    font-size: 0.75rem;
    color: #999;
    margin-left: auto;
}
.review-card .review-body {
    margin: 6px 0 0 46px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
}

/* ---- Owner Reply ---- */
.owner-reply {
    margin: 10px 0 0 46px;
    padding: 10px 14px;
    background: #f5f5f5;
    border-left: 3px solid #8B0000;
    border-radius: 4px;
}
.owner-reply .reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: bold;
}
.owner-reply .reply-header .owner-tag {
    background: #8B0000;
    color: #fff;
    padding: 0 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    text-transform: uppercase;
}
.owner-reply .reply-body {
    margin-top: 4px;
    font-size: 0.95rem;
    color: #333;
}

/* ---- Feedback Form ---- */
.feedback-form {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.feedback-form h3 {
    margin-top: 0;
}
.feedback-form .form-group {
    margin-bottom: 15px;
}
.feedback-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.9rem;
}
.feedback-form select,
.feedback-form textarea,
.feedback-form input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background: #fff;
}
.feedback-form textarea {
    min-height: 80px;
    resize: vertical;
}
.feedback-form button {
    background: #8B0000;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}
.feedback-form button:hover {
    background: #a00000;
}

/* ---- Services List ---- */
.services-list {
    margin-top: 30px;
}
.service-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
@media (max-width: 600px) {
    .service-cards {
        grid-template-columns: 1fr;
    }
}
.service-card {
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 12px;
    background: #fff;
}
.service-card h3 {
    margin: 0 0 4px;
    font-size: 1.1rem;
}
.service-card p {
    font-size: 0.9rem;
    color: #555;
    margin: 4px 0;
}
.service-card .service-images {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.service-card .service-images img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid #ddd;
}
.service-card .service-images img:hover {
    border-color: #8B0000;
}
.service-card .service-location {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

/* ---- Flash messages ---- */
.flash-message, .flash-error {
    padding: 12px 16px;
    margin: 15px 0;
    border-radius: 4px;
    font-size: 0.95rem;
}
.flash-message {
    background: #e6f7e6;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}
.flash-error {
    background: #fde8e8;
    color: #b71c1c;
    border-left: 4px solid #b71c1c;
}

/* ---- Mobile fine-tune ---- */
@media (max-width: 600px) {
    .feedback-summary {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 15px;
    }
    .feedback-summary .avg-score {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding: 0 0 10px 0;
        text-align: center;
    }
    .feedback-summary .avg-score .number {
        font-size: 2.2rem;
    }
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .profile-header .action-buttons {
        width: 100%;
        justify-content: flex-start;
    }
    .review-card .review-meta .date {
        margin-left: 0;
        width: 100%;
    }
    .review-card .review-body {
        margin-left: 0;
    }
    .owner-reply {
        margin-left: 0;
    }
}