/* ==========================================================================
   1. LAYOUT UTAMA: BULMA + WOOCOMMERCE SIDEBAR
   ========================================================================== */
.shop-layout-container {
    display: flex;
    flex-wrap: wrap;
    margin: 40px auto;
    max-width: 1300px;
    padding: 0 20px;
    gap: 40px;
}

.shop-main-content {
    flex: 1;
    min-width: 0; 
}

.shop-sidebar-area {
    width: 300px;
    flex-shrink: 0;
    background-color: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    padding: 25px;
    height: fit-content;
}

/* Grid Produk Bulma Fix */
.shop-main-content .columns.is-multiline {
    display: flex !important;
    width: 100% !important;
    margin: 0 !important;
}

/* ==========================================================================
   2. STYLING KARTU PRODUK (GRID UTAMA)
   ========================================================================== */
.shop-main-content .product {
    background: #fff;
    border: 1px solid #efefef;
    border-radius: 10px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.shop-main-content .product img {
    max-width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 15px;
}

.woocommerce-loop-product__title {
    font-size: 1rem !important;
    font-weight: 700;
    line-height: 1.4;
    min-height: 3em;
    margin-bottom: 10px !important;
    color: #363636;
}

/* HARGA PRODUK */
.shop-main-content .product .price {
    display: block;
    margin-bottom: 15px !important; /* Memberikan ruang di bawah harga */
    color: #4a4a4a;
    font-weight: 600;
}

/* TOMBOL ADD TO CART (GRID UTAMA) */
.shop-main-content .product .button, 
.shop-main-content .product .add_to_cart_button {
    margin-top: 15px !important; /* Jarak tambahan agar tidak menempel dengan harga */
    background-color: #3273dc;
    color: #fff !important;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    /* Vertikal Center */
    height: 45px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 15px !important;
    line-height: 1 !important;
}

/* ==========================================================================
   3. SIDEBAR WIDGETS (GENERAL)
   ========================================================================== */
.shop-sidebar-area .widget {
    margin-bottom: 40px;
}

.shop-sidebar-area .widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3273dc;
    color: #363636;
}

/* ==========================================================================
   4. MINI CART FIX: DELETE (X) & INFO PRODUK
   ========================================================================== */
.shop-sidebar-area .cart_list li img {
    display: none !important;
}

.shop-sidebar-area .cart_list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.shop-sidebar-area .cart_list li {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    padding: 15px 0 !important;
    border-bottom: 1px solid #f0f0f0;
    gap: 0 12px;
}

.shop-sidebar-area .cart_list li a.remove {
    order: 1 !important;
    color: #ff3860 !important;
    font-size: 1.1rem !important;
    font-weight: bold;
    text-decoration: none !important;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 10px !important; 
    display: flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
}

.shop-sidebar-area .cart_list li a.remove:hover {
    background-color: #ff3860;
    color: #ffffff !important;
    border-radius: 4px;
}

.shop-sidebar-area .cart_list li a:not(.remove) {
    order: 2 !important;
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem !important;
    line-height: 1.4;
    color: #333;
    display: block;
    text-decoration: none;
    padding: 0 !important;
    margin: 0 0 5px 0 !important;
}

.shop-sidebar-area .quantity {
    order: 3 !important;
    flex-basis: 100%;
    margin-left: 32px; 
    font-size: 0.85rem;
    color: #666;
    margin-top: -2px;
}

/* ==========================================================================
   5. SUBTOTAL & TOMBOL SIDEBAR
   ========================================================================== */
.shop-sidebar-area .total {
    padding: 20px 0 10px 0;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    border-top: 2px solid #363636;
    margin-top: 15px;
    color: #363636;
}

.shop-sidebar-area .buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.shop-sidebar-area .buttons a {
    flex: 1;
    height: 40px; 
    display: flex !important;
    align-items: center; 
    justify-content: center; 
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1 !important;
    padding: 0 5px !important;
}

.shop-sidebar-area .buttons a.wc-forward:not(.checkout) {
    background: #f5f5f5 !important;
    color: #4a4a4a !important;
    border: 1px solid #dbdbdb;
}

.shop-sidebar-area .buttons a.checkout {
    background: #3273dc !important;
    color: #ffffff !important;
    border: 1px solid #3273dc;
}

/* Responsif */
@media (max-width: 1024px) {
    .shop-layout-container { flex-direction: column; }
    .shop-sidebar-area { width: 100%; order: 2; }
}

/* ==========================================================================
   1. LAYOUT WRAPPER UTAMA
   ========================================================================== */
.shop-layout-container {
    display: flex !important;
    flex-direction: row !important;
    gap: 40px;
    align-items: flex-start;
}

.shop-main-content {
    flex: 1 !important;
}

.shop-sidebar-area {
    width: 300px !important;
    flex-shrink: 0 !important;
}

/* ==========================================================================
   2. SINGLE PRODUCT - 2 COLUMNS SYSTEM
   ========================================================================== */
/* Layout 2 Kolom di Detail Produk */
.custom-product-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 5% !important;
    width: 100% !important;
    clear: both;
}

/* Lebar Kolom Gallery */
.product-gallery {
    flex: 0 0 45% !important;
    max-width: 45% !important;
}

/* Lebar Kolom Info */
.product-info {
    flex: 0 0 50% !important;
    max-width: 50% !important;
}/* Membagi Area Produk menjadi 2 Kolom */
.custom-product-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4% !important;
}

.product-gallery {
    flex: 0 0 48% !important; /* Paksa gambar hanya 48% lebar */
    max-width: 48% !important;
}

.product-info {
    flex: 0 0 48% !important; /* Paksa info hanya 48% lebar */
    max-width: 48% !important;
}

/* Force gambar agar mengikuti lebar kolomnya */
.product-gallery img {
    width: 100% !important;
    height: auto !important;
}

.product-full-width-bottom {
    flex: 0 0 100% !important;
    margin-top: 40px;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .shop-layout-container { flex-direction: column !important; }
    .product-gallery, .product-info, .shop-sidebar-area {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Reset paksa CSS bawaan tema yang mungkin mengganggu */
.product-gallery div.images, 
.product-info .summary {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

/* Area Tabs & Related di Bawah */
.product-full-width-bottom {
    flex: 0 0 100% !important;
    width: 100% !important;
    margin-top: 40px !important;
    clear: both;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .product-gallery, .product-info {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}