/* ===========================================================
   ROOT THEME VARIABLES
=========================================================== */
:root {
  --bg: #ffffff;
  --muted: #6b7280;
  --card: #ffffff;
  --border: #e6e9ee;
  --accent: #0f172a;
}

/* ===========================================================
   GLOBAL
=========================================================== */
* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: #f3f5f7;
  font-family: "Poppins", sans-serif;
  color: var(--accent);
}

.app {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===========================================================
   MOBILE OVERLAY (for sidebar close)
=========================================================== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
  display: none;        /* hidden by default */
  z-index: 900;
}

.overlay.show {
  display: block;
}

/* ===========================================================
   SIDEBAR + TOGGLE BUTTON
=========================================================== */
.sidebar {
  width: 220px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 25px;
  box-shadow: 0 6px 18px rgba(12,18,24,0.03);

  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;

  transform: translateX(0);
  transition: transform 0.35s ease;
  z-index: 1000;
}

.sidebar.hidden {
  transform: translateX(-250px);
}

/* Sidebar Toggle Button */
.sidebar-btn {
  position: absolute;
  top: 28px;
  left: 240px;

  font-size: 32px;
  background: transparent;
  color: #0b3b8a;
  border: none;
  padding: 0;
  border-radius: 0;
  cursor: pointer;
  z-index: 1100;
  transition: color 0.3s ease;
}

.sidebar-btn:hover {
  color: #072d6b;
}

.sidebar.hidden + .main .sidebar-btn {
  left: 20px;
}

/* ===========================================================
   SIDEBAR CONTENT
=========================================================== */
.brand {
  font-family: "Ephesis";
  font-size: 38px;
  font-weight: 400;
  color: #0b3b8a;
  margin-bottom: 10px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 10px 0;
  opacity: 0.6;
}

.nav-item {
  padding: 10px 6px;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
}

.nav-item.active {
  background: #f2f6ff;
  color: #0b3b8a;
  font-weight: 600;
}

/* ===========================================================
   MAIN AREA
=========================================================== */
.main {
  flex: 1;
  padding: 28px 36px;
  margin-left: 220px;
  transition: margin-left 0.35s ease;
}

.sidebar.hidden ~ .main {
  margin-left: 0;
}

/* Dashboard Title */
.dashboard-title {
  text-align: center;
  font-size: 75px;
  font-weight: 400;
  color: #0b3b8a;
  font-family: "Island Moments", cursive;

  margin: 0;
  padding-top: 0;
  padding-bottom: 20px;
  letter-spacing: 5px;
}

/* ===========================================================
   TOP BAR
=========================================================== */
.topbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.selectors {
  display: flex;
  gap: 12px;
  align-items: end;
}

.select-wrap label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  min-width: 160px;
}

.location-title {
  margin-top: 6px;
  font-weight: 700;
  font-size: 32px;
}

/* ===========================================================
   3×2 GRID
=========================================================== */
.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.big-card {
  background: var(--card);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(8,12,20,0.03);
  min-height: 170px;
}

/* ===========================================================
   CARD CONTENT
=========================================================== */
.card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 10px;
}

.big-price {
  font-size: 28px;
  font-weight: 800;
  margin-top: 5px;
  color: #111;
}

.subtext {
  font-size: 13px;
  color: var(--muted);
}

/* ===========================================================
   PURITY BUTTONS
=========================================================== */
.purity-global {
  display: flex;
  gap: 10px;
  margin: 10px 0 20px 0;
}

.purity-global .purity-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #f9fafb;
  font-size: 14px;
  cursor: pointer;
  transition: 0.25s;
}

.purity-global .purity-btn.active {
  background: #0b3b8a;
  color: white;
  border-color: #0b3b8a;
}

/* ===========================================================
   COMPARISON — UPDATED
=========================================================== */
.comparison {
  margin-top: 40px;
  font-size: x-large;
}

.compare-controls {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 25px;
}

.compare-grid {
  display: flex;
  gap: 20px;
}

.compare-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.compare-card {
  background: var(--card);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(8,12,20,0.03);
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.compare-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.btn {
  padding: 10px 14px;
  border-radius: 8px;
  background: #0b3b8a;
  color: #fff;
  border: 0;
  cursor: pointer;
}

.compare-card div:last-child {
  font-size: 26px;
  font-weight: 800;
  color: #111;
}

/* ===========================================================
   RESPONSIVE
=========================================================== */
@media (max-width: 900px) {
  .cards-grid-3 {
    grid-template-columns: 1fr;
  }

  .main {
    margin-left: 0;
  }

  /* Hide sidebar by default on mobile */
  .sidebar {
    transform: translateX(-250px);
  }

  .sidebar-btn {
    top: 20px;
    left: 20px;
  }
}
