/* === General Styles === */
body {
    font-family: 'Inter', sans-serif;
}

.product-shop {
    margin: 20px 50px;
}

.product-header {
    padding-bottom: 16px;
    font-weight: bold;
}

/* === Grid Layout === */
#product-shop .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 20px;
}

#product-shop .col-md-3 {
    flex: 0 0 calc(25% - 20px); /* 4 per baris */
}

/* === Thumbnail Product === */
.thumbnail {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 15px;
    border-radius: 8px;
    background-color: #fffAf1;
    box-shadow: 5px 5px 3px rgba(170, 170, 170, 0.5);
}

.thumbnail > img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 10px;
}

#product-shop .thumbnail:hover {
    box-shadow: 5px 5px 5px rgba(170, 170, 170, 0.7);
}

/* === Caption === */
.caption {
    text-align: center;
    padding-top: 10px;
}

.caption h4 {
    font-size: 1.2em;
    margin-bottom: 10px;
    font-weight: bold;
}

.caption p {
    font-size: 14px;
    margin-bottom: 10px;
}

/* === Buttons === */
#product-shop .btn-holder a,
.add-to-cart button {
    background-color: #064438;
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    border: 0;
}

#product-shop .btn-holder a:hover {
    background-color: white;
    color: #064438;
}

.btn-sold-out {
    color: #064438;
    padding: 10px 15px;
    border-radius: 5px;
    display: inline-block;
    margin-top: 10px;
}

/* === Filter Sidebar === */
.filter-sidebar {
    background-color: #f6f6f6;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    font-size: 14px;
}

.filter-section h5 {
    font-size: 14px;
    color: #064438;
    margin-bottom: 8px;
    font-weight: bold;
}

.filter-section ul {
    list-style-type: none;
    padding-left: 15px;
    margin: 0;
}

.filter-section li {
    margin-bottom: 6px;
}

.filter-section a {
    color: #064438;
    text-decoration: none;
    font-size: 13px;
}

.filter-section a:hover {
    text-decoration: underline;
}

/* === Search Bar === */
.search-container {
    position: relative;
    width: 300px;
}

.search-form {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #064438;
}

.search-form input {
    flex: 1;
    border: none;
    outline: none;
    padding: 6px;
    font-size: 14px;
    background: transparent;
}

.search-form button {
    border: none;
    background: transparent;
    color: #064438;
    cursor: pointer;
    font-size: 16px;
}

/* === Suggestions === */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
}

.search-suggestions .suggest-item {
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
}

.search-suggestions .suggest-item:hover {
    background: #f1f1f1;
}

.suggest-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-right: 10px;
}

/* === Responsive Adjustments === */

/* Medium screens: 2 items per row */
@media (max-width: 992px) {
    .search-container {
        width: 100% !important;
    }
    #product-shop .col-md-3 {
        flex: 0 0 calc(50% - 20px);
    }
    .box {
        flex-direction: column-reverse; /* Ubah urutan kiri dan kanan */
        display: flex; /* Gunakan flex untuk pengaturan tata letak */
    }
}

/* Small screens */
@media (max-width: 576px) {
    .product-shop {
        margin: 8px;
    }
    .box {
        flex-direction: column-reverse; /* Ubah urutan kiri dan kanan */
        display: flex; /* Gunakan flex untuk pengaturan tata letak */
    }
    .product-header {
        padding-left: 8px;
    }

    #product-shop .col-md-3 {
        flex: 0 0 calc(50% - 10px);
    }

    #product-shop .thumbnail {
        padding: 10px;
        box-shadow: 3px 3px 2px rgba(170, 170, 170, 0.5);
    }

    #product-shop .thumbnail img {
        height: 150px;
    }

    #product-shop .caption h4 {
        font-size: 14px;
    }

    #product-shop .caption p {
        font-size: 12px;
    }

    #product-shop .btn-holder a {
        padding: 8px 10px;
    }

    .filter-sidebar {
        margin: 20px auto;
        width: 90%; /* Biar penuh tapi tidak sampai ujung */
    }
}
