:root {
  --ag-gold: #b8860b;
  --ag-gold-light: #e9c46a;
  --ag-gold-soft: #fbf3e0;
  --ag-maroon: #6d1a2b;
  --ag-maroon-dark: #4a0f1c;
  --ag-ink: #2b2118;
  --ag-muted: #7a6a58;
  --bs-primary: #6d1a2b;
  --bs-primary-rgb: 109, 26, 43;
  --bs-link-color: #6d1a2b;
  --bs-link-hover-color: #4a0f1c;
}
body { font-family: "Poppins", system-ui, sans-serif; color: var(--ag-ink); background: #fffdf8; }
h1, h2, h3, .brand, .display-font { font-family: "Playfair Display", Georgia, serif; }
.btn-primary { --bs-btn-bg: var(--ag-maroon); --bs-btn-border-color: var(--ag-maroon); --bs-btn-hover-bg: var(--ag-maroon-dark); --bs-btn-hover-border-color: var(--ag-maroon-dark); --bs-btn-active-bg: var(--ag-maroon-dark); }
.btn-gold { background: linear-gradient(135deg, var(--ag-gold-light), var(--ag-gold)); color: #fff; border: 0; }
.btn-gold:hover { color: #fff; filter: brightness(.95); }
.btn-outline-primary { --bs-btn-color: var(--ag-maroon); --bs-btn-border-color: var(--ag-maroon); --bs-btn-hover-bg: var(--ag-maroon); --bs-btn-hover-border-color: var(--ag-maroon); }
.text-gold { color: var(--ag-gold) !important; }
.text-maroon { color: var(--ag-maroon) !important; }
.bg-gold-soft { background: var(--ag-gold-soft) !important; }
.page-link { color: var(--ag-maroon); }
.active > .page-link { background: var(--ag-maroon); border-color: var(--ag-maroon); }

/* ---------- Shop ---------- */
.rate-bar { background: var(--ag-maroon-dark); color: #f6e3b4; font-size: .82rem; }
.shop-nav { background: #fff; border-bottom: 1px solid #f0e4c8; }
.shop-nav .brand { color: var(--ag-maroon); font-size: 1.6rem; font-weight: 700; letter-spacing: .5px; }
.shop-nav .brand span { color: var(--ag-gold); }
.cat-menu a { color: var(--ag-ink); text-decoration: none; font-size: .9rem; padding: .55rem .9rem; display: inline-block; }
.cat-menu a:hover { color: var(--ag-gold); }
.hero { background: radial-gradient(circle at 80% 20%, #f7e3ae 0, transparent 45%), linear-gradient(135deg, var(--ag-maroon-dark), var(--ag-maroon)); color: #fff; border-radius: 1.25rem; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.cat-tile { text-align: center; text-decoration: none; color: var(--ag-ink); }
.cat-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 3px solid var(--ag-gold-soft); transition: border-color .2s; }
.cat-tile:hover img { border-color: var(--ag-gold); }
.product-card { border: 1px solid #f0e4c8; border-radius: 1rem; overflow: hidden; background: #fff; transition: box-shadow .2s, transform .2s; height: 100%; }
.product-card:hover { box-shadow: 0 10px 30px rgba(109, 26, 43, .1); transform: translateY(-2px); }
.product-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--ag-gold-soft); }
.product-card .name { font-size: .95rem; color: var(--ag-ink); text-decoration: none; }
.product-card .price { color: var(--ag-maroon); font-weight: 600; }
.badge-purity { background: var(--ag-gold-soft); color: #8a6418; font-weight: 500; }
.section-title { position: relative; display: inline-block; padding-bottom: .4rem; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 50px; height: 3px; background: var(--ag-gold); }
.breakup td { padding: .35rem .5rem; }
footer.shop-footer { background: var(--ag-maroon-dark); color: #e8d6b0; }
footer.shop-footer a { color: #f6e3b4; }

/* Tracking timeline */
.track { list-style: none; padding: 0; margin: 0; }
.track li { position: relative; padding: 0 0 1.4rem 2.2rem; }
.track li::before { content: ""; position: absolute; left: .62rem; top: 1.3rem; bottom: 0; width: 2px; background: #e5dccb; }
.track li:last-child::before { display: none; }
.track .dot { position: absolute; left: 0; top: .1rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: #e5dccb; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .7rem; }
.track li.done .dot { background: #2e7d32; }
.track li.done::before { background: #2e7d32; }
.track li.current .dot { background: var(--ag-gold); box-shadow: 0 0 0 4px rgba(184, 134, 11, .2); }
.track li.stop .dot { background: #c62828; }

/* Order chat */
.chat { max-height: 380px; overflow-y: auto; background: #faf6ee; border-radius: .75rem; padding: 1rem; }
.bubble { max-width: 80%; padding: .55rem .85rem; border-radius: 1rem; margin-bottom: .6rem; font-size: .92rem; }
.bubble small { display: block; opacity: .7; font-size: .72rem; margin-top: .2rem; }
.bubble.me { background: var(--ag-maroon); color: #fff; margin-left: auto; border-bottom-right-radius: .25rem; }
.bubble.them { background: #fff; border: 1px solid #eee2c8; border-bottom-left-radius: .25rem; }

/* ---------- Admin ---------- */
.admin-sidebar { width: 250px; min-height: 100vh; background: linear-gradient(180deg, var(--ag-maroon-dark), var(--ag-maroon)); position: fixed; top: 0; left: 0; z-index: 1030; transition: transform .25s; }
.admin-sidebar .brand { color: #f6e3b4; font-size: 1.35rem; }
.admin-sidebar .nav-link { color: #f3dfe3; border-radius: .5rem; margin: 2px 10px; padding: .6rem .9rem; font-size: .92rem; }
.admin-sidebar .nav-link i { width: 1.4rem; display: inline-block; }
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active { background: rgba(255, 255, 255, .12); color: #fff; }
.admin-main { margin-left: 250px; min-height: 100vh; background: #f8f5ef; }
.admin-topbar { background: #fff; border-bottom: 1px solid #eee4cf; }
.stat-card { border: 0; border-radius: 1rem; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .04); }
.stat-card .icon { width: 48px; height: 48px; border-radius: .8rem; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; background: var(--ag-gold-soft); color: var(--ag-gold); }
.card { border-color: #efe5d0; border-radius: .9rem; }
.card-header { background: #fff; border-bottom-color: #efe5d0; font-weight: 600; }
.table > :not(caption) > * > * { vertical-align: middle; }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: .5rem; background: var(--ag-gold-soft); }
@media (max-width: 991px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.show { transform: none; }
  .admin-main { margin-left: 0; }
}
@media print {
  .no-print { display: none !important; }
  .admin-main { margin: 0; }
}

/* ---------- Logo ---------- */
.shop-nav .brand-mark { height: 46px; width: 46px; }
.shop-nav .brand-text { font-size: 1.45rem; line-height: 1; }
@media (max-width: 575.98px) { .shop-nav .brand-mark { height: 38px; width: 38px; } .shop-nav .brand-text { font-size: 1.15rem; } }
.footer-logo { width: 170px; height: auto; }
.admin-sidebar .sidebar-logo { width: 150px; height: auto; }
.login-logo { width: 150px; height: 150px; object-fit: cover; border-radius: 16px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
