/* ============================================================
   SokoSafi — dark glassmorphism theme
   Solid surfaces, translucent glass panels, no gradients,
   no glows, no coloured shadows.
   ============================================================ */

:root {
  --bg:            #0B1020;
  --surface:       #111827;
  --surface-2:     #172033;
  --glass:         rgba(255, 255, 255, 0.045);
  --glass-strong:  rgba(255, 255, 255, 0.07);
  --border:        rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text:          #F1F5F9;
  --text-dim:      #94A3B8;
  --text-faint:    #64748B;
  --accent:        #818CF8;
  --accent-hover:  #939AF9;
  --accent-down:   #767EF2;
  --accent-2:      #7DD3FC;
  --ok:            #4CC38A;
  --warn:          #E3B341;
  --err:           #E5655E;
  --radius:        14px;
  --radius-sm:     10px;
  --shadow:        0 14px 40px rgba(2, 6, 18, 0.4);
  --shadow-soft:   0 8px 24px rgba(2, 6, 18, 0.3);
  --font:          'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------------- base ---------------- */

* { scrollbar-width: thin; scrollbar-color: #26314A transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #26314A; border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

::selection { background: rgba(129, 140, 248, 0.35); color: var(--text); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main.page { flex: 1 0 auto; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--text); }

h1, h2, h3, h4, h5, h6 { letter-spacing: -0.01em; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.text-secondary { color: var(--text-dim) !important; }
.text-dim { color: var(--text-dim); }

.app-container { max-width: 1160px; }
.page { padding: 2.5rem 0 4rem; }
.section { padding: 2.75rem 0; }
.section-head { margin-bottom: 1.75rem; }
.section-title { font-size: 1.55rem; font-weight: 700; margin: 0; }
.section-sub { color: var(--text-dim); margin: 0.35rem 0 0; max-width: 42rem; }
.page-title { font-size: 1.9rem; font-weight: 700; margin: 0; }

.icon-accent { color: var(--accent); }
.app-hr { border: 0; border-top: 1px solid var(--border); opacity: 1; margin: 1.5rem 0; }

/* ---------------- glass panels ---------------- */

.glass-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.card-heading { font-size: 1.05rem; font-weight: 600; margin: 0; }

/* ---------------- navbar ---------------- */

.glass-nav {
  background: rgba(11, 16, 32, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding-block: 0.65rem;
}

.brand-mark {
  width: 30px; height: 30px;
  display: inline-grid; place-items: center;
  background: var(--accent);
  color: #0B1020;
  border-radius: 8px;
  font-size: 0.95rem;
  flex: none;
}
.brand-mark-lg { width: 44px; height: 44px; font-size: 1.3rem; border-radius: 12px; }
.brand-text { font-weight: 700; font-size: 1.1rem; color: var(--text); letter-spacing: -0.01em; }
.brand-accent { color: var(--accent); }

.glass-nav .nav-link {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
}
.glass-nav .nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.glass-nav .nav-link.active { color: var(--text); background: var(--glass-strong); }

.navbar-toggler {
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
}
.navbar-toggler:focus { box-shadow: none; }

/* ---------------- buttons ---------------- */

.btn { font-weight: 600; border-radius: var(--radius-sm); }
.btn-accent {
  background: var(--accent);
  border: 1px solid transparent;
  color: #0B1020;
}
.btn-accent:hover { background: var(--accent-hover); color: #0B1020; }
.btn-accent:active { background: var(--accent-down) !important; color: #0B1020; }
.btn-accent:disabled { background: var(--accent); opacity: 0.6; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:active { background: rgba(255, 255, 255, 0.12) !important; color: var(--text); }

.btn-quiet-danger {
  background: rgba(229, 101, 94, 0.08);
  border: 1px solid rgba(229, 101, 94, 0.35);
  color: var(--err);
}
.btn-quiet-danger:hover { background: rgba(229, 101, 94, 0.15); border-color: rgba(229, 101, 94, 0.5); color: var(--err); }
.btn-quiet-danger:active { background: rgba(229, 101, 94, 0.2) !important; color: var(--err); }

.btn-sm-nav { padding: 0.35rem 0.9rem; font-size: 0.875rem; }
.btn-lg { padding: 0.7rem 1.5rem; }

.btn, .product-card, .role-option, .method-option {
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

/* ---------------- forms ---------------- */

.form-label { font-size: 0.86rem; font-weight: 500; margin-bottom: 0.35rem; color: var(--text); }

.form-control, .form-select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}
.form-control::placeholder { color: var(--text-faint); }
.form-control:focus, .form-select:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: none;
}
.form-control:disabled, .form-select:disabled { background: rgba(255, 255, 255, 0.02); color: var(--text-faint); }
textarea.form-control { resize: vertical; }

.form-note { color: var(--text-dim); font-size: 0.82rem; margin-bottom: 0; }
.app-link { font-weight: 600; }

.app-form-error {
  background: rgba(229, 101, 94, 0.08);
  border: 1px solid rgba(229, 101, 94, 0.35);
  color: #F2A49F;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
.app-form-error-sm { font-size: 0.8rem; padding: 0.55rem 0.8rem; margin: 0.6rem 0 0; }

/* Registration role picker + checkout delivery method (shared styles) */
.js-role-choice, .js-method-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.role-option, .method-option {
  display: flex; gap: 0.75rem; align-items: flex-start;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  cursor: pointer;
}
.role-option input, .method-option input { position: absolute; opacity: 0; pointer-events: none; }
.role-option .role-icon, .method-option .role-icon {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--text-dim);
}
.role-option strong, .method-option strong { display: block; font-size: 0.92rem; }
.role-option small, .method-option small { color: var(--text-dim); font-size: 0.78rem; line-height: 1.4; display: block; }
.role-option:has(input:checked),
.method-option:has(input:checked) { border-color: var(--accent); background: rgba(129, 140, 248, 0.08); }
.role-option:has(input:checked) .role-icon,
.method-option:has(input:checked) .role-icon { color: var(--accent); border-color: var(--accent); }

.checkout-heading { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }

/* ---------------- badges ---------------- */

.badge {
  display: inline-flex; align-items: center;
  padding: 0.32em 0.7em;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.badge-ok      { color: var(--ok);   background: rgba(76, 195, 138, 0.12); border: 1px solid rgba(76, 195, 138, 0.3); }
.badge-warn    { color: var(--warn); background: rgba(227, 179, 65, 0.12); border: 1px solid rgba(227, 179, 65, 0.3); }
.badge-err     { color: var(--err);  background: rgba(229, 101, 94, 0.12); border: 1px solid rgba(229, 101, 94, 0.3); }
.badge-info    { color: var(--accent-2); background: rgba(125, 211, 252, 0.1); border: 1px solid rgba(125, 211, 252, 0.3); }
.badge-neutral { color: var(--text-dim); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); }

.stock-toggle { border: 0; cursor: pointer; }
.stock-toggle:hover { filter: brightness(1.15); }

/* ---------------- hero ---------------- */

.hero { padding: 4.25rem 0 2.5rem; }
.eyebrow {
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.hero-title {
  font-size: clamp(2.3rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}
.hero-lead { color: var(--text-dim); font-size: 1.1rem; max-width: 34rem; margin-bottom: 0; }
.hero-card { padding: 1.6rem 1.7rem; }

.trust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.05rem; }
.trust-list li { display: flex; gap: 0.85rem; align-items: flex-start; }
.trust-icon {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--accent);
  font-size: 1rem;
}
.trust-list strong { display: block; font-size: 0.92rem; }
.trust-list span { color: var(--text-dim); font-size: 0.84rem; line-height: 1.5; }
.trust-list-plain { margin-top: 0.5rem; }

/* ---------------- stats ---------------- */

.stat-card {
  position: relative;
  padding: 1.3rem 1.4rem;
  display: flex; flex-direction: column; gap: 0.15rem;
}
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.stat-sub { font-size: 1.05rem; color: var(--text-dim); font-weight: 500; }
.stat-label { color: var(--text-dim); font-size: 0.84rem; }
.stat-icon {
  position: absolute; top: 1.15rem; right: 1.2rem;
  font-size: 1.25rem; color: var(--text-faint);
}

/* ---------------- filter bar ---------------- */

.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
  padding: 0.9rem 1rem;
}
.filter-search { position: relative; flex: 1 1 240px; }
.filter-search i {
  position: absolute; left: 0.9rem; top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 0.9rem;
  pointer-events: none;
}
.filter-search input {
  width: 100%;
  padding: 0.6rem 0.9rem 0.6rem 2.45rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.92rem;
}
.filter-search input:focus { border-color: var(--accent); outline: none; }
.filter-search input::placeholder { color: var(--text-faint); }
.app-select { min-width: 180px; }

/* ---------------- product cards ---------------- */

.product-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  height: 100%;
}
.product-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.product-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface); }
.product-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stock-badge { position: absolute; top: 10px; left: 10px; background: rgba(11, 16, 32, 0.85); }

.product-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex; flex-direction: column; gap: 0.3rem;
  flex: 1;
}
.product-category { font-size: 0.77rem; color: var(--text-dim); }
.product-name {
  font-size: 0.98rem; font-weight: 600; line-height: 1.4;
  margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-seller { font-size: 0.83rem; color: var(--text-dim); margin: 0; }
.product-price { font-weight: 700; font-size: 1.02rem; }

/* ============================================================
   Product card alignment fix (keep at end of file)
   ============================================================ */

/* Uniform image box on every card */
.product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;   /* modern browsers */
  min-height: 170px;      /* fallback if aspect-ratio is unsupported */
  background: var(--surface);
  overflow: hidden;
  flex: 0 0 auto;         /* image box never stretches or shrinks */
}

/* The photo fills and is cropped to the box — never distorted */
.product-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* "Out of stock" stays pinned over the image */
.stock-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(11, 16, 32, 0.85);
  z-index: 2;
}

/* Equal-height cards, content stacked in a column */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.1rem 1.15rem;
}

/* Two-line names, so long and short titles keep the same rhythm.
   (Delete this rule if you prefer tighter, single-line cards.) */
.product-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.4em * 2);
}

/* Price + buttons always sit on the card's bottom edge */
.product-body .mt-auto { margin-top: auto !important; }

/* ---------------- table thumbnails ---------------- */

.product-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: block;
}

/* ---------------- empty states ---------------- */

.empty-state { padding: 3rem 1.5rem; }
.empty-state i { font-size: 2.1rem; color: var(--text-dim); }
.empty-state h3 { font-size: 1.15rem; font-weight: 600; margin: 0.8rem 0 0.3rem; }
.empty-state p { color: var(--text-dim); max-width: 26rem; margin: 0 auto 1.2rem; font-size: 0.9rem; }

/* ---------------- steps & trust ---------------- */

.step-card { padding: 1.6rem; height: 100%; }
.step-num {
  font-size: 2.4rem; font-weight: 800;
  color: rgba(255, 255, 255, 0.1);
  line-height: 1;
  letter-spacing: -0.02em;
}
.step-title { font-size: 1.05rem; font-weight: 600; margin: 0.7rem 0 0.4rem; }
.step-text { color: var(--text-dim); font-size: 0.9rem; margin: 0; }

.trust-panel { padding: 2rem 2.1rem; }
.trust-note {
  margin: 1.2rem 0 0;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.84rem;
}

/* ---------------- seller dashboard ---------------- */

.panel-card { padding: 1.6rem 1.7rem; }

.status-panel {
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  font-size: 0.92rem;
  color: var(--text);
}
.status-panel strong { font-weight: 600; }
.status-pending  { background: rgba(227, 179, 65, 0.07);  border-color: rgba(227, 179, 65, 0.3);  border-left-color: var(--warn); }
.status-approved { background: rgba(76, 195, 138, 0.07);  border-color: rgba(76, 195, 138, 0.3);  border-left-color: var(--ok); }
.status-rejected { background: rgba(229, 101, 94, 0.07);  border-color: rgba(229, 101, 94, 0.3);  border-left-color: var(--err); }

.locked-panel { text-align: center; padding: 2.5rem 1.5rem; }
.locked-panel i { font-size: 2rem; color: var(--text-dim); }
.locked-panel h3 { font-size: 1.1rem; font-weight: 600; margin: 0.8rem 0 0.4rem; }
.locked-panel p { color: var(--text-dim); font-size: 0.9rem; max-width: 26rem; margin: 0 auto; }

/* ---------------- tables ---------------- */

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: rgba(255, 255, 255, 0.07);
  font-size: 0.88rem;
}
.table thead th { color: var(--text-dim); font-weight: 600; font-size: 0.82rem; border-bottom-color: rgba(255, 255, 255, 0.12) !important; white-space: nowrap; }
.table td { padding-block: 0.8rem; vertical-align: middle; }
.table-hover tbody tr:hover { --bs-table-accent-bg: transparent; background: rgba(255, 255, 255, 0.03); }
.report-details { max-width: 320px; font-size: 0.84rem; }
.star-inline { color: var(--warn); font-size: 0.8rem; }
.order-ref { font-weight: 700; letter-spacing: 0.02em; color: var(--accent-2); }

/* ---------------- tabs ---------------- */

.app-tabs { gap: 0.4rem; }
.app-tabs .nav-link {
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-weight: 500;
  font-size: 0.9rem;
}
.app-tabs .nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.app-tabs .nav-link.active { background: var(--glass-strong); border-color: var(--border); color: var(--text); }

/* ---------------- modals ---------------- */

.app-modal .modal-content,
.glass-modal {
  background: rgba(17, 24, 39, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  color: var(--text);
  box-shadow: var(--shadow);
}
.modal-title { font-size: 1.05rem; font-weight: 600; }
.modal-header { border-bottom: 1px solid var(--border); }
.modal-body { padding: 1.4rem 1.6rem 1.6rem; }
.modal-skeleton { color: var(--text-dim); text-align: center; padding: 2.5rem 0; }

.detail-img {
  width: 100%; aspect-ratio: 4 / 3;
  object-fit: cover; display: block;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.detail-name { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; }
.detail-price { font-size: 1.45rem; font-weight: 700; color: var(--accent-2); margin: 0; }
.detail-desc { color: var(--text-dim); font-size: 0.92rem; }

.seller-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.seller-box-title { font-size: 0.82rem; font-weight: 600; color: var(--text-dim); margin-bottom: 0.5rem; }

.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; font-size: 0.9rem; }
.summary-row + .summary-row { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.summary-row .label { color: var(--text-dim); }
.summary-total { font-weight: 700; font-size: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.12) !important; margin-top: 0.3rem; padding-top: 0.7rem; }

.order-success { padding: 1.5rem 0 0.5rem; }
.order-success i { font-size: 3rem; color: var(--ok); display: block; margin-bottom: 0.8rem; }
.order-success h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.4rem; }
.order-success p { color: var(--text-dim); max-width: 26rem; margin: 0 auto 0.4rem; }
.order-success .btn { margin-top: 1rem; }

/* ---------------- cart & orders ---------------- */

.cart-btn { position: relative; }
.cart-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: #0B1020;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  line-height: 1;
}
.cart-count[hidden] { display: none; }

.offcanvas {
  background: var(--surface);
  border-left: 1px solid var(--border-strong);
  color: var(--text);
}
.offcanvas-header { border-bottom: 1px solid var(--border); }
.offcanvas-title { font-size: 1.05rem; font-weight: 600; }

.cart-line {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}
.cart-line + .cart-line { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.cart-line-unavailable { opacity: 0.7; }

.cart-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  flex: none;
}
.cart-thumb-empty { display: grid; place-items: center; color: var(--text-faint); font-size: 1.1rem; }

.cart-line-info { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.cart-line-name { font-weight: 600; font-size: 0.9rem; line-height: 1.35; }
.cart-line-meta { color: var(--text-dim); font-size: 0.78rem; }

.cart-line-side { display: flex; align-items: center; gap: 0.7rem; margin-left: auto; }
.cart-line-total { font-weight: 600; font-size: 0.9rem; min-width: 5.5rem; text-align: right; }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
  flex: none;
}
.stepper-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 0;
  color: var(--text);
  width: 28px;
  height: 28px;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}
.stepper-btn:hover { background: rgba(255, 255, 255, 0.1); }
.stepper-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.stepper-qty { min-width: 26px; text-align: center; font-size: 0.88rem; font-weight: 600; }

.cart-remove {
  background: none;
  border: 1px solid transparent;
  color: var(--text-dim);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  flex: none;
}
.cart-remove:hover { color: var(--err); background: rgba(229, 101, 94, 0.08); border-color: rgba(229, 101, 94, 0.3); }

.cart-empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-dim); }
.cart-empty i { font-size: 2rem; display: block; margin-bottom: 0.6rem; }
.cart-empty p { margin-bottom: 1rem; }

.cart-subtotal-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1rem;
}
.cart-subtotal-note { color: var(--text-dim); font-size: 0.78rem; margin: 0.2rem 0 0; }

.modal-buy { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.75rem; flex-wrap: wrap; }

/* ---------------- reviews ---------------- */

.review-section-title { font-size: 1.05rem; font-weight: 600; }
.review-avg { color: var(--text-dim); font-size: 0.88rem; }
.stars i { font-size: 0.85rem; margin-right: 1px; }
.stars .bi-star-fill { color: var(--warn); }
.stars .bi-star { color: rgba(255, 255, 255, 0.22); }

.review-item + .review-item { border-top: 1px solid rgba(255, 255, 255, 0.07); margin-top: 0.9rem; padding-top: 0.9rem; }
.review-author { font-size: 0.9rem; }
.review-comment { color: var(--text); font-size: 0.9rem; }

.review-form {
  margin-top: 1.4rem;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.review-form-title { font-size: 0.92rem; font-weight: 600; margin-bottom: 0.6rem; }

.star-input { display: flex; gap: 0.2rem; }
.star-btn {
  background: none; border: 0; padding: 0.1rem;
  font-size: 1.45rem; line-height: 1;
  color: rgba(255, 255, 255, 0.25);
  transition: color 0.15s ease, transform 0.15s ease;
}
.star-btn:hover { transform: scale(1.12); }
.star-btn .bi-star { color: rgba(255, 255, 255, 0.25); }
.star-btn .bi-star-fill { color: var(--warn); }

/* ---------------- alerts & toasts ---------------- */

.app-alert { border-radius: var(--radius-sm); font-size: 0.9rem; }
.alert-success { background: rgba(76, 195, 138, 0.1);  border-color: rgba(76, 195, 138, 0.35); color: #A9E5C8; }
.alert-danger  { background: rgba(229, 101, 94, 0.1);  border-color: rgba(229, 101, 94, 0.35); color: #F2A49F; }
.alert-warning { background: rgba(227, 179, 65, 0.1);  border-color: rgba(227, 179, 65, 0.35); color: #EFD494; }
.alert-info    { background: rgba(125, 211, 252, 0.08); border-color: rgba(125, 211, 252, 0.3);  color: #B5E3F7; }

#app-toast-root {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 2000;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.app-toast {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  max-width: 340px;
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.app-toast.show { opacity: 1; transform: none; }
.toast-ok i { color: var(--ok); }
.toast-err i { color: var(--err); }

/* ---------------- auth pages (split hero layout) ---------------- */

.auth-shell {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  min-height: 620px;
}

.auth-hero {
  position: relative;
  flex: 0 0 45%;
  background-color: var(--surface-2);   /* fallback colour if the hero image cannot load */
  background-size: cover;
  background-position: center;
  /* The hero photo URL is set per page in login.ejs / register.ejs (online image) */
}
.auth-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 16, 32, 0.75); /* solid dark overlay — raise/lower between 0.65 and 0.85 to taste */
}
.auth-hero-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
}
.auth-hero-title {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}
.auth-hero-text {
  color: rgba(241, 245, 249, 0.82);
  font-size: 0.95rem;
  max-width: 24rem;
  margin-top: 1rem;
}
.auth-hero-points {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}
.auth-hero-points li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #E2E8F0;
  font-size: 0.9rem;
}
.auth-hero-points i { color: var(--accent-2); font-size: 0.95rem; }
.auth-hero-foot {
  margin-top: auto;
  padding-top: 2rem;
  color: rgba(241, 245, 249, 0.55);
  font-size: 0.78rem;
}

.auth-form-pane {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 2.75rem 1.5rem;
}

.auth-card { width: 100%; max-width: 460px; padding: 2.2rem 2.1rem; }
.auth-card-wide { max-width: 560px; }
.auth-title { font-size: 1.45rem; font-weight: 700; margin: 0; }

.demo-creds {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.demo-creds strong { color: var(--text); font-size: 0.8rem; }
.demo-creds code { color: var(--accent-2); font-size: 0.78rem; background: rgba(255, 255, 255, 0.04); padding: 0.1em 0.35em; border-radius: 5px; }
.demo-creds div { margin-top: 0.25rem; }

@media (max-width: 991.98px) {
  .auth-shell { flex-direction: column; min-height: 0; }
  .auth-hero { flex: none; height: 250px; }
  .auth-hero-inner { padding: 1.9rem 1.5rem; }
  .auth-hero-title { font-size: 1.5rem; }
  .auth-hero-text { font-size: 0.88rem; margin-top: 0.6rem; }
  .auth-hero-points { display: none; }
  .auth-hero-foot { padding-top: 1.25rem; }
  .auth-form-pane { padding: 2rem 1.25rem; }
}

/* ---------------- footer ---------------- */

.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}
.site-footer .navbar-brand { margin-bottom: 0; }
.footer-heading { font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 0.9rem; }
.footer-links li { margin-bottom: 0.45rem; }
.footer-links a { color: var(--text-dim); font-size: 0.88rem; }
.footer-links a:hover { color: var(--text); }
.footer-link-btn {
  background: none; border: 0; padding: 0;
  color: var(--text-dim); font-size: 0.88rem; font-family: inherit;
}
.footer-link-btn:hover { color: var(--text); }
.footer-rule { border-color: rgba(255, 255, 255, 0.07); opacity: 1; margin: 0.75rem 0 1.25rem; }

/* ---------------- activity chips ---------------- */

.activity-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.activity-chip i { color: var(--accent); }

/* ---------------- responsive ---------------- */

@media (max-width: 991.98px) {
  .glass-nav .navbar-collapse { padding-top: 0.75rem; border-top: 1px solid var(--border); margin-top: 0.75rem; }
}

@media (max-width: 575.98px) {
  .hero { padding: 2.75rem 0 1.5rem; }
  .page { padding: 1.75rem 0 3rem; }
  .section { padding: 2rem 0; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .app-select { min-width: 0; width: 100%; }
  .filter-bar .btn { width: 100%; }
  .js-role-choice, .js-method-choice { grid-template-columns: 1fr; }
  .trust-panel { padding: 1.5rem 1.3rem; }
  .panel-card { padding: 1.3rem 1.2rem; }
  .auth-card { padding: 1.7rem 1.4rem; }
  #app-toast-root { left: 1.25rem; right: 1.25rem; }
  .app-toast { max-width: none; }
  .cart-line-side { margin-left: 0; width: 100%; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}