:root {
  --sidebar: 260px;
}

/* ── BREADCRUMB ─────────────────────── */
.pb-crumb {
  background: #f9f9f9;
  border-bottom: 1px solid #eee;
  padding: 10px 20px;
  font-size: 0.78rem;
  color: #888;
}
.pb-crumb a {
  color: #555;
  text-decoration: none;
  transition: color 0.12s;
}
.pb-crumb a:hover {
  color: var(--orange);
}
.pb-crumb span {
  color: #111;
  font-weight: 600;
}

/* ── LAYOUT ─────────────────────────────── */
.products-layout {
  display: flex;
  gap: 0;
  max-width: 100%;
  min-height: 80vh;
}

/* ── SIDEBAR ─────────────────────────────── */
.prod-sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: white;
  border-right: 1.5px solid #eee;
  padding: 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.prod-sidebar::-webkit-scrollbar {
  width: 4px;
}
.prod-sidebar::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 4px;
}

.sidebar-section {
  border-bottom: 1.5px solid #f0f0f0;
  padding: 18px 16px;
}
.sidebar-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-section-title a {
  font-size: 0.68rem;
  color: var(--orange);
  font-weight: 700;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}

/* Category list */
.cat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cat-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #444;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
}
.cat-item:hover {
  background: #fff3eb;
  color: var(--orange);
}
.cat-item.active {
  background: var(--orange);
  color: white;
  font-weight: 700;
}
.cat-item.active i {
  color: white;
}
.cat-item i {
  font-size: 0.82rem;
  width: 16px;
  text-align: center;
  color: #888;
}
.cat-item.active i,
.cat-item:hover i {
  color: inherit;
}
.cat-count {
  margin-left: auto;
  font-size: 0.68rem;
  background: #f0f0f0;
  color: #777;
  padding: 2px 7px;
  border-radius: 10px;
}
.cat-item.active .cat-count {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

/* Price range */
.price-range-wrap {
  padding: 4px 0;
}
.price-inputs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.price-input {
  flex: 1;
  border: 1.5px solid #e0e0e0;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 0.78rem;
  outline: none;
  text-align: center;
  transition: border 0.15s;
}
.price-input:focus {
  border-color: var(--orange);
}
.price-sep {
  display: flex;
  align-items: center;
  font-size: 0.78rem;
  color: #999;
}
.price-apply-btn {
  width: 100%;
  background: #111;
  color: white;
  border: none;
  border-radius: 7px;
  padding: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.price-apply-btn:hover {
  background: var(--orange);
}

/* Rating filter */
.rating-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rating-opt {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.8rem;
  color: #555;
  transition: background 0.12s;
  text-decoration: none;
}
.rating-opt:hover {
  background: #fff3eb;
  color: var(--orange);
}
.rating-opt.active {
  background: #fff3eb;
  color: var(--orange);
  font-weight: 700;
}
.stars-mini {
  color: #f59e0b;
  font-size: 0.75rem;
}

/* ── MAIN AREA ──────────────────────────── */
.prod-main {
  flex: 1;
  min-width: 0;
  background: #f9f9f9;
}

/* Category tabs scrollable */
.cat-tabs-strip {
  background: white;
  border-bottom: 2px solid #f0f0f0;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 20px;
}
.cat-tabs-strip::-webkit-scrollbar {
  display: none;
}
.cat-tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #777;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}
.cat-tab-btn:hover {
  color: #111;
  border-bottom-color: #e0e0e0;
}
.cat-tab-btn.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}
.cat-tab-btn i {
  font-size: 0.82rem;
}

/* Toolbar */
.prod-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: white;
  border-bottom: 1.5px solid #eee;
  flex-wrap: wrap;
  gap: 10px;
}
.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar-title {
  font-size: 1rem;
  font-weight: 800;
  color: #111;
}
.toolbar-count {
  font-size: 0.78rem;
  color: #999;
}
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sort-select {
  border: 1.5px solid #e0e0e0;
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 0.8rem;
  outline: none;
  background: white;
  cursor: pointer;
  transition: border 0.15s;
}
.sort-select:focus {
  border-color: var(--orange);
}
.view-toggle {
  display: flex;
  gap: 4px;
}
.view-btn {
  width: 32px;
  height: 32px;
  border: 1.5px solid #e0e0e0;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  transition: all 0.15s;
}
.view-btn.active,
.view-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.active-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff3eb;
  color: var(--orange);
  border: 1px solid #ffd6b3;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}
.filter-chip a {
  color: var(--orange);
  text-decoration: none;
  font-size: 0.78rem;
  margin-left: 2px;
}

/* Product grid — equal columns, max 6 per row */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 20px;
}
.prod-grid.list-view {
  grid-template-columns: 1fr;
}

/* Product card */
.pc {
  min-width: 0;
  background: white;
  border: 1.5px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
  position: relative;
}
.pc:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
  border-color: #ddd;
}
.pc-img-wrap {
  height: 200px;
  background: #f5f5f5;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pc-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.pc:hover .pc-img-wrap img {
  transform: scale(1.04);
}
.pc-emoji {
  font-size: 4rem;
}
.pc-badge-disc {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #dc2626;
  color: white;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  z-index: 1;
}
.pc-badge-hot {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--orange);
  color: white;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}
.pc-wishlist {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  background: white;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 0.9rem;
}
.pc:hover .pc-wishlist {
  opacity: 1;
}
.pc-body {
  padding: 12px;
}
.pc-cat {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.pc-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
  margin-bottom: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pc-name a {
  text-decoration: none;
  color: inherit;
}
.pc-name a:hover {
  color: var(--orange);
}
.pc-prices {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 5px;
}
.pc-price {
  font-size: 1rem;
  font-weight: 800;
  color: #111;
}
.pc-old {
  font-size: 0.75rem;
  color: #bbb;
  text-decoration: line-through;
}
.pc-rating {
  font-size: 0.72rem;
  color: #888;
  margin-bottom: 10px;
}
.pc-rating .stars {
  color: #f59e0b;
}
.pc-add {
  width: 100%;
  background: #111;
  color: white;
  border: none;
  border-radius: 7px;
  padding: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.pc-add:hover {
  background: var(--orange);
}
.pc-add.adding {
  background: #888;
  pointer-events: none;
}
.pc-add.added {
  background: #16a34a;
}

/* List view card */
.prod-grid.list-view .pc {
  display: flex;
  flex-direction: row;
}
.prod-grid.list-view .pc-img-wrap {
  width: 180px;
  height: 160px;
  flex-shrink: 0;
  border-radius: 12px 0 0 12px;
}
.prod-grid.list-view .pc-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}
.prod-grid.list-view .pc-add {
  max-width: 200px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #aaa;
}
.empty-state i {
  font-size: 3rem;
  margin-bottom: 14px;
  display: block;
  color: #ddd;
}
.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #555;
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 0.85rem;
  margin-bottom: 20px;
}
.empty-state a {
  display: inline-block;
  background: var(--orange);
  color: white;
  padding: 11px 28px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 30px 20px;
}
.pg-btn {
  width: 38px;
  height: 38px;
  border: 1.5px solid #e0e0e0;
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #555;
  text-decoration: none;
  transition: all 0.15s;
}
.pg-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.pg-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
}
.pg-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}
.pg-dots {
  color: #aaa;
  padding: 0 4px;
}

/* Mobile sidebar toggle */
.mob-filter-btn {
  display: none;
  align-items: center;
  gap: 7px;
  background: #111;
  color: white;
  border: none;
  padding: 9px 16px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.mob-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 500;
}
.mob-sidebar-overlay.open {
  display: block;
}

@media (max-width: 1400px) {
  .prod-grid:not(.list-view) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .prod-grid:not(.list-view) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .prod-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    height: 100vh;
    z-index: 501;
    transition: left 0.3s;
    width: 280px;
  }
  .prod-sidebar.open {
    left: 0;
  }
  .mob-filter-btn {
    display: flex;
  }
  .cat-tabs-strip {
    display: none;
  }
  .prod-grid:not(.list-view) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .prod-grid:not(.list-view) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
  }
  .pc-img-wrap {
    height: 160px;
  }
  .prod-grid.list-view {
    grid-template-columns: 1fr;
  }
  .prod-grid.list-view .pc {
    flex-direction: column;
  }
  .prod-grid.list-view .pc-img-wrap {
    width: 100%;
    height: 180px;
    border-radius: 12px 12px 0 0;
  }
}
