
/* ── SIDEBAR ───────────────────────────────── */
.sidebar-box {
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 8px;
  overflow: hidden;
  transition: background 0.3s;
}
[data-theme="dark"] .sidebar-box {
  border-color: rgba(255, 255, 255, 0.07);
}

.sidebar-header {
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .sidebar-header {
  border-color: rgba(255, 255, 255, 0.07);
}

.sidebar-icon {
  color: var(--mvt-green);
  font-size: 0.8rem;
}

.flt-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.flt-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  padding: 0.3rem 0;
  cursor: pointer;
  color: var(--text-main);
}
.flt-label:hover {
  color: var(--mvt-green);
}
.flt-label input[type="checkbox"] {
  accent-color: var(--mvt-green);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  cursor: pointer;
}
.flt-count {
  margin-left: auto;
  font-size: 0.72rem;
  color: #888;
}

.flt-divider {
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .flt-divider {
  border-color: rgba(255, 255, 255, 0.07);
}

/* Price range */
.price-display {
  font-size: 0.8rem;
}
.price-current {
  color: var(--mvt-green);
  font-weight: 600;
}

.range-track {
  position: relative;
  height: 4px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 2px;
  margin: 0.6rem 0 0.3rem;
}
[data-theme="dark"] .range-track {
  background: rgba(255, 255, 255, 0.12);
}
.range-track input[type="range"] {
  position: absolute;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  height: 4px;
  background: transparent;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.range-track input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--mvt-green);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--mvt-green);
  cursor: pointer;
  transition: transform 0.2s;
}
.range-track input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
.range-track input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--mvt-green);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--mvt-green);
  cursor: pointer;
}
.range-fill {
  position: absolute;
  height: 100%;
  background: var(--mvt-green);
  border-radius: 2px;
  pointer-events: none;
}
.range-hint {
  font-size: 0.75rem;
}

/* Sidebar buttons */
.btn-apply {
  background: var(--mvt-green);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem;
  width: 100%;
  cursor: pointer;
  transition: background 0.25s;
}
.btn-apply:hover {
  background: #1e7e34;
}

.btn-clear-link {
  background: none;
  border: none;
  color: #888;
  font-size: 0.78rem;
  width: 100%;
  cursor: pointer;
  padding: 0.3rem 0;
  text-align: center;
  display: block;
  text-decoration: none;
  transition: color 0.2s;
}
.btn-clear-link:hover {
  color: var(--mvt-green);
}

/* ── TOOLBAR ───────────────────────────────── */
.toolbar {
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  transition: background 0.3s;
}
[data-theme="dark"] .toolbar {
  border-color: rgba(255, 255, 255, 0.07);
}

.count-txt {
  font-size: 0.85rem;
}
.count-txt strong {
  color: var(--mvt-green);
}

.gbtn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: var(--bg-body);
  color: #888;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: var(--transition-smooth);
}
[data-theme="dark"] .gbtn {
  border-color: rgba(255, 255, 255, 0.12);
  color: #aaa;
}
.gbtn:hover,
.gbtn.active {
  background: var(--mvt-green);
  border-color: var(--mvt-green);
  color: #fff;
}

.sort-sel {
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  font-size: 0.83rem;
  padding: 0.3rem 0.7rem;
  background: var(--bg-body);
  color: var(--text-main);
  cursor: pointer;
}
[data-theme="dark"] .sort-sel {
  border-color: rgba(255, 255, 255, 0.12);
}
.sort-sel:focus {
  border-color: var(--mvt-green);
  outline: none;
}

/* Active filter tags */
.af-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(40, 167, 69, 0.1);
  color: var(--mvt-green);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  cursor: pointer;
  border: 1px solid rgba(40, 167, 69, 0.25);
}
.af-tag:hover {
  background: rgba(40, 167, 69, 0.2);
}

/* ── PRODUCT CARD ──────────────────────────── */
.pc {
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  transition: var(--transition-smooth);
}
[data-theme="dark"] .pc {
  border-color: rgba(255, 255, 255, 0.07);
}
.pc:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}
[data-theme="dark"] .pc:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.pc-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.badge-pct {
  background: #f7b731;
  color: #111;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.48rem;
  border-radius: 4px;
}
.badge-tag {
  background: var(--mvt-green);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
}

.pc-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  opacity: 0;
  transform: translateX(4px);
  transition: var(--transition-smooth);
}
.pc:hover .pc-actions {
  opacity: 1;
  transform: none;
}

.pa {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
  transition:
    background 0.2s,
    color 0.2s;
}
.pa:hover {
  background: var(--mvt-green);
  color: #fff;
}

/* Imagen siempre cuadrada */
.pc-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
}
[data-theme="dark"] .pc-img-wrap {
  background: #2a2a2a;
}
.pc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.45s ease;
}
.pc:hover .pc-img {
  transform: scale(1.06);
}

.pc-body {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.pc-brand {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mvt-green);
  margin-bottom: 0.2rem;
}
.pc-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 0.6rem;
  flex: 1;
}

.pc-regular {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #999;
  margin-bottom: 0.1rem;
}
.pc-regular .strike {
  text-decoration: line-through;
}

.pc-online {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}
.online-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--mvt-green);
}
.online-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--mvt-green);
}

.pc-cuota {
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 0.75rem;
}
.pc-cuota strong {
  color: var(--text-main);
  font-weight: 600;
}

.btn-ver {
  background: var(--mvt-green);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  transition:
    background 0.25s,
    transform 0.25s;
}
.btn-ver:hover {
  background: #1e7e34;
  color: #fff;
  transform: translateY(-1px);
}
.btn-ver-icon {
  font-size: 0.65rem;
}

/* Vista lista */
.list-view .pc {
  flex-direction: row;
}
.list-view .pc-img-wrap {
  width: 160px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}
.list-view .pc-body {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem;
}
.list-view .pc-name {
  margin-bottom: 0;
  min-width: 130px;
}
.list-view .pc-cuota {
  margin-bottom: 0;
}
.list-view .btn-ver {
  width: auto;
  padding: 0.45rem 1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Animation delays por nth-child */
.pc-col:nth-child(1) .pc {
  animation-delay: 0.04s;
}
.pc-col:nth-child(2) .pc {
  animation-delay: 0.08s;
}
.pc-col:nth-child(3) .pc {
  animation-delay: 0.12s;
}
.pc-col:nth-child(4) .pc {
  animation-delay: 0.16s;
}
.pc-col:nth-child(5) .pc {
  animation-delay: 0.2s;
}
.pc-col:nth-child(6) .pc {
  animation-delay: 0.24s;
}
.pc-col:nth-child(7) .pc {
  animation-delay: 0.28s;
}
.pc-col:nth-child(8) .pc {
  animation-delay: 0.32s;
}
.pc-col:nth-child(9) .pc {
  animation-delay: 0.36s;
}

/* ── PAGINACIÓN ────────────────────────────── */
.pg-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 0.4rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.13);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.pg-btn-ellipsis {
  border: none;
  cursor: default;
}
[data-theme="dark"] .pg-btn {
  border-color: rgba(255, 255, 255, 0.1);
}
.pg-btn:hover {
  border-color: var(--mvt-green);
  color: var(--mvt-green);
}
.pg-btn.active {
  background: var(--mvt-green);
  border-color: var(--mvt-green);
  color: #fff;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.pc {
  animation: fadeUp 0.45s ease both;
}



@media (max-width: 460px) {
  #prodGrid .pc-col {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}