/* ==========================================================================
   1. GLOBAL RESET & BASE STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ==========================================================================
   2. KOMPONEN UTAMA (TAMPILAN DASAR / DESKTOP FIRST)
   ========================================================================== */

/* --- Tombol --- */
.nextbutton {
    border: none;
    display: block;
    width: 100%;
    vertical-align: middle;
    overflow: hidden;
    text-decoration: none;
    background-color: #ffedcb;
    color: #000 !important;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    padding: 12px 24px;
    border-radius: 5px;
    transition: background-color 0.3s;
    user-select: none;
    -webkit-user-select: none;
}
.nextbutton:hover { background-color: #ffc107; }

.w3-button {
    background-color: #feecb4;
    transition: background-color 0.3s ease;
    border-radius: 5px;
}
.w3-button:hover {
    background-color: rgba(255, 193, 7, 0.8);
    border-radius: 5px;
}
.w3-button img { margin-right: 8px; }

/* --- Photo Grid & Gambar Produk --- */
.w3-row-padding .img-container {
    position: relative;
    width: 100%;
    padding: 5px;
    overflow: hidden;
    border-radius: 5px;
}
.w3-row-padding img {
    margin-bottom: -6px;
    margin-top: 20px;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
    opacity: 0.82;
    filter: blur(0.8px) grayscale(6%);
    transition: all 0.45s ease;
    cursor: pointer;
}
.w3-row-padding .img-container img:hover {
    opacity: 1;
    filter: blur(0) grayscale(0);
    transform: scale(1.02);
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}
.jarak { margin-bottom: 16px !important; margin-top: 10px !important; }
.w3-row-padding h3 { margin-left: 15px; margin-right: 15px; color: #795548; }
.w3-row-padding p { margin-left: 15px; margin-right: 15px; font-size: 1rem; }
.w3-row-padding p img {
    display: block;
    margin: 10px auto;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    opacity: 1;
}

/* --- Animasi Produk --- */
.product-item { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.product-item.show { opacity: 1; transform: translateY(0); }

/* --- Label Kategori Produk --- */
.img-kategori-top, .img-kategori-bottom {
    position: absolute;
    left: 50%;
    color: #795548;
    opacity: 0;
    transition: all 0.45s ease;
    text-align: center;
    width: 100%;
    pointer-events: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 3;
}
.img-kategori-top { top: 20px; transform: translateX(-50%) translateY(-6px); font-size: 1.1em; font-weight: 700; letter-spacing: .1px; padding: 8px 0; }
.img-kategori-bottom { bottom: 0; transform: translateX(-50%) translateY(6px); font-size: 0.8em; }

.img-kategori-top::before, .img-kategori-bottom::before {
    content: ""; position: absolute; top: 0; left: 50%; width: 97%; height: 100%;
    background-color: #fae6c2; z-index: -1; transform: translateX(-50%);
}
.img-kategori-top::before { border-radius: 5px 5px 0 0; }
.img-kategori-bottom::before { border-radius: 0 0 5px 5px; }

.img-container:hover .img-kategori-top,
.img-container:hover .img-kategori-bottom { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.02); }

/* --- CSS Dasar Modal --- */
/* Tetap dipertahankan karena masih dipakai untuk pop-up formulir (successModal/errorModal) */
.w3-modal {
    background-color: rgba(253, 245, 230, 0.8); display: none; justify-content: center; align-items: center;
    position: fixed; inset: 0; width: 100%; height: 100%; overflow: hidden !important; z-index: 999999 !important;
}
.w3-modal.show { animation: modalFadeIn 0.35s ease forwards; }
.w3-modal.hide { animation: modalFadeOut 0.35s ease forwards; }

@keyframes modalFadeIn { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: scale(1); } }
@keyframes modalFadeOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.96); } }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

body.modal-open { overflow: hidden !important; position: fixed; width: 100%; }

/* --- Slider Utama --- */
.slider { position: relative; width: 100%; max-width: 100%; overflow: hidden; height: 100vh; }
.slides { display: flex; transition: transform 0.5s ease-in-out; will-change: transform; height: 100%; }
.slide { min-width: 100%; box-sizing: border-box; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.prev, .next {
    cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%); padding: 16px;
    color: #ffc107; font-weight: bold; font-size: 24px; transition: color 0.3s ease, transform 0.3s ease;
    background-color: rgba(255, 255, 255, 0.5); border: none; border-radius: 3px; z-index: 1;
}
.prev { left: 20px; }
.next { right: 20px; }
.prev:hover, .next:hover { color: #ffc107; transform-origin: center center; transform: translateY(-50%) scale(1.5); box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); border-radius: 5px; }
.indicators { text-align: center; position: absolute; bottom: 10px; width: 100%; cursor: pointer; z-index: 1; }
.indicator { display: inline-block; width: 10px; height: 10px; margin: 0 8px; background-color: #bbb; border-radius: 50%; transition: background-color 0.3s ease, transform 0.3s ease; }
.indicator.active { background-color: #ffc107; transform: scale(1.5); }

/* --- Ikon Sosial Media --- */
.social-icons { display: flex; justify-content: center; align-items: center; margin-top: 20px; }
.social-icons i { font-size: 24px; margin: 0 6px; }
.social-icon { font-size: 2rem; color: #000; margin: 0 10px; transition: color 0.3s ease, transform 0.3s ease; }
.social-icon:hover { color: #ffc107; transform: scale(1.2); }
.social-icon:active { transform: scale(1.1); }

/* --- Container Kategori Resolusi 16:9 --- */
.w3-display-container {
    position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background-color: #fff; display: flex; align-items: center; justify-content: center;
}
.w3-display-container a img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; opacity: 0.9; filter: brightness(0.9) contrast(0.9); transition: transform 0.7s cubic-bezier(0.2, 1, 0.3, 1), filter 0.5s ease, opacity 0.5s ease; }
.w3-display-container:hover a img { transform: scale(1.1); opacity: 1; filter: brightness(1.1) contrast(1); }
.w3-display-container::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%); z-index: 1; pointer-events: none; }
.w3-display-middle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1); width: 90%; text-align: center; z-index: 5; transition: transform 0.5s ease; }
.w3-display-container:hover .w3-display-middle { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
.team-title { font-size: clamp(1.1rem, 3vw, 1.5rem) !important; font-weight: 800; color: #fff !important; text-transform: uppercase; letter-spacing: 1px; margin: 0; text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5), 0 4px 15px rgba(0, 0, 0, 0.3); }
.team-desc { font-size: clamp(0.85rem, 2vw, 1.05rem); color: #fff; font-weight: 600; margin-top: 10px; line-height: 1.4; text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5); }
.w3-display-container:hover .team-title { text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.9), 0px 0px 10px rgba(0, 0, 0, 0.4); }
.w3-display-container:hover .team-desc { text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9); }

/* --- Testimonial Carousel --- */
.testimonial-carousel { display: block; overflow-x: visible; white-space: normal; }
.testimonial-carousel .testimonial-item img { width: 60% !important; display: block; margin: 0 auto; }
.testimonial-carousel .w3-container h3, .testimonial-carousel .w3-container p { text-align: center; }
.testimonial-item { display: inline-block; vertical-align: top; min-width: 10%; margin-right: 0; white-space: normal; width: 32%; padding-left: 20px; }

/* --- Top Menu & Footer --- */
#topMenu { transition: transform 0.3s ease; transform: translateY(0); z-index: 6; }
.footer { background-color: #f1f1f1; text-align: center; box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); margin-top: 75px; }

/* --- Bottom Nav --- */
.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: #ffffff; border-top: 1px solid #e0e0e0; display: flex; justify-content: space-around; align-items: center; padding: 10px 0; box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); z-index: 9999; box-sizing: border-box; }
.bottom-nav .nav-item { text-decoration: none; color: #7a7a7a; font-size: 12px; text-align: center; flex: 1; max-width: 25%; display: flex; flex-direction: column; align-items: center; transition: color 0.3s ease, font-weight 0.3s ease; }
.bottom-nav .nav-item i { font-size: 20px; margin-bottom: 3px; }
.bottom-nav .nav-item.active { color: #e6b520; font-weight: bold; }
.bottom-nav .nav-item:hover { color: #e6b520; }

/* --- Sidebar Menu Menu & Bullet --- */
[data-list="bullet"] { list-style-type: disc; }
.custom-menu { margin-top: 20px; padding: 0 10px; }
.custom-menu-item { display: block; padding: 12px 20px; margin-bottom: 2px; color: #795548; text-decoration: none; background-color: transparent; border-radius: 4px; position: relative; overflow: hidden; transition: background-color 0.3s ease, color 0.3s ease; }
.custom-menu-item::before { content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background-color: rgba(255, 193, 7, 0.5); z-index: 0; transition: left 0.4s ease-in-out; }
.custom-menu-item:hover::before { left: 0; }
.custom-menu-item:hover { color: #000; }
.custom-menu-item.active::before { left: 0; }
.custom-menu-item.active { color: #000; font-weight: bold; background-color: rgba(255, 193, 7, 0.3); transition: background-color 0.3s ease; }

/* --- Form Hubungi & Cari Produk --- */
.error-message { color: red; font-size: 0.9em; margin-top: 5px; display: none; }
input::placeholder, textarea::placeholder { color: #999; font-style: italic; }
.tooltip-icon { display: inline-block; font-size: 12px; color: #666; cursor: pointer; position: relative; }
.tooltip-text { visibility: hidden; background-color: #333; color: #fff; text-align: center; padding: 8px; border-radius: 5px; font-size: 0.9em; position: absolute; z-index: 1; bottom: 120%; left: 50%; transform: translateX(-50%); width: 250px; opacity: 0; transition: opacity 0.3s ease; box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); }
.tooltip-text::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border-width: 6px; border-style: solid; border-color: #333 transparent transparent transparent; }
.tooltip-icon:hover .tooltip-text, .tooltip-icon:focus .tooltip-text { visibility: visible; opacity: 1; }

/* ==========================================================================
   FORM PENCARIAN (DESKTOP & MOBILE)
   ========================================================================== */
.search-wrapper {
    display: flex;
    align-items: stretch;
    margin: 0 auto;
    position: relative; /* Kunci agar ikon silang presisi */
    width: 100%;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px; /* Sudut membulat modern */
    background-color: #fff;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Lebar maksimal untuk pencarian di Menu Sidebar (Desktop) */
.cariproduk .search-wrapper {
    max-width: 250px; 
}

/* Lebar maksimal untuk pencarian di Popup Bawah (Mobile) */
.search-area .search-wrapper {
    max-width: 500px; /* Penuh di HP, rapi di Tablet */
}

.search-wrapper:focus-within {
    border-color: #ffc107;
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.3);
}

.search-wrapper input[type="text"] {
    flex: 1;
    padding: 10px 45px 10px 15px; /* Spasi ekstra di kanan untuk ikon silang (45px) */
    border: none !important;
    outline: none;
    font-size: 14px;
    background: transparent;
    width: 100%;
    min-width: 0;
}

.search-wrapper button.nextbutton {
    border: none;
    border-radius: 0;
    padding: 0 20px;
    margin: 0;
    background-color: #ffc107;
    color: #000 !important;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
}

.search-wrapper button.nextbutton:hover {
    background-color: #e0a800;
}

.clear-icon {
    position: absolute;
    right: 58px; /* Mengunci tepat di sebelah kiri tombol search */
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    cursor: pointer;
    visibility: hidden; /* Disembunyikan saat kosong */
    color: #999;
    padding: 6px;
    z-index: 2;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-icon:hover { color: #d32f2f; }
input:focus + .clear-icon, 
input:not(:placeholder-shown) + .clear-icon { visibility: visible; }

/* --- Area Pencarian Bawah (Mobile Popup) --- */
.search-area {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 9998;
    padding: 15px 20px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 15px 15px 0 0; /* Memberi efek lengkungan cantik di atas */
}

.search-area.visible { bottom: 60px; } /* Muncul tepat di atas bottom-nav */
.search-area.hidden { bottom: -100%; }


/* ==========================================================================
   3. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* --- 1. ATURAN GLOBAL UNTUK SEMUA MOBILE & TABLET (≤ 1024px) --- */
@media (max-width: 1024px) {
    .custom-sidebar { width: 100%; left: -100%; transition: transform 0.3s ease; }
    .custom-sidebar.open { transform: translateX(100%); }

    .carousel { 
        display: flex !important; flex-wrap: nowrap !important; width: 100% !important; 
        overflow-x: auto !important; scroll-behavior: auto !important; 
        -webkit-overflow-scrolling: touch !important; padding: 10px 0 !important; cursor: grab !important; 
    }
    .carousel:active { cursor: grabbing !important; }
    
    .w3-row-padding .w3-quarter, .w3-row-padding .w3-half { 
        width: 25% !important; padding: 3px !important; margin-bottom: 14px !important; 
    }
    .w3-row-padding { margin-left: -3px; margin-right: -3px; }

    .w3-row-padding img { 
        display: block !important; width: 100% !important; opacity: 1 !important; 
        filter: none !important; transform: none !important; box-shadow: none !important; 
        transition: none !important; border-radius: 0 !important; 
    }
    .w3-row-padding .img-container { 
        padding-top: 15px !important; padding-bottom: 15px !important; overflow: visible !important; 
        border-radius: 0 !important; transition: transform .18s ease, box-shadow .18s ease !important; 
    }
    .w3-row-padding .img-container:active { 
        transform: scale(.97) !important; box-shadow: 0 4px 14px rgba(0,0,0,.15) !important; 
    }

    .img-kategori-top, .img-kategori-bottom { 
        opacity: 1 !important; transform: translateX(-50%) !important; z-index: 2 !important; 
    }
    .img-kategori-top::before { background: rgba(250, 230, 194, 0.93) !important; backdrop-filter: blur(2px) !important; border-radius: 8px 8px 0 0 !important; }
    .img-kategori-bottom::before { background: rgba(250, 230, 194, 0.93) !important; backdrop-filter: blur(2px) !important; border-radius: 0 0 8px 8px !important; }
    
    .img-kategori-top { top: 12px !important; font-size: 0.55em !important; font-weight: 700; letter-spacing: 0; padding: 3px 0 !important; }
    .img-kategori-bottom { bottom: -6px !important; font-size: 0.5em !important; font-weight: 400; padding: 3px 2px !important; line-height: 1.1; }

    #topMenu { padding: 4px 0 !important; }
    #topMenu .w3-bar-item, #topMenu .w3-button, #topMenu a { 
        padding-top: 8px !important; padding-bottom: 8px !important; font-size: 14px !important; 
    }
    #topMenu i { font-size: 16px !important; } 
}


/* --- 2. TABLET POTRET & SELURUH LAYAR ≤ 768px --- */
@media (max-width: 768px) {
    .slide.desktop { display: none; }
    .slider { height: calc(100vh - 60px); }
    .slides { flex-direction: row; height: 100%; }
    .indicator { width: 8px; height: 8px; }
    .prev { left: 0px; }
    .next { right: 0px; }
    
    .cariproduk { display: none; }
    
    .social-icons { margin-top: 15px; }
    .social-icons i { font-size: 20px; margin: 0 4px; }
    
    .testimonial-carousel { display: flex; overflow-x: scroll; -webkit-overflow-scrolling: touch; padding-left: 10px; -ms-overflow-style: none; scrollbar-width: none; }
    .testimonial-carousel::-webkit-scrollbar { display: none; }
    .testimonial-carousel .w3-container h3 { font-size: 16px; }
    .testimonial-carousel .w3-container p { font-size: 12px; }
    .testimonial-item { flex: 0 0 auto; min-width: 5%; margin-right: 10px; width: 67%; padding-left: 0px; }
    
    .sosmed { display: block; }
    .sosmed .w3-xxlarge.w3-text-brown { color: #ffc107; }
    .sosmed hr { width: 50px; border: 5px solid brown; border-radius: 5px; }
    .sosmed p { margin-top: 10px; font-size: 16px; color: #2c2a2a; }
    .sosmed .social-icons { margin-top: 20px; display: flex; justify-content: space-around; }
    .sosmed .social-icon { font-size: 24px; color: #2c2a2a; transition: color 0.3s ease; }
    .sosmed .social-icon:hover { color: #ffc107; }
    
    .bottom-nav { display: flex; }
    .bottom-nav .nav-item { font-size: 10px; }
    .bottom-nav .nav-item i { font-size: 18px; }
    .w3-container p.w3-right { margin-bottom: 80px; }
    
    .w3-row-padding h3 { margin-left: 20px; margin-right: 20px; }
    .w3-row-padding p { margin-left: 20px; margin-right: 20px; }
    .w3-row-padding p img { margin: 20px auto; max-width: 95%; }
}

/* --- 3. MOBILE SEDANG (≤ 576px) -> 3 KOLOM --- */
@media (max-width: 576px) {
    .w3-row-padding .w3-quarter, .w3-row-padding .w3-half { 
        width: 33.3333% !important; 
    }
    .img-kategori-top { font-size: 0.65em !important; }
    .img-kategori-bottom { font-size: 0.55em !important; }
    
    .team-title { font-size: 1.25rem !important; }
    .team-desc { font-size: 0.8rem; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
    
    .carousel-item { flex: 0 0 80vw !important; margin-right: 15px !important; }

    #topMenu { padding: 2px 0 !important; }
    #topMenu .w3-bar-item, #topMenu .w3-button, #topMenu a { 
        padding-top: 6px !important; padding-bottom: 6px !important; font-size: 13px !important; 
    }
}

/* --- 4. MOBILE KECIL (≤ 480px) -> 2 KOLOM --- */
@media (max-width: 480px) {
    .w3-row-padding .w3-quarter, .w3-row-padding .w3-half { 
        width: 50% !important; 
    }
    
    .img-kategori-top { font-size: 0.75em !important; padding: 4px 0 !important; }
    .img-kategori-bottom { font-size: 0.65em !important; padding: 4px 2px !important; }
    
    .social-icons i { font-size: 18px; margin: 0 6px; }

    #topMenu { padding: 0 !important; }
    #topMenu .w3-bar-item, #topMenu .w3-button, #topMenu a { 
        padding-top: 4px !important; padding-bottom: 4px !important; font-size: 12px !important; 
    }
}

/* --- 5. KHUSUS LAYAR MENDATAR / LANDSCAPE (Tinggi Layar Pendek) --- */
@media (max-height: 500px) and (orientation: landscape) {
    #topMenu { padding: 0 !important; min-height: 35px !important; }
    #topMenu .w3-bar-item, #topMenu .w3-button, #topMenu a { 
        padding-top: 4px !important; padding-bottom: 4px !important; font-size: 12px !important; 
    }
    #topMenu img { max-height: 25px !important; width: auto !important; } 
}


/* --- 6. TABLET LANSKAP & UKURAN SPESIFIK (601px - 1024px) --- */
@media (min-width: 601px) and (max-width: 1024px) {
    .carousel-item { flex: 0 0 45vw !important; margin-right: 15px !important; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .slide.mobile { display: none; }
    .slider { height: 75vh; }
    .slides { flex-direction: row; height: 100%; }
    .indicator { width: 10px; height: 10px; }
    .prev { left: 10px; }
    .next { right: 10px; }
}

@media (min-width: 769px) {
    .sosmed { display: none; }
}


/* --- 7. DESKTOP KECIL & BESAR (≥ 1025px) --- */
@media (min-width: 1025px) {
    .w3-row-padding .w3-quarter { width: 25%; }
    .w3-row-padding .w3-quarter, .w3-row-padding .w3-half { padding: 0 8px; margin-bottom: 2px !important; }
    .w3-row-padding img { border-radius: 10px; }
    .img-kategori-top { font-size: 1em; top: 22px; padding: 6px 0; }
    .img-kategori-bottom { font-size: 0.82em; padding: 7px 5px; }
    .jarak { margin-bottom: 22px !important; }
    
    .slide.mobile { display: none; }
    .slider { height: 100vh; max-width: 100%; overflow: hidden; position: relative; }
    .slides { display: flex; flex-direction: row; height: 100%; width: 100%; transition: transform 0.5s ease-in-out; }
    .slide { min-width: 100%; height: 100%; box-sizing: border-box; }
    .slide img { width: 100%; height: 100%; object-fit: cover; }
}

@media (min-width: 1200px) {
    .bottom-nav { display: none; }
}


/* =========================================================
   TAMPILAN DETAIL E-COMMERCE (GAMBAR & VARIASI)
   ========================================================= */
.ecommerce-title {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 5px;
    color: #333;
}
.ecommerce-price {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 800;
    color: #ff5722; 
    margin-top: 0;
    margin-bottom: 20px;
}

.main-image-wrapper {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background-color: #fff;
}
.ecommerce-main-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; 
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    cursor: zoom-in; 
    touch-action: none;
}
.ecommerce-main-img.zooming {
    cursor: crosshair; 
}

/* =========================================================
   TAMPILAN GALERI FOTO TAMBAHAN
   ========================================================= */
.gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    justify-content: flex-start;
}

.thumb-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    width: 55px;
    height: 55px;
    user-select: none;
}
.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.thumb-item:hover {
    border-color: #ff9800;
    background-color: #fff8f0;
}
.thumb-item.active {
    border-color: #ff5722;
    background-color: #fff3e0;
    box-shadow: 0 0 0 1px #ff5722;
}

/* =========================================================
   BAGIAN PEMILIHAN VARIASI
   ========================================================= */
.ecommerce-variations {
    background-color: #fafafa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-bottom: 20px;
}
.variation-label {
    font-size: 1rem;
    color: #555;
    margin-top: 0;
    margin-bottom: 10px;
}
.variation-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variation-item {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center; 
    gap: 6px; 
    padding: 8px; 
    border: 1.5px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    user-select: none;
    min-width: 65px; 
}
.variation-item img {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 4px;
}
.variation-item span {
    font-size: 0.85rem; 
    font-weight: 500;
    color: #444;
    text-align: center; 
}

.variation-item:hover {
    border-color: #ff9800;
    background-color: #fff8f0;
}
.variation-item.active {
    border-color: #ff5722;
    background-color: #fff3e0;
    box-shadow: 0 0 0 1px #ff5722; 
}
.variation-item.active span {
    color: #e65100;
    font-weight: 700;
}

/* =========================================================
   FORMATTING UNTUK KONTEN SUMMERNOTE (DETAIL PRODUK)
   ========================================================= */
.judul-detail {
    margin-left: 15px;
    margin-right: 15px;
}

.spek-container {
    margin-left: 15px;
    margin-right: 15px;
    font-size: 1rem;
    line-height: 1.6; 
    color: #333;
    overflow-x: hidden; 
}

.spek-container p,
.spek-container div,
.spek-container h1,
.spek-container h2,
.spek-container h3,
.spek-container h4,
.spek-container h5,
.spek-container h6 {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0.5em;
    margin-bottom: 0.8em;
}

.spek-container b,
.spek-container strong,
.spek-container i,
.spek-container em,
.spek-container u,
.spek-container span {
    margin: 0 !important;
    padding: 0 !important;
    display: inline !important; 
}

.spek-container ul, 
.spek-container ol {
    padding-left: 35px !important; 
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0.5em;
    margin-bottom: 0.8em;
}

.spek-container li {
    margin-bottom: 5px;
}

.spek-container img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 5px;
}

/* =========================================================
   PENGATURAN TOMBOL MARKETPLACE / TERSEDIA DI
   ========================================================= */
.button-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important; 
    margin-top: 15px !important;
    flex-wrap: nowrap !important; 
}

.button-container .w3-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #ffefc4 !important; 
    color: #5c4033 !important; 
    border-radius: 6px !important;
    padding: 10px 24px !important;
    font-size: 1.05rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    min-width: 140px !important;
    border: none !important;
    cursor: pointer;
}

.button-container .w3-button img {
    width: 24px !important;
    height: 24px !important;
    margin-right: 8px !important;
    object-fit: contain !important;
}

.button-container .w3-button:hover {
    background-color: #ffe082 !important; 
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* =========================================================
   PENYESUAIAN RESPONSIF KHUSUS MOBILE (MAX 600PX)
   ========================================================= */
@media (max-width: 600px) {
    .judul-detail,
    .spek-container {
        margin-left: 20px !important; 
        margin-right: 20px !important; 
    }
    .ecommerce-title { margin-top: 15px; }

    .variation-grid {
        display: grid !important; 
        grid-template-columns: repeat(3, 1fr) !important; 
        gap: 8px !important; 
    }

    .variation-item {
        width: 100% !important; 
        padding: 8px !important;
    }
    .variation-item img {
        width: 45px !important; 
        height: 45px !important;
    }

    .gallery-thumbnails { justify-content: center; }
    .thumb-item { width: 65px; height: 65px; }
    
    .button-container {
        display: grid !important; 
        grid-template-columns: 1fr !important; 
        gap: 10px !important;
    }
    .button-container .w3-button {
        min-width: 100% !important; 
        padding: 10px 12px !important; 
        font-size: 0.95rem !important; 
    }

}

/* =========================================================
   ANTI BLUR & RESET GAMBAR KHUSUS HALAMAN DETAIL PRODUK
   ========================================================= */
/* Menggunakan class spesifik agar aman meskipun id diubah menjadi id="produk" */
.ecommerce-main-img, 
.thumb-item img,
.variation-item img,
.action-buy img,
.button-container img,
.spek-container img {
    filter: none !important;
    opacity: 1 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    transition: transform 0.3s ease !important; 
    will-change: transform;
}

/* Memastikan ikon di dalam tombol tidak terdorong ke bawah */
.action-buy .btn-buy-wa img,
.action-buy .btn-buy-cart i,
.button-container .w3-button img {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    vertical-align: middle !important;
}


/* =========================================================
   MODAL GALLERY MOBILE (Tampil saat gambar di-tap di HP)
   ========================================================= */
.mobile-gallery-modal {
    display: none; 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    /* Latar Belakang Transparan Gelap */
    background-color: rgba(0, 0, 0, 0.75); 
    z-index: 9999999;
    flex-direction: column;
    /* Efek Kaca Buram (Glassmorphism) */
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px);
}

.gallery-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px; color: #fff; position: absolute; top: 0; width: 100%; z-index: 10;
}

.gallery-counter {
    background: rgba(255, 255, 255, 0.2); padding: 5px 15px; border-radius: 20px; 
    font-weight: bold; font-size: 1rem; letter-spacing: 1px;
}

.close-gallery {
    font-size: 2.5rem; cursor: pointer; line-height: 1; color: #fff; padding-left: 20px;
}

.gallery-slider-container {
    flex: 1; overflow: hidden; position: relative; width: 100%; height: 100%; display: flex; align-items: center;
}

.gallery-slides {
    display: flex; width: 100%; height: 100%; transition: transform 0.3s ease-out; will-change: transform;
}

.gallery-actions {
    position: absolute; bottom: 30px; left: 0; width: 100%;
    display: flex; justify-content: center; gap: 15px; z-index: 10; padding: 0 15px;
}

.gallery-actions .action-btn {
    display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 30px;
    text-decoration: none; font-weight: bold; font-size: 1rem; flex: 1; justify-content: center;
}

.gallery-actions .wa-btn { background-color: #25D366; color: #fff; box-shadow: 0 4px 10px rgba(37,211,102,0.3); }
.gallery-actions .cart-btn { background-color: #ff9800; color: #fff; box-shadow: 0 4px 10px rgba(255,152,0,0.3); }

/* --- Penataan Slide & Variasi Nama --- */
.gallery-slide {
    min-width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 0 10px;
}

/* Pembungkus Konten Gambar & Nama Variasi (Ubah ke mode Vertikal) */
.slide-content-wrapper {
    position: relative;
    display: flex;
    flex-direction: column; /* Menyusun elemen dari atas ke bawah */
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 75vh;
    gap: 15px; /* Memberikan jarak 15px antara gambar dan label nama variasi */
}

.slide-content-wrapper img {
    max-width: 100%; 
    max-height: 60vh; /* Tinggi gambar dikurangi sedikit agar teks di bawahnya punya ruang luas */
    object-fit: contain; 
    border-radius: 8px; 
    user-select: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25); 
}

/* Desain Label Nama Variasi (Di luar gambar, Solid, Terlihat Jelas) */
.gallery-var-badge {
    position: relative; /* Menghilangkan mode melayang (absolute) */
    background-color: #ffefc4; /* Warna solid krem lembut senada dengan tombol website Anda */
    color: #5c4033; /* Warna teks cokelat pekat agar sangat kontras dan jelas */
    border: 1px solid #ffc107; /* Garis pinggir emas */
    padding: 8px 24px;
    border-radius: 30px; 
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis; /* Otomatis menjadi titik-titik (...) jika nama variasi terlalu panjang */
    max-width: 95%; /* Mencegah teks melebar keluar layar HP */
    box-shadow: 0 4px 10px rgba(0,0,0,0.4); /* Bayangan estetik agar tombol tampak timbul */
    pointer-events: none; /* Sentuhan layar tembus, tidak mengganggu fitur swipe gambar */
    z-index: 5;
}


/* =========================================================
   GAYA BARU: KOTAK TOMBOL TRANSAKSI (ACTION BUY)
   ========================================================= */
.action-buy {
    display: flex !important;
    gap: 12px !important;
    margin-top: 15px;
    margin-bottom: 25px;
    width: 100%;
}

.action-buy .btn-buy-wa {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #25D366 !important; 
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out !important;
    flex: 1; 
    border: none !important;
}

.action-buy .btn-buy-wa img {
    margin-right: 8px !important;
    width: 22px !important;
    height: 22px !important;
}

.action-buy .btn-buy-cart {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #ff9800 !important; 
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out !important;
    flex: 1; 
    border: none !important;
    cursor: pointer;
}

.action-buy .btn-buy-cart i {
    margin-right: 8px !important;
    font-size: 1.1rem;
}

.action-buy .btn-buy-wa:hover { background-color: #20ba5a !important; transform: translateY(-1px); }
.action-buy .btn-buy-cart:hover { background-color: #e65100 !important; transform: translateY(-1px); }

@media (max-width: 600px) {
    .action-buy {
        gap: 8px !important;
        margin-bottom: 20px;
    }
    .action-buy .btn-buy-wa,
    .action-buy .btn-buy-cart {
        padding: 10px 12px !important;
        font-size: 0.95rem !important;
    }
}

/* Menonaktifkan kursor pointer untuk menu yang sedang aktif */
.custom-menu-item.active,
.bottom-nav .nav-item.active {
    cursor: default !important;
}