/* DE_PC2 v2.0 — components.css */

/* ─── Lucide icons ────────────────────────── */
[data-lucide] {
  width: 18px; height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.icon-btn [data-lucide]  { width: 20px; height: 20px; }
.icon-sm  [data-lucide]  { width: 15px; height: 15px; }

/* ─── Buttons ─────────────────────────────── */
button { cursor: pointer; font-family: inherit; font-size: 13px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-muted);
  transition: all var(--tr);
  gap: 6px;
}
.icon-btn:hover { background: var(--bg-3); color: var(--text); border-color: var(--accent); }
.icon-btn.active { color: var(--accent); border-color: var(--accent); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-weight: 500;
  transition: background var(--tr);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: all var(--tr);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: var(--r-md);
  transition: all var(--tr);
}
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  font-size: 12px;
  white-space: nowrap;
  transition: all var(--tr);
}
.btn-add:hover, .btn-add.added {
  background: var(--accent);
  color: #fff;
}

/* ─── Table ───────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-2);
}

table.catalog {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.catalog thead th {
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
  position: sticky;
  top: 0;
}
table.catalog tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--tr);
  cursor: pointer;
}
table.catalog tbody tr:nth-child(even) { background: var(--row-alt); }
table.catalog tbody tr:hover { background: var(--row-hover); }
table.catalog tbody tr.expanded { background: var(--row-expanded); }
table.catalog td {
  padding: 7px 10px;
  vertical-align: middle;
  color: var(--text);
}
td.col-model    { min-width: 180px; font-weight: 500; }
td.col-category { min-width: 160px; color: var(--text-muted); font-size: 12px; }
td.col-sku      { font-family: monospace; font-size: 12px; color: var(--text-muted); }
td.col-dims     { white-space: nowrap; font-size: 12px; color: var(--text-muted); }
td.col-price    { white-space: nowrap; font-weight: 500; text-align: right; min-width: 100px; }
td.col-add      { white-space: nowrap; min-width: 100px; }

mark {
  background: var(--mark-bg);
  color: var(--mark-color);
  border-radius: 2px;
  padding: 0 1px;
}

/* Expand row */
tr.expand-row td {
  padding: 0;
  cursor: default;
}
.expand-content {
  padding: 12px 16px;
  display: flex;
  gap: 16px;
  background: var(--row-expanded);
  border-top: 1px solid var(--border);
}
.expand-img {
  flex-shrink: 0;
  width: 120px; height: 90px;
  object-fit: contain;
  border-radius: var(--r-sm);
  background: var(--bg-3);
  cursor: zoom-in;
}
.expand-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
}
.expand-desc {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  line-height: 1.7;
}
.expand-actions { display: flex; gap: 8px; align-items: flex-start; flex-shrink: 0; }

/* ─── Color picker ────────────────────────── */
.color-picker {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-bottom: 4px;
}
.color-swatch {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--tr), transform var(--tr);
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.active { border-color: var(--accent); }

/* ─── Color dots in cart ──────────────────── */
.ral-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 3px;
  border: 1px solid var(--border);
}
.ral7035 { background: #d0cfca; }
.ral9005 { background: #0e0e10; }

/* ─── Pagination ──────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 0;
  justify-content: center;
  flex-wrap: wrap;
}
.pagination button {
  padding: 4px 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 12px;
  transition: all var(--tr);
}
.pagination button:hover { border-color: var(--accent); color: var(--accent); }
.pagination button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination button:disabled { opacity: 0.4; cursor: default; }
.pag-info { font-size: 12px; color: var(--text-muted); }

/* ─── Cart panel ──────────────────────────── */
#cart-drawer {
  position: fixed;
  top: 52px; right: 0; bottom: 0;
  width: 540px;
  max-width: 95vw;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  z-index: var(--z-modal);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
#cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.cart-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.cart-empty { color: var(--text-muted); text-align: center; padding: 32px; }

table.cart-table { width: 100%; border-collapse: collapse; font-size: 12px; }
table.cart-table th {
  padding: 6px 8px;
  background: var(--bg-3);
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
table.cart-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-model { font-weight: 500; }
.cart-color { color: var(--text-muted); font-size: 11px; }
.cart-usd-price { text-align: right; font-weight: 500; white-space: nowrap; color: var(--text-muted); font-size: 11px; }
.cart-price { text-align: right; font-weight: 500; white-space: nowrap; }

.cart-qty, .cart-disc {
  width: 54px;
  padding: 3px 6px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 12px;
  text-align: center;
}
.cart-totals {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  margin-top: 8px;
}
.cart-input {
  width: 100%;
  padding: 6px 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 13px;
  margin-top: 8px;
}
.cart-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.cart-badge {
  position: absolute;
  top: -6px; right: -6px;
  width: 18px; height: 18px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* ─── Modal (lightbox) ────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
}
#lightbox .lb-close {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-md);
  color: #fff;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ─── Toast notifications ─────────────────── */
#toast-container {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 10px 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 13px;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.2s ease;
  pointer-events: auto;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger);  }
@keyframes toast-in { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: none; } }

/* ─── NBP rates bar ───────────────────────── */
#rates-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
#rates-bar strong { color: var(--text); }
#rates-bar .stale { color: var(--warning); }

/* ─── Lang selector ───────────────────────── */
.lang-menu {
  display: flex;
  gap: 2px;
}
.lang-btn {
  padding: 4px 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  transition: all var(--tr);
}
.lang-btn:hover { background: var(--bg-3); border-color: var(--border); color: var(--text); }
.lang-btn.active { background: var(--bg-3); border-color: var(--accent); color: var(--accent); }

/* ─── Price mode selector ─────────────────── */
.price-mode {
  display: flex;
  gap: 2px;
}
.price-btn {
  padding: 4px 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  transition: all var(--tr);
}
.price-btn:hover { color: var(--text); border-color: var(--text-muted); }
.price-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── Map section ─────────────────────────── */
#map-container {
  width: 100%;
  height: 320px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 12px;
}
#map-container iframe { width: 100%; height: 100%; border: none; }

/* ─── Contact info ────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.contact-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
}
.contact-row:hover { color: var(--accent); }
.contact-row [data-lucide] { color: var(--accent); flex-shrink: 0; }

/* ─── Loading overlay ─────────────────────── */
#loading {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  flex-direction: column;
  gap: 16px;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Overlay for cart drawer ─────────────── */
#drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: calc(var(--z-modal) - 1);
  display: none;
}
#drawer-overlay.open { display: block; }

/* ─── Row thumbnail ───────────────────────── */
.row-thumb {
  width: 44px; height: 36px;
  object-fit: contain;
  border-radius: 4px;
  background: var(--bg-3);
  display: block;
  transition: opacity var(--tr);
}
.row-thumb-empty {
  display: block;
  width: 44px; height: 36px;
  background: var(--bg-3);
  border-radius: 4px;
  opacity: 0.3;
}

/* ─── Datasheet inline button ─────────────── */
.ds-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--accent);
  font-size: 11px;
  margin-top: 3px;
  cursor: pointer;
  transition: all var(--tr);
}
.ds-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── Lang dropdown ───────────────────────── */
.lang-dropdown { position: relative; }
.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--tr);
}
.lang-current:hover { border-color: var(--accent); color: var(--accent); }
.lang-options {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  z-index: 300;  /* above bars-wrap(90) and header(200) */
  z-index: 300;
  min-width: 150px;
  overflow: hidden;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--tr);
  text-align: left;
}
.lang-option:hover { background: var(--row-hover); }
.lang-option.active { color: var(--accent); font-weight: 600; }

/* ─── Color modal (DE PRICE style) ──────────  */
#color-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#color-modal.open { display: flex; }

#color-modal-inner {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.cm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 600;
}
.cm-product {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.cm-img {
  width: 80px; height: 64px;
  object-fit: contain;
  border-radius: var(--r-sm);
  background: var(--bg-3);
  flex-shrink: 0;
}
.cm-model { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.cm-cat   { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.cm-price { font-size: 15px; font-weight: 700; color: var(--accent); }

.cm-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.cm-swatches {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.cm-swatch {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  background: var(--bg-3);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--tr);
  position: relative;
}
.cm-swatch:hover  { border-color: var(--accent); }
.cm-swatch.active { border-color: var(--accent); background: rgba(0,153,255,0.08); }
.cm-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: block;
}
.cm-label { font-size: 11px; font-weight: 600; color: var(--text); text-align: center; }
.cm-check {
  position: absolute;
  top: 6px; right: 6px;
  width: 14px !important; height: 14px !important;
  color: var(--accent);
  transition: opacity var(--tr);
}
.cm-actions {
  display: flex;
  gap: 8px;
}
.cm-actions .btn-primary  { flex: 1; justify-content: center; }
.cm-actions .btn-secondary { flex: 0 0 auto; }

/* ─── NBP rates bar visible ───────────────── */
#rates-bar {
  padding: 6px 16px;
  font-size: 12px;
}

/* ─── Sidebar contacts ────────────────────── */
.sidebar-contact {
  margin-top: 16px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}
.sidebar-contact-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.sidebar-contact-title [data-lucide] { width:13px; height:13px; }

.sidebar-contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
  transition: color var(--tr);
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.sidebar-contact-row:hover { color: var(--accent); }
.sidebar-contact-row [data-lucide] { width:14px; height:14px; flex-shrink:0; color: var(--accent); }

.sidebar-map-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 5px 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: all var(--tr);
  width: 100%;
}
.sidebar-map-btn:hover { border-color: var(--accent); color: var(--accent); }
.sidebar-map-btn [data-lucide] { width:13px; height:13px; }

/* ─── Cart close button — always visible ─────── */
.cart-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--bg-3);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  cursor: pointer;
  transition: all var(--tr);
  flex-shrink: 0;
}
.cart-close-btn:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.cart-close-btn [data-lucide] { width:16px; height:16px; stroke-width:2.5; }

/* ─── Sidebar lucide icon fix ─────────────── */
/* Force icons to render even before createIcons() */
.nav-item i[data-lucide] {
  display: inline-block;
  width: 16px; height: 16px;
}

/* ─── Discount bar ────────────────────────── */
.discount-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  flex-wrap: wrap;
}
.disc-label {
  display: flex; align-items: center; gap: 5px;
  font-weight: 600; color: var(--text);
}
.disc-label [data-lucide] { width:14px; height:14px; color: var(--accent); }
.disc-global-input {
  width: 64px; padding: 3px 8px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text); font-size: 13px;
  text-align: center;
  transition: border-color var(--tr);
}
.disc-global-input:focus { border-color: var(--accent); outline: none; }
.disc-pct { color: var(--text-muted); }
.disc-active-badge {
  padding: 2px 8px; background: var(--success);
  color: #fff; border-radius: 10px; font-size: 11px; font-weight: 700;
}
.col-disc { color: var(--success) !important; }

/* ─── Rates bar link ──────────────────────── */
.rates-link {
  display: inline-flex; align-items: center; gap: 3px;
  color: var(--accent); text-decoration: none; font-size: 11px;
}
.rates-link:hover { text-decoration: underline; }
.rates-link [data-lucide] { width:11px; height:11px; }
.rates-pair { white-space: nowrap; }
.rates-label-text { font-weight: 600; }
.rates-tab { font-size: 10px; color: var(--text-muted); }
.rates-date { font-size: 11px; color: var(--text-muted); }
.rates-date.stale { color: var(--warning); }

/* ─── Expand image placeholder ────────────── */
.expand-img-wrap { flex-shrink: 0; }
.expand-img-ph {
  width: 120px; height: 90px;
  background: var(--bg-3); border-radius: var(--r-sm);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; cursor: pointer; color: var(--text-muted);
  font-size: 10px; text-align: center; padding: 8px;
  border: 1px dashed var(--border);
  transition: border-color var(--tr);
}
.expand-img-ph:hover { border-color: var(--accent); color: var(--accent); }
.expand-img-ph [data-lucide] { width:24px; height:24px; }

/* ─── PDF button missing state ────────────── */
.ds-btn-missing {
  opacity: 0.5;
}
.ds-btn-missing:hover { opacity: 1; background: var(--warning) !important; border-color: var(--warning) !important; color: #fff !important; }

/* ─── Color modal disc price ──────────────── */
.cm-disc { color: var(--success); font-size: 12px; margin-left: 4px; }

/* ─── Sound button active ─────────────────── */
#btn-sound.muted { color: var(--text-muted); opacity: 0.5; }

/* ─── Global discount tag in cart row ────── */
.global-disc-tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 5px;
  background: var(--success);
  color: #fff;
  border-radius: 8px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ─── Toast — more visible ────────────────── */
.toast {
  padding: 12px 20px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
  min-width: 240px;
  max-width: 360px;
}
.toast.info    { border-left: 4px solid var(--accent) !important; }
.toast.success { border-left: 4px solid var(--success) !important; }
.toast.error   { border-left: 4px solid var(--danger) !important; }

/* ─── Rates bar + discount bar scroll fix ─── */
#rates-bar {
  overflow-x: auto;
  white-space: nowrap;
  flex-wrap: nowrap !important;
  min-height: 32px;
  scrollbar-width: thin;
}
#discount-bar {
  overflow-x: auto;
  flex-wrap: nowrap !important;
}

/* ─── Sidebar nav item — allow text wrap ───── */
.nav-item .nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
/* On hover — show full text */
.nav-item:hover .nav-label {
  white-space: normal;
  overflow: visible;
  word-break: break-word;
}

/* ─── PDF missing — same style as image toast ── */
.pdf-missing-note {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
}

/* ─── Custom SVG icons in sidebar ────────── */
.nav-item svg.icon {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
  stroke: currentColor;
  fill: none;
  opacity: 0.75;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.nav-item:hover svg.icon       { opacity: 1; transform: translateX(2px); }
.nav-item.active svg.icon      { opacity: 1; stroke: var(--accent); }
.nav-item svg.icon .icon-accent { stroke: var(--accent); }
.nav-item:not(.active) svg.icon .icon-accent { opacity: 0.7; }
.nav-item:hover svg.icon .icon-accent,
.nav-item.active svg.icon .icon-accent { opacity: 1; }

/* ─── Language flag emoji — reliable rendering ── */
.lang-flag {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 14px;
  margin-right: 4px;
  display: inline-block;
}
.lang-option .lang-flag {
  font-size: 16px;
  margin-right: 6px;
}

/* ─── 2-level sidebar nav ───────────────── */
.nav-subitem {
  padding-left: 36px !important;
  font-size: 12px !important;
  color: var(--text-muted);
  border-left: 3px solid transparent;
}
.nav-subitem:hover {
  background: var(--hover-bg);
  color: var(--text);
  border-left-color: rgba(0,153,255,.2);
}
.nav-subitem.active {
  background: var(--accent-bg);
  border-left-color: var(--accent);
  color: var(--accent);
  font-weight: 500;
}
.nav-sub-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  margin-right: 2px;
}
.nav-subitem.active .nav-sub-dot {
  background: var(--accent);
}
.nav-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: var(--text-muted);
  transition: transform 0.2s ease;
}
.nav-chevron.open {
  transform: rotate(180deg);
}
.nav-item.has-subs .nav-label {
  pointer-events: none;
}

/* ─── Price on request ──────────────────── */
.price-on-request {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  white-space: nowrap;
}

/* deploy: 2026-04-16 */
/* @v1776352182 */
/* SKU hidden from table — shown only in export */
.col-sku { display: none !important; }

/* ── PDF Viewer Modal ── */
#pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  background: #111;
}

.pdf-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #1B4F8A;
  min-height: 52px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.pdf-modal-back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  color: #1B4F8A;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.pdf-modal-back svg { stroke: #1B4F8A; }
.pdf-modal-back:active { opacity: 0.8; }

.pdf-modal-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  padding: 0 8px;
}

.pdf-modal-download {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.pdf-modal-download svg { stroke: #fff; }
.pdf-modal-download:active { opacity: 0.8; }

#pdf-modal-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

/* Fallback message inside modal */
.pdf-modal-fallback {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 24px;
  background: #1a1a2e;
  color: #fff;
  text-align: center;
}
.pdf-modal-fallback p {
  font-size: 16px;
  color: #aaa;
  max-width: 320px;
  line-height: 1.5;
}
.pdf-modal-open-browser {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #1B4F8A;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

/* ─── Email send button ───────────────────── */
.btn-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: transparent;
  color: var(--success);
  border: 1px solid var(--success);
  border-radius: var(--r-md);
  font-weight: 500;
  transition: all var(--tr);
}
.btn-email:hover {
  background: var(--success);
  color: #fff;
}

/* ─── Email modal ─────────────────────────── */
#email-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: calc(var(--z-modal) + 10);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: em-fade-in 0.15s ease;
}
#email-modal.em-closing {
  animation: em-fade-out 0.2s ease forwards;
}
@keyframes em-fade-in  { from { opacity:0; transform:scale(0.96); } to { opacity:1; transform:scale(1); } }
@keyframes em-fade-out { from { opacity:1; } to { opacity:0; } }

#email-modal-inner {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.em-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
  background: var(--bg-3);
}
.em-header [data-lucide] { color: var(--success); margin-right: 6px; }

.em-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.em-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.em-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.em-field input,
.em-field textarea {
  padding: 7px 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--tr);
  resize: vertical;
}
.em-field input:focus,
.em-field textarea:focus { border-color: var(--success); }

.em-info {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-3);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  line-height: 1.5;
}
.em-info [data-lucide] { flex-shrink:0; width:14px; height:14px; margin-top:1px; }

.em-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-3);
}

/* loader spin */
@keyframes spin { to { transform: rotate(360deg); } }
#em-send-btn [data-lucide="loader-2"] { animation: spin 0.8s linear infinite; }

/* @v2.49 */

/* ─── Email consent (GDPR/RODO) ──────────── */
.em-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--tr), background var(--tr);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}
.em-consent:hover {
  border-color: var(--accent);
}
.em-consent input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}
.em-consent span strong { color: var(--text); }
.em-consent-checked {
  border-color: var(--success);
  background: rgba(63,185,80,0.06);
  color: var(--text);
}

/* @oksi4-v1.2 */
