/* ============================================
   CATEGORY BUTTON (open panel)
============================================ */

.cat-btn-title {
  display: inline-block;
  margin-top: .75rem;
  padding: .6rem 1rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2,132,199,.45);
  transition: transform .2s ease, box-shadow .2s ease;
}

.cat-btn-title:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2,132,199,.55);
}

/* ============================================
   CATEGORY PANEL (ALL DEVICES)
============================================ */

.category-panel {
  position: fixed;
  top: 0;
  right: 0;

  width: 360px;
  max-width: 92vw;
  height: 100 vh; /*dynamic viewport */

  background: #fff;
  z-index: 1000;

  display: flex;
  flex-direction: column;

  /* START OFF-SCREEN */
  transform: translate3d(110%, 0, 0);
  transition: transform 0.32s cubic-bezier(.4,0,.2,1);

  box-shadow: -10px 0 30px rgba(0,0,0,.18);

  will-change: transform;
  backface-visibility: hidden;
}

/* OPEN */
.category-panel.open {
  transform: translate3d(0, 0, 0);
}


/* ============================================
   CATEGORY PANEL HEADER
============================================ */

.category-panel-header {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.05rem;
}

.category-panel-header button {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

/* ============================================
   CATEGORY GRID (SCROLLABLE)
============================================ */

.category-panel .category-grid {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

/* ============================================
   CATEGORY CARD
============================================ */

.cat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border-radius: 14px;
  padding: 22px 20px;
  text-decoration: none;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.cat-card.active {
  border: 2px solid #0ea5e9;
  box-shadow: 0 0 10px rgba(14,165,233,0.4);
}

/* ============================================
   CATEGORY TITLE + EMOJI
============================================ */

.cat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.cat-title span:first-child {
  font-size: 1.8rem;
}

.cat-desc {
  font-size: .95rem;
  color: #475569;
  line-height: 1.5;
}

/* ============================================
   CATEGORY CARD FOOTER
============================================ */

.cat-footer {
  margin-top: 16px;
  text-align: center;
}

.cat-btn {
  display: inline-block;
  background: #0ea5e9;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  transition: background .2s ease;
}

.cat-card:hover .cat-btn {
  background: #0284c7;
}

/* ============================================
   OVERLAY
============================================ */

#categoryOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 999;
}

#categoryOverlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   PROFILE SWITCHER
============================================ */

.profile-switcher {
  margin: 10px 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.9rem;
}

.profile-switcher .label {
  color: #475569;
}

.profile-switcher .badge {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  text-decoration: none;
  color: #0f172a;
  transition: all .2s ease;
}

.profile-switcher .badge:hover {
  background: #e0f2fe;
  border-color: #0ea5e9;
}

.profile-switcher .badge.active {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #fff;
}

/* ============================================
   CONTENT TOP
============================================ */

.content-top {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.content-top .top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
}

/* ============================================
   MOBILE TUNING (SLIDE STILL ENABLED)
============================================ */

@media (max-width: 768px) {
  .category-panel {
    width: 100%;
    max-width: 420px;
    border-radius: 16px 0 0 16px;
  }
}
