/* marketplace_modern.css */
:root {
    --primary: #00303f;
    --accent: #ca8a4b;
    /* Brownish like reference */
    --bg-beige: #fdf6ef;
    --white: #ffffff;
    --text-dark: #2c2c2c;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: var(--bg-beige);
    color: var(--text-dark);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    text-align: center;
    padding: 60px 20px 40px;
    background: transparent;
    /* Assuming clean look */
    overflow: visible;
}

/* If user wants a background image but lighter */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
    /* Fadout */
    background: linear-gradient(180deg, rgba(253, 246, 239, 0.8) 0%, rgba(253, 246, 239, 1) 100%);
    z-index: -1;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
    line-height: 1.2;
}

.hero p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Search Form (The Key Request) --- */
.search-form-container {
    padding: 0 20px;
    margin-bottom: 40px;
}

.search-form {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    max-width: 800px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 2fr 1fr;
    /* Desktop default */
    gap: 15px;
    align-items: center;
}

.search-form select {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    background-color: #fff;
    font-size: 1rem;
    color: #333;
    appearance: none;
    /* Add custom arrow if needed, mostly default is fine or standard hack */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

.search-form button {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    background-color: var(--accent);
    /* Brown button */
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.3s;
}

.search-form button:hover {
    opacity: 0.9;
}

/* --- Grid Items --- */
.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 20px;
    padding: 0 20px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.mp-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mp-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.mp-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mp-card:hover img {
    transform: scale(1.05);
}

.category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 48, 63, 0.85);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.mp-card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.mp-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.mp-card-meta {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 15px;
}

.mp-card-meta i {
    color: var(--accent);
}

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

.detail-btn {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.mp-card:hover .detail-btn {
    color: var(--accent);
}

/* --- Mobile Specific --- */
@media (max-width: 768px) {
    .hero {
        padding-top: 40px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .search-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "provinsi provinsi"
            "kategori button";
        gap: 12px;
        padding: 15px;
    }

    .search-provinsi {
        grid-area: provinsi;
    }

    .search-kategori {
        grid-area: kategori;
    }

    .search-btn {
        grid-area: button;
    }

    .marketplace-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
        padding: 0 15px 40px;
    }

    .mp-card-title {
        font-size: 1rem;
        height: 2.8em;
    }

    .mp-card-content {
        padding: 12px;
    }

    .mp-card-meta {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }

    .category-badge {
        padding: 4px 8px;
        font-size: 0.65rem;
        top: 8px;
        left: 8px;
    }

    .mp-card-footer {
        padding-top: 10px;
    }
}