:root {
  --brand: #8B1E1E;
  --brand-dark: #6E1515;
  --brand-soft: #FBEDEA;
  --cream: #FFF9F4;
  --bs-body-font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --bs-body-bg: var(--cream);
  --bs-border-radius: .75rem;
}
body { font-family: var(--bs-body-font-family); color: #2b2220; }
.brand { font-weight: 800; color: var(--brand) !important; letter-spacing: -.02em; }
.text-brand { color: var(--brand) !important; }
.bg-brand { background: var(--brand) !important; }
.bg-brand-subtle { background: var(--brand-soft) !important; }
.btn-brand { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark); }
.navbar .nav-link.active { color: var(--brand); font-weight: 600; }
.form-control:focus, .form-select:focus { border-color: #d9a59d; box-shadow: 0 0 0 .2rem rgba(139,30,30,.12); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.container.narrow { max-width: 720px; }
.auth-wrap { max-width: 480px; margin-top: 2rem; }

/* Cards */
.card-soft, .product-card, .stat-card { --bs-card-bg: #fff; --bs-card-cap-bg: #fff; }
.card-soft { border: 0; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(60,20,10,.05); }
.product-card { border: 0; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(60,20,10,.06); transition: transform .15s; }
.product-card:hover { transform: translateY(-2px); }
.product-card .card-img-top { aspect-ratio: 4/3; object-fit: cover; background: #f3e9e3; }
.line-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thumb { width: 72px; height: 72px; object-fit: cover; border-radius: .75rem; background: #f3e9e3; }
.thumb-sm { width: 44px; height: 44px; object-fit: cover; border-radius: .5rem; background: #f3e9e3; }
.btn-add { width: 34px; height: 34px; padding: 0; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--brand) 0%, #B8452C 100%); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.08); }
.search-box { position: relative; max-width: 460px; }
.search-box .bi { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); color: #888; z-index: 2; }
.search-box input { padding-left: 2.8rem; border: 0; }

/* Chips */
.chips { scrollbar-width: none; }
.chip { white-space: nowrap; padding: .45rem 1rem; border-radius: 999px; background: #fff; color: #5a4a46; text-decoration: none;
  font-weight: 600; font-size: .9rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.chip.active { background: var(--brand); color: #fff; }

/* Floating cart */
.cart-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 1rem; z-index: 1030; width: min(560px, calc(100% - 2rem));
  display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.25rem; border-radius: 999px;
  background: #198754; color: #fff; text-decoration: none; box-shadow: 0 8px 24px rgba(25,135,84,.35); }
.cart-bar:hover { color: #fff; background: #157347; }

/* Modal bottom sheet on mobile */
.modal-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--bs-modal-border-radius) var(--bs-modal-border-radius) 0 0; background: #f3e9e3; }
.qty { width: 130px; flex-shrink: 0; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-sm { width: auto; }
@media (max-width: 575.98px) {
  .modal-bottom { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; max-width: none; }
  .modal-bottom.modal-dialog-centered { min-height: auto; }
  .modal-bottom .modal-content { border-radius: 1.25rem 1.25rem 0 0; }
  .modal-bottom .modal-img { border-radius: 1.25rem 1.25rem 0 0; }
  .modal.fade .modal-bottom { transform: translateY(100%); }
  .modal.show .modal-bottom { transform: none; }
}

/* Payment option */
.pay-option { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border: 1px solid #eadcd6; border-radius: .75rem; margin-bottom: .5rem; cursor: pointer; }
.pay-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.pay-option input { margin: 0; }

/* Timeline */
.timeline { list-style: none; display: flex; padding: 0; margin: 0; counter-reset: s; }
.timeline li { flex: 1; text-align: center; font-size: .78rem; color: #999; position: relative; padding-top: 2rem; }
.timeline li::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 1.6rem; height: 1.6rem; line-height: 1.6rem; border-radius: 50%; background: #e9e1dd; color: #fff; font-weight: 700; z-index: 1; }
.timeline li::after { content: ''; position: absolute; top: .8rem; left: -50%; width: 100%; height: 3px; background: #e9e1dd; }
.timeline li:first-child::after { display: none; }
.timeline li.done { color: #2b2220; font-weight: 600; }
.timeline li.done::before, .timeline li.done::after { background: var(--brand); }
.timeline li.current::before { box-shadow: 0 0 0 4px rgba(139,30,30,.2); }

.order-row:hover { box-shadow: 0 6px 20px rgba(60,20,10,.1); }
.footer { background: #fff; border-top: 1px solid #f0e4de; }

/* ===== Admin ===== */
body.admin { background: #F6F3F1; }
.sidebar { width: 240px; background: #fff; border-right: 1px solid #eee5e1; min-height: 100vh; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 0; height: 100vh; } }
.sidebar .nav-link { display: flex; align-items: center; gap: .65rem; color: #5a4a46; border-radius: .6rem; padding: .6rem .8rem; font-weight: 500; }
.sidebar .nav-link:hover { background: #f7f0ed; }
.sidebar .nav-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.topbar { background: #fff; border-bottom: 1px solid #eee5e1; }
.min-vw-0 { min-width: 0; }
.stat-card { border: 0; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(60,20,10,.05); }
.stat-icon { width: 42px; height: 42px; border-radius: .75rem; display: grid; place-items: center; font-size: 1.25rem; }
.table > :not(caption) > * > * { padding: .75rem 1rem; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #8a7a76; font-weight: 600; background: #fcfaf9; }
tr.clickable { cursor: pointer; }
.status-tabs .nav-link { color: #5a4a46; }
.status-tabs .nav-link.active { background: var(--brand); }
.pagination .page-item.active .page-link { background: var(--brand); border-color: var(--brand); }
.pagination .page-link { color: var(--brand); }
.img-preview { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: .75rem; background: #f3e9e3; }
.form-narrow { max-width: 900px; }
