/* General Body Styles */
body {
    font-family: sans-serif;
    background-color: #222;
    color: #eee;
    margin: 0;
}

/* Header */
header {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 2rem;
    background-color: #1a1a1a;
}

header nav a {
    color: #eee;
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: bold;
    display: inline-flex; /* Mengubah ke inline-flex */
    align-items: center;
}

.nav-icon, .badge-icon, .bi {
    margin-right: 8px;
}

/* Main Content */
main {
    /* padding: 0 2rem; */ /* Dihapus agar hero bisa full-width */
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2rem; /* Disesuaikan untuk padding internal */
    flex-wrap: wrap;
    background-color: #000000;
}

.hero-text {
    flex: 1;
    min-width: 300px;
}

.hero-text h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    color: #eee;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-text .logo {
    width: 150px;
}

.hero-image {
    flex: 1;
    text-align: right;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* About Section */
.about {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem; /* Ditambahkan padding kiri-kanan */
    flex-wrap: wrap;
}

.about-text {
    flex: 2;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.about-text p {
    color: #ccc;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    color: white;
    font-weight: bold;
}

.badge-jual { background-color: #dc3545; }
.badge-tukar { background-color: #28a745; }
.badge-lelang { background-color: #fd7e14; }
.badge-barter { background-color: #007bff; }

.badge {
    display: inline-flex;
    align-items: center;
}

/* Separator */
.separator {
    border: 0;
    border-top: 1px dashed #555;
    margin: 2rem 0;
}

/* Products and Ads Sections */
.products-section, .ads-section {
    padding: 2rem 2rem; /* Ditambahkan padding kiri-kanan */
}

.products-section h3, .ads-section h3 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    font-size: 24px; /* Menyesuaikan ukuran ikon Bootstrap */
    color: #eee; /* Menyamakan warna dengan teks */
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    background-color: #333;
    padding: 1.5rem;
    border-radius: 8px;
}

.product-card {
    background-color: #444;
    border-radius: 8px;
    overflow: hidden;
    color: #eee;
    text-decoration: none;
}

.product-card:hover {
    transform: translateY(-5px);
    transition: transform 0.2s;
}

.product-card .seller-info {
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

.seller-info .initial-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #555;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-right: 0.5rem;
}

.product-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.product-card .product-info {
    padding: 1rem;
}

.product-info h4 {
    margin: 0 0 0.5rem 0;
}

.product-info .description {
    font-size: 0.9rem;
    color: #ccc;
    height: 2.7em; /* 2 lines */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-info .price {
    margin-top: 1rem;
    font-weight: bold;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    background-color: #111;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero, .about {
        flex-direction: column;
        text-align: center;
    }

    .hero-image {
        margin-top: 2rem;
        text-align: center;
    }

    .badges {
        justify-content: center;
        margin-top: 1rem;
    }

    header {
        justify-content: center;
    }
}