/* Container Utama */
.jss-shopee-container {
    background-color: #f5f5f5; /* Abu-abu terang khas marketplace */
    padding: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Search Bar ala Shopee */
.jss-search-bar {
    background: linear-gradient(135deg, #ff6600, #ff9900); /* Gradasi Oranye Jangki */
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.jss-search-bar form {
    margin: 0 !important;
    padding: 0 !important;
}

.jss-search-input-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    padding: 2px;
}

.jss-search-input {
    flex-grow: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    outline: none !important;
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
}

.jss-search-input::placeholder {
    color: #999;
}

.jss-search-button {
    background-color: #ff6600 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0 15px !important;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.jss-search-button:hover {
    background-color: #e65c00 !important;
}


/* Layout 2 Kolom (Sidebar & Main) */
.jss-layout-wrapper {
    display: block;
}

/* Sidebar Kategori */
.jss-sidebar {
    background: #ffffff;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.jss-sidebar-title {
    font-size: 16px;
    margin: 0 0 10px 0;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.jss-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; /* Horizontal on mobile */
    overflow-x: auto;
    white-space: nowrap;
    gap: 10px;
    padding-bottom: 5px; /* for scrollbar */
}
.jss-category-list li {
    display: inline-block;
}
.jss-category-list a {
    text-decoration: none !important;
    color: #333 !important;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 20px;
    background: #f0f0f0;
    display: inline-block;
}
.jss-category-list a.active, .jss-category-list a:hover {
    color: #ff6600 !important;
    background: #ffeee6;
    font-weight: bold;
}

/* Main Content */
.jss-main-content {
    flex-grow: 1;
}

/* Sorting Bar */
.jss-sort-bar {
    background: #ffffff;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow-x: auto;
    white-space: nowrap;
}
.jss-sort-label {
    font-size: 14px;
    color: #666;
}
.jss-sort-buttons {
    display: flex;
    gap: 8px;
}
.jss-sort-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 2px;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 14px;
    transition: all 0.2s;
}
.jss-sort-btn:hover {
    background: #f9f9f9;
}
.jss-sort-btn.active {
    background: #ff6600;
    border-color: #ff6600;
    color: #fff !important;
}

/* Grid Produk */
.jss-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 Kolom di Mobile */
    gap: 8px; /* Jarak kecil antar kartu */
}

/* Kartu Produk */
.jss-product-card {
    background-color: #ffffff; /* Putih */
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.jss-product-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.jss-product-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
    height: 100%;
}

/* Gambar Produk */
.jss-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Memaksa aspect ratio 1:1 (Kotak) */
    background-color: #f8f8f8;
}

.jss-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Memastikan gambar memenuhi kotak tanpa merusak rasio */
    border: none;
    margin: 0;
    padding: 0;
}

/* Label Promo */
.jss-badge-sale {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #f53d2d; /* Oranye/Merah khas diskon */
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    z-index: 2;
    text-transform: uppercase;
}

/* Info Produk (Bawah Gambar) */
.jss-product-info {
    padding: 8px;
}

/* Judul Produk */
.jss-product-title {
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: #000000 !important; /* Hitam (Warna Jangki) */
    margin: 0 0 5px 0 !important;
    font-weight: normal;
    
    /* Line Clamp untuk 2 baris */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 33px; /* Mempertahankan tinggi agar rapi */
}

/* Wrapper Harga */
.jss-product-price-wrapper {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

/* Harga */
.jss-product-price, .jss-product-price span.woocommerce-Price-amount {
    color: #ff6600 !important; /* Oranye (Warna Jangki) */
    font-size: 14px !important;
    font-weight: bold !important;
}

/* Harga Coret (Diskon) */
.jss-product-price del .woocommerce-Price-amount {
    color: #999 !important;
    font-size: 11px !important;
    font-weight: normal !important;
    text-decoration: line-through;
    margin-right: 5px;
}

/* No Products */
.jss-no-products {
    text-align: center;
    padding: 40px;
    color: #666;
    background: #fff;
}

/* Container Full Width on Desktop */
.jss-shopee-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Pagination */
.jss-pagination {
    margin-top: 20px;
    text-align: center;
    padding: 10px 0;
    width: 100%;
}
.jss-pagination ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}
.jss-pagination li {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}
.jss-pagination .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    background: #fff;
    border: 1px solid #eee;
    color: #333 !important;
    text-decoration: none !important;
    border-radius: 2px;
    font-size: 14px;
    transition: all 0.2s;
}
.jss-pagination .page-numbers:hover {
    background: #f9f9f9;
}
.jss-pagination .page-numbers.current {
    background: #ff6600;
    border-color: #ff6600;
    color: #fff !important;
    font-weight: bold;
}

/* Responsiveness untuk Tablet & Desktop */
@media (min-width: 768px) {
    .jss-layout-wrapper {
        display: flex;
        gap: 20px;
        align-items: flex-start;
    }
    .jss-sidebar {
        flex: 0 0 200px; /* Lebar tetap 200px untuk sidebar */
        margin-bottom: 0;
        position: sticky;
        top: 20px;
    }
    .jss-category-list {
        display: block;
        overflow: visible;
        white-space: normal;
    }
    .jss-category-list li {
        display: block;
        margin-bottom: 5px;
    }
    .jss-category-list a {
        display: block;
        border-radius: 4px;
        background: transparent;
        padding: 8px 10px;
    }
    
    .jss-product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    .jss-product-info {
        padding: 12px;
    }
    .jss-product-title {
        font-size: 14px !important;
        min-height: 39px;
    }
    .jss-product-price, .jss-product-price span.woocommerce-Price-amount {
        font-size: 16px !important;
    }
}

@media (min-width: 1024px) {
    .jss-sidebar {
        flex: 0 0 240px; /* Lebih lebar di layar besar */
    }
    .jss-product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
