/* ===== LIGHT MODE ENHANCEMENTS - #EAE1D4 BASED ===== */
:root {
    /* Override untuk Light Mode yang lebih soft */
    --color-bg-primary: #EAE1D4;
    --color-bg-secondary: #F5F0E9;
    --color-bg-card: #FFFFFF;
    --color-bg-elevated: #FFFFFF;
    
    --color-text-primary: #2e2e2e;
    --color-text-secondary: #666666;
    --color-text-tertiary: #999999;
    
    --color-accent-teal: #009999;
    --color-accent-pink: #FF0066;
    
    --color-border: #E8E2D6;
    --color-separator: #F0EBE0;

    /* ===== IOS TYPOGRAPHY SYSTEM ===== */
    --ios-font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ios-font-size-large-title: 34px;
    --ios-font-size-title1: 28px;
    --ios-font-size-title2: 22px;
    --ios-font-size-title3: 20px;
    --ios-font-size-headline: 17px;
    --ios-font-size-body: 17px;
    --ios-font-size-callout: 16px;
    --ios-font-size-subhead: 15px;
    --ios-font-size-footnote: 13px;
    --ios-font-size-caption1: 12px;
    --ios-font-size-caption2: 11px;
    
    /* ===== IOS SPACING & EFFECTS ===== */
    --ios-border-radius: 12px;
    --ios-border-radius-large: 16px;
    --ios-border-radius-extra-large: 20px;
    
    --ios-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
    --ios-shadow-hover: 0px 8px 24px rgba(0, 0, 0, 0.12);
    --ios-shadow-dark: 0px 8px 32px rgba(0, 0, 0, 0.28);
    
    --ios-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ios-transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   MARKETPLACE MODERN DESIGN
   File: assets/css/market.css
   Version: 1.0
============================================ */

/* Container Utama */
.marketplace-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== SEARCH & FILTER BAR ===== */
.search-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.search-form {
    flex: 1;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 4px 4px 4px 16px;
    border: 1px solid #eaeaea;
    transition: all 0.2s;
}

.search-wrapper:focus-within {
    background: white;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37,99,235,0.1);
}

.search-icon {
    width: 20px;
    height: 20px;
    color: #888;
    margin-right: 8px;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 15px;
    outline: none;
}

.search-submit {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.search-submit:hover {
    background: #1d4ed8;
}

.filter-toggle {
    width: 48px;
    height: 48px;
    background: #f5f5f5;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-toggle:hover {
    background: #eaeaea;
}

.filter-toggle i {
    width: 20px;
    height: 20px;
    color: #333;
}

/* ===== BANNER SLIDER ===== */
.banner-slider {
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.banner-slider .swiper-slide {
    aspect-ratio: 4/1;
}

.banner-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-slider .swiper-pagination-bullet {
    background: white;
    opacity: 0.5;
}

.banner-slider .swiper-pagination-bullet-active {
    opacity: 1;
    background: #2563eb;
}

.banner-slider .swiper-button-prev,
.banner-slider .swiper-button-next {
    color: white;
    background: rgba(0,0,0,0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    backdrop-filter: blur(4px);
}

.banner-slider .swiper-button-prev:after,
.banner-slider .swiper-button-next:after {
    font-size: 18px;
}

/* ===== VENDOR UNGGULAN ===== */
.featured-vendors {
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #1a1a1a;
}

.vendor-scroll-container {
    position: relative;
    display: flex;
    align-items: center;
}

.vendor-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 4px 0;
    flex: 1;
}

.vendor-track::-webkit-scrollbar {
    display: none;
}

.vendor-card {
    flex: 0 0 auto;
    width: 80px;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s;
}

.vendor-card:hover {
    transform: translateY(-4px);
}

.vendor-avatar {
    width: 64px;
    height: 64px;
    margin: 0 auto 8px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.vendor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 600;
}

.vendor-name {
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vendor-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 12px;
    color: #666;
}

.vendor-rating .star-icon {
    width: 12px;
    height: 12px;
    color: #fbbf24;
    fill: #fbbf24;
}

.scroll-arrow {
    width: 32px;
    height: 32px;
    border: 1px solid #eaeaea;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #666;
    transition: all 0.2s;
    z-index: 2;
}

.scroll-arrow:hover {
    background: #f5f5f5;
    color: #2563eb;
    border-color: #2563eb;
}

.scroll-arrow.prev {
    margin-right: 8px;
}

.scroll-arrow.next {
    margin-left: 8px;
}

/* ===== NEARBY SEARCH ===== */
.nearby-search {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 24px;
    color: white;
}

.nearby-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.location-icon {
    width: 24px;
    height: 24px;
}

.nearby-label {
    font-weight: 500;
    font-size: 16px;
}

.radius-select {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.radius-select option {
    background: #667eea;
    color: white;
}

.nearby-search-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.nearby-search-btn:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

.nearby-search-btn i {
    width: 16px;
    height: 16px;
}

/* ===== SORT BAR ===== */
.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.result-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
}

.result-count i {
    width: 18px;
    height: 18px;
}

.sort-select {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    background: white;
    cursor: pointer;
    outline: none;
}

.sort-select:focus {
    border-color: #2563eb;
}

/* ===== SERVICES GRID ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 kolom di mobile */
    gap: 12px;
    margin-bottom: 24px;
}

/* Service Card */
.service-card {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.05);
    border-color: #2563eb;
}

/* Card Vendor (Opsi A) */
.card-vendor {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px 8px;
}

.vendor-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    background: #2563eb;
    flex-shrink: 0;
}

.vendor-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder-small {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.vendor-name-small {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card Image */
.card-image {
    position: relative;
    aspect-ratio: 4/3;
    margin: 0 12px 12px;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
}

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

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: linear-gradient(135deg, #f5f5f5, #eaeaea);
    color: #aaa;
}

/* Card Info */
.card-info {
    padding: 0 12px 12px;
}

.service-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-description {
    font-size: 12px;
    color: #666;
    margin: 0 0 8px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #888;
    margin-bottom: 8px;
}

.icon-small {
    width: 12px;
    height: 12px;
}

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

.service-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
}

.service-rating .star-icon {
    width: 14px;
    height: 14px;
    color: #fbbf24;
    fill: #fbbf24;
}

/* Tombol Lihat */
.view-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    background: #007aff;
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.view-button:hover {
    background: #0051d5;
    transform: translateY(-1px);
}

.view-button:active {
    transform: scale(0.96);
}

/* Dark mode */
.dark-mode .view-button {
    background: #0a84ff;
}

.dark-mode .view-button:hover {
    background: #0063ce;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    background: #fafafa;
    border-radius: 16px;
}

.empty-icon {
    width: 48px;
    height: 48px;
    color: #aaa;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 13px;
    color: #888;
    margin: 0 0 20px 0;
}

.btn-primary {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.btn-outline {
    display: inline-block;
    background: white;
    color: #2563eb;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #2563eb;
}

/* ===== LOAD MORE ===== */
.load-more-container {
    text-align: center;
    margin: 32px 0;
}

.load-more-btn {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 12px 32px;
    border-radius: 30px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.load-more-btn:hover {
    background: #f5f5f5;
    border-color: #2563eb;
    color: #2563eb;
}

.load-more-btn i {
    width: 16px;
    height: 16px;
}

.load-more-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #666;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== SEO SUGGESTIONS ===== */
.seo-suggestions {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #f0f0f0;
}

.suggestion-group {
    margin-bottom: 24px;
}

.suggestion-group h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
}

.tag:hover {
    background: #2563eb;
    color: white;
}

.tag-icon {
    width: 12px;
    height: 12px;
}

/* ===== FILTER MODAL ===== */
.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: flex-end;
}

.filter-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-height: 90vh;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.filter-modal.active .modal-content {
    transform: translateY(0);
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
}

.close-modal:hover {
    background: #f5f5f5;
}

.close-modal i {
    width: 18px;
    height: 18px;
}

.modal-body {
    max-height: calc(90vh - 150px);
    overflow-y: auto;
    padding: 4px 0;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.filter-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    background: white;
    cursor: pointer;
    outline: none;
}

.filter-select:focus {
    border-color: #2563eb;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
}

.price-input:focus {
    border-color: #2563eb;
}

.price-separator {
    color: #666;
    font-size: 14px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.reset-btn, .apply-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.reset-btn {
    background: white;
    border: 1px solid #e0e0e0;
    color: #666;
}

.apply-btn {
    background: #2563eb;
    border: none;
    color: white;
}

.reset-btn:hover {
    background: #f5f5f5;
}

.apply-btn:hover {
    background: #1d4ed8;
}

.reset-btn i, .apply-btn i {
    width: 16px;
    height: 16px;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 640px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .nearby-wrapper {
        flex-wrap: nowrap;
    }
}

@media (max-width: 480px) {
    .search-wrapper {
        padding-left: 12px;
    }
    
    .search-submit {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .vendor-card {
        width: 70px;
    }
    
    .vendor-avatar {
        width: 56px;
        height: 56px;
    }
    
    .nearby-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .radius-select, .nearby-search-btn {
        width: 100%;
    }
}

/* Services Grid - dengan 6 item */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 kolom di mobile */
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 640px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 kolom di tablet/desktop */
        gap: 16px;
    }
}

/* Animasi masuk */
.service-card {
    animation: fadeIn 0.3s ease forwards;
    opacity: 0;
}

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

/* No more services message */
.no-more {
    text-align: center;
    padding: 16px;
    color: #8e8e93;
    font-size: 14px;
    border-top: 1px solid #f0f0f0;
    margin-top: 16px;
}

.dark-mode .no-more {
    color: #666;
    border-top-color: #2c2c2e;
}

/* ===== INFINITE SCROLL ===== */
.infinite-scroll-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px;
    color: #8e8e93;
    font-size: 14px;
}

.infinite-scroll-loading .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top-color: #007aff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.end-of-services {
    text-align: center;
    padding: 30px;
    color: #8e8e93;
    font-size: 14px;
    border-top: 1px solid #f0f0f0;
    margin-top: 20px;
}

.end-of-services p {
    margin: 0;
}

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

/* Dark mode */
.dark-mode .infinite-scroll-loading {
    color: #666;
}

.dark-mode .end-of-services {
    border-top-color: #2c2c2e;
    color: #666;
}

/* Stagger animation */
.service-card:nth-child(1) { animation-delay: 0.05s; }
.service-card:nth-child(2) { animation-delay: 0.1s; }
.service-card:nth-child(3) { animation-delay: 0.15s; }
.service-card:nth-child(4) { animation-delay: 0.2s; }
.service-card:nth-child(5) { animation-delay: 0.25s; }
.service-card:nth-child(6) { animation-delay: 0.3s; }