/* ==========================================================================
   ElectroSearch – Soukup.xyz Black Dot-Grid Aesthetic
   Accessibility-focused with larger text, high-contrast monospace typography.
   ========================================================================== */

:root {
  --bg-black: #000000;
  --bg-surface: #0a0a0a;
  --bg-surface-alt: #121212;
  --bg-panel: #0d0d0d;
  --bg-panel-hover: #171717;
  --bg-input: #050505;
  
  --border-color: #262626;
  --border-focus: #e87f2e;
  
  --text-pure: #ffffff;
  --text-main: #f0f0f0;
  --text-muted: #b5b5b5;
  --text-dim: #737373;
  
  --color-orange: #e87f2e;
  --color-red: #ff3300;
  --color-price: #4ade80;
  --color-price-alt: #fb923c;
  
  --font-mono: 'Source Code Pro', 'CascadiaCode', 'JetBrains Mono', Menlo, Consolas, monospace;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important;
}

body {
  font-family: var(--font-mono);
  background-color: var(--bg-black);
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 0);
  background-size: 20px 20px;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Top Accent Gradient Line (soukup.xyz style) */
.accent-line {
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-red) 0%, var(--color-orange) 50%, var(--color-red) 100%);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* ==========================================================================
   Header & Controls
   ========================================================================== */
.site-header {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 3px;
  z-index: 100;
}

.header-inner {
  max-width: 100%;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.header-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(45deg, var(--color-red) 0%, var(--color-orange) 50%, var(--color-red) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-tag {
  font-size: 14px;
  color: var(--text-dim);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Dropdown */
.dropdown-wrapper {
  position: relative;
}

.btn-dropdown {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-pure);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.btn-dropdown:hover {
  border-color: var(--color-orange);
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 300px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  z-index: 200;
}

.dropdown-panel.hidden {
  display: none;
}

.dropdown-panel-head {
  padding: 10px 14px;
  background-color: #050505;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.dropdown-quick-links {
  display: flex;
  gap: 6px;
  align-items: center;
}

.sep {
  color: var(--border-color);
}

.link-action {
  background: transparent;
  border: none;
  color: var(--color-orange);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
}

.link-action:hover {
  text-decoration: underline;
}

.dropdown-panel-body {
  padding: 6px 0;
  max-height: 350px;
  overflow-y: auto;
}

.dropdown-shop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  cursor: pointer;
  user-select: none;
}

.dropdown-shop-item:hover {
  background-color: var(--bg-panel-hover);
}

.dropdown-shop-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-orange);
  cursor: pointer;
}

.dropdown-shop-label {
  display: flex;
  flex-direction: column;
}

.dropdown-shop-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-pure);
}

.dropdown-shop-domain {
  font-size: 12px;
  color: var(--text-dim);
}

/* Tabs */
.view-switch {
  display: flex;
  gap: 6px;
}

.btn-tab {
  background-color: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 0;
  cursor: pointer;
}

.btn-tab:hover {
  color: var(--text-pure);
  background-color: var(--bg-panel-hover);
}

.btn-tab.active {
  color: var(--color-orange);
  border-color: var(--border-color);
  background-color: var(--bg-surface);
  font-weight: 700;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.main-wrapper {
  max-width: 100%;
  padding: 20px;
  flex: 1;
}

.view-content {
  display: none;
}

.view-content.active {
  display: block;
}

/* ==========================================================================
   Search Bar
   ========================================================================== */
.search-container {
  margin-bottom: 16px;
}

.search-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}

.input-wrapper {
  flex: 1;
  min-width: 320px;
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 0;
  padding: 0 12px;
}

.input-wrapper:focus-within {
  border-color: var(--border-focus);
}

.prompt-symbol {
  color: var(--color-orange);
  font-weight: 700;
  font-size: 18px;
  margin-right: 10px;
}

#search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text-pure);
  padding: 12px 0;
}

#search-input::placeholder {
  color: var(--text-dim);
  font-size: 15px;
}

.btn-clear {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  display: none;
}

.btn-clear.visible {
  display: block;
}

.btn-clear:hover {
  color: var(--text-pure);
}

.btn-action {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-pure);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-action:hover {
  border-color: var(--color-orange);
  background-color: var(--bg-panel-hover);
}

.btn-submit {
  background: #141414;
  border-color: var(--color-orange);
  color: var(--color-orange);
}

.btn-submit:hover {
  background: var(--color-orange);
  color: #000000;
}

.banner-notice {
  background-color: rgba(232, 127, 46, 0.1);
  border: 1px solid var(--color-orange);
  border-radius: 0;
  padding: 10px 14px;
  margin-top: 10px;
  font-size: 14px;
  color: #ffb070;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.banner-notice.hidden {
  display: none;
}

/* Meta Bar */
.meta-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0 12px 0;
  font-size: 14px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}

.meta-note {
  font-size: 13px;
  color: var(--text-dim);
}

/* ==========================================================================
   Flat Comparison Table
   ========================================================================== */
.table-frame {
  background: rgba(169, 169, 169, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 0;
  width: 100%;
  max-height: calc(100vh - 190px);
  min-height: 380px;
  overflow-y: auto;
  overflow-x: auto;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a #080808;
}

.table-frame::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.table-frame::-webkit-scrollbar-track {
  background: #080808;
}
.table-frame::-webkit-scrollbar-thumb {
  background: #2a2a2a;
}
.table-frame::-webkit-scrollbar-thumb:hover {
  background: var(--color-orange);
}

.products-table {
  width: 100%;
  min-width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  text-align: left;
  background: transparent;
}

.products-table thead {
  position: sticky;
  top: 0;
  z-index: 25;
}

.products-table th {
  background: #0d0d0d !important;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 8px 6px;
  border-bottom: 2px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 25;
  white-space: normal !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.products-table td {
  background: transparent;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  vertical-align: middle;
  white-space: normal !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.products-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.05);
}

.shop-th-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}

.shop-header-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.shop-dropdown-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.shop-cart-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-cart-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.prod-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-pure);
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: break-word;
}

.prod-mpn-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 3px;
  font-family: var(--font-mono);
  word-break: break-all;
}

.btn-cart-plus {
  background: #141414;
  border: 1px solid var(--color-price);
  color: var(--color-price);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
  padding: 0;
  line-height: 1;
}

.btn-cart-plus:hover {
  background: var(--color-price);
  color: #000000;
}

/* Columns */
.th-chk, td.th-chk {
  width: 38px;
  min-width: 38px;
  max-width: 44px;
  text-align: center;
  padding: 8px 4px;
}

.th-img, .td-img {
  text-align: center;
  width: 68px;
  min-width: 68px;
  max-width: 76px;
  padding: 6px 4px;
}

.th-title, td.td-title {
  min-width: 220px;
  width: auto;
}

.th-pkg, td.th-pkg {
  min-width: 85px;
  text-align: center;
  white-space: nowrap;
}

.th-actions, td.th-actions {
  width: 44px;
  min-width: 44px;
  max-width: 48px;
  text-align: center;
  padding: 6px 4px;
}

.product-thumb-img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 0;
  padding: 2px;
  display: block;
  margin: 0 auto;
}

.product-thumb-svg {
  width: 54px;
  height: 54px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.product-thumb-svg svg {
  width: 38px;
  height: 38px;
}

.mpn-code {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-pure);
  white-space: nowrap;
}

.pkg-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: #ffb070;
  border-radius: 0;
  white-space: nowrap;
}

/* Shop Columns & Prices */
.th-shop, td.th-shop {
  text-align: center;
  min-width: 80px;
  width: auto;
}

.th-shop.hidden, td.th-shop.hidden {
  display: none !important;
}

.price-box {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  white-space: nowrap;
  gap: 2px;
}

.price-val {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-price);
  text-decoration: none;
  font-family: var(--font-mono);
  padding: 1px 2px;
  border-radius: 0;
  white-space: nowrap;
  display: inline-block;
  letter-spacing: -0.2px;
}

td.th-shop {
  white-space: nowrap;
  text-align: center;
  padding: 6px 2px;
}

.price-val:hover {
  text-decoration: underline;
  background-color: rgba(74, 222, 128, 0.1);
}

.price-catalog {
  color: var(--color-orange);
  font-size: 11.5px;
  font-weight: 600;
}

.price-catalog:hover {
  background-color: rgba(232, 127, 46, 0.1);
}

.no-price {
  font-size: 13px;
  color: #383838;
  user-select: none;
}

.no-price-link {
  font-size: 13px;
  color: #333333;
  text-decoration: none;
  display: inline-block;
  padding: 1px 4px;
  border-radius: 0;
  transition: all 0.15s ease;
}

.no-price-link:hover {
  color: var(--color-orange);
  background-color: rgba(232, 127, 46, 0.08);
}

.btn-open-row {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
}

.btn-open-row:hover {
  color: var(--color-orange);
  border-color: var(--color-orange);
  background: #141414;
}

.row-empty td {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
  font-size: 16px;
}

/* ==========================================================================
   Table In-Place Loading Progress Bar (Clean, Minimalist, No Text)
   ========================================================================== */
.table-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 380px;
  padding: 60px 20px;
  box-sizing: border-box;
}

.table-loading-container.hidden {
  display: none !important;
}

.products-table.hidden {
  display: none !important;
}

.progress-bar-track {
  width: 100%;
  max-width: 460px;
  height: 4px;
  background: #141414;
  border: 1px solid #2a2a2a;
  position: relative;
  overflow: hidden;
}

.progress-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 35%;
  background: var(--color-orange);
  animation: progressIndeterminate 1.3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes progressIndeterminate {
  0% {
    left: -35%;
    width: 35%;
  }
  50% {
    left: 25%;
    width: 55%;
  }
  100% {
    left: 100%;
    width: 35%;
  }
}

/* ==========================================================================
   BOM View
   ========================================================================== */
.bom-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 0;
  padding: 20px;
}

.bom-title-row {
  margin-bottom: 14px;
}

.bom-title-row h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 4px;
}

.text-dim {
  color: var(--text-dim);
  font-size: 14px;
}

#bom-textarea {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-pure);
  font-family: var(--font-mono);
  font-size: 16px;
  padding: 14px;
  border-radius: 0;
  outline: none;
  resize: vertical;
  margin-bottom: 14px;
}

#bom-textarea:focus {
  border-color: var(--border-focus);
}

.bom-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.bom-results-table.hidden {
  display: none;
}

/* ==========================================================================
   Costs & Shipping Configuration Dropdown
   ========================================================================== */
.dropdown-panel-wide {
  width: 400px;
  max-width: 95vw;
}

.dropdown-panel-scroll {
  max-height: 480px;
  overflow-y: auto;
}

.dropdown-section {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-orange);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dropdown-radio-item,
.dropdown-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 4px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s ease;
}

.dropdown-radio-item:hover,
.dropdown-check-item:hover {
  background-color: var(--bg-panel-hover);
}

.dropdown-radio-item input[type="radio"],
.dropdown-check-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--color-orange);
  cursor: pointer;
  flex-shrink: 0;
}

.radio-label,
.check-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.radio-title,
.check-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-pure);
}

.radio-desc,
.check-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.35;
}

.dropdown-rates-info {
  padding: 10px 14px;
  background-color: #050505;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--border-color);
}

.currency-tag {
  font-size: 12px;
  color: var(--color-price);
  font-weight: 600;
}

/* ==========================================================================
   Meta Bar & Cost Summary Indicator
   ========================================================================== */
.meta-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 0 14px 0;
}

.meta-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meta-right {
  display: flex;
  align-items: center;
}

.meta-cost-indicator {
  font-size: 13px;
  color: var(--color-orange);
  background: rgba(232, 127, 46, 0.08);
  border: 1px solid rgba(232, 127, 46, 0.4);
  padding: 4px 10px;
}

/* ==========================================================================
   Manual Merge Action Bar
   ========================================================================== */
.merge-action-bar {
  background-color: #111111;
  border: 1px solid var(--color-orange);
  box-shadow: 0 6px 24px rgba(232, 127, 46, 0.2);
  padding: 12px 18px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.merge-action-bar.hidden {
  display: none;
}

.merge-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.merge-icon {
  font-size: 18px;
}

.merge-count-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-pure);
}

.merge-hint {
  font-size: 13px;
  color: var(--text-muted);
}

.merge-bar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-merge {
  background-color: var(--color-orange);
  color: #000000;
  border-color: var(--color-orange);
  font-weight: 700;
}

.btn-merge:hover {
  background-color: #ff933b;
  color: #000000;
}

/* Table Row Selection & Merge Badges */
tr.row-selected td {
  background-color: rgba(232, 127, 46, 0.08) !important;
}

.row-chk {
  width: 17px;
  height: 17px;
  accent-color: var(--color-orange);
  cursor: pointer;
}

.badge-merged {
  display: inline-block;
  background-color: rgba(232, 127, 46, 0.15);
  border: 1px solid var(--color-orange);
  color: var(--color-orange);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 5px;
  margin-top: 4px;
}

.btn-unmerge {
  background: transparent;
  border: 1px solid #444;
  color: #aaa;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 5px;
  margin-left: 6px;
  cursor: pointer;
}

.btn-unmerge:hover {
  border-color: var(--color-orange);
  color: var(--text-pure);
}

/* Row Action Buttons */
.row-actions-wrapper {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.btn-add-cart {
  background: #141414;
  border: 1px solid var(--color-price);
  color: var(--color-price);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-add-cart:hover {
  background: var(--color-price);
  color: #000000;
}

.price-origin-subtext {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1;
  white-space: nowrap;
  display: inline-block;
  margin-left: 2px;
  margin-top: 0;
}

/* ==========================================================================
   Shopping Cart (Košík) View
   ========================================================================== */
.cart-container {
  max-width: 100%;
}

.cart-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.cart-header-title h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-pure);
  margin-bottom: 4px;
}

.cart-header-actions {
  display: flex;
  gap: 10px;
}

.cart-empty-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 50px 20px;
  text-align: center;
  font-size: 18px;
  color: var(--text-pure);
}

.cart-content-wrapper.hidden,
.cart-empty-box.hidden {
  display: none;
}

.cart-section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 12px;
}

.cart-qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
}

.btn-qty {
  background: transparent;
  border: none;
  color: var(--text-pure);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.12s;
}

.btn-qty:hover {
  background-color: var(--bg-panel-hover);
  color: var(--color-orange);
}

.input-qty {
  width: 54px;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  color: var(--text-pure);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  padding: 4px 0;
  outline: none;
}

.btn-remove-item {
  background: transparent;
  border: 1px solid #333;
  color: #888;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-remove-item:hover {
  border-color: var(--color-red);
  color: var(--color-red);
  background: rgba(255, 51, 0, 0.1);
}

/* ==========================================================================
   Distributor Shopping Cards (.cart-shops-grid & .shop-cart-card)
   ========================================================================== */
.cart-shops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.shop-cart-card {
  background: #0d0d0d;
  border: 1px solid var(--border-color);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.shop-cart-card:hover {
  border-color: #383838;
}

.shop-cart-card.card-winner {
  border: 1px solid var(--color-price);
  background: #0b140d;
}

.card-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.card-shop-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-shop-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  background: #1a1a1a;
  padding: 2px;
}

.card-shop-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-pure);
  font-family: var(--font-mono);
}

.card-header-tags {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-winner {
  color: var(--color-price);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  border: 1px solid var(--color-price);
  padding: 2px 6px;
  background: rgba(74, 222, 128, 0.1);
}

.card-tag-origin {
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid #282828;
  padding: 2px 6px;
  font-family: var(--font-mono);
}

.card-stock-status {
  padding: 4px 0;
}

.card-badge-avail {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.badge-stock-full {
  color: var(--color-price);
}

.badge-stock-partial {
  color: var(--color-orange);
}

.badge-stock-none {
  color: var(--text-dim);
}

.card-missing-list {
  font-size: 11px;
  color: var(--color-orange);
  margin-top: 4px;
  line-height: 1.3;
}

.card-items-preview {
  background: #080808;
  border: 1px solid #1a1a1a;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.card-items-preview-title {
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 5px;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.card-items-preview-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 110px;
  overflow-y: auto;
}

.card-item-snippet {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
  line-height: 1.4;
}

.card-item-snippet-code {
  color: var(--color-orange);
  font-weight: 700;
  min-width: 80px;
  flex-shrink: 0;
}

.card-item-snippet-qty {
  color: var(--text-muted);
  min-width: 36px;
  flex-shrink: 0;
}

.card-item-snippet-name {
  color: var(--text-pure);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.card-finance-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #080808;
  border: 1px solid #1a1a1a;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.c-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.c-label {
  color: var(--text-muted);
  font-size: 13px;
}

.c-val {
  color: var(--text-pure);
  white-space: nowrap;
}

.c-shipping-box {
  background: #111111;
  border: 1px solid #222222;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c-shipping-head-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.carrier-select-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carrier-logo-container {
  width: 54px;
  height: 28px;
  background: #181818;
  border: 1px solid #333333;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 2px 4px;
  box-sizing: border-box;
}

.carrier-badge-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.card-shipping-select {
  background: #000000;
  color: var(--text-pure);
  border: 1px solid #383838;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 6px;
  flex-grow: 1;
  min-width: 0;
  cursor: pointer;
  outline: none;
}

.card-shipping-select:focus {
  border-color: var(--color-orange);
}

.c-sub-row {
  padding-left: 2px;
  font-size: 12px;
}

.c-sublabel {
  color: var(--text-dim);
}

.c-subval {
  color: var(--text-pure);
  white-space: nowrap;
}

.val-free {
  color: var(--color-price);
  font-weight: 700;
}

.val-fee {
  color: var(--color-orange);
  font-size: 12px;
}

.val-vat {
  color: var(--text-pure);
  font-size: 12px;
}

.card-divider {
  border-top: 1px dashed #262626;
  margin: 6px 0;
}

.c-total-row {
  align-items: baseline;
  margin-top: 2px;
}

.c-total-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-pure);
}

.c-total-amount {
  font-size: 19px;
  font-weight: 900;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.c-total-amount.active-price {
  color: var(--color-price);
}

.c-total-amount.dim-price {
  color: var(--text-dim);
  font-size: 16px;
}

.c-total-sub-usd {
  justify-content: flex-end;
  font-size: 11px;
}

.card-bottom {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-card-big-action {
  width: 100%;
  background: var(--color-orange);
  color: #000000;
  font-weight: 800;
  font-family: var(--font-mono);
  font-size: 13px;
  border: 1px solid var(--color-orange);
  padding: 10px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.btn-card-big-action:hover {
  opacity: 0.92;
  filter: brightness(1.08);
}

.btn-card-big-action:active {
  transform: translateY(1px);
}


/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #111111;
  border: 1px solid var(--color-orange);
  color: var(--text-pure);
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 15px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.85);
  z-index: 10000;
  animation: slideToast 0.2s ease-out;
}

.toast-notification.hidden {
  display: none;
}

@keyframes slideToast {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==========================================================================
   Bulk Import Modal (BOM Quick Order)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 3000;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 680px;
  background: #0d0d0d;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95);
  overflow: hidden;
}

.modal-card .terminal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #151515;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 15px;
  cursor: pointer;
  padding: 2px 6px;
}

.btn-modal-close:hover {
  color: var(--color-orange);
}

.modal-body {
  padding: 20px;
}

.bulk-instructions {
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.bulk-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--color-price);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  padding: 14px;
  resize: vertical;
  outline: none;
  margin-bottom: 16px;
}

.bulk-textarea:focus {
  border-color: var(--border-focus);
}

.bulk-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-highlight {
  background: #141414;
  border-color: var(--color-orange);
  color: var(--color-orange);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-highlight:hover {
  background: var(--color-orange);
  color: #000000;
}

.btn-bulk-import {
  background: #141414;
  border: 1px solid var(--color-orange);
  color: var(--color-orange);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-bulk-import:hover {
  background: var(--color-orange);
  color: #000000;
}

.cart-actions-cell {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Clickable Component Table Titles & Thumbnails
   ========================================================================== */
.prod-title-clickable {
  cursor: pointer;
  color: var(--text-pure);
  transition: color 0.15s ease;
  display: inline-block;
}

.prod-title-clickable:hover {
  color: var(--color-orange);
  text-decoration: underline;
}

.td-img {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.td-img:hover .product-thumb-img {
  border-color: var(--color-orange);
  opacity: 0.88;
}

.mpn-link {
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.mpn-link:hover {
  color: var(--color-orange);
  text-decoration: underline;
}

/* ==========================================================================
   E-Shop Product Detail Modal & Page View
   ========================================================================== */
/* ==========================================================================
   E-Shop Product Detail Modal & Page View
   ========================================================================== */
.modal-detail-card {
  max-width: 980px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #0c0c0c;
  border: 1px solid var(--border-color);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.98);
  overflow: hidden;
}

.detail-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-breadcrumb-mpn {
  color: var(--color-orange);
  font-weight: 700;
}


/* Modal Body */
.detail-modal-body {
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ==========================================================================
   SEKCE 1: Horní sekce - Pouze fotky, kusovník a cena
   ========================================================================== */
.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 768px) {
  .detail-hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Gallery Container */
.detail-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-main-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #050505;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 14px;
}

.detail-main-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
  user-select: none;
}

.detail-img-source {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--border-color);
  font-size: 11px;
  padding: 2px 6px;
  color: var(--text-dim);
}

.detail-thumbnails-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.detail-thumb-item {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  background: #080808;
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.detail-thumb-item:hover {
  border-color: var(--color-orange);
  opacity: 0.9;
}

.detail-thumb-item.active {
  border-color: var(--color-orange);
  outline: 1px solid var(--color-orange);
}

.detail-thumb-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Right Column: Hero Buy Box */
.detail-hero-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-hero-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-brand-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-orange);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: #191410;
  border: 1px solid rgba(232, 127, 46, 0.3);
  padding: 2px 8px;
}

.detail-product-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-pure);
  line-height: 1.3;
}

/* Prices Box: All distributors, no "best" highlight, clickable price links to e-shop */
.detail-prices-box {
  background: #101014;
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-prices-title {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}

.detail-prices-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.detail-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: #15151c;
  border: 1px solid #23232e;
  border-radius: 2px;
  gap: 12px;
  transition: border-color 0.15s, background-color 0.15s;
}

.detail-price-row:hover {
  border-color: #3b3b4a;
  background: #1a1a24;
}

.detail-price-shop-col {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.detail-price-shop-logo {
  height: 15px;
  max-width: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.detail-price-shop-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-pure);
  white-space: nowrap;
}

.detail-price-stock-tag {
  font-size: 11px;
  color: var(--text-dim);
  background: #0d0d12;
  border: 1px solid #22222d;
  padding: 2px 7px;
  white-space: nowrap;
}

.detail-price-stock-tag.in-stock {
  color: #5af78e;
  border-color: rgba(90, 247, 142, 0.25);
  background: rgba(90, 247, 142, 0.05);
}

.detail-price-val-col {
  flex-shrink: 0;
}

/* Clickable price link to e-shop */
.detail-price-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-price, #5af78e);
  background: #0c1810;
  border: 1px solid rgba(90, 247, 142, 0.45);
  padding: 5px 12px;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.detail-price-link:hover {
  background: #14301c;
  border-color: #5af78e;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(90, 247, 142, 0.25);
}

.detail-price-link.disabled {
  color: var(--text-dim);
  background: #141418;
  border-color: #22222a;
  cursor: default;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.detail-price-link-icon {
  font-size: 11px;
  opacity: 0.85;
}

.detail-no-prices {
  font-size: 13px;
  color: var(--text-dim);
  padding: 8px 0;
}

/* Kusovník & Přidání do košíku */
.detail-hero-buyrow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.qty-selector-wrap {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  background: #000000;
}

.btn-qty {
  background: #161616;
  border: none;
  color: var(--text-main);
  width: 36px;
  height: 40px;
  cursor: pointer;
  font-size: 16px;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.btn-qty:hover {
  background: #252525;
  color: var(--color-orange);
}

.detail-qty-input {
  width: 58px;
  height: 40px;
  background: transparent;
  border: none;
  text-align: center;
  color: var(--text-pure);
  font-size: 15px;
  font-family: var(--font-mono);
  outline: none;
}

.btn-hero-cart {
  height: 40px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 700;
}

/* ==========================================================================
   SEKCE 2: Dolní sekce - Taby: Popis, Dokumenty, Parametry
   ========================================================================== */
.detail-tabs-section {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-tabs-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 2px solid var(--border-color);
}

.detail-tabs-bar {
  display: flex;
  gap: 6px;
  border-bottom: none;
  margin-bottom: -2px;
}

.btn-detail-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  margin-bottom: 0;
  transition: all 0.15s ease;
}

.btn-detail-tab:hover {
  color: var(--text-pure);
}

.btn-detail-tab.active {
  color: var(--color-orange);
  border-bottom-color: var(--color-orange);
  background: #141414;
}

/* Distributor source dropdown next to tabs */
.detail-tabs-source-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
}

.detail-tabs-source-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.detail-tabs-source-select {
  background: #14141c;
  border: 1px solid var(--border-color);
  color: var(--text-pure);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.detail-tabs-source-select:hover,
.detail-tabs-source-select:focus {
  border-color: var(--color-orange);
}

.detail-tab-pane {
  display: none;
}

.detail-tab-pane.active {
  display: block;
}

/* Tab 1: Popis */
.detail-desc-box {
  background: #0d0d0d;
  border: 1px solid var(--border-color);
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
}

.detail-desc-box .desc-source-tag {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 10px;
  text-align: right;
}

/* Tab 2: Dokumenty */
.detail-docs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-doc-card {
  background: #0f172a;
  border: 1px solid #1e3a8a;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.detail-doc-card:hover {
  border-color: #3b82f6;
  background: #131e36;
}

.detail-doc-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.doc-badge-pdf {
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 2px;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.detail-doc-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.doc-shop-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  background: #1c1917;
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 2px 7px;
  border-radius: 2px;
  font-family: var(--font-mono);
  white-space: nowrap;
  flex-shrink: 0;
}

.doc-shop-logo {
  height: 12px;
  max-width: 32px;
  object-fit: contain;
}

.doc-filename {
  color: #f1f5f9;
  font-weight: 600;
  font-size: 13px;
  font-family: var(--font-mono);
  word-break: break-all;
}

.btn-doc-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e3a8a;
  border: 1px solid #3b82f6;
  color: #ffffff;
  text-decoration: none;
  height: 34px;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-doc-download:hover {
  background: #2563eb;
}

.detail-empty-pane {
  background: #111111;
  border: 1px dashed var(--border-color);
  padding: 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}

/* Tab 3: Parametry Grid */
.detail-params-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}

.detail-param-card {
  background: #0d0d0d;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
}

.detail-param-name {
  color: var(--text-dim);
  flex-shrink: 0;
}

.detail-param-value {
  color: var(--text-pure);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}



