/* =====================================================
   sidebar-v2.css — Dark catalog sidebar nav
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700&display=swap');

/* ── Container overrides ──────────────────────────── */
.products-sidebar {
  background: #13141a;
  padding: 0;
  border-right: 1px solid rgba(200,140,20,0.06);
}

/* ── Eyebrow header ───────────────────────────────── */
.s-eyebrow {
  padding: 14px 16px 11px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #9a7838;
  border-bottom: 1px solid rgba(200,140,20,0.08);
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #13141a 0%, #16150f 50%, #13141a 100%);
  font-family: 'DM Sans', sans-serif;
}

.s-eyebrow::before {
  content: '';
  position: absolute;
  bottom: 0; left: 16px; right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,140,20,0.3), transparent);
}

.s-eyebrow::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(220,160,30,0.18), transparent);
  animation: sbShimmer 3.5s ease-in-out infinite;
}

@keyframes sbShimmer {
  0%   { left: -80%; opacity: 0; }
  10%  { opacity: 1; }
  60%  { left: 160%; opacity: 1; }
  65%  { opacity: 0; }
  100% { left: 160%; opacity: 0; }
}

/* ── Category block ───────────────────────────────── */
.cat {
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.cat:last-child { border-bottom: none; }

/* ── Category header row ──────────────────────────── */
.cat-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px 11px 16px;
  cursor: pointer;
  transition: background 0.18s;
  position: relative;
  user-select: none;
}

.cat-head:hover { background: rgba(255,255,255,0.025); }

.cat-head.open {
  background: linear-gradient(90deg, rgba(200,140,20,0.07) 0%, rgba(200,140,20,0.02) 60%, transparent 100%);
}

.cat-head.open::after {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, #f0a820, #c8870a);
  box-shadow:
    0 0 8px rgba(240,168,32,0.8),
    0 0 20px rgba(200,135,10,0.4);
}

/* ── Category number ──────────────────────────────── */
.cat-num {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #3a3d48;
  line-height: 1;
  width: 22px;
  flex-shrink: 0;
  transition: color 0.25s, text-shadow 0.25s;
}

.cat-head.open .cat-num {
  color: #c8870a;
  text-shadow: 0 0 12px rgba(200,135,10,0.5);
}

.cat-head:hover .cat-num { color: #505360; }

/* ── Text block ───────────────────────────────────── */
.cat-text { flex: 1; }

.cat-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #6a6d7a;
  letter-spacing: 0.01em;
  line-height: 1.3;
  transition: color 0.2s;
}

.cat-head:hover .cat-name { color: #8a8d9a; }

.cat-head.open .cat-name {
  color: #ddd8cc;
  text-shadow: 0 0 20px rgba(200,150,50,0.15);
}

.cat-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  color: #42454f;
  margin-top: 1px;
  transition: color 0.2s;
}

.cat-head:hover .cat-count { color: #565a66; }
.cat-head.open .cat-count { color: #6b5520; }

/* ── Chevron icon ─────────────────────────────────── */
.cat-chevron {
  width: 14px; height: 14px;
  color: #4a4d5a;
  opacity: 0.65;
  transition: transform 0.22s ease, opacity 0.2s, color 0.2s;
  flex-shrink: 0;
}

.cat-head.open .cat-chevron {
  transform: rotate(180deg);
  opacity: 1;
  color: #c8870a;
}

.cat-head:hover .cat-chevron { opacity: 0.85; }

/* ── Items list ───────────────────────────────────── */
.cat-items {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-items.open {
  max-height: 400px;
}

.cat-items-inner {
  padding: 3px 0 8px 49px;
}

/* ── Item links / buttons ─────────────────────────── */
.item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 0;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #2e3040;
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  transition: color 0.18s, text-shadow 0.25s;
  position: relative;
  opacity: 0;
  transform: translateX(-8px);
  animation: none;
}

.cat-items.open .item {
  animation: sbFadeSlideIn 0.3s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

.cat-items.open .item:nth-child(1) { animation-delay: 0.05s; }
.cat-items.open .item:nth-child(2) { animation-delay: 0.12s; }
.cat-items.open .item:nth-child(3) { animation-delay: 0.19s; }
.cat-items.open .item:nth-child(4) { animation-delay: 0.26s; }
.cat-items.open .item:nth-child(5) { animation-delay: 0.33s; }
.cat-items.open .item:nth-child(6) { animation-delay: 0.40s; }

@keyframes sbFadeSlideIn {
  0%   { opacity: 0; transform: translateX(-8px); }
  100% { opacity: 1; transform: translateX(0); }
}

.item::before {
  content: '';
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #484b58;
  flex-shrink: 0;
  transition: background 0.18s, box-shadow 0.25s, transform 0.2s;
}

.item:hover { color: #7a7d8c; }
.item:hover::before {
  background: #5a5d6a;
  transform: scale(1.4);
}

.item.active {
  color: #d4cfc4;
  text-shadow: 0 0 16px rgba(200,150,50,0.35);
}

.item.active::before {
  background: #c8870a;
  width: 5px; height: 5px;
  box-shadow:
    0 0 6px rgba(200,135,10,0.8),
    0 0 14px rgba(200,135,10,0.4);
}

/* ── Link-only row (no sub-items) ─────────────────── */
.cat-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px 10px 16px;
  cursor: pointer;
  transition: background 0.18s;
  text-decoration: none;
}

.cat-link:hover { background: rgba(255,255,255,0.03); }

.cat-link .cat-num { color: #3a3d48; }
.cat-link:hover .cat-num { color: #505360; }

.cat-link .cat-name { color: #6a6d7a; }
.cat-link:hover .cat-name { color: #8a8d9a; }

.cat-link .cat-count { color: #42454f; }

.cat-link-arrow {
  margin-left: auto;
  font-size: 11px;
  color: #4a4d5a;
  transition: color 0.15s, transform 0.15s;
}

.cat-link:hover .cat-link-arrow {
  color: #7a7d8c;
  transform: translateX(3px);
}

/* ── CTA / manual overrides for new bg ────────────── */
.products-sidebar .sidebar-cta {
  margin-top: auto;
  padding: 1.25rem 1rem;
  border-top: 1px solid rgba(200,140,20,0.08);
}

.products-sidebar .sidebar-manual-card {
  padding: 0 0.875rem 1.25rem;
  border-top: 1px solid rgba(200,140,20,0.06);
}

/* ── Mobile — compact vertical accordion ─────────── */
@media (max-width: 768px) {

  /* Reset any horizontal-bar styles from other stylesheets */
  .products-sidebar {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    white-space: normal !important;
    padding: 0 !important;
    border-right: none;
    border-bottom: 1px solid rgba(200,140,20,0.12);
    scrollbar-width: auto;
  }

  .products-sidebar::-webkit-scrollbar { display: initial; }

  /* sidebar-inner stays as normal block */
  .sidebar-inner { display: block; }

  /* Compact eyebrow */
  .s-eyebrow {
    display: block;
    padding: 9px 14px 8px;
    font-size: 8px;
    letter-spacing: 0.18em;
  }

  /* Category rows — keep full width, reduce padding slightly */
  .cat {
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }

  .cat-head {
    display: flex !important;
    background: none !important;
    padding: 10px 14px 10px 14px;
    border-radius: 0;
    gap: 10px;
    white-space: normal;
  }

  .cat-head.open {
    background: linear-gradient(90deg, rgba(200,140,20,0.07) 0%, transparent 100%) !important;
  }

  .cat-head::after {
    display: block;
    top: 5px; bottom: 5px;
  }

  /* Show numbers on mobile — they anchor the layout */
  .cat-num {
    display: block;
    font-size: 13px;
    width: 20px;
  }

  /* Show chevron on mobile */
  .cat-chevron {
    display: block;
    width: 13px; height: 13px;
  }

  /* Slightly smaller text */
  .cat-name {
    font-size: 11.5px;
    white-space: normal;
  }

  /* Hide sub-label counts on mobile to save space */
  .cat-count { display: none; }

  /* Items — keep in-flow (no position:absolute) */
  .cat-items {
    position: static;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .cat-items.open { max-height: 300px; }

  .cat-items-inner {
    padding: 2px 14px 8px 44px;
    display: block;
  }

  /* Item links — compact row of pills */
  .item {
    display: inline-flex !important;
    width: auto !important;
    padding: 3px 11px !important;
    margin: 3px 4px 3px 0 !important;
    background: rgba(255,255,255,0.06) !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    color: rgba(255,255,255,0.45) !important;
    text-shadow: none !important;
  }

  .item::before { display: none !important; }

  .item.active {
    background: rgba(200,140,20,0.18) !important;
    color: #c8870a !important;
    text-shadow: none !important;
  }

  /* Link-only rows */
  .cat-link {
    display: flex !important;
    padding: 10px 14px 10px 14px !important;
    border-radius: 0 !important;
    background: none !important;
    white-space: normal !important;
  }

  .cat-link .cat-num { color: #3a3d48; }
  .cat-link .cat-name { font-size: 11.5px; }
  .cat-link-arrow { display: block; }

  /* Hide CTA and manual card */
  .products-sidebar .sidebar-cta,
  .products-sidebar .sidebar-manual-card { display: none; }
}
