/* =============================================
   DELIGHTPK — CATEGORIES PAGE CSS
   Consistent with Home.css design system
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #ff6b00;
  --primary-light: #fff3e8;
  --primary-glow: rgba(255,107,0,0.18);
  --bg: #f2f2f7;
  --card-bg: #ffffff;
  --text-dark: #1a1a2e;
  --text-mid: #555577;
  --text-light: #999;
  --border: #e8e8f0;
  --sidebar-w: 100px;
  --header-h: 60px;
  --bar-h: 64px;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ─── Header ─────────────────────────────── */
.main-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: linear-gradient(135deg, #ff6b00, #ff9500);
  display: flex;
  align-items: center;
  padding: 0 14px;
  z-index: 9999;
  box-shadow: 0 3px 16px rgba(255,107,0,0.35);
}

.header-left {
  display: flex; align-items: center; gap: 10px;
}

.logo-wrap {
  width: 40px; height: 40px;
  background: white; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  overflow: hidden; flex-shrink: 0;
}
.logo-wrap img { width: 42px; height: 42px; object-fit: contain; }

.brand-name {
  font-family: 'Poppins', sans-serif;
  font-size: 22px; font-weight: 800;
  color: white; letter-spacing: 0.5px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.brand-name span { color: rgba(255,255,255,0.85); }

/* ─── Sidebar ────────────────────────────── */
.sidebar {
  position: fixed;
  top: var(--header-h);
  bottom: var(--bar-h);
  left: 0; right: calc(100% - var(--sidebar-w));
  width: var(--sidebar-w);
  background: white;
  border-right: 1.5px solid var(--border);
  overflow-y: auto;
  z-index: 100;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-item {
  width: 100%;
  padding: 12px 4px;
  cursor: pointer;
  text-align: center;
  color: var(--text-mid);
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}

.sidebar-item img {
  width: 32px; height: 32px;
  object-fit: contain;
}

.sidebar-item span {
  line-height: 1.2;
  font-size: 10px;
}

.sidebar-item:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.sidebar-item.active {
  background: var(--primary-light);
  border-left-color: var(--primary);
  color: var(--primary);
}

.sidebar-item.active img {
  filter: drop-shadow(0 0 3px rgba(255,107,0,0.4));
}

/* ─── Content Area ───────────────────────── */
.content {
  margin-top: var(--header-h);
  margin-left: var(--sidebar-w);
  padding: 14px 12px;
  min-height: calc(100vh - var(--header-h) - var(--bar-h));
  padding-bottom: calc(var(--bar-h) + 10px);
}

.content h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 15px; font-weight: 800;
  color: var(--primary);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
  display: flex; align-items: center; gap: 6px;
}

/* ─── Sub Grid ───────────────────────────── */
.sub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sub-item {
  text-align: center;
  cursor: pointer;
  background: white;
  border-radius: 12px;
  padding: 12px 6px 10px;
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s, border-color 0.2s;
}

.sub-item:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 6px 20px rgba(255,107,0,0.15);
  border-color: rgba(255,107,0,0.3);
}

.sub-item img {
  width: 52px; height: 52px;
  object-fit: contain;
  margin-bottom: 6px;
  border-radius: 8px;
  padding: 4px;
  background: var(--bg);
}

.sub-item span {
  display: block;
  font-size: 11px; font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}

/* ─── Bottom Nav ─────────────────────────── */
.bar {
  position: fixed;
  bottom: 8px; left: 50%;
  transform: translateX(-50%) translateY(120%);
  width: 92%; max-width: 400px;
  display: flex; justify-content: space-around;
  background: linear-gradient(135deg, #e53838, #ef6000);
  padding: 8px 6px 10px;
  border-radius: 26px;
  z-index: 9999;
  box-shadow: 0 8px 28px rgba(255,107,0,0.4), 0 2px 8px rgba(0,0,0,0.1);
  animation: slideUpBar 0.7s cubic-bezier(0.34,1.56,0.64,1) 0.2s forwards;
}

@keyframes slideUpBar {
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
  from { transform: translateX(-50%) translateY(120%); opacity: 0; }
}

.bar a {
  text-decoration: none;
  color: rgba(255,255,255,0.8);
  font-family: 'Nunito', sans-serif;
  font-size: 10px; font-weight: 800;
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  padding: 4px 12px; border-radius: 16px;
  flex: 1; text-transform: uppercase; letter-spacing: 0.6px;
  transition: all 0.25s ease;
}

.bar a img {
  width: 22px; height: 22px;
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.bar a span { line-height: 1; margin-top: -1px; }

.bar a.active, .bar a:hover {
  color: white; background: rgba(255,255,255,0.22);
}

.bar a.active img, .bar a:hover img {
  opacity: 1; transform: translateY(-3px) scale(1.15);
}

.bar a.active::after {
  content: ''; width: 4px; height: 4px;
  background: white; border-radius: 50%; margin-top: 1px;
  box-shadow: 0 0 6px rgba(255,255,255,0.9);
}