/* ══════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
}
.sidebar-overlay.open { display: block; }

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 280px;
  background: #1e1e1e;
  border-right: 1px solid #333;
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

.sidebar-top {
  padding: 14px 16px;
  background: #111111;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.sidebar-top span {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}
.sidebar-close {
  background: rgba(0,0,0,0.25);
  border: none;
  color: #fff;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.sidebar-close:hover { background: rgba(0,0,0,0.4); }

.sidebar-section {
  padding: 16px;
  border-bottom: 1px solid #2a2a2a;
}
.sidebar-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #aaa;
  margin-bottom: 12px;
}

/* Формат копирования — toggle */
.copy-format-toggle {
  display: flex;
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
}
.copy-format-toggle button {
  flex: 1;
  padding: 8px 6px;
  font-size: 0.78rem;
  font-weight: 600;
  background: transparent;
  color: #888;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: normal;
  line-height: 1.3;
}
.copy-format-toggle button:first-child {
  border-right: 1px solid #333;
}
.copy-format-toggle button.active {
  background: #FFD100;
  color: #111;
}
.copy-format-toggle button:hover:not(.active) {
  background: #2a2a2a;
  color: #ccc;
}

/* Cart info */
.cart-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cart-count-label {
  font-size: 0.88rem;
  color: #ccc;
}
.cart-count-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFD100;
}

.sidebar-btn {
  width: 100%;
  padding: 13px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
}
.sidebar-btn:last-child { margin-bottom: 0; }
.sidebar-btn.primary { background: #FFD100; color: #111; font-weight: 700; }
.sidebar-btn.primary:hover { background: #e6bc00; }
.sidebar-btn.danger { background: #3a1a1a; color: #e57373; }
.sidebar-btn.danger:hover { background: #4a2020; }
.sidebar-btn.default { background: #2a2a2a; color: #ccc; }
.sidebar-btn.default:hover { background: #333; }

/* Catalogs */
.catalog-item {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  user-select: none;
}
.catalog-item:hover {
  border-color: #C8A800;
  color: #C8A800;
}
.catalog-item.active {
  background: #181500;
  border-color: #C8A800;
  color: #C8A800;
}
.catalog-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #555;
  flex-shrink: 0;
  transition: background 0.15s;
}
.catalog-item.active .catalog-dot {
  background: #C8A800;
}
.catalog-item.inactive {
  opacity: 0.45;
  border-style: dashed;
}
.catalog-item.inactive:hover {
  opacity: 0.75;
  border-color: #666;
  color: #999;
}
/* keep old class for compat */
.catalog-active-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: #C8A800;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* ══════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════ */
header {
  background: #111111;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  position: sticky;
  top: 0;
  z-index: 100;
}

.menu-btn {
  background: rgba(0,0,0,0.2);
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  justify-self: start;
  transition: background 0.15s;
}
.menu-btn:hover { background: rgba(0,0,0,0.35); }
.hamburger-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hamburger {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}
.cart-badge {
  background: #e53935;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.header-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  text-align: center;
}
.header-brand h1 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.2;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ponsse-logo {
  background: #FFD100;
  color: #111;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}
.header-model {
  color: #fff;
}
.header-brand .brand-sub {
  font-size: 0.72rem;
  color: #999;
}

#catalog-badge {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 0.72rem;
  color: #c8e6c9;
  line-height: 1.45;
  text-align: right;
  white-space: nowrap;
  justify-self: end;
}
#catalog-badge .cat-model { font-weight: 700; font-size: 0.8rem; color: #fff; }
#catalog-badge .cat-meta { opacity: 0.65; }

/* ══════════════════════════════════════════
   SEARCH
   ══════════════════════════════════════════ */
.search-bar {
  padding: 20px 24px;
  display: flex;
  gap: 10px;
  max-width: 800px;
  margin: 0 auto;
}

#query {
  flex: 1;
  padding: 13px 18px;
  font-size: 1.05rem;
  border: 2px solid #333;
  border-radius: 10px;
  background: #2a2a2a;
  color: #e8e8e8;
  outline: none;
  transition: border-color 0.2s;
}
#query:focus { border-color: #FFD100; box-shadow: 0 0 0 2px rgba(255,209,0,0.15); }
#query::placeholder { color: #666; }

button.search-btn {
  padding: 13px 24px;
  font-size: 1rem;
  font-weight: 700;
  background: #FFD100;
  color: #111;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
button.search-btn:hover { background: #e6bc00; }

/* ══════════════════════════════════════════
   RESULTS
   ══════════════════════════════════════════ */
#status {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 8px;
  min-height: 20px;
}

#results {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
