/* Navbar custom background */
.navbar-custom {
  background-color: transparent !important;
  overflow: visible !important;
  position: relative !important;
  z-index: 1000;
}

/* Sticky Navbar */
.navbar-custom.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.3s ease-out;
  width: 100%;
  margin: 0 auto;
}

body.sticky-nav {
  padding-top: 60px; /* Sesuaikan dengan tinggi navbar */
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Dropdown menu */
.navbar .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 2000 !important;
  display: none;
  background-color: white;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.navbar-nav .dropdown-menu.show {
  display: block;
}

/* Hover dropdown untuk desktop */
@media (min-width: 768px) {
  .navbar .nav-item.dropdown:hover .dropdown-menu {
    display: block;
  }
}

/* Dropdown menu untuk mobile */
@media (max-width: 767.98px) {
  .navbar .dropdown-menu,
  .navbar-nav .dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    margin-top: 0;
    background-color: #fff;
    box-shadow: none;
    display: none;
  }

  .navbar .nav-item.show .dropdown-menu,
  .navbar .dropdown.show .dropdown-menu {
    display: block;
  }

  .navbar-nav .nav-item:hover .dropdown-menu {
    display: none;
  }

  .navbar-collapse {
    max-height: 80vh;
    overflow-y: auto;
  }

  .navbar-nav {
    padding-bottom: 1rem;
  }
}

.navbar .dropdown:hover .dropdown-menu,
.navbar .dropdown:focus-within .dropdown-menu,
.navbar .nav-item.dropdown.show .dropdown-menu {
  display: block;
}

.navbar .dropdown-toggle::after {
  display: inline-block;
  margin-left: .255em;
  vertical-align: .255em;
  content: "";
  border-top: .3em solid;
  border-right: .3em solid transparent;
  border-bottom: 0;
  border-left: .3em solid transparent;
}

.navbar .nav-link {
  position: relative;
  z-index: 1100;
  color: black !important;
  font-weight: 500;
}

.nav-link:hover {
  color: #dc3545 !important;
}

/* Animasi intro */
.intro-animation {
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeSlideIn 0.8s ease-out forwards;
}
.intro-delay-1 { animation-delay: 0.2s; }
.intro-delay-2 { animation-delay: 0.4s; }
.intro-delay-3 { animation-delay: 0.6s; }
.intro-delay-4 { animation-delay: 0.8s; }
.intro-delay-5 { animation-delay: 1s; }
.intro-delay-6 { animation-delay: 1.2s; }
.intro-delay-7 { animation-delay: 1.3s; }
.intro-delay-8 { animation-delay: 1.3s; }

@keyframes fadeSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Carousel image styling */
.carousel-item img {
  height: 60vh;
  object-fit: cover;
}

.carousel {
  overflow: visible;
  position: relative;
}

.custom-caption {
  position: absolute;
  top: 30%;
  left: 5%;
  transform: translateY(-30%);
  color: white;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
  z-index: 1 !important;
}

.custom-caption h1 {
  font-size: 3rem;
  font-weight: 700;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .custom-caption h1 {
    font-size: 2rem;
  }
}

/* Teks */
.text-white {
  color: white;
}

.text-yellow {
  color: #FFD700;
}

/* Mengunci gambar agar membesar di dalam area box slider modal saja */
#modalCarouselInner .carousel-item {
  overflow: hidden !important;
  position: relative;
}

/* Mengatur transisi gambar saat di-hover */
.zoomable-img {
  transition: transform 0.1s ease-out !important; /* Kecepatan responsif mengikuti kursor */
  cursor: zoom-in;
  transform-origin: center center;
}

/* Saat di-hover, gambar membesar sesuai arah kursor */
#modalCarouselInner .carousel-item:hover .zoomable-img {
  transform: scale(2) !important; /* Membesar 2 kali lipat. Bisa diubah ke 2.5 atau 3 jika ingin lebih besar */
}

/* Product Carousel Controls & Grid Layout */
.product-prev,
.product-next {
  width: 50px;
  height: 50px;
  background: #fff;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

#productCarousel {
  position: relative;
  padding: 0 60px;
}

.product-prev { left: 0; }
.product-next { right: 0; }

.product-prev .carousel-control-prev-icon,
.product-next .carousel-control-next-icon {
  filter: invert(1);
}

.product-col {
  width: 20%;
  flex: 0 0 20%;
}

@media(max-width: 992px) {
  .product-col {
    width: 33.333%;
    flex: 0 0 33.333%;
  }
}

@media(max-width: 768px) {
  .product-col {
    width: 50%;
    flex: 0 0 50%;
  }
  .product-prev,
  .product-next {
    width: 40px;
    height: 40px;
  }
}

.product-label {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: bold;
  color: #fff;
  z-index: 2;
}

.label-fresh { background-color: #28a745; }
.label-sale { background-color: #ffc107; color: #000; }
.label-sold { background-color: #6c757d; }


/* ==========================================
   KARTU PRODUK 1:1 RESPONSIF (APLIKASI BARU)
   ========================================== */
.product-card {
  position: relative;
  overflow: hidden;
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  
  /* Dikunci sesuai batas gambar maksimal Anda */
  max-width: 222.67px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.product-img {
  width: 100%;
  max-height: 222.67px;
  
  /* Mengunci gambar bawaan 1080x1080px agar tetap 1:1 kotak sempurna */
  aspect-ratio: 1 / 1;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.product-card:hover .product-img {
  transform: scale(1.04);
}

/* Pembungkus teks di bawah gambar */
.product-card .p-2 {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px !important;
}

.product-name {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-top: 4px;
  margin-bottom: 2px;
  
  /* Membatasi nama produk maksimal 1 baris */
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-img {
    width: 100%;
    height: 320px; /* Mengunci tinggi gambar di layar laptop agar pas (tidak terlalu panjang ke bawah) */
    object-fit: cover; /* Memastikan gambar 1080x1350 terpotong proporsional, tidak gepeng/melar */
    object-position: center; /* Fokus potongan gambar berada di tengah */
    border-radius: 8px; /* Opsional: memberikan lengkungan halus di sudut gambar */
}
.product-img {
  width: 100%;
  aspect-ratio: 1 / 1; /* Memaksa elemen berbentuk persegi sempurna */
  object-fit: cover;   /* Mengisi ruang penuh tanpa membuat gambar gepeng */
  object-position: center; /* Memastikan objek di tengah tetap terlihat */
  border-radius: 4px;  /* Opsional: mempercantik sudut gambar */
}

/* Pengaturan khusus untuk layar HP agar tidak terlalu tinggi */
@media (max-width: 768px) {
    .product-img {
        height: 200px; /* Di layar HP, tingginya disesuaikan agar pas dengan formasi 2 kolom */
    }
}



.product-price {
  font-size: 11px;
  color: #777;
  line-height: 1.4;
  margin-bottom: 0;
  
  /* Mengunci tinggi area deskripsi warna agar antar kartu sejajar rata */
  display: -webkit-box;
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}


/* Filter Menu */
.filter-menu {
  font-size: 0.95rem;
  gap: 1rem;
}

.filter-menu a {
  text-decoration: none;
  color: #555;
}

.filter-menu a.active {
  font-weight: bold;
  color: #000;
  border-bottom: 2px solid #000;
}

.filter-link {
  margin: 0 10px;
  text-decoration: none;
  color: #000;
  font-weight: 500;
}

.filter-link.active,
.filter-link:hover {
  color: #dc3545;
  text-decoration: underline;
}

/* Deal of the Week */
.deal-section {
  background-color: #7492cc;
  padding: 60px 0;
}
.video-container {
  position: relative;
  width: 560px;
  height: 315px;
  overflow: hidden;
}
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* disable all user interaction */
}

.deal-title {
  color: #dc3545;
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.deal-product-title {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
}

.deal-prices {
  font-size: 1rem;
  color: #999999;
  text-decoration: line-through;
}

.deal-new-price {
  color: #000;
  font-weight: bold;
  margin-left: 10px;
}

.deal-badge {
  display: inline-block;
  background-color: #dc3545;
  color: #fff;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: bold;
  border-radius: 5px;
  margin: 10px 0;
}

.countdown-timer {
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 20px 30px;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  max-width: 400px;
  margin-top: 20px;
}

.countdown-item {
  text-align: center;
  min-width: 60px;
}

.countdown-item span {
  display: block;
}

.countdown-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: #000;
}

.countdown-label {
  font-size: 0.8rem;
  color: #999;
}

.btn-deal {
  border: 1px solid #000;
  padding: 10px 20px;
  background: transparent;
  font-weight: 500;
  margin-top: 20px;
}

/* SPARROW VIDIO PROSESING */
.sparrow-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
}

.sparrow-video {
  position: relative;
  width: 100%;
  max-width: 350px;
  margin: 0 auto;

  /* Rasio Shorts 9:16 */
  aspect-ratio: 9 / 16;

  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

@media (min-width: 992px) {
  .sparrow-container > * {
    margin-top: -10px;
  }
}

.sparrow-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.sparrow-text {
  text-align: left;
}

.sparrow-text.center {
  text-align: right;
}

.sparrow-text h2 {
  margin: 0;
  font-weight: normal;
  line-height: 1.5;
}

.sparrow-text h2 strong {
  font-weight: bold;
}

.sparrow-text p {
  font-size: 18px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .sparrow-container {
    grid-template-columns: 1fr;
  }
  .sparrow-video {
    max-width: 280px;
  }
}

.sparrow-subtext {
  font-style: italic;
  font-size: 14px;
  color: #999;
  font-weight: 300;
  margin-top: 8px;
}

/* Footer */
.footer-container {
  background-color: #7492cc;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9em;
  gap: 20px;
}

.footer-left {
  flex: 1;
  min-width: 200px;
}

.footer-left .footer-logo img {
  width: 100%;
  max-width: 300px;
  height: auto;
}

.footer-right {
  flex: 1;
  min-width: 200px;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.footer-contact {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .footer-right {
    align-items: flex-start;
    text-align: left;
  }
  .footer-contact {
    justify-content: flex-start;
  }
}

/* Floating WhatsApp Button */
.floating-whatsapp {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.floating-whatsapp a {
  display: block;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 60px;
  font-size: 2.5em;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s ease;
}

.floating-whatsapp a:hover {
  background-color: #128C7E;
}