/* ==============================
   THEME VARIABLES
============================== */
:root{
  --bg: #f9fafb;
  --card-bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --header-bg: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.9));
  --header-text: #111827;
  --button-bg: #374151;
  --button-text: #ffffff;
  --border: #e5e7eb;
}

html.dark {
  --bg: #0b1220;
  --card-bg: #0f1724;
  --text: #e6eef8;
  --muted: #9ca3af;
  --header-bg: linear-gradient(180deg, rgba(10,11,15,0.95), rgba(10,11,15,0.9));
  --header-text: #e6eef8;
  --button-bg: #1f2937;
  --button-text: #e6eef8;
  --border: #111827;
}

/* ==============================
   GLOBAL STYLES
============================== */
html, body {
  background: var(--bg) !important;
  color: var(--text) !important;
  transition: background-color .25s ease, color .25s ease;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  margin: 0;
  padding: 0;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ==============================
   SIDEBAR
============================== */
.sidebar {
  width: 220px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--card-bg);
  border-right: 1px solid var(--border);
  padding-top: 20px;
  transition: width 0.3s ease;
}

.sidebar-logo {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: #007bff;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
}

.sidebar .nav-link i {
  margin-right: 10px;
}

.sidebar .nav-link:hover {
  background: #f5f5f5;
  color: #007bff;
}

.sidebar .logout {
  color: #dc3545;
}

/* ==============================
   TOPBAR
============================== */
.topbar {
  margin-left: 220px;
  height: 60px;
  background: var(--header-bg) !important;
  color: var(--header-text) !important;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.topbar-title {
  font-size: 16px;
  font-weight: 500;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-user i {
  font-size: 18px;
  color: #007bff;
}

.topbar-user a {
  text-decoration: none;
  color: #007bff;
}

/* ==============================
   CONTENT WRAPPER
============================== */
.content {
  margin-left: 220px;
  padding: 20px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 8px;
  color: var(--text);
}

/* ==============================
   BUTTONS / INPUTS
============================== */
.compare-box select {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  padding: 8px;
  border-radius: 6px;
}

button#theme-toggle {
  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

button#theme-toggle:hover {
  opacity: .95;
}

/* ==============================
   RESPONSIVE
============================== */
@media screen and (max-width: 768px) {
  .sidebar {
    width: 60px;
  }
  .sidebar .nav-link span,
  .sidebar-logo span {
    display: none;
  }
  .topbar {
    margin-left: 60px;
  }
  .content {
    margin-left: 60px;
  }
}
/* Fix product thumbnail sizes */
.thumb {
    max-width: 150px;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
}

