:root {
  /* Dark theme (default) - Blue theme */
  --bg: #0b1220; /* deep navy */
  --bg-2: #16233a; /* darker slate-blue */
  --bg-page: linear-gradient(135deg, var(--bg), var(--bg-2));
  --card: #0f1b2e; /* card navy */
  --glass: rgba(255, 255, 255, 0.06);
  --glass-hover: rgba(255, 255, 255, 0.1);
  --accent: #60a5fa; /* blue accent */
  --accent-2: #38bdf8; /* cyan accent */
  --text-light: #0f1724; /* placeholder, overridden below */
  --text-strong: #f2f6ff; /* near-white with blue tint */
  --text-muted: #9fb3c8;
  --btn-fg: #0b1220; /* dark text on bright accents */
  --on-accent: #0b1220;
}

/* Light theme overrides - Blue theme */
body.theme-light {
  --bg: #f4f7fb; /* light blue-gray */
  --bg-2: #e8eef7;
  --bg-page: linear-gradient(135deg, var(--bg), var(--bg-2));
  --card: #ffffff;
  --glass: rgba(0, 0, 0, 0.04);
  --glass-hover: rgba(0, 0, 0, 0.08);
  --accent: #2563eb; /* blue */
  --accent-2: #0ea5e9; /* cyan */
  --text-strong: #0b1220; /* navy text */
  --text-muted: #4b5b70;
  --btn-fg: #ffffff; /* light text on darker accents */
  --on-accent: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-page);
  color: var(--text-strong);
  padding: 20px;
  transition: background 0.3s ease, color 0.2s ease;
}

header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-img {
  height: 120px;
  width: auto;
  border-radius: 12px;
  background: var(--card);
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

header h1 {
  font-size: 22px;
  margin-bottom: 4px;
}

header p {
  color: var(--text-muted);
  font-size: 14px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search {
  display: flex;
  gap: 8px;
  background: var(--glass);
  padding: 8px 12px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.search input, .select {
  background: transparent;
  border: none;
  color: var(--text-strong);
  outline: none;
}

input::placeholder {
  color: var(--text-muted);
}

.btn {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  color: var(--btn-fg);
  transition: 0.3s;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

main {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 25px;
}

aside {
  background: var(--glass);
  padding: 20px;
  border-radius: 12px;
  backdrop-filter: blur(12px);
}

.filters h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.filters input {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  background: var(--card);
  border: none;
  color: var(--text-strong);
  margin-bottom: 12px;
}

.chip {
  display: inline-block;
  margin: 5px 5px 0 0;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  transition: 0.3s;
}
.chip:hover {
  background: var(--accent);
  color: var(--on-accent);
}

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
  gap: 20px;
}

.card {
  background: var(--glass);
  border-radius: 14px;
  overflow: hidden;
  transition: 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.card:hover {
  transform: translateY(-8px);
  background: var(--glass-hover);
}

.media {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.card h3 {
  margin: 12px;
  font-size: 18px;
}
.card p {
  margin: 0 12px 12px;
  color: var(--text-muted);
}
.card strong {
  color: var(--accent-2);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal.show { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
}

.modal-panel {
  background: var(--card);
  border-radius: 14px;
  padding: 20px;
  max-width: 700px;
  width: 90%;
  z-index: 10;
  animation: popIn 0.3s ease;
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.carousel img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 15px;
}

.detail h2 {
  margin-bottom: 5px;
}
.detail p.price {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent);
  margin: 8px 0;
}

footer {
  margin-top: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

@media(max-width: 800px) {
  main {
    grid-template-columns: 1fr;
  }
  aside {
    order: 2;
  }
}
