/* BCX Theme — archive-product.css, v1.2.0
   Categoria com sidebar esquerda (desktop) + bottom sheet (mobile)
   Mockup aprovado preview-categoria-desktop-mobile-guedes.html, 16/05/2026
*/

/* ─── Breadcrumb ─────────────────────────────────────────────── */
.bcx-breadcrumb {
  background: #fff;
  border-bottom: 1px solid var(--bcx-border, #E2E8F0);
}
.bcx-breadcrumb .bcx-container {
  padding: 8px 16px;
  font-size: 11px;
  color: var(--bcx-text-soft, #94A3B8);
  display: flex; align-items: center; gap: 4px;
  overflow-x: auto; white-space: nowrap;
}
@media (min-width: 768px) {
  .bcx-breadcrumb .bcx-container { padding: 10px 24px; font-size: 12px; }
}
.bcx-breadcrumb a { color: var(--bcx-text-soft, #94A3B8); text-decoration: none; }
.bcx-breadcrumb a:hover { color: var(--bcx-primary, #37B7FF); }
.bcx-breadcrumb .sep { opacity: 0.5; }
.bcx-breadcrumb .current { color: var(--bcx-text, #0F172A); font-weight: 600; }

/* ─── Vehicle context ────────────────────────────────────────── */
.bcx-vehicle-ctx {
  background: var(--bcx-primary-light, #DEF1FE);
  border-left: 4px solid var(--bcx-primary, #37B7FF);
}
.bcx-vehicle-ctx-inner {
  padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
}
@media (min-width: 768px) {
  .bcx-vehicle-ctx-inner { padding: 12px 24px; }
}
.bcx-vehicle-ctx svg { color: var(--bcx-primary-deep, #0F5E94); flex-shrink: 0; }
.bcx-vehicle-ctx-text { flex: 1; }
.bcx-vehicle-ctx-text small {
  font-size: 9px; font-weight: 700;
  color: var(--bcx-primary-deep, #0F5E94);
  text-transform: uppercase; letter-spacing: 0.5px;
  display: block;
}
.bcx-vehicle-ctx-text strong {
  font-size: 13px; font-weight: 800;
  color: var(--bcx-primary-deep, #0F5E94);
}
@media (min-width: 768px) { .bcx-vehicle-ctx-text strong { font-size: 15px; } }
.bcx-vehicle-ctx-action {
  background: #fff; color: var(--bcx-primary-deep, #0F5E94);
  border: 1px solid var(--bcx-primary, #37B7FF);
  padding: 5px 12px;
  font-size: 11px; font-weight: 700;
  border-radius: 100px;
  cursor: pointer;
}

/* ─── Header categoria ───────────────────────────────────────── */
.bcx-cat-header {
  background: #fff;
  border-bottom: 1px solid var(--bcx-border, #E2E8F0);
}
.bcx-cat-header .bcx-container { padding: 14px 16px; }
@media (min-width: 768px) { .bcx-cat-header .bcx-container { padding: 18px 24px; } }
.bcx-cat-title {
  font-size: 20px; font-weight: 900;
  color: var(--bcx-text, #0F172A);
  letter-spacing: -0.4px; line-height: 1.2;
  margin: 0 0 4px;
}
@media (min-width: 768px) { .bcx-cat-title { font-size: 26px; } }
.bcx-cat-count {
  font-size: 12px; color: var(--bcx-text-soft, #94A3B8);
  font-weight: 500; margin: 0;
}
@media (min-width: 768px) { .bcx-cat-count { font-size: 13px; } }

/* ─── Subcategorias chips ────────────────────────────────────── */
.bcx-subcats-wrap {
  background: #fff;
  border-bottom: 1px solid var(--bcx-border, #E2E8F0);
}
.bcx-subcats {
  display: flex; gap: 6px;
  padding: 10px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.bcx-subcats::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .bcx-subcats { padding: 10px 24px; gap: 8px; } }
.bcx-subcat {
  flex: 0 0 auto;
  background: var(--bcx-bg-soft, #F1F5F9);
  border: 1px solid var(--bcx-border, #E2E8F0);
  color: var(--bcx-text-mid, #475569);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 11px; font-weight: 700;
  white-space: nowrap; text-decoration: none;
}
.bcx-subcat:hover, .bcx-subcat.active {
  background: var(--bcx-primary, #37B7FF);
  border-color: var(--bcx-primary, #37B7FF);
  color: #fff;
}

/* ─── Layout 2 colunas (desktop) ─────────────────────────────── */
.bcx-shop-layout { background: var(--bcx-bg-soft, #F1F5F9); padding: 20px 0; }
.bcx-shop-grid {
  display: block;
  padding: 0 16px;
}
@media (min-width: 1024px) {
  .bcx-shop-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    padding: 0 24px;
  }
}

/* ─── Sidebar desktop / Bottom sheet mobile ──────────────────── */
.bcx-shop-sidebar {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  align-self: start;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
@media (min-width: 1024px) {
  .bcx-shop-sidebar {
    position: sticky; top: 16px;
    max-height: calc(100vh - 32px); overflow-y: auto;
  }
}
@media (max-width: 1023px) {
  .bcx-shop-sidebar {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 100; max-height: 90vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%); transition: transform 0.3s ease-out;
    display: flex; flex-direction: column;
    padding: 0;
  }
  .bcx-shop-sidebar.open { transform: translateY(0); }
  .bcx-shop-sidebar::before {
    content: ''; display: block;
    width: 36px; height: 4px;
    background: var(--bcx-border, #E2E8F0);
    border-radius: 100px;
    margin: 8px auto 0;
  }
}
.bcx-sidebar-header {
  display: flex; align-items: center;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--bcx-border, #E2E8F0);
  gap: 10px;
}
@media (max-width: 1023px) {
  .bcx-sidebar-header { padding: 12px 16px; margin: 0; }
}
.bcx-sidebar-header h3 {
  flex: 1; margin: 0;
  font-size: 15px; font-weight: 800;
  display: inline-flex; align-items: center; gap: 6px;
}
.bcx-sidebar-clear {
  background: none; border: none;
  color: var(--bcx-promo, #EF4444);
  font-size: 11px; font-weight: 700;
  cursor: pointer;
}
.bcx-sidebar-close {
  background: none; border: none;
  color: var(--bcx-text-soft, #94A3B8);
  cursor: pointer;
}
@media (min-width: 1024px) { .bcx-sidebar-close { display: none; } }

.bcx-sidebar-section {
  padding: 12px 0;
  border-bottom: 1px solid var(--bcx-border, #E2E8F0);
}
@media (max-width: 1023px) { .bcx-sidebar-section { padding: 0 16px; } }
.bcx-sidebar-section:last-child { border-bottom: none; }
.bcx-sidebar-section-header {
  display: flex; align-items: center;
  cursor: pointer;
  padding: 12px 0;
  user-select: none;
}
.bcx-sidebar-section-header strong {
  flex: 1;
  font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--bcx-text, #0F172A);
}
.bcx-sidebar-section-header svg {
  color: var(--bcx-text-soft, #94A3B8);
  transition: transform 0.2s;
}
.bcx-sidebar-section.collapsed .bcx-sidebar-section-header svg { transform: rotate(-90deg); }
.bcx-sidebar-section.collapsed .bcx-sidebar-section-body { display: none; }
.bcx-sidebar-section-body { padding-bottom: 12px; }

.bcx-filter-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  font-size: 13px;
}
.bcx-filter-opt input[type="checkbox"], .bcx-filter-opt input[type="radio"] {
  width: 18px; height: 18px;
  accent-color: var(--bcx-primary, #37B7FF);
  flex-shrink: 0;
}
.bcx-filter-opt span:first-of-type { flex: 1; }
.bcx-filter-opt-count {
  font-size: 11px;
  color: var(--bcx-text-soft, #94A3B8);
}

/* Range slider */
.bcx-range-wrap { padding: 4px 0; }
.bcx-range-bar {
  position: relative; height: 4px;
  background: var(--bcx-border, #E2E8F0);
  border-radius: 100px;
  margin: 12px 0 8px;
}
.bcx-range-bar-fill {
  position: absolute; top: 0; left: 0; right: 0; height: 100%;
  background: var(--bcx-primary, #37B7FF);
  border-radius: 100px;
}
.bcx-range-handle {
  position: absolute; top: -7px;
  width: 18px; height: 18px;
  background: var(--bcx-primary, #37B7FF);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  cursor: pointer;
}
.bcx-range-handle.left { left: -9px; }
.bcx-range-handle.right { right: -9px; }
.bcx-range-inputs { display: flex; gap: 8px; align-items: center; }
.bcx-range-inputs span { font-size: 12px; color: var(--bcx-text-soft, #94A3B8); }
.bcx-range-input {
  flex: 1; height: 36px; padding: 0 10px;
  background: var(--bcx-bg-soft, #F1F5F9);
  border: 1px solid var(--bcx-border, #E2E8F0);
  border-radius: 6px; font-size: 12px;
}

.bcx-sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--bcx-border, #E2E8F0);
  background: #fff;
  margin-top: auto;
  display: none;
}
@media (max-width: 1023px) {
  .bcx-sidebar-footer { display: block; box-shadow: 0 -4px 12px rgba(0,0,0,0.06); }
}

/* Overlay mobile */
.bcx-sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}
@media (min-width: 1024px) { .bcx-sidebar-overlay { display: none !important; } }

/* ─── Main area ──────────────────────────────────────────────── */
.bcx-shop-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Mobile filter+sort bar */
.bcx-filter-sort-bar {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 0;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
}
@media (min-width: 1024px) { .bcx-filter-sort-bar { display: none; } }
.bcx-filter-btn, .bcx-sort-select {
  background: var(--bcx-bg-soft, #F1F5F9);
  border: 1px solid var(--bcx-border, #E2E8F0);
  color: var(--bcx-text, #0F172A);
  padding: 10px 12px;
  font-size: 12px; font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.bcx-filter-btn .bcx-filter-count {
  background: var(--bcx-primary, #37B7FF);
  color: #fff;
  font-size: 9px; font-weight: 800;
  padding: 1px 6px; border-radius: 100px;
}
.bcx-sort-select {
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

/* Desktop toolbar */
.bcx-shop-toolbar {
  display: none;
}
@media (min-width: 1024px) {
  .bcx-shop-toolbar {
    display: flex; align-items: center; gap: 12px;
    background: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  }
}
.bcx-toolbar-count { flex: 1; font-size: 13px; color: var(--bcx-text-mid, #475569); }
.bcx-toolbar-count strong { color: var(--bcx-text, #0F172A); }
.bcx-toolbar-count span { margin-left: 4px; }
.bcx-view-toggle {
  display: flex; gap: 2px;
  background: var(--bcx-bg-soft, #F1F5F9);
  border-radius: 6px; padding: 2px;
}
.bcx-view-toggle button {
  width: 32px; height: 32px;
  background: transparent; border: none;
  color: var(--bcx-text-soft, #94A3B8);
  border-radius: 4px;
  display: grid; place-items: center;
  cursor: pointer;
}
.bcx-view-toggle button.active {
  background: #fff;
  color: var(--bcx-primary-deep, #0F5E94);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* Applied chips */
.bcx-applied-chips {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 8px 0;
}
.bcx-applied-chip {
  background: var(--bcx-primary-light, #DEF1FE);
  border: 1px solid var(--bcx-primary, #37B7FF);
  color: var(--bcx-primary-deep, #0F5E94);
  padding: 4px 4px 4px 10px;
  border-radius: 100px;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px;
}
.bcx-applied-chip-x {
  background: var(--bcx-primary, #37B7FF); color: #fff;
  border: none; cursor: pointer;
  width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; line-height: 1;
}
.bcx-applied-clear {
  background: none; border: none;
  color: var(--bcx-promo, #EF4444);
  font-size: 11px; font-weight: 700;
  cursor: pointer; padding: 4px 8px;
}

/* Grid produtos (override do WC) */
.bcx-shop-main ul.products,
.bcx-shop-main .products {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0; padding: 0; list-style: none;
}
@media (min-width: 768px) {
  .bcx-shop-main ul.products,
  .bcx-shop-main .products { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
.bcx-shop-main ul.products::before,
.bcx-shop-main ul.products::after { display: none !important; }
.bcx-shop-main li.product { width: 100% !important; margin: 0 !important; padding: 0 !important; }

/* Load more */
.bcx-load-more {
  text-align: center;
  padding: 16px 0;
}
.bcx-load-more button {
  background: #fff;
  border: 2px solid var(--bcx-primary, #37B7FF);
  color: var(--bcx-primary-deep, #0F5E94);
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 800; font-size: 13px;
  cursor: pointer;
}
.bcx-load-more-meta {
  font-size: 10px; color: var(--bcx-text-soft, #94A3B8);
  margin-top: 8px;
}

/* Empty state */
.bcx-empty-state {
  text-align: center;
  padding: 48px 16px;
}
.bcx-empty-state svg { color: var(--bcx-text-soft, #94A3B8); margin-bottom: 12px; }
.bcx-empty-state h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.bcx-empty-state p { color: var(--bcx-text-mid, #475569); margin-bottom: 16px; }

/* SEO content rodapé */
.bcx-cat-seo {
  background: #fff;
  padding: 20px 0;
  border-top: 1px solid var(--bcx-border, #E2E8F0);
}
.bcx-cat-seo .bcx-container {
  font-size: 13px; line-height: 1.7;
  color: var(--bcx-text-mid, #475569);
}
.bcx-cat-seo h2 { font-size: 16px; font-weight: 800; margin-bottom: 8px; color: var(--bcx-text, #0F172A); }
.bcx-cat-seo h3 { font-size: 13.5px; font-weight: 700; margin: 12px 0 4px; color: var(--bcx-text, #0F172A); }
