@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Mengatur font global */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
    /* Warna latar belakang seperti Tailwind gray-100 */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.footer {
    width: 100%;
    text-align: center;
    padding: 1rem 0;
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: auto;
}


.header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: #fff;
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 960px;
    /* Lebar maksimum seperti container Bootstrap */
    margin: auto;
}

.header-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.main-content {
    flex-grow: 1;
    max-width: 960px;
    margin: 1rem auto;
    padding: 1rem;
    width: 100%;
}

.card-container {
    background-color: #fff;
    border-radius: 1.5rem;
    /* 24px */
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #f3f4f6;
    border-radius: 9999px;
    /* rounded-full */
    padding: 0.5rem 1rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.search-bar svg {
    color: #6b7280;
    /* gray-500 */
    margin-right: 0.5rem;
}

.search-bar input {
    width: 100%;
    background-color: transparent;
    border: none;
    outline: none;
    color: #374151;
    /* gray-700 */
}



/* Kelas kustom untuk efek hover pada tombol */
.menu-btn {
    transition: all 0.3s ease;
}

.menu-btn:hover {
    transform: translateY(-2px);
}

/* Menggunakan properti aspect-ratio untuk membuat tombol persegi */
.square-button {
    aspect-ratio: 1 / 1;
}

/* Kelas kustom untuk shadow yang lebih rounded pada card */
.card-shadow {
    border-radius: 20px !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Gaya kustom untuk Offcanvas */
.offcanvas.offcanvas-start {
    top: 0;
    left: 0;
    width: 70%;
}

/* Gaya untuk logo di dalam offcanvas */
.offcanvas-logo {
    height: 2.5rem;
}

/* Gaya untuk tombol floating */
.floating-button-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    /* Pastikan di atas konten lain */
}

.floating-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* untuk Katalog */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-link {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 1rem;
    /* 16px */
    background-color: #fff;
    transition: transform 0.2s ease-in-out;
    text-decoration: none;
}

.category-link:hover {
    transform: translateY(-2px);
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-name {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 500;
    color: #374151;
    /* gray-700 */
    text-align: center;
}

/* untuk Belanja */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-item {
    display: flex;
    /* Mengubah tata letak untuk konten yang rata kiri dan memberikan jarak */
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.product-item:hover {
    transform: translateY(-2px);
}

.product-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    /* Mengambil semua ruang yang tersedia untuk memastikan gambar terdorong ke kanan */
    flex-grow: 1;
}

.product-image-small {
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    object-fit: cover;
}

.product-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 600;
}

.product-location {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #6c757d;
}

.product-location svg {
    margin-right: 0.25rem;
}

.join-group {
    font-size: 0.9rem;
    color: #007bff;
    text-decoration: none;
}

.product-list a {
    text-decoration: none;
    color: inherit;
}

.product-item-footer {
    margin-top: 1rem;
}

.product-item-footer .join-group {
    display: block;
    /* Mengubah perataan teks menjadi rata kiri */
    text-align: left;
}

/* untuk detail produk */

.product-image-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Rasio aspek untuk gambar produk */
    overflow: hidden;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    background-color: #e9ecef;
    /* Placeholder background */
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details-card {
    padding: 1rem;
    margin-bottom: 1rem;
}

.product-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.25rem;
    color: #28a745;
    /* Warna hijau untuk harga */
    font-weight: 600;
    margin-bottom: 1rem;
}

.product-category {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.product-description {
    font-size: 1rem;
    color: #495057;
}

.seller-details {
    font-size: 0.9rem;
    color: #495057;
}

.whatsapp-button {
    background-color: #25d366;
    /* Warna hijau WhatsApp */
    color: white;
    border: none;
    width: 100%;
    padding: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    /* Hilangkan garis bawah pada link */
}

.whatsapp-icon {
    width: 24px;
    height: 24px;
    margin-right: 0.5rem;
}

/* untuk Kabar desa */
/* Style yang diperbarui */
.news-list {
    display: flex;
    flex-direction: column;
    /* Mengubah jarak antar item daftar menjadi 1rem */
    gap: 1rem;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    text-decoration: none;
    /* Menghilangkan underline pada link */
    color: inherit;
    /* Mengambil warna teks dari parent */
}

.news-item:hover {
    transform: translateY(-2px);
}

.news-icon-container {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    /* Mengatur border-radius container menjadi 0 */
    border-radius: 0;
    /* Menghapus background-color agar transparan */
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 1rem;
    /* Menghapus overflow hidden karena tidak lagi dibutuhkan */
}

.news-icon {
    /* Mengubah ukuran agar gambar mengisi penuh container */
    width: 100%;
    height: 100%;
    /* Memastikan gambar tetap proporsional dan memenuhi area */
    object-fit: cover;
    /* Menambahkan border-radius 5px */
    border-radius: 5px;
}

.news-content {
    flex-grow: 1;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.news-details {
    font-size: 0.9rem;
    color: #6c757d;
}


/* untuk group whatsapp */
.group-list {
    display: flex;
    flex-direction: column;
    /* Mengurangi jarak antar item daftar */
    gap: 0.5rem;
}

.group-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.group-item:hover {
    transform: translateY(-2px);
}

.group-icon-container {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    /* Latar belakang transparan */
    background-color: transparent;
    border-radius: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.group-icon {
    /* Menggunakan gambar ikon sebagai ganti SVG */
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Menambahkan border-radius 5px */
    border-radius: 5px;
}

.group-content {
    flex-grow: 1;
}

.group-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.group-details {
    font-size: 0.9rem;
    color: #6c757d;
}