/* 
  Modjoer Makmoer Global Styles (Bootstrap 5 Overrides)
*/

:root {
  /* Palet Warna */
  --bg-main: #fdf8f5;
  /* Cream */
  --bg-surface: #ffffff;
  --bg-surface-low: #faf2ec;
  --bg-surface-lowest: #ffffff;
  --bg-surface-variant: #fdf8f5;
  --bg-header: #fdf8f5;

  --text-main: #2d2926;
  /* Charcoal */
  --text-muted: #6b6661;
  /* Warm Grey */
  --text-stone: #6b6661;
  --text-stone-dark: #2d2926;

  --primary: #c61a09;
  /* Deep Red */
  --primary-container: #c61a09;
  --on-primary: #ffffff;

  --accent: #e9c46a;
  /* Harvest Gold */

  --border-color: #e8e3df;
  --border-outline: #d1cbc7;
  --border-outline-variant: #f0ebe6;

  /* Tipografi */
  --font-serif: 'Noto Serif', serif;
  --font-sans: 'Be Vietnam Pro', sans-serif;
  --icon-font: 'Material Symbols Outlined';

  /* Override Bootstrap */
  --bs-body-font-family: var(--font-sans);
  --bs-body-bg: var(--bg-main);
  --bs-body-color: var(--text-main);
  --bs-primary: var(--primary);
}

html {
  scroll-behavior: smooth;
}

/* Gaya Dasar */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main) !important;
}

/* Tombol */
.btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--on-primary) !important;
}

.btn-primary:hover {
  background-color: var(--primary-container) !important;
  border-color: var(--primary-container) !important;
}

/* Teks */
.font-serif {
  font-family: var(--font-serif);
}

.font-sans {
  font-family: var(--font-sans);
}

.text-primary {
  color: var(--primary-container) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.big-title {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
}

.mid-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
}

.small-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;
}

.mini-text {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Ikon Material */
.material-symbols-outlined {
  font-family: var(--icon-font);
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* Navbar */
.navbar {
  background-color: var(--bg-header) !important;
  border-bottom: 1px solid var(--border-color);
  min-height: 60px;
}

.logo-img {
  height: 80px;
  width: auto;
  object-fit: contain;
  padding: 8px;
}

.nav-link {
  color: var(--text-stone) !important;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
  padding: 8px 16px !important;
  border-radius: 4px;
}

.nav-link:hover {
  color: var(--primary-container) !important;
  background-color: var(--bg-surface-lowest);
}

.nav-link.active {
  color: var(--primary-container) !important;
  font-weight: bold;
  border-bottom: 2px solid var(--primary-container);
  border-radius: 0;
}

.menu-link-indicator {
  border-bottom: 2px solid transparent;
}

.header-icons button {
  color: var(--primary-container);
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s;
}

.header-icons button:hover {
  background-color: #f5f5f4;
}

/* Footer */
.footer {
  background-color: #2d2926;
  /* Charcoal */
  border-top: none;
  padding: 48px 0;
  margin-top: auto;
  color: #ffffff;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: bold;
  color: var(--on-primary);
}

.footer-links a {
  color: var(--bg-surface-variant);
  font-size: 14px;
  text-decoration: underline;
  text-decoration-color: var(--bg-surface-variant);
  text-underline-offset: 4px;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 0.8;
  color: var(--on-primary);
}

/* Hero */
.hero {
  position: relative;
  height: 716px;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(51, 48, 44, 0.4);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 42rem;
}

/* Tombol */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 24px;
  box-shadow: 0 4px 12px rgba(156, 8, 0, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-container);
  border-color: var(--primary-container);
}

/* Kartu dan Grid Menu */
.card {
  background-color: var(--bg-surface-lowest);
  border: 1px solid var(--border-color);
  transition: box-shadow 0.3s;
}

.card:hover {
  box-shadow: 0 12px 24px rgba(156, 8, 0, 0.15);
  border-color: var(--border-outline-variant) !important;
}

.card-img-top,
.card-img-container img {
  width: 100%;
  height: 192px;
  object-fit: cover;
  transition: transform 0.5s;
}

.card-img-container {
  overflow: hidden;
  background-color: var(--bg-surface-variant);
  border-top-left-radius: calc(0.375rem - 1px);
  border-top-right-radius: calc(0.375rem - 1px);
  height: 192px;
}

.card:hover .card-img-top,
.card:hover .card-img-container img {
  transform: scale(1.05);
}

/* Grid Halaman Utama */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  grid-auto-rows: 300px;
}

@media (min-width: 768px) {
  .menu-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .menu-box.large {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.menu-box {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-outline-variant);
  cursor: pointer;
}

.menu-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.menu-box:hover .menu-pic {
  transform: scale(1.05);
}

.menu-shadow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(51, 48, 44, 0.8), transparent);
}

.menu-info {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 24px;
  color: var(--on-primary);
}

.menu-btn {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background-color: var(--bg-surface);
  color: var(--primary);
  padding: 8px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
}

.menu-box:hover .menu-btn {
  opacity: 1;
}

/* Form */
.form-control:focus {
  border-color: var(--primary-container);
  box-shadow: 0 0 0 0.25rem rgba(198, 26, 9, 0.25);
}

/* Sidebar Kategori */
.category-sidebar {
  width: 100%;
  flex-shrink: 0;
}

@media (min-width: 992px) {
  .category-sidebar {
    width: 200px;
    position: sticky;
    top: 120px;
  }
}

.category-link {
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
}

.category-link.active,
.category-link:hover {
  color: var(--primary-container);
  border-color: var(--primary-container);
}

.category-section {
  scroll-margin-top: 150px;
}

#category-nav::-webkit-scrollbar {
  display: none;
}

#category-nav {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.add-btn {
  transition: all 0.2s;
}

.add-btn:hover {
  transform: scale(1.1);
  background-color: var(--primary);
  color: var(--on-primary) !important;
}

/* Sidebar Keranjang */
.cart-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  width: 320px;
  background-color: var(--bg-surface-lowest);
  border-left: 1px solid var(--border-color);
  box-shadow: -12px 0 24px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  z-index: 1045;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

.cart-sidebar.show {
  transform: translateX(0);
}

/* Opsi Pembayaran */
.payment-option {
  position: relative;
  border: 1px solid var(--border-outline-variant);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.payment-option:hover {
  background-color: var(--bg-surface);
}

.payment-option input {
  position: absolute;
  opacity: 0;
}

.payment-option input:checked+.payment-inner {
  background-color: var(--bg-surface-low);
  border: 1px solid var(--primary-container);
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--primary-container);
}

.payment-inner {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.checkout-surface-card {
  background-color: var(--bg-surface-lowest);
  border: 1px solid var(--border-color) !important;
}

.checkout-summary-card {
  top: 100px;
}

.checkout-divider {
  border-color: var(--border-outline-variant);
}

/* Gaya Section */
.section-dark {
  background-color: var(--primary) !important;
  color: var(--on-primary) !important;
}

.section-dark .mid-title,
.section-dark .small-title,
.section-dark .text-muted {
  color: var(--on-primary) !important;
}

.section-dark .menu-info p {
  color: rgba(255, 255, 255, 0.8) !important;
}

.section-dark .btn-primary {
  background-color: var(--bg-surface-lowest) !important;
  color: var(--primary) !important;
  border-color: var(--bg-surface-lowest) !important;
}

.section-dark .btn-primary:hover {
  background-color: var(--bg-surface) !important;
  color: var(--primary-container) !important;
  transform: translateY(-2px);
}

.section-dark .menu-box {
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Cart Sidebar Drawer */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  max-width: 100vw;
  height: 100vh;
  background-color: var(--bg-surface-lowest);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  z-index: 1050;
  transition: right 0.3s ease-in-out;
}

.cart-sidebar.show {
  right: 0;
}

.cart-badge {
  font-size: 10px;
  background-color: var(--primary) !important;
  color: var(--on-primary);
}

/* Tombol Kategori Menu */
.nav-pills .nav-link {
  color: var(--text-stone-dark);
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.nav-pills .nav-link:hover {
  background-color: var(--bg-surface);
  color: var(--primary);
}

.nav-pills .nav-link.active,
.nav-pills .show>.nav-link {
  background-color: var(--primary) !important;
  color: var(--on-primary) !important;
  border-color: var(--primary);
}

/* Scrollbar Kustom */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-surface-variant);
}

::-webkit-scrollbar-thumb {
  background: var(--border-outline);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ─── ANIMATIONS ─── */
.fade-in {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
}

.vibe-card {
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  gap: 16px;
  transition: transform 0.3s;
  background: var(--bg-surface);
  border: 1px solid var(--border-outline-variant);
}

.vibe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.vibe-icon {
  font-size: 40px;
}

.promo-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-outline-variant);
  border-radius: 4px;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.promo-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Ccircle cx='50' cy='50' r='35' fill='none' stroke='%23e9c46a' stroke-width='0.5' opacity='0.12'/%3E%3C/svg%3E");
  pointer-events: none;
}