/* ==========================================================
   Jumlaq — shared site styles (layout, components, pages)
   Depends on: bootstrap.rtl.min.css, tokens.css
   ========================================================== */

/* ---------- Base ---------- */
html { scroll-padding-top: 88px; }
body {
  font-family: var(--font-text);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, .display-font { font-family: var(--font-display); font-weight: 700; color: var(--ink); line-height: 1.35; }
h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.35rem; font-weight: 600; }
.text-muted, .muted { color: var(--ink-muted) !important; }
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
.num { unicode-bidi: isolate; direction: ltr; font-variant-numeric: tabular-nums; display: inline-block; }
:focus-visible { outline: var(--stroke-strong) solid var(--focus-ring) !important; outline-offset: 2px; box-shadow: none !important; }
.section { padding-block: var(--space-16); }
.section-sm { padding-block: var(--space-12); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: var(--space-4); margin-bottom: var(--space-6); flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--ink-muted); max-width: 60ch; }
.bg-hessian { background: var(--hessian) !important; }
.bg-raised { background: var(--surface-raised) !important; }
.bg-ink { background: #1c1409 !important; color: #f7f1e6; }
.bg-ink h2, .bg-ink h3 { color: #f7f1e6; }

/* the grain — the diamond dot of the ج */
.grain { display: inline-block; width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); flex: none; vertical-align: middle; }
.grain-lg { width: 12px; height: 12px; }

/* ---------- Buttons ---------- */
.btn { font-weight: 600; border-radius: var(--radius-md); padding: .55rem 1.1rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-lg { padding: .8rem 1.5rem; font-size: 1rem; }
.btn-primary, .btn-jq {
  --bs-btn-bg: var(--bulk); --bs-btn-border-color: var(--bulk); --bs-btn-color: var(--on-bulk);
  --bs-btn-hover-bg: #ffc41f; --bs-btn-hover-border-color: #ffc41f; --bs-btn-hover-color: var(--on-bulk);
  --bs-btn-active-bg: #e0a800; --bs-btn-active-border-color: #e0a800; --bs-btn-active-color: var(--on-bulk);
  --bs-btn-disabled-bg: var(--hessian); --bs-btn-disabled-border-color: var(--hessian); --bs-btn-disabled-color: var(--ink-muted);
}
.btn-outline-dark, .btn-secondary-jq {
  --bs-btn-color: var(--ink); --bs-btn-border-color: var(--border); --bs-btn-bg: var(--surface-raised);
  --bs-btn-hover-bg: var(--hessian); --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: var(--border);
  --bs-btn-active-bg: var(--hessian); --bs-btn-active-color: var(--ink); --bs-btn-active-border-color: var(--ink);
}
.btn-bid {
  --bs-btn-bg: var(--bid); --bs-btn-border-color: var(--bid); --bs-btn-color: var(--on-bid);
  --bs-btn-hover-bg: var(--bid); --bs-btn-hover-color: var(--on-bid); --bs-btn-hover-border-color: var(--bid);
  --bs-btn-active-bg: var(--bid); --bs-btn-active-color: var(--on-bid);
  --bs-btn-disabled-bg: var(--hessian); --bs-btn-disabled-border-color: var(--hessian); --bs-btn-disabled-color: var(--ink-muted);
}
.btn-bid:hover { filter: brightness(1.08); }
.btn-secure { --bs-btn-bg: var(--secure); --bs-btn-border-color: var(--secure); --bs-btn-color: var(--on-secure); --bs-btn-hover-bg: var(--secure); --bs-btn-hover-color: var(--on-secure); --bs-btn-active-bg: var(--secure); --bs-btn-active-color: var(--on-secure); }
.btn-quiet { --bs-btn-color: var(--ink); --bs-btn-hover-bg: var(--hessian); --bs-btn-hover-color: var(--ink); --bs-btn-active-bg: var(--hessian); border: 0; }
.btn-light-on-ink { --bs-btn-color: #f7f1e6; --bs-btn-border-color: #7d705c; --bs-btn-hover-bg: #2e2519; --bs-btn-hover-color: #f7f1e6; --bs-btn-hover-border-color: #f7f1e6; }

/* ---------- Tags / badges ---------- */
.tag { display: inline-flex; align-items: center; gap: .5rem; font-size: .8125rem; font-weight: 600; line-height: 1.5; padding: 2px 8px; border-radius: var(--radius-sm); background: var(--hessian); color: var(--ink); white-space: nowrap; }
.tag-bulk { background: var(--bulk-soft); color: var(--bulk-ink); }
.tag-bid { background: var(--bid-soft); color: var(--bid); }
.tag-secure { background: var(--secure-soft); color: var(--secure); }
.tag-live .grain { animation: jq-pulse 1s ease-in-out infinite; }
@keyframes jq-pulse { 50% { opacity: .25; transform: rotate(45deg) scale(.7); } }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 1030; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: var(--stroke) solid var(--line); }
.site-header .navbar { padding-block: .6rem; }
.site-header .brand img { height: 44px; width: auto; }
.site-header .brand .logo-dark { display: none; }
[data-theme="dark"] .site-header .brand .logo-light { display: none; }
[data-theme="dark"] .site-header .brand .logo-dark { display: inline; }
.site-header .btn { white-space: nowrap; }
.site-header .nav-link { white-space: nowrap; font-weight: 500; color: var(--ink); padding-inline: .8rem !important; border-radius: var(--radius-md); }
.site-header .nav-link:hover { background: var(--hessian); text-decoration: none; }
.site-header .nav-link.active { color: var(--ink); box-shadow: inset 0 -3px 0 var(--bulk); border-radius: 0; }
.header-search { position: relative; flex: 1 1 200px; min-width: 0; max-width: 300px; }
.site-header .navbar-collapse > * { flex-shrink: 0; }
.site-header .navbar-collapse > .header-search { flex-shrink: 1; }
.site-header .navbar.jq-compact .header-search { max-width: none; }
.site-header .navbar.jq-nosearch .header-search { display: none; }
.header-search .form-control { padding-inline-start: 2.3rem; background: var(--surface-raised); }
.header-search .bi { position: absolute; inset-inline-start: .8rem; top: 50%; transform: translateY(-50%); color: var(--ink-muted); }
.icon-btn { position: relative; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-md); color: var(--ink); background: transparent; border: 0; font-size: 1.2rem; }
.icon-btn:hover { background: var(--hessian); }
.icon-btn .count { position: absolute; top: 3px; inset-inline-end: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--radius-full); background: var(--bid); color: var(--on-bid); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.notif-menu { width: 340px; max-height: 420px; overflow-y: auto; }
.notif-item { display: flex; gap: .75rem; padding: .6rem 1rem; border-bottom: var(--stroke) solid var(--line); font-size: .9rem; line-height: 1.6; }
.notif-item.unread { background: var(--bulk-soft); }
.notif-item .bi { font-size: 1.1rem; margin-top: 2px; }
.dropdown-menu { --bs-dropdown-bg: var(--surface-raised); --bs-dropdown-border-color: var(--line); --bs-dropdown-link-color: var(--ink); --bs-dropdown-link-hover-bg: var(--hessian); --bs-dropdown-link-active-bg: var(--bulk); --bs-dropdown-link-active-color: var(--on-bulk); border-radius: var(--radius-lg); padding: .4rem; }
.dropdown-item { border-radius: var(--radius-md); padding: .45rem .8rem; }
.promo-strip { background: #1c1409; color: #f7f1e6; font-size: .875rem; padding: .4rem 0; text-align: center; }
.promo-strip a { color: #f5b700; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: #1c1409; color: #d8cdb9; padding-top: var(--space-12); margin-top: var(--space-16); }
.site-footer h5 { color: #f7f1e6; font-size: 1rem; margin-bottom: 1rem; }
.site-footer a { color: #d8cdb9; }
.site-footer a:hover { color: #f5b700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; font-size: .9rem; }
.site-footer .legal { border-top: 1px solid #3a3024; margin-top: var(--space-8); padding-block: var(--space-4); font-size: .85rem; }
.pay-badges span { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid #3a3024; border-radius: var(--radius-sm); padding: 2px 10px; font-size: .8rem; margin: 0 0 .4rem .4rem; color: #f7f1e6; }

/* ---------- Hero ---------- */
.hero { padding-block: var(--space-12) var(--space-16); position: relative; overflow: hidden; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); line-height: 1.25; margin-bottom: 1rem; }
.hero .lead { font-size: 1.15rem; color: var(--ink-muted); max-width: 52ch; }
.hero-art { position: relative; min-height: 420px; }
.hero-slab { position: absolute; border-radius: var(--radius-lg); }
.hero-slab.s1 { background: var(--bulk); inset-inline-start: 0; top: -40px; width: 42%; height: 330px; display: flex; overflow: hidden; }
.hero-slab.s2 { background: #1c1409; inset-inline-end: 0; top: 0; width: 52%; height: 170px; padding: var(--space-6); color: #f7f1e6; }
.hero-slab.s3 { background: var(--hessian); inset-inline-end: 0; top: 186px; width: 52%; height: 230px; display: flex; overflow: hidden; }
.hero-spot { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; color: var(--ink); text-decoration: none; }
.hero-spot:hover { color: var(--ink); text-decoration: none; }
.hero-spot:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
.hero-spot img { width: 100%; height: 46%; object-fit: cover; flex: none; display: block; }
.hero-spot-body { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; padding: 12px 14px 14px; min-height: 0; }
.hero-spot-title { font-family: var(--font-display); font-weight: 600; font-size: .95rem; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.hero-spot .price { font-size: 1.2rem; }
.hero-spot .timer { font-size: .8rem; }
.hero-slab.s1 .tag-bulk { background: var(--ink); color: #f7f1e6; }
.hero-slab.s3 .hero-spot { flex-direction: row; }
.hero-slab.s3 .hero-spot img { width: 42%; height: 100%; }
.hero-slab.s3 .hero-spot-body { flex: 1; justify-content: center; padding: 12px; }
.hero-slab.s3 .hero-spot-title { font-size: .9rem; }
.hero-spot-empty { display: flex; flex-direction: column; justify-content: center; gap: .5rem; height: 100%; padding: 16px; }
.hero-spot-empty p { margin: 0; }
.hero-live { position: absolute; inset-inline-start: 6%; bottom: 0; width: 70%; z-index: 2; }
.grain-heap { position: absolute; inset-inline-end: 8%; bottom: 26px; display: grid; justify-items: center; gap: 6px; }
.grain-heap div { display: flex; gap: 12px; }
.grain-heap i { width: 14px; height: 14px; background: var(--bulk); transform: rotate(45deg); display: block; }
.hero-stats { display: flex; gap: var(--space-8); flex-wrap: wrap; margin-top: var(--space-8); }
.hero-stats strong { font-family: var(--font-display); font-size: 1.75rem; display: block; line-height: 1.2; }
.hero-stats span { color: var(--ink-muted); font-size: .9rem; }

/* ---------- Cards ---------- */
.card-jq { background: var(--surface-raised); border: var(--stroke) solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
/* equal heights only when the card is the sole child of a grid cell */
[class*="col"] > .card-jq:only-child, [class*="col"] > .plan:only-child { height: 100%; }
@media (min-width: 992px) { .card-jq.pad-lg { padding: var(--space-6); } }
.card-title-jq { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; line-height: 1.5; margin: 0; color: var(--ink); }
.card-meta { font-size: .875rem; color: var(--ink-muted); display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; }
.price { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; line-height: 1.2; color: var(--ink); }
.price small { font-family: var(--font-text); font-size: .85rem; font-weight: 400; color: var(--ink-muted); margin-inline-start: .25rem; }
.price.bid { color: var(--bid); }
.price.deal { color: var(--bulk-ink); }
.price-was { color: var(--ink-muted); text-decoration: line-through; font-size: .9rem; margin-inline-start: .5rem; }
.timer { font-family: var(--font-display); font-weight: 500; font-size: .95rem; }
.timer.urgent { color: var(--bid); }

.product-card { position: relative; padding: 0; overflow: hidden; }
.product-card .thumb {
  aspect-ratio: 4 / 3;
  background: var(--hessian);
  overflow: hidden;
  position: relative;
  flex: none;
  width: 100%;
}
.product-card .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-card .body { padding: var(--space-4); display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.product-card .stretched-link:focus-visible { outline: none !important; }
.product-card:has(.stretched-link:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.product-card .tags { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; gap: .4rem; z-index: 2; }
.product-card .card-title-jq {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: 3em;
}
.product-card .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: .5rem; flex-wrap: nowrap; }
.product-card .moq { flex: none; text-align: end; white-space: nowrap; }
.moq { font-size: .8rem; color: var(--ink-muted); }
.rating { color: var(--bulk-ink); font-weight: 600; font-size: .875rem; }
.card-jq:hover, .product-card:hover { border-color: var(--border); }

/* category tiles */
.cat-tile { display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-raised); border: var(--stroke) solid var(--line); color: var(--ink); height: 100%; }
.cat-tile:hover { text-decoration: none; border-color: var(--ink); }
.cat-tile img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.cat-tile .body { padding: var(--space-4); display: flex; justify-content: space-between; align-items: center; }
.cat-tile h3 { margin: 0; font-size: 1.2rem; }

/* how it works */
.step { display: grid; grid-template-columns: 48px 1fr; gap: var(--space-4); align-items: start; }
.step-num { width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--bulk); color: var(--on-bulk); font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; display: grid; place-items: center; }
.step h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.step p { margin: 0; color: var(--ink-muted); }

/* feature list */
.feature { display: flex; gap: var(--space-4); }
.feature .ic { flex: none; width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--hessian); display: grid; place-items: center; font-size: 1.35rem; color: var(--ink); }
.bg-ink .feature .ic { background: #2e2519; color: #f5b700; }
.feature h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.feature p { margin: 0; color: var(--ink-muted); font-size: .95rem; }
.bg-ink .feature p, .bg-ink .muted { color: #b8ac98 !important; }

/* escrow flow */
.escrow-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); counter-reset: flow; }
.escrow-flow li { list-style: none; background: var(--surface-raised); border: var(--stroke) solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); position: relative; }
.escrow-flow li strong { display: block; font-family: var(--font-display); margin-bottom: .25rem; }
.escrow-flow li span { color: var(--ink-muted); font-size: .9rem; }
.escrow-flow li .bi { font-size: 1.5rem; color: var(--secure); display: block; margin-bottom: .5rem; }
@media (max-width: 767px) { .escrow-flow { grid-template-columns: 1fr 1fr; } }

/* ---------- Price tiers ---------- */
.tiers { width: 100%; background: var(--hessian); border-radius: var(--radius-lg); padding: var(--space-2); border-collapse: separate; border-spacing: 0; }
.tiers th { font-weight: 500; color: var(--ink-muted); font-size: .8125rem; padding: .3rem .75rem; text-align: start; }
.tiers td { padding: .5rem .75rem; border-top: 1px solid var(--line); }
.tiers td:last-child { text-align: end; font-family: var(--font-display); font-weight: 600; }
.tiers tr.active td { background: var(--bulk-soft); border-top-color: transparent; }
.tiers tr.active td:last-child { color: var(--bulk-ink); }
.tiers .save { display: block; font-family: var(--font-text); font-size: .75rem; color: var(--bulk-ink); font-weight: 500; }

/* ---------- Deal meter ---------- */
.meter { position: relative; height: 12px; border-radius: var(--radius-full); background: var(--hessian); }
.meter-fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: var(--radius-full); background: var(--bulk); transition: width .6s ease; }
.meter-fill::after { content: ""; position: absolute; inset-inline-end: -7px; top: -3px; width: 14px; height: 14px; background: var(--ink); transform: rotate(45deg); border: 2px solid var(--surface-raised); }
.meter-row { display: flex; justify-content: space-between; font-size: .875rem; }

/* ---------- Auction ---------- */
.bidbox { background: var(--hessian); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); }
.bid-history { max-height: 320px; overflow-y: auto; }
.bid-row { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.bid-row.me { font-weight: 600; }
.bid-row:first-child .amt { color: var(--bid); font-weight: 700; }
.flash { animation: flash 0.8s ease; }
@keyframes flash { 0% { background: var(--bid-soft); } 100% { background: transparent; } }
.big-timer { font-family: var(--font-display); font-size: 2.25rem; font-weight: 600; line-height: 1; letter-spacing: .02em; }
.timer-units { display: flex; gap: var(--space-3); }
.timer-units div { text-align: center; background: var(--surface-raised); border-radius: var(--radius-md); padding: .5rem .75rem; min-width: 64px; }
.timer-units span { display: block; font-size: .75rem; color: var(--ink-muted); }
.rule-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .9rem; }
.rule-list li { display: flex; gap: .6rem; align-items: baseline; }
.rule-list .grain { color: var(--bulk-ink); }

/* ---------- Filters ---------- */
.filter-panel { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); position: sticky; top: 96px; }
.filter-panel h6 { font-family: var(--font-display); font-weight: 600; margin-bottom: .6rem; font-size: .95rem; }
.filter-group + .filter-group { border-top: 1px solid var(--line); margin-top: var(--space-4); padding-top: var(--space-4); }
.chip-toggle { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--border); border-radius: var(--radius-full); padding: .25rem .8rem; font-size: .875rem; cursor: pointer; background: var(--surface-raised); margin: 0 0 .4rem .3rem; }
.btn-check:checked + .chip-toggle { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn-check:focus-visible + .chip-toggle { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.empty-state { text-align: center; padding: var(--space-12) var(--space-4); background: var(--hessian); border-radius: var(--radius-lg); }
.empty-state .bi { font-size: 2.5rem; color: var(--ink-muted); }

/* ---------- Forms ---------- */
.form-control, .form-select { background-color: var(--surface-raised); border-color: var(--border); color: var(--ink); border-radius: var(--radius-md); padding: .6rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--ink); box-shadow: none; background-color: var(--surface-raised); color: var(--ink); }
.form-control::placeholder { color: var(--ink-muted); opacity: .8; }
.form-label { font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.form-text { color: var(--ink-muted); }
.form-check-input { border-color: var(--border); background-color: var(--surface-raised); }
.form-check-input:checked { background-color: var(--ink); border-color: var(--ink); }
[data-theme="dark"] .form-check-input:checked { background-color: var(--bulk); border-color: var(--bulk); }
.form-check-input:focus { box-shadow: none; }
.input-group-text { background: var(--hessian); border-color: var(--border); color: var(--ink-muted); }
.otp-inputs { display: flex; gap: .5rem; direction: ltr; justify-content: center; }
.otp-inputs input { width: 48px; height: 56px; text-align: center; font-size: 1.4rem; font-family: var(--font-display); font-weight: 600; }
.auth-wrap { min-height: calc(100vh - 80px); display: grid; place-items: center; padding: var(--space-8) var(--space-4); }
.auth-card { width: 100%; max-width: 560px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-8); }
.role-option { display: block; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); cursor: pointer; height: 100%; }
.role-option .bi { font-size: 1.6rem; }
.btn-check:checked + .role-option { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--bulk-soft); }

/* stepper */
.stepper { display: flex; gap: var(--space-2); margin-bottom: var(--space-6); list-style: none; padding: 0; }
.stepper li { flex: 1; font-size: .8rem; color: var(--ink-muted); }
.stepper li::before { content: ""; display: block; height: 4px; border-radius: var(--radius-full); background: var(--line); margin-bottom: .4rem; }
.stepper li.done::before, .stepper li.current::before { background: var(--bulk); }
.stepper li.current { color: var(--ink); font-weight: 600; }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-border-color: var(--line); --bs-table-hover-bg: var(--hessian); --bs-table-hover-color: var(--ink); --bs-table-striped-bg: var(--hessian); margin: 0; }
.table thead th { font-size: .8125rem; font-weight: 600; color: var(--ink-muted); background: var(--hessian); border-bottom: 0; white-space: nowrap; }
.table thead th:first-child { border-start-start-radius: var(--radius-md); border-end-start-radius: var(--radius-md); }
.table thead th:last-child { border-start-end-radius: var(--radius-md); border-end-end-radius: var(--radius-md); }
.table td { vertical-align: middle; font-size: .9rem; }
.table-wrap { overflow-x: auto; }

/* ---------- Cart / checkout ---------- */
.cart-group { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.cart-group-head { background: var(--hessian); padding: .75rem var(--space-4); display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cart-line { display: grid; grid-template-columns: 72px 1fr auto; gap: var(--space-4); padding: var(--space-4); border-top: 1px solid var(--line); align-items: center; }
.cart-line img { width: 72px; height: 54px; object-fit: cover; border-radius: var(--radius-sm); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.qty button { border: 0; background: var(--surface-raised); width: 36px; height: 36px; color: var(--ink); }
.qty button:hover { background: var(--hessian); }
.qty input { width: 64px; border: 0; text-align: center; background: var(--surface-raised); color: var(--ink); font-weight: 600; height: 36px; }
.summary { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); position: sticky; top: 96px; }
.summary-row { display: flex; justify-content: space-between; padding: .35rem 0; }
.summary-total { border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .75rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.pay-option { display: flex; align-items: center; gap: .75rem; border: 1px solid var(--border); border-radius: var(--radius-md); padding: .8rem 1rem; cursor: pointer; }
.btn-check:checked + .pay-option { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--bulk-soft); }
.escrow-note { display: flex; gap: .75rem; background: var(--secure-soft); color: var(--secure); border-radius: var(--radius-md); padding: .75rem 1rem; font-size: .9rem; }
.escrow-note .bi { font-size: 1.25rem; }
.warn-note { background: var(--bid-soft); color: var(--bid); border-radius: var(--radius-md); padding: .6rem .9rem; font-size: .875rem; display: flex; gap: .5rem; }

/* ---------- Order timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; display: flex; justify-content: space-between; position: relative; }
.timeline::before { content: ""; position: absolute; top: 9px; inset-inline: 10px; height: 3px; background: var(--line); }
.timeline li { position: relative; text-align: center; flex: 1; font-size: .78rem; color: var(--ink-muted); }
.timeline li i { width: 20px; height: 20px; display: block; margin: 0 auto .35rem; background: var(--surface-raised); border: 3px solid var(--line); transform: rotate(45deg); position: relative; }
.timeline li.done i { background: var(--bulk); border-color: var(--bulk); }
.timeline li.done { color: var(--ink); }
.timeline li.current i { background: var(--ink); border-color: var(--ink); }
.timeline li.current { color: var(--ink); font-weight: 700; }
.status { font-size: .8rem; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-sm); white-space: nowrap; }
.status-new { background: var(--hessian); color: var(--ink); }
.status-confirmed, .status-processing { background: var(--bulk-soft); color: var(--bulk-ink); }
.status-shipped { background: var(--secure-soft); color: var(--secure); }
.status-delivered { background: var(--secure); color: var(--on-secure); }
.status-cancelled { background: var(--bid-soft); color: var(--bid); }

/* ---------- Plans ---------- */
.plan { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); height: 100%; display: flex; flex-direction: column; gap: var(--space-4); position: relative; }
.plan.featured { border: 2px solid var(--ink); }
.plan .ribbon { position: absolute; top: -13px; inset-inline-start: var(--space-6); }
.plan .amount { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; line-height: 1; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; font-size: .92rem; }
.plan ul li { display: flex; gap: .6rem; align-items: baseline; }
.plan ul li .grain { color: var(--bulk-ink); }
.plan ul li.off { color: var(--ink-muted); text-decoration: line-through; }
.commission { background: var(--hessian); border-radius: var(--radius-md); padding: .5rem .8rem; font-weight: 600; display: flex; justify-content: space-between; }
.billing-toggle .btn { min-width: 110px; }

/* ---------- Chat ---------- */
.chat-shell { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 220px); min-height: 520px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.chat-list { border-inline-end: 1px solid var(--line); overflow-y: auto; }
.chat-list button { display: flex; width: 100%; gap: .75rem; padding: .8rem 1rem; text-align: start; border: 0; background: transparent; border-bottom: 1px solid var(--line); color: var(--ink); }
.chat-list button.active, .chat-list button:hover { background: var(--hessian); }
.avatar { width: 42px; height: 42px; border-radius: var(--radius-full); background: var(--bulk); color: var(--on-bulk); display: grid; place-items: center; font-weight: 700; flex: none; font-family: var(--font-display); }
.chat-thread { display: flex; flex-direction: column; min-width: 0; }
.chat-head { padding: .8rem 1rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .75rem; }
.chat-body { flex: 1; overflow-y: auto; padding: var(--space-4); display: flex; flex-direction: column; gap: .6rem; background: var(--surface); }
.msg { max-width: 72%; padding: .55rem .9rem; border-radius: var(--radius-lg); font-size: .92rem; line-height: 1.7; }
.msg time { display: block; font-size: .72rem; color: var(--ink-muted); margin-top: .2rem; }
.msg.them { background: var(--surface-raised); border: 1px solid var(--line); align-self: flex-start; border-start-start-radius: var(--radius-sm); }
.msg.me { background: var(--bulk); color: var(--on-bulk); align-self: flex-end; border-start-end-radius: var(--radius-sm); }
.msg.me time { color: #5c4a18; }
.msg.offer { background: var(--secure-soft); color: var(--secure); border: 1px solid var(--secure); }
.chat-input { border-top: 1px solid var(--line); padding: .75rem; display: flex; gap: .5rem; }
@media (max-width: 767px) { .chat-shell { grid-template-columns: 1fr; height: auto; } .chat-list { max-height: 220px; } .chat-thread { height: 520px; } }

/* ---------- Page header ---------- */
.page-head { padding-block: var(--space-8) var(--space-6); border-bottom: 1px solid var(--line); margin-bottom: var(--space-8); background: var(--surface); }
.page-head h1 { font-size: clamp(1.75rem, 3vw, 2.4rem); margin-bottom: .25rem; }
.page-head p { color: var(--ink-muted); margin: 0; }
.breadcrumb { --bs-breadcrumb-divider-color: var(--ink-muted); --bs-breadcrumb-item-active-color: var(--ink-muted); font-size: .85rem; margin-bottom: .5rem; }

/* ---------- Misc ---------- */
.kpi { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); height: 100%; }
.kpi .label { color: var(--ink-muted); font-size: .85rem; }
.kpi .value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; line-height: 1.3; }
.kpi .delta { font-size: .8rem; font-weight: 600; color: var(--secure); }
.kpi .delta.down { color: var(--bid); }
.nav-pills-jq .nav-link { color: var(--ink); border-radius: var(--radius-md); font-weight: 500; }
.nav-pills-jq .nav-link.active { background: var(--ink); color: var(--surface); }
.nav-tabs { --bs-nav-tabs-border-color: var(--line); --bs-nav-tabs-link-active-bg: var(--surface-raised); --bs-nav-tabs-link-active-color: var(--ink); --bs-nav-tabs-link-active-border-color: var(--line) var(--line) var(--surface-raised); --bs-nav-link-color: var(--ink-muted); --bs-nav-link-hover-color: var(--ink); }
.modal-content { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--ink); }
.modal-header, .modal-footer { border-color: var(--line); }
[data-theme="dark"] .btn-close { filter: invert(1); }
.accordion { --bs-accordion-bg: var(--surface-raised); --bs-accordion-color: var(--ink); --bs-accordion-border-color: var(--line); --bs-accordion-btn-color: var(--ink); --bs-accordion-active-bg: var(--hessian); --bs-accordion-active-color: var(--ink); --bs-accordion-btn-focus-box-shadow: none; --bs-accordion-border-radius: var(--radius-lg); --bs-accordion-inner-border-radius: var(--radius-lg); }
.accordion-button { font-weight: 600; }
.toast-container { z-index: 2000; }
.toast { background: var(--ink); color: var(--surface); border: 0; border-radius: var(--radius-md); }
.toast .btn-close { filter: invert(1); }
[data-theme="dark"] .toast .btn-close { filter: none; }
.stars { color: var(--bulk); letter-spacing: 2px; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-input input { display: none; }
.star-input label { font-size: 1.8rem; color: var(--line); cursor: pointer; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--bulk); }
.gate { max-width: 520px; margin: var(--space-16) auto; text-align: center; }
.list-clean { list-style: none; padding: 0; margin: 0; }
.divider { height: 1px; background: var(--line); margin-block: var(--space-4); }
.invoice { font-size: .9rem; }
.invoice .qr { width: 110px; height: 110px; }
.skip-link { position: absolute; inset-inline-start: 8px; top: -80px; z-index: 3000; background: var(--bulk); color: var(--on-bulk); padding: .5rem 1rem; border-radius: var(--radius-md); }
.skip-link:focus { top: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .site-header, .site-footer, .no-print, .promo-strip { display: none !important; }
  body { background: #fff; }
}

/* number inputs inside steppers: no native spinners */
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button, .otp-inputs input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input { -moz-appearance: textfield; appearance: textfield; }
.big-timer.urgent { color: var(--bid); }
[data-theme="dark"] .hero-slab.s2 { background: #2e2519; }
[data-theme="dark"] .product-card .thumb img, [data-theme="dark"] .cat-tile img { filter: brightness(.92); }
@media (max-width: 991px) {
  .hero-art { min-height: 0; display: grid; gap: var(--space-3); }
  .grain-heap { display: none; }
  .hero-slab.s1, .hero-slab.s2, .hero-slab.s3, .hero-live { position: static; width: auto; height: auto; }
  .hero-slab.s1 { min-height: 280px; }
  .hero-slab.s3 { min-height: 180px; }
  .hero-slab.s3 .hero-spot { flex-direction: column; }
  .hero-slab.s3 .hero-spot img { width: 100%; height: 140px; }
}

/* ==========================================================
   Jumlaq brand icons — replace the matching Bootstrap Icons site-wide.
   Drawn on a 24px grid, 1.75 outline; they take the text colour (currentColor).
   ========================================================== */
.bi-hammer::before, .bi-shield-check::before, .bi-shield-lock::before, .bi-safe::before, .bi-patch-check::before, .bi-receipt::before, .bi-lightning-charge::before, .bi-box-seam::before, .bi-box::before, .bi-truck::before, .bi-tag::before, .bi-shop::before, .bi-bag::before { content: "" !important; display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; background-color: currentColor; -webkit-mask: var(--jq-icon) center / contain no-repeat; mask: var(--jq-icon) center / contain no-repeat; }
.bi-hammer { --jq-icon: url("../img/icons/gavel.svg"); }
.bi-shield-check { --jq-icon: url("../img/icons/shield.svg"); }
.bi-shield-lock { --jq-icon: url("../img/icons/shield.svg"); }
.bi-safe { --jq-icon: url("../img/icons/shield.svg"); }
.bi-patch-check { --jq-icon: url("../img/icons/badge.svg"); }
.bi-receipt { --jq-icon: url("../img/icons/invoice.svg"); }
.bi-lightning-charge { --jq-icon: url("../img/icons/flash.svg"); }
.bi-box-seam { --jq-icon: url("../img/icons/pallet.svg"); }
.bi-box { --jq-icon: url("../img/icons/pallet.svg"); }
.bi-truck { --jq-icon: url("../img/icons/truck.svg"); }
.bi-tag { --jq-icon: url("../img/icons/tag.svg"); }
.bi-shop { --jq-icon: url("../img/icons/store.svg"); }
.bi-bag { --jq-icon: url("../img/icons/sack.svg"); }
.jq-icon { width: 1em; height: 1em; vertical-align: -.125em; }

/* ==========================================================
   One-product order: photo, services, live order summary
   ========================================================== */
.product-media { border-radius: var(--radius-lg); overflow: hidden; background: var(--hessian); aspect-ratio: 4 / 3; }
.product-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card .thumb img, .cat-tile img { object-fit: cover; }
img.is-fallback { object-fit: contain !important; }
.promise-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.promise-list li { display: flex; gap: var(--space-3); align-items: flex-start; }
.promise-list .bi { color: var(--bulk-ink); font-size: 1.2rem; line-height: 1.4; }
.order-form { gap: var(--space-4); }
.svc-group { border: 0; margin: 0; padding: 0; display: grid; gap: var(--space-2); min-width: 0; }
.svc-group:empty { display: none; }
.svc-group > legend { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: var(--space-1); float: none; width: auto; padding: 0; }
.svc { border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); background: var(--surface-raised); display: grid; gap: var(--space-2); }
.svc-title { display: flex; justify-content: space-between; gap: var(--space-2); font-weight: 600; flex-wrap: wrap; }
.svc-hint { font-size: .8125rem; color: var(--ink-muted); }
.svc-opt { display: flex; align-items: center; gap: var(--space-2); padding: .35rem .25rem; border-radius: var(--radius-sm); cursor: pointer; }
.svc-opt:hover { background: var(--hessian); }
.svc-opt .form-check-input { margin: 0; flex: none; }
.svc-opt .lbl { flex: 1; min-width: 0; }
.svc-price { font-family: var(--font-display); font-weight: 600; font-size: .875rem; color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.svc-opt input:checked ~ .svc-price, .svc.on .svc-title .svc-price { color: var(--bulk-ink); }
.svc.on { border-color: var(--bulk); box-shadow: inset 0 0 0 1px var(--bulk); }
.order-sum { background: var(--hessian); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); }
.order-sum .summary-row { font-size: .9rem; gap: var(--space-3); }
.order-sum .summary-row span:first-child { min-width: 0; }
.order-sum .summary-row span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.order-sum .summary-total { font-size: 1.05rem; }
.mode-note { display: flex; gap: .75rem; align-items: flex-start; border-radius: var(--radius-md); padding: .75rem 1rem; font-size: .9rem; }
.mode-note.deal { background: var(--bulk-soft); color: var(--ink); }
.mode-note.auction { background: var(--bid-soft); color: var(--ink); }
