/* ==========================================================================
   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;
    }
}

/* 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;
    }
}

/* 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;
}

/* Pastikan lightbox tetap terikat dengan wrapper kita */
.product-gallery .woocommerce-product-gallery {
    width: 100% !important;
    position: relative !important;
}

/* Memastikan gambar di dalam lightbox tidak terdistorsi */
.woocommerce-product-gallery__wrapper {
    width: 100% !important;
}

/* 1. Sembunyikan elemen duplikat yang disuntikkan WooCommerce */
.product-gallery .flex-control-nav, 
.product-gallery .woocommerce-product-gallery__trigger {
    display: block !important; 
}

/* 2. Paksa ukuran thumbnail agar tidak membesar */
.flex-control-thumbs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 15px !important;
}

.flex-control-thumbs li {
    width: 60px !important; /* Paksa lebar thumbnail */
    flex: 0 0 60px !important;
}

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

/* 3. Menghapus foto duplikat (Jika muncul elemen 'clone') */
.product-gallery .cloned {
    display: none !important;
}

/* Memastikan gambar di dalam lightbox/popup tidak stretch */
.pswp__img {
    object-fit: contain !important;
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
}


/* 1. Sembunyikan semua thumbnail yang disuntikkan otomatis di bawah gambar utama */
.product-gallery .flex-control-thumbs {
    display: none !important;
}

/* 2. Sembunyikan navigasi slider (tombol panah kiri/kanan) */
.product-gallery .flex-direction-nav {
    display: none !important;
}

/* 3. Paksa gambar utama agar selalu tampil (karena kadang WooCommerce menyembunyikannya jika tidak ada thumbnail) */
.product-gallery .woocommerce-product-gallery__wrapper {
    width: 100% !important;
    display: block !important;
}

.product-gallery .woocommerce-product-gallery__image {
    display: block !important;
    position: relative !important;
}

/* 4. Pastikan gambar utama tidak bergeser */
.product-gallery .woocommerce-product-gallery__image:not(.flex-active-slide) {
    display: none !important;
}

.product-gallery .woocommerce-product-gallery__image.flex-active-slide {
    display: block !important;
}

/* 5. Mengatur tombol zoom agar tetap bisa diklik dan tidak menutupi gambar */
.woocommerce-product-gallery__trigger {
    display: block !important;
    z-index: 99 !important;
    top: 10px !important;
    right: 10px !important;
}

/* Pastikan kontainer produk tidak berantakan */
.product-gallery {
    display: block !important;
    position: relative !important;
}

/* Sembunyikan sisa-sisa elemen galeri WooCommerce yang tidak terpakai */
.woocommerce-product-gallery__trigger, 
.flex-control-thumbs, 
.flex-direction-nav {
    display: none !important;
}

/* Pastikan gambar utama Anda tampil sempurna */
.product-gallery .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    cursor: pointer !important;
}

/* Pastikan gambar utama muncul kembali */
.main-image-wrapper {
    width: 100% !important;
    display: block !important;
}

.main-image-wrapper img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 8px; /* Agar rapi */
    cursor: zoom-in;
}

/* Sembunyikan elemen sisa woocommerce yang mungkin masih nyangkut */
.woocommerce-product-gallery__trigger,
.woocommerce-product-gallery__wrapper {
    display: none !important;
}