/* =========================================================
   DESIGN SYSTEM — Digital Printing Store
   Signature: halftone dot texture (offset print screening)
              + CMYK "color bar" (print calibration strip)
   Type: Space Grotesk (display) / Inter (body) / IBM Plex Mono (specs & prices)
   ========================================================= */

:root {
  --ink: #15181d;
  --ink-soft: #2b2f38;
  --paper: #f6f4ef;
  --paper-2: #edeae2;
  --paper-3: #e3ded0;
  --line: #ddd7c8;
  --text: #23241f;
  --text-muted: #6b675c;
  --cyan: #00aeef;
  --magenta: #ec008c;
  --yellow: #ffd400;
  --success: #1b7a4d;
  --danger: #c62828;

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', monospace;

  --radius: 14px;
  --radius-sm: 10px;

  /* remap Bootstrap variables to our palette */
  --bs-primary: var(--ink);
  --bs-primary-rgb: 21, 24, 29;
  --bs-body-color: var(--text);
  --bs-body-bg: var(--paper);
  --bs-border-color: var(--line);
  --bs-link-color: var(--ink);
  --bs-link-hover-color: var(--cyan);
}

body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  padding-bottom: env(safe-area-inset-bottom);
  /* footer nempel ke bawah viewport walau isi halaman pendek (mis. keranjang isi 1 produk,
     form-id-card) - main dibuat "flex:1" mengisi sisa ruang, footer otomatis terdorong ke
     bawah, bukan cuma nempel pas di bawah konten kalau kontennya sedikit. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.font-mono, .price, .money { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

a { color: var(--ink); }
a:hover { color: var(--cyan); }

/* -------------------- CMYK color bar (signature divider) -------------------- */
.cmyk-bar {
  display: flex;
  height: 4px;
  width: 100%;
}
.cmyk-bar span { flex: 1 1 0; }
.cmyk-bar .c { background: var(--cyan); }
.cmyk-bar .m { background: var(--magenta); }
.cmyk-bar .y { background: var(--yellow); }
.cmyk-bar .k { background: var(--ink); }

/* -------------------- Back to top button -------------------- */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 1030;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--ink-soft); color: #fff; }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.section-eyebrow::before {
  content: '';
  width: 18px; height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--yellow));
  border-radius: 2px;
  display: inline-block;
}

/* -------------------- Navbar -------------------- */
.navbar-print {
  background: var(--ink);
  padding: .65rem 0;
}
.navbar-print .navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  display: flex; align-items: center; gap: .5rem;
}
.navbar-print .brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: conic-gradient(var(--cyan) 0deg 90deg, var(--magenta) 90deg 180deg, var(--yellow) 180deg 270deg, #fff 270deg 360deg);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); font-size: .85rem; font-weight: 800;
}
.navbar-print .nav-link {
  color: rgba(255,255,255,.75);
  font-weight: 500;
  font-size: .92rem;
}
.navbar-print .nav-link:hover, .navbar-print .nav-link.active { color: #fff; }
.navbar-print .dropdown-menu {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
}
.cart-dropdown { width: 320px; max-width: 90vw; }
.cart-dropdown-items { max-height: 320px; overflow-y: auto; }
.cart-badge {
  position: absolute; top: -4px; right: -8px;
  background: var(--magenta); color: #fff;
  font-size: .62rem; font-family: var(--font-mono);
  min-width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* -------------------- Hero (full gambar, dgn/tanpa slider) -------------------- */
.hero-full-image {
  border-radius: 0 0 28px 28px;
  overflow: hidden;
  line-height: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.hero-full-image-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  max-height: 450px;
  object-fit: cover;
}
.hero-full-image .carousel-control-prev,
.hero-full-image .carousel-control-next { width: 8%; opacity: .8; }
.hero-full-image .carousel-indicators { margin-bottom: .75rem; }
.hero-full-image .carousel-indicators button {
  width: 8px; height: 8px; border-radius: 50%; border: none; background: #fff; opacity: .55;
}
.hero-full-image .carousel-indicators button.active { opacity: 1; }

/* -------------------- Buttons -------------------- */
.btn-ink, .btn-primary {
  background: var(--ink); border-color: var(--ink); color: #fff;
  font-weight: 600; border-radius: var(--radius-sm);
}
.btn-ink:hover, .btn-primary:hover { background: #000; border-color: #000; color: #fff; }
.btn-outline-ink { border: 1.5px solid var(--ink); color: var(--ink); border-radius: var(--radius-sm); font-weight: 600; }
.btn-outline-ink:hover { background: var(--ink); color: #fff; }
.btn { border-radius: var(--radius-sm); }

/* -------------------- Cards -------------------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }

.category-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
  padding: .75rem .4rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.category-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(21,24,29,.08); }
.category-card .cat-image-wrap {
  width: 100%; aspect-ratio: 1/1; margin: 0 auto .6rem;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--paper-2);
}
.category-card .cat-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* -------------------- Checkout: step bernomor -------------------- */
.step-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); color: #fff;
  font-size: .72rem; font-weight: 700; flex-shrink: 0;
}

.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
  height: 100%;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(21,24,29,.10); }
.product-card .thumb-wrap { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--paper-2); }
.product-card .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-card .cat-tag {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-muted);
}
.product-card .card-body { padding: .9rem 1rem 1.1rem; }
.product-card h6 { margin-bottom: 0; font-size: .95rem; }

/* -------------------- Badge & harga coret produk diskon -------------------- */
/* bentuk kupon/setengah pita - ujung lancip spt label harga/tiket, bukan pil polos */
.discount-badge {
  position: absolute; bottom: .5rem; right: .5rem; z-index: 2;
  background: var(--danger); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .01em;
  padding: .3rem .95rem .3rem .7rem;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}
/* varian khusus kartu produk: pita nongol dari sisi KIRI-BAWAH gambar, ujung lancip mengarah ke
   kanan (ke dalam foto) - bentuk sama dgn .discount-badge dasar, cuma posisinya beda, tanpa dimiringkan */
.discount-badge-card {
  bottom: .5rem; left: 0; right: auto;
  padding: .3rem .95rem .3rem .7rem;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}
/* varian khusus halaman detail produk (di samping nama): arah ujung KEBALIKAN dari kartu produk
   (lancip ke KIRI, bukan ke kanan) */
.discount-badge-detail {
  padding: .3rem .7rem .3rem .95rem;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
}
.price-before-discount { text-decoration: line-through; color: var(--text-muted); font-size: .78rem; }
.price-after-discount { color: var(--danger); }

/* -------------------- Variant chips (mobile-first attribute selector) -------------------- */
.attr-group { margin-bottom: 1.35rem; }
.attr-group-label {
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  display: flex; align-items: center; gap: .4rem; margin-bottom: .55rem;
}
.attr-scroll {
  display: flex; gap: .55rem; overflow-x: auto; overflow-y: visible; padding-bottom: .35rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.attr-scroll::-webkit-scrollbar { height: 5px; }
.attr-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }

.chip-option {
  flex: 0 0 auto;
  min-width: 132px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: .6rem .8rem;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
  user-select: none;
  text-decoration: none;
  color: inherit;
}
.chip-option .chip-name { font-weight: 600; font-size: .85rem; line-height: 1.25; color: var(--text); }
.chip-option .chip-price { font-family: var(--font-mono); font-size: .74rem; color: var(--text-muted); margin-top: .15rem; }
.chip-option:hover { text-decoration: none; }
.chip-option:hover .chip-name { color: var(--text); }
.chip-option.selected {
  border-color: var(--ink);
  background: var(--ink);
}
.chip-option.selected .chip-name, .chip-option.selected .chip-price { color: #fff; }
.chip-option.selected .chip-price { color: rgba(255,255,255,.7); }

/* -------------------- Qty stepper -------------------- */
.qty-stepper { display: inline-flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.qty-stepper button {
  border: none; background: var(--paper-2); width: 42px; font-size: 1.1rem; font-weight: 600; color: var(--ink);
}
.qty-stepper input {
  border: none; width: 60px; text-align: center; font-family: var(--font-mono); font-weight: 600;
}
.qty-stepper input:focus { outline: none; box-shadow: none; }

/* -------------------- Sticky mobile-first price/CTA bar -------------------- */
.sticky-cta-bar {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  margin-top: .5rem;
}
.sticky-cta-bar .total-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.sticky-cta-bar .total-value { font-family: var(--font-mono); font-weight: 700; font-size: 1.15rem; color: var(--ink); }

/* -------------------- Status badges -------------------- */
.status-pill {
  display: inline-block;
  text-align: center;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .03em;
  padding: .3rem .65rem; border-radius: 999px; font-weight: 600;
}
.status-pill.st-wait   { background: #f1ede2; color: #7a7361; }
.status-pill.st-queue  { background: #e4f1fb; color: #0e6ba8; }
.status-pill.st-confirm{ background: #fdf1da; color: #92620d; }
.status-pill.st-confirm-active{ background: #fce3c3; color: #a3450a; }
.status-pill.st-process{ background: #eae7fb; color: #4933c4; }
.status-pill.st-ready  { background: #dcf5f2; color: #0f766e; }
.status-pill.st-prod   { background: #eae7fb; color: #4933c4; }
.status-pill.st-done   { background: #e2f5ea; color: #1b7a4d; }
.status-pill.st-ship   { background: #e4f1fb; color: #0e6ba8; }
.status-pill.st-delivered { background: #e2f5ea; color: #1b7a4d; }
.status-pill.st-cancel { background: #fbe7e7; color: #b3261e; }

/* -------------------- Footer -------------------- */
.footer-print { background: var(--ink); color: rgba(255,255,255,.65); }
.footer-print a { color: rgba(255,255,255,.85); text-decoration: none; }
.footer-print a:hover { color: var(--cyan); }
.footer-print .brand-mark { width: 26px; height: 26px; border-radius: 7px; background: conic-gradient(var(--cyan) 0deg 90deg, var(--magenta) 90deg 180deg, var(--yellow) 180deg 270deg, #fff 270deg 360deg); }
.footer-logo {
  height: 28px;
  max-width: 64px;
  object-fit: contain;
  background: #fff;
  border-radius: 5px;
  padding: .2rem .35rem;
}

/* -------------------- Forms -------------------- */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border-color: var(--line);
  padding: .55rem .8rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(21,24,29,.08);
}

/* -------------------- Misc -------------------- */
.text-muted-2 { color: var(--text-muted); }
.badge-soft { background: var(--paper-2); color: var(--text); font-weight: 500; }

/* mobile-first base spacing */
main { flex: 1 0 auto; }
.container { max-width: 1180px; }

/* -------------------- Lacak Pesanan: stepper horizontal dgn ikon -------------------- */
.h-stepper { display: flex; align-items: flex-start; overflow-x: auto; padding-bottom: .25rem; }
.h-stepper .h-step { flex: 1 1 0; min-width: 84px; text-align: center; position: relative; }
.h-stepper .h-step::before {
  content: ''; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px;
  background: var(--line); z-index: 0;
}
.h-stepper .h-step:first-child::before { content: none; }
.h-stepper .h-step.done::before { background: var(--cyan); }
.h-stepper .h-step-icon {
  width: 32px; height: 32px; border-radius: 50%; margin: 0 auto .4rem;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid var(--line); color: var(--text-muted);
  position: relative; z-index: 1; font-size: .85rem;
}
.h-stepper .h-step.done .h-step-icon { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.h-stepper .h-step-label { font-size: .68rem; line-height: 1.2; color: var(--text-muted); }
.h-stepper .h-step.done .h-step-label { color: var(--ink); font-weight: 600; }

/* -------------------- Widget bintang ulasan interaktif -------------------- */
.star-rating { font-size: 1.4rem; }
.star-rating .star-rating-icon { color: var(--text-muted); cursor: pointer; margin-right: .15rem; transition: color .1s ease; }
.star-rating .star-rating-icon.bi-star-fill { color: #f5b301; }

/* -------------------- Riwayat Status: timeline vertikal -------------------- */
.v-timeline { position: relative; }
.v-timeline-item { display: flex; gap: .75rem; position: relative; padding-bottom: 1.1rem; }
.v-timeline-item:last-child { padding-bottom: 0; }
.v-timeline-item::before {
  content: ''; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--cyan);
}
.v-timeline-item:last-child::before { content: none; }
.v-timeline-dot {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: var(--cyan); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: .75rem; position: relative; z-index: 1;
}
.v-timeline-content { padding-top: 1px; }

/* -------------------- Card collapse warning (Ubah Status/Metode) - hindari garis dobel -------------------- */
/* Bootstrap .card-header punya border-bottom bawaan yg menempel dgn border card saat body
   collapse/tersembunyi, bikin terlihat dobel. Dihapus krn warna header (bg-warning) sudah cukup
   membedakan tanpa perlu garis tambahan. */
.card.border-warning > .card-header { border-bottom: none; }
