/* Custom styles - halaman Home (hero welcome + kartu eksplorasi) */

/* Fix: gambar di modal Quick View meluber keluar kotak modal */
#modaltoggle .image-holder {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  border-radius: 8px;
}

#modaltoggle .image-holder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fix: gambar produk di grid card tingginya beda-beda / meluber keluar kotak */
.product-card .card-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
}

.product-card .card-img img.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-welcome {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
}

.hero-welcome .hero-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 0 1rem;
}

.hero-welcome .hero-inner h1,
.hero-welcome .hero-inner p {
  color: #fff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}

.hero-welcome h1 {
  font-weight: 800;
  font-size: 3rem;
}

.explore-card {
  display: block;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  min-height: 260px;
  color: #fff;
  text-decoration: none;
  background-size: cover;
  background-position: center;
}

.explore-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  transition: background .2s ease;
}

.explore-card:hover::before {
  background: rgba(0, 0, 0, .55);
}

.explore-card span {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 1;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
}

/* Fix: modal (login, register, cart, quick-view) transparan / tembus pandang */
.modal-content {
  background-color: #fff !important;
  opacity: 1 !important;
}

.modal-backdrop.show {
  opacity: 0.5 !important;
}

/* Fix hover kartu produk: tombol tas & quick-view ditempel ke dasar GAMBAR (bukan ke
   dasar kartu). Dulu posisinya dihitung dari bawah kartu, jadi begitu kartu lebih tinggi
   (ada tombol "Beli Sekarang" / harga sale 2 baris) tombolnya turun keluar dari gambar. */
.product-card .card-img {
  position: relative;
}

.product-content .product-card .cart-concern {
  bottom: 14px;
}

.product-content .product-card:hover .cart-concern {
  bottom: 26px;
}

/* ===== Peringatan stok menipis (partials/low-stock.blade.php) ===== */
.low-stock-badge { background: #f59f00; color: #fff; font-weight: 700; letter-spacing: .2px; }
.low-stock-badge.is-critical { background: #d6293e; animation: low-stock-pulse 1.6s ease-in-out infinite; }
@keyframes low-stock-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(214, 41, 62, .45); }
  50% { box-shadow: 0 0 0 6px rgba(214, 41, 62, 0); }
}
.low-stock-note { display: flex; align-items: flex-start; gap: .4rem; font-size: .8rem; font-weight: 600; line-height: 1.3;
  color: #8a5a00; background: #fff6e0; border: 1px solid #ffe2a1; border-radius: 8px; padding: .4rem .6rem; }
.low-stock-note.is-critical { color: #a61e30; background: #fdecee; border-color: #f5b8c0; }
.low-stock-note svg { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; margin-top: 1px; }
@media (prefers-reduced-motion: reduce) { .low-stock-badge.is-critical { animation: none; } }
