/* ============================================================
   COLOR PALETTE: Coklat Kayu, Cream, Putih, Hitam
   ============================================================ */
:root {
  --primary-color: #8B5A2B;
  --primary-hover: #704822;
  --secondary-color: #F8F1E5;
  --text-dark: #222222;
  --text-light: #ffffff;
  --bottom-nav-h: 65px;
}

/* ============================================================
   BASE
   ============================================================ */
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--secondary-color);
  color: var(--text-dark);
  /* Beri ruang bawah agar konten tidak tertutup bottom nav di mobile */
  padding-bottom: 0;
}

/* ============================================================
   NAVBAR (Atas — Desktop)
   ============================================================ */
.navbar-custom {
  background-color: var(--text-light);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  padding-top: 15px;
  padding-bottom: 15px;
}
.navbar-custom .navbar-brand {
  color: var(--primary-color);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 1px;
}
.navbar-custom .nav-link {
  color: var(--text-dark);
  font-weight: 500;
  margin: 0 5px;
  transition: all 0.3s ease;
}
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* ============================================================
   BOTTOM NAVIGATION — Mobile Only
   ============================================================ */
.bottom-nav {
  display: none; /* Tersembunyi di desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: #ffffff;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
  z-index: 1050;
  border-top: 1px solid #f0f0f0;
}
.bottom-nav-inner {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-around;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #888;
  font-size: 10px;
  font-weight: 500;
  flex: 1;
  height: 100%;
  transition: all 0.25s ease;
  gap: 4px;
}
.bottom-nav-item i {
  font-size: 20px;
  transition: transform 0.25s ease;
}
.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--primary-color);
}
.bottom-nav-item.active i {
  transform: translateY(-2px);
}
.bottom-nav-item .badge-cart {
  position: relative;
}
.bottom-nav-item .badge-cart .cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--primary-color);
  color: #fff;
  font-size: 9px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ============================================================
   CUSTOM BUTTONS
   ============================================================ */
.btn-primary-custom {
  background-color: var(--primary-color);
  color: var(--text-light);
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  padding: 10px 24px;
  font-weight: 600;
  transition: all 0.3s ease;
}
.btn-primary-custom:hover {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.7)),
              url('https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?auto=format&fit=crop&w=1920&q=80')
              center/cover no-repeat;
  height: 85vh;
  display: flex;
  align-items: center;
  color: var(--text-light);
  text-align: center;
}
.hero-section h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.2;
}
.hero-section p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  opacity: 0.9;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
  text-align: center;
  margin-bottom: 50px;
}
.section-title h2 {
  font-weight: 700;
  color: var(--text-dark);
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}
.section-title h2::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* ============================================================
   FEATURE BOXES
   ============================================================ */
.feature-box {
  transition: all 0.4s ease;
  border-bottom: 4px solid transparent;
}
.feature-box:hover {
  transform: translateY(-10px);
  border-bottom: 4px solid var(--primary-color);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.card-custom {
  border: none;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: all 0.4s ease;
  background-color: var(--text-light);
  overflow: hidden;
}
.card-custom:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}
.card-img-top {
  height: 250px;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card-custom:hover .card-img-top {
  transform: scale(1.05);
}

/* ============================================================
   PAGE BANNER (sub-pages)
   ============================================================ */
.page-banner {
  padding: 80px 0 60px;
}
.page-banner h1 {
  font-size: 2.8rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer-custom {
  background-color: #1a1a1a;
  color: #cccccc;
  padding: 60px 0 20px;
}
.footer-custom a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-custom a:hover {
  color: var(--primary-color);
}
.footer-custom h5 {
  color: var(--text-light);
  font-weight: 600;
}

/* ============================================================
   MOBILE-FIRST RESPONSIVE — ≤ 767px
   ============================================================ */
@media (max-width: 767px) {

  /* --- Body: beri ruang bawah untuk bottom nav --- */
  body {
    padding-bottom: var(--bottom-nav-h);
  }

  /* --- Sembunyikan navbar atas di mobile --- */
  .navbar-custom {
    display: none !important;
  }

  /* --- Tampilkan bottom nav --- */
  .bottom-nav {
    display: flex;
  }

  /* --- Hero Section --- */
  .hero-section {
    height: 60vh;
    min-height: 380px;
    padding: 20px 0;
  }
  .hero-section h1 {
    font-size: 1.8rem;
    margin-bottom: 14px;
  }
  .hero-section p {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }
  .hero-section .btn {
    width: 100%;
    margin-bottom: 12px !important;
    margin-right: 0 !important;
  }
  .hero-section .mt-5 {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1.5rem !important;
  }

  /* --- Page Banners --- */
  .page-banner, 
  .container-fluid.text-white.py-5 {
    padding-top: 50px !important;
    padding-bottom: 30px !important;
  }
  .container-fluid.text-white.py-5 .container {
    padding-top: 20px !important;
    padding-bottom: 10px !important;
  }
  .container-fluid.text-white.py-5 h1,
  .container-fluid.text-white.py-5 .display-4 {
    font-size: 1.7rem !important;
  }
  .container-fluid.text-white.py-5 .lead {
    font-size: 0.9rem !important;
  }

  /* --- Section titles --- */
  .section-title {
    margin-bottom: 28px;
  }
  .section-title h2 {
    font-size: 1.4rem;
  }

  /* --- Product Cards --- */
  .card-img-top {
    height: 160px;
  }

  /* --- Login & Register container --- */
  .login-container,
  .register-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .card-login,
  .card-register {
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 100vh;
  }
  .card-login .p-4,
  .card-register .p-4 {
    padding: 24px 20px !important;
  }

  /* --- Checkout layout: stacked --- */
  .checkout-sticky-btn {
    position: sticky;
    bottom: calc(var(--bottom-nav-h) + 10px);
    z-index: 100;
  }

  /* --- Riwayat card list --- */
  .riwayat-table-wrap {
    display: none;
  }
  .riwayat-card-list {
    display: block !important;
  }

  /* --- Footer --- */
  .footer-custom {
    padding: 40px 0 calc(var(--bottom-nav-h) + 20px);
    text-align: center;
  }
  .footer-custom .d-flex {
    justify-content: center;
  }

  /* --- Stepper scroll --- */
  .step-navigation {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 10px;
    max-width: 100% !important;
    gap: 12px;
  }
  .step-navigation::before,
  .step-navigation .position-absolute {
    display: none !important;
  }
  .step-btn {
    flex-shrink: 0;
  }
  .step-content-container {
    max-width: 100% !important;
  }

  /* --- Layanan CTA section --- */
  .row.bg-white.rounded-4.shadow-sm.p-5 {
    padding: 24px !important;
  }

  /* --- General spacing --- */
  section.py-5 {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }
  .container.my-5 {
    margin-top: 24px !important;
    margin-bottom: 24px !important;
  }

  /* --- Tables: make them card-style on mobile --- */
  .table-responsive {
    font-size: 13px;
  }
}

/* ============================================================
   TABLET — 768px ~ 991px
   ============================================================ */
@media (min-width: 768px) and (max-width: 991px) {
  .hero-section {
    height: 70vh;
  }
  .hero-section h1 {
    font-size: 2.5rem;
  }
  .riwayat-card-list {
    display: none !important;
  }
}

/* ============================================================
   DESKTOP — ≥ 992px
   ============================================================ */
@media (min-width: 992px) {
  .bottom-nav {
    display: none !important;
  }
  .riwayat-card-list {
    display: none !important;
  }
}
