/* ========== LAYOUT RAÇÕES ========== */
.racoes-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* ========== SIDEBAR FILTROS ========== */
.filters-sidebar {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  position: sticky;
  top: 80px;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
}

.filters-header h3 {
  font-size: 1rem;
  color: var(--gray-800);
}

.filters-clear {
  background: none;
  color: var(--primary);
  font-size: 0.8rem;
  padding: 0;
}

.filters-clear:hover {
  text-decoration: underline;
}

.filter-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-100);
}

.filter-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-section h4 {
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.filter-section .checkbox-group {
  max-height: 180px;
  overflow-y: auto;
}

.price-range {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.price-range input {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.price-range span {
  color: var(--gray-400);
  font-size: 0.85rem;
}

/* ========== GRID DE PRODUTOS ========== */
.products-area {
  min-width: 0;
}

.products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.products-count {
  font-size: 0.9rem;
  color: var(--gray-500);
}

.products-sort select {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.85rem;
  background: var(--white);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.products-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-500);
}

.products-empty svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  color: var(--gray-300);
}

/* ========== PRODUCT CARD ========== */
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-card-image {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  padding: 0.75rem;
}

.product-card-image img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.product-card-body {
  padding: 0.75rem 1rem 1rem;
}

.product-card-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.product-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.3;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-name a {
  color: inherit;
}

.product-card-name a:hover {
  color: var(--primary);
  text-decoration: none;
}

.product-card-brand {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 0.4rem;
}

.product-card-rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.product-card-rating .star {
  color: #f59e0b;
}

.product-card-rating .star.empty {
  color: var(--gray-300);
}

.product-card-rating .count {
  color: var(--gray-400);
  font-size: 0.75rem;
}

.product-card-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.product-card-price .from {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gray-500);
}

.product-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.compare-checkbox {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--gray-600);
  user-select: none;
}

.compare-checkbox input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.compare-checkbox.selected {
  color: var(--primary);
  font-weight: 600;
}

/* ========== MOBILE FILTER TOGGLE ========== */
.filter-toggle-mobile {
  display: none;
  width: 100%;
  margin-bottom: 1rem;
}

.filter-overlay {
  display: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .racoes-layout {
    grid-template-columns: 1fr;
  }

  .filters-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    border-radius: 0;
    overflow-y: auto;
    padding-top: 1rem;
  }

  .filters-sidebar.open {
    display: block;
  }

  .filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
  }

  .filter-overlay.open {
    display: block;
  }

  .filter-toggle-mobile {
    display: flex;
  }

  .filters-sidebar .filter-close {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
  }

  .filter-close button {
    background: none;
    font-size: 1.5rem;
    color: var(--gray-600);
    padding: 0.5rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
  }

  .product-card-image {
    height: 140px;
  }
}
