/* ===== BODY / GLOBAL ===== */
body {
  font-family: Inter, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
}

@media (max-width: 767.98px) {
  body { padding-bottom: 70px !important; }
}

/* ===== HERO SECTION ===== */
.hero-section {
  background:
    radial-gradient(ellipse at 10% 20%, rgba(255,255,255,.12) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 70%, rgba(99,179,237,.20) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 110%, rgba(29,78,216,.35) 0%, transparent 55%),
    linear-gradient(135deg, #1D4ED8 0%, #2563EB 45%, #3B82F6 100%);
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-section::before,
.hero-section::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* Decorative circles dalam batas hero (top >= 0) */
.hero-section::before {
  width: 360px; height: 360px;
  background: rgba(255,255,255,.06);
  top: 0; right: -100px;
}

.hero-section::after {
  width: 240px; height: 240px;
  background: rgba(99,179,237,.12);
  bottom: -60px; left: -60px;
}

/* Konten hero di atas pseudo-elements via container */
.hero-section .container {
  position: relative;
  z-index: 1;
}

@media (max-width: 767.98px) {
  .hero-section {
    min-height: unset;
    padding: 28px 0 calc(var(--bottom-nav-height, 64px) + 12px);
    align-items: flex-start;
  }
  .hero-banner-mobile {
    text-align: center;
    padding: 0 20px 28px;
    color: #fff;
  }
  .hero-banner-mobile h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 6px;
  }
  .hero-banner-mobile p {
    font-size: 0.85rem;
    opacity: 0.88;
    margin: 0;
    line-height: 1.5;
  }
}

/* ===== ORDER CARD ===== */
#order-card {
  min-height: 320px;
  border-radius: 20px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.15) !important;
}

@media (max-width: 767.98px) {
  #order-card {
    border-radius: 20px !important;
    box-shadow: 0 4px 24px rgba(0,0,0,.12) !important;
    margin-bottom: 0 !important;
  }
  .hero-card-wrapper {
    padding-left: 0;
    padding-right: 0;
    margin-top: 8px;
  }
}

/* ===== ACCORDION ===== */
.acc-section {
  border-bottom: 1px solid var(--color-border);
}
.acc-section:last-child {
  border-bottom: none;
}

.acc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: default;
  transition: background .15s;
  user-select: none;
}

.acc-header:not(.locked) {
  cursor: pointer;
}

.acc-header:not(.locked):hover {
  background: var(--color-primary-light);
}

.acc-header.active {
  background: var(--color-primary-light);
}

.acc-header.locked {
  opacity: .55;
  cursor: default !important;
}

.acc-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-border);
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all .2s;
}

.acc-header.active .acc-step-num {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,.4);
}

.acc-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
  flex-grow: 1;
}

.acc-summary {
  font-size: 12px;
  color: var(--color-primary);
  font-weight: 500;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acc-chevron {
  font-size: 12px;
  color: var(--color-muted);
  transition: transform .25s;
  flex-shrink: 0;
}

.acc-header.open .acc-chevron {
  transform: rotate(180deg);
}

/* Accordion body animation via max-height */
.acc-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .32s cubic-bezier(0.4,0,0.2,1), opacity .25s ease;
  padding: 0 16px;
}

.acc-body.open {
  max-height: 700px;
  opacity: 1;
  padding: 16px;
}

/* ===== PRODUCT CHIPS ===== */
.product-chips-container {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 4px 2px 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.product-chips-container::-webkit-scrollbar { display: none; }

.product-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 76px;
  padding: 10px 6px;
  border: 2px solid var(--color-border);
  border-radius: 14px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: all .18s;
  outline: none;
}

.product-chip:hover:not(:disabled) {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37,99,235,.15);
}

.product-chip.selected {
  border-color: var(--color-primary) !important;
  background: var(--color-primary-light) !important;
}

.product-chip img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.product-chip span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  margin-top: 5px;
  color: var(--color-text);
}

.product-chip:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.product-chip-reason {
  font-size: 9px;
  color: var(--color-danger);
  display: block;
  margin-top: 2px;
}

/* ── Chip "Lainnya" ── */
.product-chip-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-style: dashed;
}
.product-chip-more-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: var(--color-primary);
  font-size: 20px;
}

/* ── Modal Pilih Produk ── */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: none;
}
.product-modal.open { display: block; }
body.modal-open-lock { overflow: hidden; }

.product-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .5);
  backdrop-filter: blur(2px);
  animation: pm-fade .18s ease;
}
.product-modal-dialog {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .2);
  animation: pm-slide .22s ease;
}
@media (min-width: 768px) {
  .product-modal-dialog {
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    border-radius: 18px;
    animation: pm-fade .18s ease;
  }
}
.product-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
}
.product-modal-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text);
}
.product-modal-close {
  border: none;
  background: #f1f5f9;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--color-text);
  cursor: pointer;
}
.product-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 18px;
  overflow-y: auto;
}
@media (min-width: 768px) {
  .product-modal-grid { grid-template-columns: repeat(4, 1fr); }
}
.product-modal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  border: 2px solid var(--color-border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: all .15s;
}
.product-modal-item:hover:not(:disabled) {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.product-modal-item.selected {
  border-color: var(--color-primary) !important;
  background: var(--color-primary-light) !important;
}
.product-modal-item img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}
.product-modal-item span {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  color: var(--color-text);
  line-height: 1.2;
}
.product-modal-item:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.product-modal-reason {
  font-size: 9px;
  color: var(--color-danger);
  text-align: center;
}
@keyframes pm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pm-slide { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }

/* ===== OPERATOR BADGE ===== */
.operator-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
}

/* ===== NOMINAL CARDS ===== */
.nominal-card {
  cursor: pointer;
  transition: all .15s;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  background: #fff;
}

.nominal-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(37,99,235,.12);
}

.nominal-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.nominal-card.disabled-card {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

.nominal-price {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-primary);
}

.nominal-name {
  font-size: 11px;
  color: var(--color-muted);
  margin-bottom: 4px;
}

/* ===== SUMMARY BOX ===== */
#summary-box {
  background: #f8faff !important;
  border: 1px solid var(--color-primary-light);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

/* ===== ORDER BUTTON ===== */
#btn-order {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  border: none;
  border-radius: 12px !important;
  font-size: 15px;
  letter-spacing: .5px;
  box-shadow: 0 4px 16px rgba(37,99,235,.35);
  transition: all .2s;
}

#btn-order:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,.45);
}

/* ===== STATS ===== */
.stats-section .fw-bold {
  font-size: 1.5rem !important;
  color: var(--color-primary);
}

/* ===== FITUR CARDS ===== */
.fitur-card {
  border-radius: 16px;
  border: none;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  padding: 20px 12px;
  text-align: center;
  background: #fff;
  height: 100%;
}

.fitur-card i {
  font-size: 1.75rem;
  color: var(--color-primary);
  margin-bottom: 10px;
  display: block;
}

.fitur-card h6 {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.fitur-card p {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin: 0;
}

/* ===== SECTION TITLE ===== */
.section-title {
  position: relative;
  padding-left: 14px;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(180deg, #2563EB, #3B82F6);
}

/* ===== CATALOG PRODUK ===== */
.catalog-card { transition: transform .18s, box-shadow .18s; overflow: hidden; }
.catalog-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,.12) !important; }
.catalog-img-wrap {
  background: linear-gradient(135deg, #f8faff, #eef2ff);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.catalog-card .card-img-top {
  height: 90px;
  object-fit: contain;
  width: auto;
  max-width: 100%;
}
.catalog-card .btn-produk-catalog { border-radius: 8px; }

/* ===== BOTTOM NAV (mobile only) ===== */
.bottom-nav {
  display: none;
}

@media (max-width: 767.98px) {
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: #fff;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -2px 12px rgba(0,0,0,.08);
    display: flex;
    height: 64px;
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 500;
    gap: 3px;
    padding: 6px 4px;
    transition: color .15s;
  }

  .bottom-nav-item i {
    font-size: 18px;
  }

  .bottom-nav-item.active,
  .bottom-nav-item:hover {
    color: var(--color-primary);
    text-decoration: none;
  }
}
