/* ========================================
   SECTION PRODUTOS - CSS Completo
   ======================================== */

/* ===== CART OVERLAY & SIDEBAR ===== */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100%;
  background: white;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}

.cart-sidebar.active {
  right: 0;
}

.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.close-cart {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: color 0.2s ease;
}

.close-cart:hover {
  color: #111827;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cart-item-info span:first-child {
  font-weight: 500;
}

.cart-item-info span:last-child {
  color: #10b981;
  font-weight: 600;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-item-controls button {
  background: #f3f4f6;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #6b7280;
  transition: all 0.2s ease;
}

.cart-item-controls button:hover {
  background: #ef4444;
  color: white;
}

.cart-quantity-input {
  width: 50px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  text-align: center;
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.send-order-button {
  width: 100%;
  padding: 1rem;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s ease;
}

.send-order-button:hover {
  background: #059669;
}

.empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.empty-cart-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-cart p {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

#continueShopping {
  padding: 0.75rem 1.5rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease;
}

#continueShopping:hover {
  background: #2563eb;
}

/* ===== SEARCH CARD ===== */
.search-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.search-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.logo-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.company-logo {
  max-height: 80px;
  max-width: 200px;
  object-fit: contain;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: #9ca3af;
  font-size: 1.125rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.filter-badge {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: #dbeafe;
  color: #1e40af;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
}

.filter-badge.hidden {
  display: none;
}

.remove-filter {
  background: transparent;
  border: none;
  color: #1e40af;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  padding: 0;
  margin-left: 0.5rem;
}

.cart-wrapper {
  display: flex;
  justify-content: center;
}

.cart-button {
  padding: 0.75rem 1.5rem;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s ease;
}

.cart-button:hover {
  background: #059669;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.btn-filter {
  flex: 1;
  padding: 0.75rem 1rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-filter:hover {
  background: #e5e7eb;
}

.view-toggle {
  display: flex;
  gap: 0.5rem;
}

.btn-view {
  padding: 0.75rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-view:hover {
  background: #e5e7eb;
}

.btn-view.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }
}

/* ===== CATEGORY MENU ===== */
.category-menu {
  position: sticky;
  top: 1rem;
  height: fit-content;
}

.category-menu.mobile-hidden {
  display: none;
}

@media (min-width: 1024px) {
  .category-menu.mobile-hidden {
    display: block;
  }
}

.menu-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.menu-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-clear {
  padding: 0.5rem 1rem;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.2s ease;
}

.btn-clear:hover {
  background: #dc2626;
}

.btn-clear.hidden {
  display: none;
}

.menu-content {
  max-height: 70vh;
  overflow-y: auto;
}

/* ===== SECTIONS, CATEGORIES, SUBCATEGORIES ===== */
.sections-list {
  padding: 0.5rem;
}

.section-item {
  margin-bottom: 0.5rem;
}

.section-header,
.category-header {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #f9fafb;
  border: none;
  border-radius: 0.5rem;
  text-align: left;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}

.section-header:hover,
.category-header:hover {
  background: #f3f4f6;
}

.section-header i,
.category-header i {
  transition: transform 0.2s ease;
}

.section-header.expanded i,
.category-header.expanded i {
  transform: rotate(90deg);
}

.categories-list {
  padding-left: 1rem;
  margin-top: 0.5rem;
}

.category-item {
  margin-bottom: 0.5rem;
}

.subcategories-list {
  padding-left: 1rem;
  margin-top: 0.5rem;
}

.subcategory-item {
  padding: 0.75rem 1rem;
  background: white;
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.subcategory-item:hover {
  background: #eff6ff;
  color: #2563eb;
}

.subcategory-item.active {
  background: #dbeafe;
  color: #1e40af;
  font-weight: 600;
}

.subcategory-item span:last-child {
  background: #e5e7eb;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

.subcategory-item.active span:last-child {
  background: #93c5fd;
  color: #1e3a8a;
}

/* ===== PRODUCTS CONTAINER ===== */
.products-container {
  min-height: 400px;
}

.no-products {
  background: white;
  border-radius: 1rem;
  padding: 3rem 2rem;
  text-align: center;
  color: #6b7280;
}

.no-products.hidden {
  display: none;
}

.no-products-content {
  font-size: 1.125rem;
}

/* ===== PRODUCTS GRID ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.products-grid.list-view {
  grid-template-columns: 1fr;
}

.product-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.product-card.list-view {
  flex-direction: row;
}

.product-image-container {
  position: relative;
  width: 100%;
  padding-top: 75%;
  overflow: hidden;
  background: #f9fafb;
}

.list-view .product-image-container {
  padding-top: 0;
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}

.product-image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image-container img {
  transform: scale(1.05);
}

.favorite-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 40px;
  height: 40px;
  background: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: #9ca3af;
  transition: all 0.2s ease;
  z-index: 10;
}

.favorite-btn:hover {
  color: #ef4444;
  transform: scale(1.1);
}

.product-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.product-info > div:first-child {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-info h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: #111827;
  line-height: 1.4;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.75rem;
}

.product-footer span {
  font-size: 1.25rem;
  font-weight: 700;
  color: #10b981;
}

.buy-btn,
.details-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.buy-btn {
  background: #10b981;
  color: white;
}

.buy-btn:hover {
  background: #059669;
  transform: scale(1.05);
}

.details-btn {
  background: #f3f4f6;
  color: #374151;
  font-size: 0.875rem;
}

.details-btn:hover {
  background: #e5e7eb;
}

/* ===== ORDER MODAL ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 1rem;
  max-width: 600px;
  width: 100%;
  padding: 2rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #f3f4f6;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.close-btn:hover {
  background: #e5e7eb;
}

.progress-section {
  margin-bottom: 2rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.stepTitle {
  font-weight: 600;
  color: #111827;
}

.progress-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 1rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  transition: width 0.3s ease;
}

.step-content {
  min-height: 300px;
  margin-bottom: 2rem;
}

.modal-navigation {
  display: flex;
  gap: 1rem;
}

.nav-btn {
  flex: 1;
  padding: 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.back-btn {
  background: #f3f4f6;
  color: #374151;
}

.back-btn:hover {
  background: #e5e7eb;
}

.next-btn,
.submit-btn {
  background: #10b981;
  color: white;
}

.next-btn:hover,
.submit-btn:hover {
  background: #059669;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .search-content {
    gap: 0.75rem;
  }

  .controls {
    flex-direction: column;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .product-info h3 {
    font-size: 1rem;
  }

  .product-footer span {
    font-size: 1rem;
  }

  .modal-content {
    padding: 1.5rem;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== UTILITY CLASSES ===== */
.hidden {
  display: none !important;
}
