/* Estilos adicionais para layout fluid */
.container-fluid {
  padding-left: 20px;
  padding-right: 20px;
}

/* Layout corrigido para filtros */
.row {
  display: flex;
  flex-wrap: wrap;
}

/* Sidebar em seção independente */
.filters-section .sidebar-filters {
  max-width: 300px;
  margin: 0 auto;
  position: sticky;
  top: 20px;
}

/* Layout para telas grandes */
@media (min-width: 992px) {
  .filters-section .sidebar-filters {
    display: flex;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
  }

  /* Título centralizado */
  .filters-section .sidebar-filters h5 {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
    font-size: 1.2rem;
    color: #2c3e50;
    width: 100%;
  }

  /* Filtros organizados em grid */
  .filters-section .filter-group:first-child {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
  }

  .filters-section .filter-group:last-child {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
  }

  /* Alinhamento dos filtros */
  .filters-section .filter-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 50px;
  }

  .filters-section .filter-option:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  .filters-section .filter-option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
  }

  .filters-section .filter-option label {
    flex-grow: 1;
    margin-bottom: 0;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .filters-section .filter-option .badge {
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 30px;
    text-align: center;
    background: #6c757d !important;
  }
}

/* Grid de produtos organizado */
#productsGrid {
  margin-top: 20px;
}

#productsGrid .col-6,
#productsGrid .col-md-4,
#productsGrid .col-lg-3 {
  margin-bottom: 20px;
}

.product-card-compact {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card-compact .card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 15px;
}

.product-card-compact .card-img-top {
  height: 180px;
  object-fit: cover;
}

.product-card-compact .product-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #2c3e50;
  line-height: 1.4;
  height: auto;
  overflow: visible;
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}

.product-card-compact .product-description {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 10px;
  height: auto;
  overflow: visible;
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}

.product-card-compact .product-meta {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f8f9fa;
}

.product-card-compact .btn {
  margin-top: 10px;
}

/* Sidebar organizado */
.sidebar-filters {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid #eaeaea;
  margin-bottom: 20px;
  position: sticky;
  top: 20px;
}

.sidebar-filters {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid #eaeaea;
  margin-bottom: 20px;
}

.filter-group {
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}

.filter-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: #f8f9fa;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.filter-option:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

.filter-option input[type="radio"] {
  margin-right: 10px;
  cursor: pointer;
}

.filter-option label {
  flex-grow: 1;
  margin-bottom: 0;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #495057;
}

.filter-option .badge {
  font-size: 0.75rem;
  font-weight: 500;
  min-width: 30px;
  text-align: center;
}

.filter-group h5,
.filter-group h6 {
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #3498db;
}

/* Filtros Horizontais */
.horizontal-filters {
  margin: 20px 0;
}

.horizontal-filters .filter-option {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f8f9fa;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

.horizontal-filters .filter-option:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

.horizontal-filters .filter-option input[type="radio"] {
  margin-right: 8px;
  cursor: pointer;
}

.horizontal-filters .filter-option label {
  margin-bottom: 0;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #495057;
}

/* Grid de produtos mais compacto */
#productsGrid.list-view .col-6 {
  flex: 0 0 100%;
  max-width: 100%;
}

.product-card-compact {
  transition: all 0.3s ease;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
}

.product-card-compact:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.product-title {
  font-size: 0.95rem;
  line-height: 1.3;
  height: 2.6rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #2c3e50;
  font-weight: 600;
}

.product-description {
  font-size: 0.8rem;
  height: 2.4rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #6c757d;
}

.product-meta {
  font-size: 0.75rem;
}

.x-small {
  font-size: 0.75rem;
}

/* Ajustes para melhor espaçamento */
.card-body {
  padding: 1rem !important;
}

.quick-action-buttons {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card-compact:hover .quick-action-buttons {
  opacity: 1;
}

.quick-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #333;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.quick-action-btn:hover {
  background: #fff;
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Badges de status */
.product-badges {
  position: absolute;
  top: 10px;
  left: 10px;
}

.product-badges .badge {
  font-size: 0.7rem;
  padding: 4px 8px;
  font-weight: 600;
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Botão de ação do carrinho */
.cart-action-btn {
  width: 36px;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sistema de busca organizado */
.filters-container {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #eaeaea;
  margin-bottom: 20px;
  padding: 20px;
  margin-top: 1.5cm;
}

.search-box {
  position: relative;
  max-width: 100%;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  z-index: 2;
}

.search-box .form-control {
  padding-left: 45px;
  padding-right: 45px;
  border-radius: 8px;
  border: 1px solid #ced4da;
  transition: all 0.3s ease;
  height: 45px;
  font-size: 1rem;
}

.search-box .form-control:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.clear-search {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  cursor: pointer;
  font-size: 1rem;
  z-index: 2;
}

.clear-search:hover {
  color: #dc3545;
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
  max-height: 300px;
  overflow-y: auto;
}

/* Botões de visualização */
.view-options {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.view-options .btn {
  width: 45px;
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  background: white;
  color: #6c757d;
  transition: all 0.3s ease;
}

.view-options .btn:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

.view-options .btn.active {
  background: #2c3e50;
  color: white;
  border-color: #2c3e50;
}

/* Contador de resultados */
.results-counter {
  padding: 10px 0;
  color: #6c757d;
  font-size: 0.95rem;
  text-align: center;
  border-top: 1px solid #f8f9fa;
  margin-top: 15px;
}

/* Paginação organizada */
.pagination {
  margin-top: 30px;
}

.pagination .page-link {
  color: #2c3e50;
  border-color: #dee2e6;
  padding: 8px 12px;
  margin: 0 2px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.pagination .page-link:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
  color: #2c3e50;
}

.pagination .page-item.active .page-link {
  background: #2c3e50;
  border-color: #2c3e50;
  color: white;
}

/* Mensagem sem resultados */
#noResults {
  background: white;
  border-radius: 10px;
  padding: 40px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #eaeaea;
  margin-top: 20px;
}

#noResults i {
  color: #6c757d;
  margin-bottom: 20px;
}

#noResults h4 {
  color: #2c3e50;
  margin-bottom: 10px;
}

#noResults p {
  color: #6c757d;
  margin-bottom: 20px;
}

#noResults .btn {
  background: #2c3e50;
  border-color: #2c3e50;
  padding: 10px 20px;
  border-radius: 8px;
}

#noResults .btn:hover {
  background: #1a252f;
  border-color: #1a252f;
}

/* Modal de visualização rápida */
.quick-view-modal .modal-content {
  border-radius: 15px;
  overflow: hidden;
  border: none;
}

#whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  color: white;
}

/* Seção de agentes */
#agentes {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 2px solid #dee2e6;
  border-bottom: 2px solid #dee2e6;
}

.agentes-text {
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.6;
}

.titulo-agentes {
  color: #2c3e50;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Loading overlay */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#loading-overlay.active {
  display: flex;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
}

.spinner-circle {
  width: 100%;
  height: 100%;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 1.2rem;
  color: #666;
  font-weight: 500;
}

/* Footer ajustado */
.footer {
  background: #2c3e50;
  color: white;
  padding: 40px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h4 {
  color: white;
  margin-bottom: 20px;
  font-size: 1.2rem;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a,
.footer-section ul li {
  color: #bdc3c7;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.footer-section ul li a:hover {
  color: white;
}

.footer-section ul li i {
  width: 20px;
  margin-right: 8px;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  color: white;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.social-links a:hover {
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

.developer-credit {
  margin: 10px 0;
}

.developer-credit a {
  color: #3498db;
  text-decoration: none;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

.footer-links a {
  color: #bdc3c7;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: white;
}

/* Responsividade aprimorada */
@media (max-width: 992px) {
  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }

  .filters-section {
    position: static;
    width: 100%;
    height: auto;
    left: auto;
    top: auto;
    margin: 0;
    padding: 20px 0;
    overflow: visible;
  }

  .products-section {
    margin-left: 0;
    width: 100%;
    padding-top: 0;
  }

  .products-section .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }

  .filters-container {
    padding: 15px;
  }

  /* Organização dos filtros no mobile */
  .filters-section .sidebar-filters h5 {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    font-size: 1.1rem;
  }

  .filters-section .filter-option {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
  }

  .filters-section .filter-option:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
  }

  .view-options {
    justify-content: center;
    margin-top: 15px;
  }

  .search-box .form-control {
    font-size: 0.9rem;
    height: 40px;
  }

  .view-options .btn {
    width: 40px;
    height: 40px;
  }

  .product-card-compact .card-img-top {
    height: 150px;
  }

  .product-title {
    font-size: 0.9rem;
  }

  .product-description {
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  main {
    padding: 10px 0;
  }

  .container-fluid {
    padding-left: 10px;
    padding-right: 10px;
  }

  .col-6 {
    padding-left: 8px;
    padding-right: 8px;
  }

  .g-3 {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
  }

  .filters-container {
    padding: 15px !important;
  }

  .search-box .form-control {
    font-size: 0.9rem;
    padding-left: 40px;
    padding-right: 40px;
  }

  .search-icon {
    left: 12px;
  }

  .clear-search {
    right: 12px;
  }

  .product-card-compact .card-img-top {
    height: 120px;
  }

  .product-card-compact .card-body {
    padding: 12px;
  }

  .product-title {
    font-size: 0.85rem;
  }

  .product-description {
    font-size: 0.75rem;
  }

  .results-counter {
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .container-fluid {
    padding-left: 5px;
    padding-right: 5px;
  }

  .sidebar-filters {
    padding: 15px;
  }

  .filter-option {
    padding: 8px 10px;
    margin-bottom: 6px;
  }

  .filter-option label {
    font-size: 0.85rem;
  }

  .filters-container {
    padding: 10px !important;
  }

  .search-box .form-control {
    height: 38px;
    font-size: 0.85rem;
  }

  .view-options .btn {
    width: 38px;
    height: 38px;
  }

  .product-card-compact .card-img-top {
    height: 100px;
  }

  .product-card-compact .card-body {
    padding: 10px;
  }

  .product-title {
    font-size: 0.8rem;
  }

  .product-description {
    font-size: 0.7rem;
  }
}

/* Estilos para o contador do carrinho na sidebar */
#sidebarCartCount {
  color: #3498db;
  font-size: 1.5rem;
}

.filter-group h6 {
  font-size: 1rem;
  color: #495057;
  margin-bottom: 15px;
}

/* Ajuste para o modal mobile */
.mobile-filters-modal .filter-group {
  margin-bottom: 20px;
  border: none;
  padding: 0;
}

.mobile-filters-modal .filter-option {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  margin-bottom: 10px;
}

.mobile-filters-modal .modal-content {
  border-radius: 15px;
  overflow: hidden;
}

.mobile-filters-modal .modal-header {
  background: #2c3e50;
  color: white;
  border-bottom: none;
}

.mobile-filters-modal .modal-footer {
  border-top: 1px solid #dee2e6;
}

/* Estilos para o botão de filtro mobile */
.btn-dark {
  background: #2c3e50;
  border-color: #2c3e50;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-dark:hover {
  background: #1a252f;
  border-color: #1a252f;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Centralizar busca em telas grandes */
@media (min-width: 992px) {
  .filters-container .row {
    justify-content: center;
  }
  .filters-container .col-md-8 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .filters-container .col-md-4 {
    flex: 0 0 25%;
    max-width: 25%;
  }
}
