/* ==========================================================================
   Printing UI Template — design tokens & component styles
   Works alongside Tailwind (utility layout) + Bootstrap (carousel/offcanvas/modal JS)
   ========================================================================== */

:root {
  --brand: #061952;
  --brand-dark: #040f36;
  --brand-orange: #F2B807;
  --brand-orange-dark: #cf9c04;
  --brand-soft: #e7eaf3;
  --grad-start: #061952;
  --grad-end: #1a3a8f;
  --ink: #1f2333;
  --muted: #7c8493;
  --bg: #f5f6fb;
  --surface: #ffffff;
  --line: #ececf3;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 10px 30px -12px rgba(31, 35, 51, 0.12);
  --shadow-pop: 0 16px 40px -14px rgba(31, 35, 51, 0.22);
}

* { -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Outfit', DM Sans, sans-serif !important;
  scroll-behavior: smooth;
}

/* Hide scrollbars for horizontal chip/category rails */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ---- Shell ------------------------------------------------------------- */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  box-shadow: var(--shadow-pop);
  display: flex;
  flex-direction: column;
}
/* Push the bottom-nav to the bottom of the viewport on short pages (mobile only —
   on desktop the footer should flow naturally after content, not get stretched down). */
.app-shell > .app-shell-main { flex: 1 0 auto; }
@media (min-width: 1024px) {
  .app-shell { max-width: 100%; box-shadow: none; }
  .app-shell > .app-shell-main { flex: 0 1 auto; }
}

/* ---- Buttons ------------------------------------------------------------ */
.btn-brand {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  box-shadow: 0 10px 20px -8px rgba(6, 25, 82, .45);
}
.btn-brand:hover { background: var(--brand-dark); color: #fff; }
.btn-brand:active { transform: scale(.97); }

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-card);
  border: none;
  flex-shrink: 0;
}
.btn-icon.solid { background: var(--brand); color: #fff; box-shadow: 0 10px 20px -8px rgba(6, 25, 82, .45); }
.btn-icon.active { background: var(--brand); color: #fff; }

/* ---- Cards --------------------------------------------------------------*/
.card-surface {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.hero-banner {
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  color: #fff;
}
.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 120px at 85% 20%, rgba(255,255,255,.25), transparent 70%);
}

/* ---- Hero carousel: Tokopedia-style hover arrows + bottom-left dots ----- */
#heroCarousel { position: relative; }
#heroCarousel .hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}
#heroCarousel .hero-nav-prev { left: 12px; }
#heroCarousel .hero-nav-next { right: 12px; }
#heroCarousel:hover .hero-nav { opacity: 1; visibility: visible; }
#heroCarousel .hero-nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .95);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
  transition: transform .15s ease;
}
#heroCarousel .hero-nav:hover .hero-nav-icon { transform: scale(1.08); }
#heroCarousel .hero-nav:active .hero-nav-icon { transform: scale(.95); }
#heroCarousel .hero-indicators {
  position: absolute;
  justify-content: flex-start;
  margin: 0 0 10px 16px;
  gap: 4px;
}
@media (max-width: 1023px) {
  #heroCarousel .hero-indicators { bottom: -18px; margin-left: 4px; }
  #heroCarousel .hero-nav { display: none; }
}

.category-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.category-pill .icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 22px;
  transition: transform .15s ease;
}
.category-pill.active .icon-wrap,
.category-pill:hover .icon-wrap { background: var(--brand); color: #fff; transform: translateY(-2px); }
.category-pill.active { color: var(--ink); }

/* "Lainnya" tile: same shape/shadow as the rest, just a soft brand tint so it reads as one extra option, not a different design */
.icon-wrap.cat-accent-lainnya { background: var(--brand-soft); color: var(--brand-dark); }
.category-pill:hover .icon-wrap.cat-accent-lainnya { background: var(--brand); color: #fff; }
.category-pill:hover .icon-wrap.cat-accent-lainnya { background: var(--brand); }

.product-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); }
.product-card.featured-card { box-shadow: var(--shadow-pop); }

.badge-discount {
  background: #ffe9c7;
  color: #b8600a;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
}

.wishlist-btn {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center;
  color: #c7cbd6;
  border: none;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
}
.wishlist-btn.active, .wishlist-btn:active { color: var(--brand); }

.rating-stars { color: #ffb020; font-size: 12px; }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-stepper button {
  width: 34px; height: 34px;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--ink);
  font-weight: 700;
}
.qty-stepper button:active { background: var(--brand-soft); }
.qty-stepper input {
  width: 36px;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 14px;
}
.qty-stepper input:focus { outline: none; }

/* ---- Bottom mobile nav --------------------------------------------------*/
.bottom-nav {
  position: sticky;
  bottom: 0;
  left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
  padding: 10px 6px calc(10px + env(safe-area-inset-bottom));
  z-index: 40;
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  width: 56px;
}
.bottom-nav a i { font-size: 19px; }
.bottom-nav a .nav-icon-wrap {
  width: 34px; height: 34px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s ease;
}
.bottom-nav a.active {
  color: var(--ink);
  margin-top: -22px;
}
.bottom-nav a.active .nav-icon-wrap {
  width: 46px; height: 46px;
  border-radius: 16px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 20px -6px rgba(6,25,82,.5);
}
.bottom-nav a.active span { margin-top: 2px; }

/* ---- Tabs (product detail) ---------------------------------------------*/
.tab-btn {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 4px;
  border-bottom: 2px solid transparent;
}
.tab-btn.active { color: var(--brand); border-color: var(--brand); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- Accordion (product detail info) ------------------------------------*/
.accordion-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.accordion-item + .accordion-item { margin-top: 10px; }
.accordion-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.accordion-item > summary::-webkit-details-marker { display: none; }
.accordion-item > summary .accordion-chevron { transition: transform .18s ease; color: var(--muted); flex-shrink: 0; }
.accordion-item[open] > summary .accordion-chevron { transform: rotate(180deg); }
.accordion-item[open] > summary { border-bottom: 1px solid var(--line); }
.accordion-item .accordion-body {
  padding: 4px 16px 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---- Form fields (product detail) ----------------------------------------*/
#productForm input[type="text"],
#productForm input[type="number"],
#productForm select,
#productForm textarea {
  transition: border-color .15s ease, box-shadow .15s ease;
}
#productForm input[type="text"]:focus,
#productForm input[type="number"]:focus,
#productForm select:focus,
#productForm textarea:focus {
  box-shadow: 0 0 0 3px var(--brand-soft);
}
#productForm select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237c8493' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
.dropzone {
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.dropzone i { color: var(--brand); }

.btn-cart {
  transition: background .15s ease, transform .15s ease;
}
.btn-cart:hover { background: var(--brand-soft); }
.btn-cart:active { transform: scale(.97); }

/* ---- Option chips (ukuran/bahan) ----------------------------------------*/
.option-chip {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
}
.option-chip.active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* ---- Upload dropzone -----------------------------------------------------*/
.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius-md);
  background: #fbfbfe;
  color: var(--muted);
}

/* ---- Sticky bottom bars --------------------------------------------------*/
.sticky-actionbar {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  z-index: 40;
}

/* ---- Checkout step indicator ---------------------------------------------*/
.step-dot {
  width: 26px; height: 26px;
  border-radius: 999px;
  background: var(--line);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.step-dot.active { background: var(--brand); color: #fff; }
.step-dot.done { background: #22c55e; color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--line); }

/* ---- Misc ---------------------------------------------------------------*/
.divider-dashed { border-top: 1.5px dashed var(--line); }
.text-muted-soft { color: var(--muted); }

/* ---- Pagination -----------------------------------------------------------*/
.pagi-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.pagi-btn:hover { background: var(--brand-soft); color: var(--brand-dark); }
.pagi-btn:active { transform: scale(.94); }
.pagi-btn.active { background: var(--brand); color: #fff; box-shadow: 0 10px 20px -8px rgba(6, 25, 82, .45); }
.pagi-btn.pagi-dots { background: transparent; box-shadow: none; color: var(--muted); pointer-events: none; }

/* ---- Mega menu (desktop "Kategori Cetak") -------------------------------*/
.mega-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  z-index: 40;
}
.mega-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mega-menu-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  margin-bottom: 4px;
}
.mega-menu-cat i:first-child { color: var(--brand); font-size: 15px; }
.mega-menu-cat i:last-child { margin-left: auto; font-size: 10px; opacity: .5; }
.mega-menu-cat:hover, .mega-menu-cat.active { background: var(--brand-soft); color: var(--brand-dark); }
.mega-menu-cat.active i:first-child { color: var(--brand-dark); }

/* ---- Client logo tiles ----------------------------------------------------*/
.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 84px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .02em;
  filter: grayscale(1);
  opacity: .7;
  transition: all .18s ease;
}
.client-logo:hover { filter: grayscale(0); opacity: 1; color: var(--brand); transform: translateY(-2px); }

/* ---- Client logo marquee --------------------------------------------------*/
.client-marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: client-marquee 28s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}
@keyframes client-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.client-marquee-viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.client-card {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  width: 220px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  filter: grayscale(1);
  opacity: .75;
  transition: all .2s ease;
}
.client-card:hover { filter: grayscale(0); opacity: 1; transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.client-card .logo-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}
.client-card .logo-name { font-weight: 700; font-size: 13px; color: var(--ink); line-height: 1.2; }
.client-card .logo-tag { font-size: 10px; color: var(--muted); }

/* ---- Header divider (soft fade instead of hard line) ----------------------*/
.header-accent-bar { height: 3px; background: linear-gradient(90deg, var(--brand), var(--grad-start), var(--grad-end)); }
.header-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line) 15%, var(--line) 85%, transparent); border: none; }

.nav-link-underline {
  position: relative;
  padding-bottom: 4px;
}
.nav-link-underline::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: width .18s ease;
}
.nav-link-underline:hover::after { width: 100%; }
.nav-link-underline.active { color: var(--brand); }
.nav-link-underline.active::after { width: 100%; }

/* ---- Product gallery thumbnails -------------------------------------------*/
.thumb-btn {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  flex-shrink: 0;
  opacity: .55;
  transition: all .15s ease;
}
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-btn:hover { opacity: .85; }
.thumb-btn.active { border-color: var(--brand); opacity: 1; }

/* ---- Account dropdown (click-toggle, header avatar) -----------------------*/
.account-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  width: 192px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  z-index: 50;
}
.account-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---- Custom checkbox ------------------------------------------------------*/
.check-brand {
  width: 20px; height: 20px;
  border-radius: 7px;
  accent-color: var(--brand);
  cursor: pointer;
}
