/* === Responsive Global CSS === */

/* Background Website */
body.bg-site {
  position: relative;
  min-height: 100vh;
}

body.bg-site::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  background-size: cover;
  background-image: var(--bg-image);
  z-index: -1; /* Letakkan di belakang semua konten */
}

/* Efek Shadow Halus */
.shadow-soft {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover efek untuk card */
.card.shadow-soft:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* Carousel image */
#mainCarousel img {
  border-radius: 10px;
}

/* Carousel animasi smooth */
.carousel-item {
  transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
}

/* Tablet dan HP */
@media (max-width: 768px) {
  /* Navbar */
  .navbar-brand img {
    height: 30px !important;
  }
  .navbar-nav .nav-link {
    font-size: 14px;
    padding: 6px 8px;
  }

  /* Container */
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Card Produk */
  .card img {
    height: 180px !important;
    object-fit: cover;
  }
  .card-title {
    font-size: 1rem;
  }

  /* Heading */
  h2, h3, h4 {
    font-size: 1.2rem;
  }
}

/* HP Kecil */
@media (max-width: 480px) {
  .navbar-brand img {
    height: 25px !important;
  }
  h2, h3, h4 {
    font-size: 1rem;
  }
  .btn {
    font-size: 0.85rem;
    padding: 6px 10px;
  }
}

/* ==== Mobile Friendly Styling untuk index.php ==== */
@media (max-width: 768px) {
  body.home-page h2 {
    font-size: 1.4rem;
    text-align: center;
  }

  body.home-page .carousel img {
    border-radius: 6px;
    max-height: 200px;
    object-fit: cover;
  }

  body.home-page .card img {
    height: 120px !important;
  }

  body.home-page .card .card-body h5,
  body.home-page .card .card-body h6 {
    font-size: 0.95rem;
  }

  body.home-page .btn {
    font-size: 0.8rem;
    padding: 6px 8px;
  }

  body.home-page .container {
    padding-left: 8px;
    padding-right: 8px;
  }
}

@media (max-width: 480px) {
  body.home-page h2 {
    font-size: 1.2rem;
  }

  body.home-page .card img {
    height: 100px !important;
  }

  body.home-page .btn {
    font-size: 0.75rem;
    padding: 5px 8px;
  }
}

/* ==== Styling khusus tombol Login/Daftar di navbar ==== */
@media (max-width: 768px) {
  .navbar-nav .btn {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .navbar-nav .btn + .btn {
    margin-left: 6px;
  }
}

@media (max-width: 480px) {
  /* Stack tombol di layar sangat kecil */
  .navbar-nav.ms-auto {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .navbar-nav.ms-auto .btn {
    width: 100%;
    margin-bottom: 6px;
    font-size: 0.8rem;
    padding: 8px;
  }

  .navbar-nav.ms-auto .btn:last-child {
    margin-bottom: 0;
  }
}

/* === Tombol Login & Daftar Bersebelahan di Mobile === */
@media (max-width: 768px) {
  .navbar-nav.ms-auto .nav-item.d-flex {
    justify-content: center;
    margin-top: 10px;
  }

  .navbar-nav.ms-auto .btn {
    flex: 1;
    font-size: 0.9rem;
    padding: 6px 10px;
  }
}


