:root {
  --primary-color: #40B25C;
  --primary-dark: #338647;
  --secondary-color: #4CAF50;
  --accent-color: #8BC34A;
  --background-color: #f5f5f5;
  --text-color: #2d3436;
  --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
}

header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  padding: 0.75rem 1rem;
}

#header-category {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: hsla(0, 0%, 100%, .95);
  color: var(--primary-color);
  padding: 13px 16px;
  font-size: 1.2rem;
  font-weight: 600;
  border-bottom: 1px solid #eee;
  z-index: 1000;
  text-transform: uppercase;
  font-family: -apple-system, HelveticaNeueMedium, HelveticaNeue-Medium, Helvetica Neue Medium, Helvetica Neue, Roboto, Droid Sans, Arial Bold, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#scroll-top {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 4px;
  text-transform: uppercase;
  font-family: inherit;
}

#scroll-top .up-arrow {
  width: 20px;
  height: 20px;
}

.search-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1rem;
  margin-top: 1rem;
}

.search-box {
  display: flex;
  align-items: center;
  background-color: white;
  padding: 0.625rem 1rem;
  border-radius: 3px;
  flex-grow: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-icon {
  width: 20px;
  height: 20px;
  margin-right: 0.75rem;
  opacity: 0.4;
}

#search-input {
  border: none;
  outline: none;
  font-size: 1rem;
  width: 100%;
  background: transparent;
  color: #333;
}

#search-input::placeholder {
  color: var(--primary-color);
  font-weight: 600;
}

.search-counter {
  padding: 1rem;
  font-size: 0.9rem;
  color: #666;
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.no-results {
  text-align: center;
  padding: 4rem 1rem;
  grid-column: 1 / -1;
  margin-top: -3rem;
}

.search-icon-large {
  width: 80px;
  height: 80px;
  opacity: 0.6;
  margin-bottom: 1rem;
}

.search-term {
  color: var(--primary-color);
  font-weight: 500;
  white-space: normal;
  word-break: break-word;
  margin-right: 110px;
}

.results-count {
  font-style: italic;
  white-space: nowrap;
}

.suggestions {
  margin-top: 1.5rem;
}

.suggestions p {
  color: #666;
  margin-bottom: 0.75rem;
}

.suggestion {
  background: rgba(64, 178, 92, 0.1);
  border: none;
  border-radius: 20px;
  color: var(--primary-color);
  padding: 8px 16px;
  margin: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  display: inline-block;
}

.suggestion:hover {
  background: rgba(64, 178, 92, 0.2);
  transform: translateY(-1px);
}

.cart-icon {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}

.cart-button-icon {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.cart-count {
  position: absolute;
  top: -1px;
  right: -3px;
  background: #ff4444;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100%;
  background: white;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: right 0.3s ease;
}

.cart-sidebar.active {
  right: 0;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.cart-overlay.active {
  display: block;
}

.cart-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.cart-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.close-cart.back-arrow {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.cart-items {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(100vh - 180px);
}

.cart-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-weight: 500;
  margin-bottom: 5px;
}

.cart-item-pricing {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.cart-old-price {
  color: #757575;
  text-decoration: line-through;
  font-size: 0.875rem;
}

.cart-item-price {
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 1.2rem;
}

.cart-item-quantity {
  margin-bottom: 10px;
}

.remove-item {
  background: none;
  border: none;
  color: #ff4444;
  cursor: pointer;
  margin-right: 10px;
  font-size: 0.875rem;
}

.finalize-btn {
  background-color: #28a745;
  color: #fff;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
}

.cart-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: white;
  border-top: 1px solid #eee;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 1.125rem;
  font-weight: 600;
}

.total-amount {
  color: #333;
}

@media (max-width: 480px) {
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }
}

.notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(51, 51, 51, 0.9);
  color: #fff;
  padding: 16px 24px;
  border-radius: 8px;
  z-index: 200000000000000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 500;
}

.notification-icon {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.logo-container {
  text-align: center;
  margin: 0 auto;
  margin-top: 1.3rem;
}

.logo-container img {
  width: 200px;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px;
  margin: 0 auto;
  max-width: 1200px;
  justify-content: center;
}

.badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  padding: 8px 12px;
  border-radius: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  min-width: 160px;
}

.icon-container {
  background: var(--primary-color);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.badge-icon {
  width: 18px;
  height: 18px;
}

.badge-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
  white-space: nowrap;
}

.custom-alert {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: 16px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  padding: 24px 32px;
  position: relative;
  overflow: hidden;
  max-width: 800px;
  margin: 20px auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.custom-alert .alert-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.custom-alert .alert-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.custom-alert .alert-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.custom-alert .main-message {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.custom-alert .sub-message {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.95;
  letter-spacing: 0.3px;
}

.custom-alert::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.category-heading {
  grid-column: 1 / -1;
  font-size: 1.8rem;
  margin: 2.3rem 0 1rem;
  color: var(--text-color);
  position: relative;
  font-weight: bold;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(64, 178, 92, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.discount {
  position: absolute;
  top: 1.925rem;
  right: 0.625rem;
  background-color: var(--secondary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.product-image {
  width: 100%;
  object-fit: cover;
}

.product-info {
  padding: 0.75rem 0.875rem;
}

.tag {
  background-color: var(--accent-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.product-info h2 {
  font-size: 0.938rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  line-height: 1.4;
  height: 2.8em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.price-info {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(64, 178, 92, 0.06);
}

.old-price {
  font-size: 0.875rem;
  color: #757575;
  text-decoration: line-through;
  margin-bottom: 0.25rem;
}

.price {
  color: var(--secondary-color);
  font-size: 1.25rem;
  font-weight: 700;
}

.product-view {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-view.active {
  display: flex;
  opacity: 1;
}

.product-view-content {
  background: white;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  position: relative;
}

.header-product-view {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #fff;
  padding: 0.2rem 0.1em;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 10;
}

.back-button {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0.25rem;
  color: var(--primary-color);
}

.back-button:hover {
  background-color: #f5f5f5;
  border-radius: 50%;
}

.header-product-name {
  font-size: 1.2rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70vw;
}

.product-view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.product-image-container {
  position: relative;
}

.product-view-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.discount-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--secondary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
}

.product-details {
  padding: 1rem;
}

.product-header {
  margin-bottom: 2rem;
}

.product-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--accent-color);
  color: white;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.product-tag.promoção {
  background: var(--accent-color);
}

.product-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.2;
}

.product-pricing {
  margin-bottom: 2rem;
}

.price-block {
  margin-bottom: 1rem;
}

.old-price {
  display: block;
  color: #666;
  text-decoration: line-through;
  font-size: 1.25rem;
}

.current-price {
  display: block;
  color: var(--secondary-color);
  font-size: 3rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.installment-info {
  display: block;
  color: #666;
  font-size: 0.875rem;
}

.product-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.buy-button,
.cart-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.2rem;
}

.buy-button {
  background: var(--secondary-color);
  color: white;
}

.buy-button:hover {
  background: var(--primary-dark);
}

.cart-button {
  background: #e0e0e0;
  color: var(--text-color);
}

.cart-button:hover {
  background: #d0d0d0;
}

.product-description {
  color: var(--text-color);
}

.product-description h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.product-description p {
  line-height: 1.6;
  color: #666;
}

.recommended-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: #f9f9f9;
  border-top: 1px solid #ddd;
  margin: 0 auto;
  max-width: 1400px;
}

.recommended-section h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: #333;
}

.recommended-products {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.recommended-products .product-card {
  flex: 1 1 calc(33.333% - 1rem);
  min-width: 150px;
  max-width: 200px;
  background-color: #fff;
  border: 1px solid #eee;
  padding: 0.5rem;
  transition: transform 0.2s;
}

.recommended-products .product-card:hover {
  transform: translateY(-5px);
}

@media (max-width: 1024px) {
  .product-view-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .product-title {
    font-size: 1.5rem;
  }

  .current-price {
    font-size: 2rem;
  }

  .product-actions {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  header {
    padding: 0.75rem 1rem;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .product-info {
    padding: 0.75rem;
  }

  .product-info h2 {
    font-size: 0.875rem;
    height: 2.5em;
  }

  .price {
    font-size: 1.335rem;
  }

  .old-price {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .trust-badges {
    gap: 12px;
    padding: 12px;
  }

  .badge {
    min-width: auto;
    padding: 6px 10px;
  }

  .badge-text {
    font-size: 12px;
  }

  .icon-container {
    width: 28px;
    height: 28px;
  }

  .custom-alert {
    margin: 12px;
    padding: 14px;
    border-radius: 10px;
  }

  .custom-alert .alert-icon {
    width: 24px;
    height: 24px;
  }

  .custom-alert .main-message {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
  }

  .custom-alert .sub-message {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.95;
    letter-spacing: 0.3px;
  }


  .search-term {
    margin-right: 30px;
  }

}

.product-view-footer {
  padding: 2rem 1rem;
  text-align: center;
  border-top: 1px solid #e5e7eb;
  margin-top: auto;
  background: #f8f9fa;
  font-size: 0.875rem;
  color: #6b7280;
}

.product-view-footer p {
  margin: 0.25rem 0;
}

@media (max-width: 768px) {
  .product-view-footer {
    padding: 1.5rem 1rem;
    font-size: 0.8rem;
  }
}

.minimal-footer {
  border-top: 1px solid #e5e7eb;
  padding: 2rem 1rem;
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  gap: 1rem;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.legal-links a {
  color: #4b5563;
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.legal-links a:hover {
  color: #3b82f6;
}

.social-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.social-links a {
  color: #6b7280;
  line-height: 0;
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: #3b82f6;
}

.footer-bottom {
  text-align: center;
  color: #6b7280;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  order: -1; /* Garante que vem primeiro no mobile */
}

@media (max-width: 768px) {
  .minimal-footer {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 1rem 1.5rem;
  }

  .footer-content {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 2rem;
  }

  .legal-links {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  .footer-bottom {
    order: 0;
    margin-bottom: 1rem;
  }
}