/**
 * Public styles for Marketplace Core
 */

/* Service Grid */
.marketplace-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.service-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.service-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-card-body {
    padding: 20px;
}

.service-card-vendor {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.vendor-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.vendor-info {
    flex: 1;
}

.vendor-name {
    font-size: 14px;
    color: #666;
    text-decoration: none;
}

.vendor-name:hover {
    color: #2271b1;
}

.vendor-level {
    display: inline-block;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
}

.service-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px;
}

.service-card-title a {
    color: #333;
    text-decoration: none;
}

.service-card-title a:hover {
    color: #2271b1;
}

.service-card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.service-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.service-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.star-rating {
    color: #ffb400;
    font-size: 14px;
}

.rating-count {
    font-size: 12px;
    color: #999;
}

.service-price {
    font-size: 20px;
    font-weight: 600;
    color: #2271b1;
}

.service-price-starting {
    font-size: 12px;
    color: #666;
    display: block;
}

/* Service Single */
.marketplace-service-single {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin: 30px 0;
}

.service-main-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.service-gallery {
    margin-bottom: 30px;
}

.gallery-main {
    width: 100%;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: auto;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.gallery-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.gallery-thumbnail:hover,
.gallery-thumbnail.active {
    opacity: 1;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-header {
    margin-bottom: 30px;
}

.service-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 15px;
}

.service-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: #666;
    font-size: 14px;
}

.service-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.service-description {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.service-section {
    margin-bottom: 40px;
}

.service-section h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px;
}

/* Service Packages */
.service-packages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.package-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
}

.package-card:hover {
    border-color: #2271b1;
    transform: translateY(-3px);
}

.package-card.recommended {
    border-color: #2271b1;
}

.package-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #2271b1;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.package-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px;
}

.package-price {
    font-size: 32px;
    font-weight: 700;
    color: #2271b1;
    margin: 20px 0;
}

.package-description {
    font-size: 14px;
    color: #666;
    margin: 15px 0;
    min-height: 60px;
}

.package-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.package-features li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.package-features li:before {
    content: "✓";
    color: #46b450;
    font-weight: bold;
}

.package-delivery {
    font-size: 14px;
    color: #666;
    margin: 15px 0;
}

.package-select-btn {
    width: 100%;
    padding: 12px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.package-select-btn:hover {
    background: #135e96;
}

/* Service Extras */
.service-extras {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
}

.extras-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.extra-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.extra-checkbox {
    width: 20px;
    height: 20px;
}

.extra-info {
    flex: 1;
}

.extra-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.extra-description {
    font-size: 14px;
    color: #666;
}

.extra-price {
    font-weight: 600;
    color: #2271b1;
}

/* Service FAQs */
.service-faqs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    background: #f0f0f1;
}

.faq-toggle {
    font-size: 20px;
    transition: transform 0.3s;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s, padding 0.3s;
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 500px;
}

/* Service Sidebar */
.service-sidebar {
    position: sticky;
    top: 30px;
}

.order-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 20px;
}

.order-box h3 {
    font-size: 20px;
    margin: 0 0 20px;
}

.order-summary {
    margin-bottom: 20px;
}

.order-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-line:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 18px;
    padding-top: 15px;
}

.order-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-order,
.btn-contact {
    padding: 15px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-order {
    background: #2271b1;
    color: #fff;
}

.btn-order:hover {
    background: #135e96;
}

.btn-contact {
    background: #fff;
    color: #2271b1;
    border: 2px solid #2271b1;
}

.btn-contact:hover {
    background: #2271b1;
    color: #fff;
}

/* Vendor Box */
.vendor-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 25px;
    text-align: center;
}

.vendor-box-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
}

.vendor-box-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px;
}

.vendor-box-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.vendor-stat {
    text-align: center;
}

.vendor-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #2271b1;
}

.vendor-stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Reviews Section */
.service-reviews {
    margin-top: 50px;
    padding-top: 50px;
    border-top: 2px solid #e0e0e0;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.reviews-summary {
    display: flex;
    align-items: center;
    gap: 20px;
}

.average-rating {
    text-align: center;
}

.rating-number {
    font-size: 48px;
    font-weight: 700;
    color: #2271b1;
}

.rating-stars {
    font-size: 20px;
    color: #ffb400;
    margin: 5px 0;
}

.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-bar-label {
    font-size: 14px;
    width: 50px;
}

.rating-bar-track {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: #ffb400;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.review-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
}

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

.review-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

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

.review-author-name {
    font-weight: 600;
}

.review-date {
    font-size: 12px;
    color: #666;
}

.review-rating {
    color: #ffb400;
}

.review-content {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.review-response {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border-left: 3px solid #2271b1;
    border-radius: 0 5px 5px 0;
}

.review-response-label {
    font-size: 12px;
    font-weight: 600;
    color: #2271b1;
    margin-bottom: 8px;
}

/* Vendor Dashboard */
.vendor-dashboard {
    margin: 30px 0;
}

.dashboard-header {
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.dashboard-welcome {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px;
}

.dashboard-subtitle {
    font-size: 16px;
    color: #666;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: #f0f6ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #2271b1;
}

.stat-content h3 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    color: #2271b1;
}

.stat-content p {
    margin: 5px 0 0;
    color: #666;
}

.dashboard-sections {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.dashboard-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.section-link {
    color: #2271b1;
    text-decoration: none;
    font-size: 14px;
}

.section-link:hover {
    text-decoration: underline;
}

/* Order List */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-item {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-info h4 {
    margin: 0 0 5px;
    font-size: 16px;
}

.order-meta {
    font-size: 12px;
    color: #666;
}

.order-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Message System */
.conversation-list {
    display: flex;
    flex-direction: column;
}

.conversation-item {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.2s;
}

.conversation-item:hover {
    background: #f8f9fa;
}

.conversation-item.unread {
    background: #f0f6ff;
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.conversation-user {
    font-weight: 600;
}

.conversation-time {
    font-size: 12px;
    color: #666;
}

.conversation-preview {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Forms */
.marketplace-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2271b1;
}

.form-group .description {
    font-size: 12px;
    color: #666;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #2271b1;
    color: #fff;
}

.btn-primary:hover {
    background: #135e96;
}

.btn-secondary {
    background: #f0f0f1;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .marketplace-service-single {
        grid-template-columns: 1fr;
    }
    
    .service-sidebar {
        position: static;
    }
    
    .dashboard-sections {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .marketplace-services-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .service-packages {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .reviews-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .reviews-summary {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .marketplace-services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .vendor-box-stats {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px;
}

.empty-state-text {
    font-size: 16px;
    color: #666;
    margin: 0 0 20px;
}

/* Notifications */
.notification {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-success {
    background: #e8f5e9;
    color: #1b5e20;
}

.notification-error {
    background: #ffebee;
    color: #b71c1c;
}

.notification-warning {
    background: #fff3e0;
    color: #e65100;
}

.notification-info {
    background: #e3f2fd;
    color: #0d47a1;
}

/* Pagination */
.marketplace-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 40px 0;
}

.page-numbers {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.page-numbers:hover {
    background: #f0f0f1;
}

.page-numbers.current {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.page-numbers.dots {
    border: none;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Modal */
.marketplace-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 50px auto;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}