body {
  background: #f0f0f0 !important;
}
#main {
  background-color: #F0F0F0 !important;
  padding-top: 145px !important;
}
.custom-product-page {
  margin-top: 10px;
}

/* ==========================================================================
   Apple Island Concept Floating Header (Centering & Reset Fix)
   ========================================================================== */
/* 1. Hilangkan HANYA background layer Flatsome (.header-bg-*) */
.header-bg-container,
.header-bg-image,
.header-bg-color {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
  opacity: 0 !important;
  display: none !important;
  visibility: hidden !important;
}

#header {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  transform: none !important;
}


.header-wrapper,
#header .header-wrapper,
#header.header-sticky .header-wrapper {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  z-index: 9999 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
  pointer-events: none;
  margin: 0 !important;
  transform: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

/* Top Announcement Mini-Pill */
#top-bar {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  margin: 10px auto 8px auto !important;
  transform: none !important;
  float: none !important;
  background: rgba(20, 20, 20, 0.88) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border-radius: 999px !important;
  max-width: fit-content !important;
  padding: 4px 22px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#top-bar .top-bar-text {
  font-size: 11px !important;
  letter-spacing: 0.4px !important;
  color: #f5f5f7 !important;
  font-weight: 500 !important;
  white-space: nowrap;
}

#top-bar .flex-row.container {
  min-height: 24px !important;
  padding: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
}

/* Main Navigation Floating Island (80vw Mengikuti Layar Penuh) */
#masthead {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  margin: 0 auto !important;
  transform: none !important;
  float: none !important;
  background-color: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(16px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(190%) !important;
  border-radius: 999px !important;
  width: 80vw !important;
  max-width: 90vw !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
  pointer-events: auto;
  overflow: visible !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#masthead .header-inner {
  min-height: 64px !important;
  height: 100% !important;
  padding: 0 28px !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

#masthead .flex-col {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
}

#masthead .logo {
  padding: 0 !important;
  margin-right: 20px !important;
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
}

#masthead .logo img {
  max-height: 38px !important;
  width: auto !important;
  transition: transform 0.2s ease;
}

#masthead .flex-col.header-nav {
  flex: 1 1 auto !important;
}

/* Max Mega Menu & Flatsome Nav Consistency */
#masthead .nav,
#masthead #mega-menu-wrap-primary,
#masthead #mega-menu-wrap-primary #mega-menu-primary {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  margin: 0 !important;
  background: transparent !important;
}

#masthead #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item {
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  background: transparent !important;
}

#masthead #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link,
#masthead .nav > li > a {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #333333 !important;
  padding: 8px 13px !important;
  border-radius: 20px;
  white-space: nowrap !important;
  transition: all 0.2s ease;
  background: transparent !important;
  line-height: normal !important;
  height: auto !important;
}

#masthead #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link:hover,
#masthead .nav > li > a:hover {
  color: #000000 !important;
  background: rgba(0, 0, 0, 0.05) !important;
}

/* Dropdown menus dari Island */
#masthead .nav-dropdown,
#masthead .mega-sub-menu {
  border-radius: 16px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

/* Spasi Breadcrumbs */
.breadcrumbs {
  margin-top: 12px !important;
  margin-bottom: 18px !important;
}

/* Tablet (iPad Landscape & Mid-Screen: 850px - 1199px) */
@media (min-width: 850px) and (max-width: 1199px) {
  #masthead {
    width: 95vw !important;
    max-width: 96vw !important;
  }
  #masthead .header-inner {
    padding: 0 16px !important;
  }
  #masthead .logo {
    margin-right: 10px !important;
  }
  #masthead .logo img {
    max-height: 30px !important;
  }
  #masthead #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link,
  #masthead .nav > li > a {
    font-size: 11.5px !important;
    padding: 6px 7px !important;
  }
  #masthead .nav-right > li {
    padding: 0 3px !important;
  }
  #top-bar {
    max-width: 95vw !important;
  }
}

/* Mobile & Tablet Portrait (< 850px) */
@media (max-width: 849px) {
  #top-bar {
    width: calc(100% - 24px) !important;
    max-width: 100% !important;
    text-align: center;
  }
  #masthead {
    width: calc(100% - 24px) !important;
    border-radius: 30px !important;
  }
  #masthead .header-inner {
    min-height: 56px !important;
    height: 100% !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  #masthead .flex-col {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
  }
  #main {
    padding-top: 130px !important;
  }
}


.mils-tags {
  padding-bottom: 2em;
}
.mils-tags span.tagged_as {
  display: flex;
  width: max-content;
  gap: 5px;
}
.mils-tags span.tagged_as a {
  color: #fff;
  font-weight: 600;
  font-size: 1.3em;
  letter-spacing: 1.2px;
  background: #ADADAD;
  padding: 5px 15px;
  border-radius: .4em;
}
.mils-tags span.tagged_as a:hover {
  color: #fff;
}
.product-title-container h1.entry-title {
  font-weight: 700;
  color: #505050;
  font-size: 3em;
  margin-bottom: 1em;
}
.product-title-container .is-divider {
  display: none !important;
}
.price-wrapper .price.product-page-price {
  line-height: 2em;
}
span.woocommerce-Price-amount.amount {
  font-weight: 500;
  font-size: 1.8em;
  color: #505050;
}
.breadcrumbs a {
  font-weight: 500;
  font-size: 1.2em;
}
.product-short-description {
  display: none !important;
}
.cfvsw-product-page table.variations .label label {
  font-weight: 500;
  font-size: 1.3em;
  letter-spacing: 1.2px;
}
.cfvsw-swatches-option.cfvsw-label-option {
  padding: 10px 20px;
  border-radius: .6em !important;
}
table.variations {
  border-spacing: 0em 1em;
}
.ux-quantity {
  border: 1px solid rgba(0, 0, 0, .5);
  border-radius: .4em;
  overflow: hidden;
  padding: 5px 20px;
  background: #fff;
  margin: 0 !important;
}
.ux-quantity input, .quantity .button.minus, .quantity .button.plus {
  border-style: none !important;
  background-color: #fff;
  box-shadow: none !important;
}
.current .breadcrumb-step, [data-icon-label]:after, .button#place_order, .button.checkout, .checkout-button, .single_add_to_cart_button.button, .sticky-add-to-cart-select-options-button {
  text-decoration: none;
  text-transform: none;
  font-weight: 400;
  padding: 5px 30px;
  border-radius: .4em;
  overflow: hidden;
}
*[display="false"] {
  display: none !important;
}
.woocommerce-variation-add-to-cart {
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: max-content 1fr max-content;
  grid-gap: 1em;
}
.yith-wcwl-add-to-wishlist {
  margin: 0;
  width: max-content;
  margin: 0;
  padding: 5px 15px;
  display: grid;
  justify-items: center;
  align-items: center;
  background-color: #D4D4D4;
  border-radius: .5em;
}
.yith-wcwl-add-to-wishlist span {
  display: none;
}
.single_add_to_cart_button {
  margin: 0 !important;
  background-color: #2F3133 !important;
}
.yith-wcwl-add-button .add_to_wishlist svg.yith-wcwl-icon-svg, .yith-wcwl-add-button .add_to_wishlist img {
  margin: 0;
}
.cfvsw-label-option, .cfvsw-image-option {
  border: 1px solid #00000000;
}
.cfvsw-swatches-option:not( .cfvsw-swatches-disabled, .cfvsw-swatches-out-of-stock ):hover {
  border-color: #000000c7;
}

/* Sembunyikan Tabs Bawaan Flatsome */
.product-footer .woocommerce-tabs.wc-tabs-wrapper,
.woocommerce-tabs.wc-tabs-wrapper.tabbed-content {
    display: none !important;
}

/* Container Utama */
.woocommerce-tabs-accordion.custom-accordion {
    margin-top: 30px;
    border-top: 2px solid #c8c8c8;
    border-bottom: 2px solid #c8c8c8;
    border-radius: 5px;
    overflow: hidden;
    width: 100%;
    clear: both;
}

/* Item Wrapper */
.woocommerce-tabs-accordion .accordion-item {
    border-bottom: 2px solid #c8c8c8;
    background: #ffffff00;
}

.woocommerce-tabs-accordion .accordion-item:last-child {
    border-bottom: none;
}

/* Header (Judul) */
.woocommerce-tabs-accordion .accordion-header {
    background-color: #fcfcfc00;
    padding: 20px 20px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    outline: none;

}

/* Hover Effect */
.woocommerce-tabs-accordion .accordion-header:hover {
    background-color: #ffffff00;
}

/* Remove default marker */
.woocommerce-tabs-accordion .accordion-header::-webkit-details-marker {
    display: none;
}
/* Panah Chevron (Kanan) menggunakan CSS Border */
.accordion-arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid #999;
    border-bottom: 2px solid #999;
    transform: rotate(45deg); /* Membentuk panah ke bawah */
    transition: transform 0.3s ease;
    margin-right: 5px;
}

/* STATE: OPEN (Saat Terbuka) */
.woocommerce-tabs-accordion .accordion-item[open] .accordion-arrow {
    transform: rotate(-135deg); /* Memutar panah ke atas */
    border-color: #333;
}

/* Ubah warna header saat terbuka */
.woocommerce-tabs-accordion .accordion-item[open] .accordion-header {
    background-color: #ffffff00;
    border-bottom: 1px solid #f0f0f0;
}

/* Konten dengan Animasi Slide Down */
.woocommerce-tabs-accordion .accordion-content {
    padding: 20px;
    background: #ffffff00;

    line-height: 1.6;
    color: #555;
    /* Animasi */
    animation: slideDown 0.4s ease-out;
    transform-origin: top;
}

/* Keyframes untuk efek smooth opening */
@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fix untuk Judul Ganda di Description/Reviews */
.woocommerce-tabs-accordion .accordion-content > h2:first-child,
.woocommerce-tabs-accordion .accordion-content > h3:first-child {
    display: none;
}
.is-sticky-column {
    top: 90px !important; 
}
.accordion-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.accordion-title-wrapper .material-icons {
    font-size: 20px;
    color: #555;
    line-height: 1;
    display: inline-block;
}

.accordion-header:hover .accordion-title-wrapper .material-icons,
.accordion-item[open] .accordion-title-wrapper .material-icons {
    color: #333;
}

accordion-title-wrapper .custom-svg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Styling SVG */
.accordion-title-wrapper .custom-svg-icon svg {
    width: 1.125em; /* Ukuran relatif terhadap teks (kira-kira 18px) */
    height: 1.125em;
    stroke-width: 2px; /* Ketebalan garis, sesuaikan jika perlu */
    transition: all 0.3s ease;
    color: #555; /* Warna default (abu-abu) */
}

.accordion-title-wrapper i {
    font-size: 1.125em;
}

/* Styling Wrapper Icon */
.accordion-title-wrapper .custom-svg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-right: 2px; /* Sedikit penyesuaian jarak */
}

/* Styling SVG (Ukuran & Garis) */
.accordion-title-wrapper .custom-svg-icon svg {
    width: 30px;
    height: 30px;
    stroke-width: 1.3px;
    transition: all 0.3s ease;
    color: #555;   /* Warna default (Abu-abu) */
}
.accordion-title-text {
    font-size: 1.3em;
    font-weight: 500;
}

@media (max-width: 767px) {
  .product-title-container h1.entry-title {
    font-size: 1.6em;
  }
  .product-page-price {
    font-size: .8em
  }
}
/* === FIXED: SLIDER THUMBNAIL DENGAN SCROLL === */

/* 1. Container Slider */
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs {
    display: flex !important;
    flex-wrap: nowrap !important; /* Paksa satu baris lurus */
    overflow-x: auto !important; /* Wajib auto agar scrollbar muncul */
    overflow-y: hidden !important;
    width: 100% !important;
    padding: 10px 0 !important;
    
    /* UX Modern */
    scroll-snap-type: x mandatory; /* Agar berhenti pas di gambar */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Smooth scroll untuk iOS */
    
    /* Penting: Izinkan browser menangani geseran */
    touch-action: pan-x;
    cursor: grab;
}

/* 2. Item Thumbnail (3 Gambar per Slide) */
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li {
    /* Mencegah gambar menyusut (Shrink) agar overflow terjadi */
    flex: 0 0 33.333% !important; 
    max-width: 33.333% !important;
    width: 33.333% !important;
    
    /* Snap align */
    scroll-snap-align: start;
    
    padding: 0 5px !important;
    margin: 0 !important;
    list-style: none !important;
    box-sizing: border-box !important;
}

/* 3. Gambar */
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li img {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    opacity: 0.5;
    transition: opacity 0.3s;
    display: block !important;
}

/* 4. Highlight Gambar Aktif */
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li img.flex-active {
    opacity: 1 !important;
    border: 1px solid #333 !important;
}

/* --- BAGIAN PENTING: SCROLLBAR NAVIGASI --- */

/* Tampilkan scrollbar tipis agar user Desktop bisa menggeser */
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs::-webkit-scrollbar {
    height: 6px; /* Tinggi scrollbar (cukup tebal untuk diklik mouse) */
    display: block !important; /* Paksa muncul */
}

/* Track (Jalur) Scrollbar */
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 4px;
}

/* Handle (Batang) Scrollbar yang bergerak */
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs::-webkit-scrollbar-thumb {
    background: #ccc; /* Warna batang */
    border-radius: 4px;
}

/* Efek saat mouse diarahkan ke scrollbar */
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs::-webkit-scrollbar-thumb:hover {
    background: #888; 
}

/* --- Styling Video di Dalam Slider Thumbnail --- */

/* --- SYSTEM VIDEO OVERLAY --- */

/* 1. Mengatur Player Video Utama agar menutupi gambar produk */
.mils-video-overlay {
    display: none; /* Sembunyi default */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Menutupi area hijau sepenuhnya */
    background: #000;
    z-index: 99; /* Pastikan di atas gambar */
    align-items: center;
    justify-content: center;
}

/* Membuat Iframe Responsive di Tengah */
.mils-video-responsive {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}
.mils-video-responsive iframe {
    width: 100%;
    height: 100%; /* Full area */
    object-fit: contain;
}

/* 2. Styling Thumbnail Video di Slider Bawah */
.mils-video-thumb-li {
    position: relative;
    cursor: pointer;
    flex: 0 0 33.333% !important; /* Wajib sama dengan settingan slider kamu */
    max-width: 33.333% !important;
    padding: 0 5px !important;
    box-sizing: border-box;
}

/* Gambar Thumbnail Youtube */
.mils-video-thumb-li img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    opacity: 0.6;
    transition: 0.3s;
}

/* Efek Highlight saat Aktif */
.mils-video-thumb-li img.flex-active {
    opacity: 1 !important;
    border: 2px solid #000; /* Border penanda */
}

/* Ikon Play Kecil di tengah Thumbnail (Pemanis) */
.mils-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background: rgba(0,0,0,0.7);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    pointer-events: none; /* Agar klik tembus ke li */
}

/* --- Tambahan Tombol Close --- */
.mils-close-video {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 24px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    transition: 0.2s;
}
.mils-close-video:hover {
    background: red;
}

/* Pastikan Overlay tetap absolute dan full terhadap PARENT-nya (Viewport) */
.mils-video-overlay {
    position: absolute !important; /* Paksa absolute */
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 999;
}

:root {
  --mils-accent: #7eaeb4;
  --mono-bg: #ffffff;
  --mono-text: #2d2d2d;
  --mono-muted: #666666;
  --mono-border: #f0f0f0;
}

.floating-panel-contact {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  font-family: 'Segoe UI', Roboto, Helvetica, sans-serif;
  transform: scale(0);
  opacity: 0;
  animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.panel-inner {
  background: var(--mono-bg);
  border: 1px solid var(--mono-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  width: 120px;
  height: 45px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
  cursor: pointer; /* Menandakan bisa diklik saat tertutup */
}

.initial-state {
  font-size: 14px;
  font-weight: 600;
  color: var(--mono-text);
  transition: opacity 0.3s ease;
  position: absolute;
}

/* State ketika expand menjadi kotak */
.floating-panel-contact.expanded .panel-inner {
  width: 320px;
  height: 220px; /* Anda bisa kurangi tingginya lagi jika header sudah tidak bocor */
  border-radius: 12px;
  padding: 20px;
  cursor: default;
  /* Tambahan untuk memastikan layout internal rapi */
  box-sizing: border-box;
  align-items: flex-start;
}

.floating-panel-contact.expanded .initial-state {
  opacity: 0;
  pointer-events: none;
}



.expanded-state {
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  transition: opacity 0.4s ease 0.5s;
}

.floating-panel-contact.expanded .expanded-state {
  opacity: 1;
  pointer-events: auto;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between; 
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--mono-border);
  /* Tambahan untuk mengunci tinggi header */
  flex: 0 0 auto; 
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--mono-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: var(--mils-accent);
}

.avatar {
  background-color: var(--mils-accent);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.sender-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--mono-text);
}

.chat-body {
  flex-grow: 1;
}

.typing-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--mono-muted);
}

.typing-text::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--mils-accent);
  font-weight: bold;
}

.typing-text.done::after {
  display: none;
}

.chat-action {
  margin-top: 15px;
}

.wa-btn {
  display: block;
  background-color: var(--mils-accent);
  color: #ffffff;
  text-decoration: none;
  padding: 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.5s ease;
  border: 1px solid var(--mils-accent);
}

.wa-btn.show {
  opacity: 1;
  transform: translateY(0);
}

.wa-btn:hover {
  background-color: transparent;
  color: var(--mils-accent);
}
.chat-header p {
  margin-bottom: 0em;
}
.chat-header .close-btn {
  min-height: 0em;
  min-width: 0px;
  margin-bottom: 0em;
}

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ==========================================================================
   Mils Product Gallery Upgrade: Hide Thumbnails & Style Scrollable Gallery
   ========================================================================== */
ol.flex-control-thumbs,
ol.flex-control-nav,
.flex-control-thumbs,
.flex-control-nav,
.product-gallery-thumbnails,
.product-thumbnails,
.woocommerce-product-gallery .flex-control-thumbs,
.woocommerce-product-gallery .flex-control-nav,
.mils-video-thumb-li {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.woocommerce-product-gallery {
  position: relative !important;
  margin-bottom: 24px !important;
}

.woocommerce-product-gallery .flex-viewport {
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.mils-gallery-counter {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(17, 17, 17, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  z-index: 25;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  user-select: none;
}

/* ==========================================================================
   Sticky Product Gallery (Pinned until content column finishes scrolling)
   ========================================================================== */
html,
body.single-product {
  overflow-x: clip !important;
}

@media (min-width: 850px) {
  /* 1. Ensure the parent flex row stretches columns equally so the left column extends the full content height */
  .custom-product-page .row,
  .product-main .row,
  .row:has(.product-gallery-default),
  .row:has(.is-sticky-column) {
    display: flex !important;
    flex-flow: row wrap !important;
    align-items: stretch !important;
  }

  /* 2. Ensure gallery column stretches to match full height of content column */
  .col:has(.product-gallery-default),
  .col:has(.woocommerce-product-gallery),
  .col:has(.is-sticky-column),
  .product-gallery.col {
    height: auto !important;
    align-self: stretch !important;
  }

  /* 3. Make the gallery sticky with top: 130px below our Apple Island Floating Header */
  .col:has(.product-gallery-default) .is-sticky-column,
  .col:has(.woocommerce-product-gallery) .is-sticky-column,
  .is-sticky-column {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 130px !important;
    height: -moz-fit-content !important;
    height: fit-content !important;
    max-height: calc(100vh - 145px) !important;
    z-index: 20 !important;
    overflow: visible !important;
    transition: top 0.2s ease;
  }

  /* 4. Ensure internal wrappers don't force 100% height or block scrolling */
  .col:has(.product-gallery-default) .is-sticky-column__inner,
  .col:has(.product-gallery-default) .col-inner {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  /* 5. Fallback if .is-sticky-column wrapper is not present */
  .col:has(.product-gallery-default):not(:has(.is-sticky-column)) .col-inner,
  .col:has(.woocommerce-product-gallery):not(:has(.is-sticky-column)) .col-inner {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 130px !important;
    height: -moz-fit-content !important;
    height: fit-content !important;
    z-index: 20 !important;
  }

  .product-gallery-default {
    position: relative;
    max-width: 100%;
  }
}

@media (max-width: 849px) {
  .is-sticky-column,
  .col:has(.product-gallery-default) .is-sticky-column,
  .col:has(.product-gallery-default) .col-inner {
    position: relative !important;
    top: auto !important;
    height: auto !important;
  }
}
