/* ==========================================================================
   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 */
/* 1. Reset & Force Layout Flex */
.custom-product-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    width: 100% !important;
}

/* 2. Paksa Gallery ke Kiri (45%) */
.product-gallery {
    flex: 0 0 45% !important;
    max-width: 45% !important;
    width: 45% !important;
}

/* 3. Paksa Summary/Info ke Kanan (50%) */
.product-info {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
}

/* 4. Paksa Gambar/Gallery agar tidak Full Width */
.product-gallery .woocommerce-product-gallery {
    width: 100% !important;
    float: none !important;
}

/* 5. Paksa Area Bawah (Tabs) tetap Full Width */
.product-full-width-bottom {
    flex: 0 0 100% !important;
    width: 100% !important;
    margin-top: 30px !important;
}

/* 6. Mobile Responsive (Kembali ke 1 kolom) */
@media (max-width: 768px) {
    .custom-product-wrapper { flex-direction: column !important; }
    .product-gallery, .product-info {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !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;
    }
}

/* 1. Paksa area detail produk menjadi rata kiri */
.custom-product-wrapper, 
.product-info, 
.summary.entry-summary {
    text-align: left !important;
}

/* 2. Mengatur perataan khusus pada area tab agar tidak center */
.product-full-width-bottom, 
.woocommerce-tabs.wc-tabs-wrapper, 
.wc-tab {
    text-align: left !important;
}

/* 3. Menyesuaikan posisi harga dan tombol agar sejajar ke kiri */
.product-info .price,
.product-info form.cart {
    text-align: left !important;
    display: block !important;
}

/* 4. Memastikan konten di dalam tab (deskripsi) juga rata kiri */
#tab-description, 
#tab-description p, 
#tab-description ul {
    text-align: left !important;
}

/* Menghilangkan bayangan/shadow pada wrapper tab */
.woocommerce-tabs,
.wc-tabs-wrapper,
.tabs, 
.wc-tab,
.panel.entry-content {
    box-shadow: none !important;
    border: none !important; /* Opsional: hilangkan border jika efek shadow masih terasa */
    background: transparent !important; /* Pastikan background sesuai dengan tema */
}

/* Jika shadow muncul pada area tab judul */
ul.tabs li,
ul.wc-tabs li {
    box-shadow: none !important;
}

/* Memperbesar ukuran font nama produk */
.custom-product-wrapper .product-info h1.product_title,
.custom-product-wrapper .product-info h2.product_title {
    font-size: 2rem !important; /* Anda bisa menyesuaikan angka ini (misal: 2.2rem, 3rem) */
    line-height: 1.2 !important;  /* Menjaga jarak antar baris agar tetap rapi */
    margin-bottom: 20px !important;
}

/* ==========================================================================
   GALERI PRODUK (Ganti semua CSS galeri lama dengan ini)
   ========================================================================== */

/* 1. Kontainer Utama */
.product-gallery { 
    flex: 0 0 45% !important; 
    max-width: 45% !important; 
    position: relative;
}

/* 2. Menghilangkan Jarak Atas (Space) */
.woocommerce-product-gallery,
.woocommerce-product-gallery .flex-viewport,
.woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery__image {
    padding: 0 !important;
    margin: 0 !important;
}

/* 3. Gambar Utama: Pastikan proporsional */
.woocommerce-product-gallery__wrapper img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
}

/* 4. Thumbnail (Grid Bawah) */
.flex-control-thumbs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 20px !important;
    padding: 0 !important;
    list-style: none !important;
}

.flex-control-thumbs li {
    width: 80px !important;
    height: 80px !important;
    cursor: pointer;
    border: 2px solid #eee;
    border-radius: 6px;
    overflow: hidden;
}

.flex-control-thumbs li img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.flex-control-thumbs li img.flex-active {
    border: 2px solid #3273dc;
}

/* 5. Posisi Ikon Kaca Pembesar */
.woocommerce-product-gallery__trigger {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 100 !important;
    background: rgba(255,255,255,0.7) !important;
    padding: 8px !important;
    border-radius: 50% !important;
}

/* 6. Memperbaiki Lightbox */
.pswp__img {
    object-fit: contain !important;
}

/* Sembunyikan Navigasi Slider */
.flex-direction-nav { display: none !important; }

/* Memastikan kontainer zoom memiliki z-index yang benar dan tidak terpotong */
.woocommerce-product-gallery__image {
    position: relative !important;
    overflow: hidden !important;
}

/* Memastikan area magnifier (zoom) tidak tertutup oleh elemen lain */
.zoomImg {
    z-index: 10 !important;
    cursor: crosshair !important;
}

/* 1. Paksa kursor menjadi 'pointer' (atau 'zoom-in') untuk menunjukkan bisa diklik */
.woocommerce-product-gallery__image {
    cursor: zoom-in !important;
}

/* Jika ingin menggunakan ikon kaca pembesar custom (bawaan browser) */
.woocommerce-product-gallery__image img {
    cursor: zoom-in !important;
}

/* 2. Pastikan elemen zoom tidak aktif dan tidak ada interaksi saat hover */
.woocommerce-product-gallery__image img {
    pointer-events: auto !important; /* Biarkan klik tetap jalan */
}

/* 4. Pastikan saat hover tidak ada pergeseran atau transisi zoom */
.zoomImg {
    display: none !important;
}

/* PRUDUCT TAB */

/* 1. Kontainer Tab (Horizontal & Rapat) */
.woocommerce-tabs ul.tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    border-bottom: 2px solid #ddd !important; /* Garis pembatas bawah */
}

/* 2. Setiap Item Tab */
.woocommerce-tabs ul.tabs li {
    margin: 0 !important; /* Hilangkan jarak antar tab */
    padding: 0 !important;
    border: none !important;
}

/* 3. Tampilan Link Tab */
.woocommerce-tabs ul.tabs li a {
    display: block !important;
    padding: 12px 20px !important;
    background: #f8f8f8 !important;
    color: #555 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    border: 1px solid #ddd !important;
    border-bottom: none !important; /* Agar menempel ke garis bawah */
    margin-right: -1px !important; /* Efek tumpuk agar border menempel */
}

/* 4. Tab Aktif */
.woocommerce-tabs ul.tabs li.active a {
    background: #ffffff !important;
    color: #3273dc !important;
    border-bottom: 2px solid #ffffff !important; /* Menutup garis bawah kontainer */
    position: relative !important;
    top: 1px !important; /* Sedikit naik untuk menutupi garis */
}

/* 5. Area Panel Konten */
.woocommerce-tabs .panel {
    border: 1px solid #ddd !important;
    padding: 20px !important;
    margin-top: -1px !important; /* Agar panel menempel ke tab */
}