/* Catálogo - Estilos da Loja */

/* Hero Section */
.catalog-hero {
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    var(--bg-tertiary) 100%
  );
  padding: 120px 0 80px;
  text-align: center;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.catalog-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.catalog-hero .container {
  position: relative;
  z-index: 2;
}

.catalog-hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.catalog-hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Search Bar */
.search-bar {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-container {
  position: relative;
  display: flex;
  background: var(--bg-primary);
  border-radius: 50px;
  box-shadow: 0 10px 30px var(--shadow);
  overflow: hidden;
}

.search-container input {
  flex: 1;
  padding: 15px 20px;
  border: none;
  outline: none;
  font-size: 1rem;
  background: transparent;
  color: var(--text-primary);
}

.search-container button {
  padding: 15px 25px;
  background: #16a34a;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-container button:hover {
  background: #15803d;
}

/* Filters Section */
.filters-section {
  background: var(--bg-secondary);
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.filters-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.filters-left {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

.filters-right {
  display: flex;
  gap: 15px;
  align-items: center;
}

.filter-dropdown {
  position: relative;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  color: var(--text-primary);
}

.filter-btn:hover,
.filter-dropdown.active .filter-btn {
  border-color: #16a34a;
  color: #16a34a;
}

.filter-dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 25px var(--shadow);
  min-width: 200px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.filter-dropdown.active .filter-dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.filter-option {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid var(--border-secondary);
  color: var(--text-primary);
}

.filter-option:last-child {
  border-bottom: none;
}

.filter-option:hover {
  background: var(--bg-secondary);
}

.filter-option.active {
  background: #16a34a;
  color: white;
}

/* Sort and View Controls */
.sort-select {
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg-primary);
  cursor: pointer;
  outline: none;
  transition: border-color 0.3s ease;
  color: var(--text-primary);
}

.sort-select:focus {
  border-color: #16a34a;
}

.view-toggle {
  display: flex;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.view-btn {
  padding: 10px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-secondary);
}

.view-btn.active {
  background: #16a34a;
  color: white;
}

/* Products Section */
.products-section {
  padding: 60px 0;
  background: var(--bg-primary);
}

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

.results-count {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

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

/* Product Card */
.product-card {
  background: var(--bg-primary);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  border: 2px solid transparent;
  cursor: pointer;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(22, 163, 74, 0.05) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.product-card:hover::before {
  opacity: 1;
}

.product-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.2);
  border-color: #16a34a;
}

.product-card:active {
  transform: translateY(-8px);
  transition: transform 0.1s ease;
}

.product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 15px;
  max-height: 85%;
  max-width: 85%;
  background: #ffffff;
}

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

.product-card:hover .product-image {
  background: #f8fafc;
  border-color: #d1d5db;
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #16a34a;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.product-actions {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 2;
}

.product-card:hover .product-actions {
  opacity: 1;
  transform: translateX(0);
}

.action-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  color: var(--text-secondary);
}

.action-btn:hover {
  background: #16a34a;
  color: white;
  transform: scale(1.15);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.3);
}

.product-info {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-header {
  display: flex;
  gap: 12px;
  margin-bottom: 0;
}

.product-category {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.product-brand {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border-secondary);
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-specs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border-left: 3px solid #16a34a;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.spec-item i {
  color: #16a34a;
  font-size: 0.9rem;
}

.spec-more {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  border: 1px dashed var(--border-secondary);
}

.price-old {
  color: var(--text-secondary);
  text-decoration: line-through;
  font-size: 0.9rem;
  font-weight: 500;
}

.price-main {
  font-size: 1.5rem;
  font-weight: 800;
  color: #16a34a;
  line-height: 1;
}

.price-pix {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #16a34a;
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.price-pix i {
  font-size: 1rem;
}

.price-pix .pix-text {
  font-size: 0.8rem;
  opacity: 0.9;
}

.price-pix .pix-value {
  font-size: 1rem;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid var(--border-secondary);
}

.product-price {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-secondary);
}

.product-actions-bottom {
  display: flex;
  gap: 12px;
  margin-top: 0;
}

.btn-add-cart,
.btn-quote {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-add-cart {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.3);
}

.btn-add-cart:hover {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.4);
}

.btn-quote {
  background: transparent;
  color: #16a34a;
  border: 2px solid #16a34a;
}

.btn-quote:hover {
  background: #16a34a;
  color: white;
  transform: translateY(-2px);
}

/* List View Styles */
.products-grid.list-view .product-card {
  display: flex;
  align-items: center;
  padding: 20px;
}

.products-grid.list-view .product-image {
  width: 150px;
  height: 150px;
  flex-shrink: 0;
  margin-right: 20px;
  aspect-ratio: 1;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.products-grid.list-view .product-info {
  flex: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.products-grid.list-view .product-footer {
  margin-top: 15px;
  padding-top: 15px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 50px;
}

.pagination button {
  padding: 10px 15px;
  border: 2px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.pagination button:hover:not(:disabled) {
  border-color: #16a34a;
  color: #16a34a;
}

.pagination button.active {
  background: #16a34a;
  border-color: #16a34a;
  color: white;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 60px 0;
  color: var(--text-secondary);
}

.loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top: 2px solid #16a34a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* No Results */
.no-results {
  text-align: center;
  padding: 60px 0;
  color: var(--text-secondary);
}

.no-results i {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

/* Estilos para PIX e Cartão */
.price-current {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #16a34a;
  margin-bottom: 5px;
}

.price-current .fa-pix {
  color: #32bcad;
  font-size: 20px;
}

.pix-text {
  font-size: 14px;
  font-weight: 600;
  color: #32bcad;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.installment {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
}

.installment .fa-credit-card {
  color: var(--text-secondary);
}

.price-old {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 5px;
  display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
  .catalog-hero h1 {
    font-size: 2.5rem;
  }

  .filters-container {
    flex-direction: column;
    align-items: stretch;
  }

  .filters-left,
  .filters-right {
    justify-content: center;
  }

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

  .products-grid.list-view .product-card {
    flex-direction: column;
    text-align: center;
  }

  .products-grid.list-view .product-image {
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
  }

  .products-grid.list-view .product-info {
    padding: 0 20px 20px;
  }

  .price-current {
    font-size: 1rem;
  }

  .installment {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .catalog-hero {
    padding: 100px 0 60px;
  }

  .catalog-hero h1 {
    font-size: 2rem;
  }

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

  .search-container {
    flex-direction: column;
    border-radius: 12px;
  }

  .search-container button {
    border-radius: 0 0 12px 12px;
  }
}

/* Product Modal Styles */
.product-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

.product-modal.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 1000 !important;
  pointer-events: auto !important;
  background: rgba(0, 0, 0, 0.8) !important;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: var(--bg-primary);
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-overlay {
  animation: modalFadeIn 0.3s ease-out;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: #16a34a;
  color: white;
  transform: scale(1.1);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.modal-image {
  position: relative;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 40px;
}

.modal-info {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
}

.modal-category {
  background: #16a34a;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-brand {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
}

.modal-description {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.modal-specs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-specs .spec-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border-left: 4px solid #16a34a;
}

.modal-specs .spec-item i {
  color: #16a34a;
  font-size: 1.1rem;
}

.modal-specs .spec-item span {
  color: var(--text-primary);
  font-weight: 500;
}

.modal-price {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 2px solid var(--border-secondary);
}

.modal-price .price-old {
  color: var(--text-secondary);
  text-decoration: line-through;
  font-size: 1rem;
  font-weight: 500;
}

.modal-price .price-main {
  font-size: 2.5rem;
  font-weight: 800;
  color: #16a34a;
  line-height: 1;
}

.modal-price .price-pix {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #16a34a;
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
}

.modal-price .price-pix i {
  font-size: 1.2rem;
}

.modal-price .price-pix .pix-text {
  font-size: 0.9rem;
  opacity: 0.9;
}

.modal-price .price-pix .pix-value {
  font-size: 1.1rem;
}

.modal-actions {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.btn-add-cart-modal,
.btn-quote-modal {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-add-cart-modal {
  background: #16a34a;
  color: white;
}

.btn-add-cart-modal:hover {
  background: #15803d;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.4);
}

.btn-quote-modal {
  background: #25d366;
  color: white;
}

.btn-quote-modal:hover {
  background: #128c7e;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

/* Modal Mobile Responsive */
@media (max-width: 768px) {
  .modal-body {
    grid-template-columns: 1fr;
  }

  .modal-image {
    min-height: 250px;
  }

  .modal-info {
    padding: 30px 20px;
  }

  .modal-title {
    font-size: 1.5rem;
  }

  .modal-price .price-main {
    font-size: 2rem;
  }

  .modal-actions {
    flex-direction: column;
  }

  .btn-add-cart-modal,
  .btn-quote-modal {
    width: 100%;
  }
}
