/* Home Page Styles */

.header {
  padding: 20px 12px;
  background-color: var(--bg-secondary);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-greeting p {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
}

.header-greeting h2 {
  color: var(--text-primary);
  font-size: 20px;
  margin: 4px 0 0 0;
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  overflow: hidden;
  display: block;
  flex-shrink: 0;
}

.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-container {
  padding: 20px 12px;
}

.search-bar {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
}

.search-filter {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.search-filter:hover {
  color: var(--text-primary);
  background-color: var(--bg-card);
}

.banner-section {
  padding: 0 12px 0;
  margin-bottom: 0 !important;
  margin-top: 0;
}

.carousel {
  height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Desktop: Banner com altura maior e proporção melhor */
@media (min-width: 769px) {
  .carousel {
    height: 800px;
    max-width: 95%;
    margin: 0 auto;
  }

  .carousel-item {
    height: 1000px !important;
  }

  .banner-section {
    max-width: 95%;
    margin: 0 auto 0 auto;
    padding: 0 20px 0;
    margin-bottom: 0 !important;
  }
}

.categories-section {
  padding: 12px 20px 2px;
  margin-top: 0 !important;
  margin-bottom: 0;
}

/* Remover qualquer espaço entre banner e categorias */
.banner-section + .categories-section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.banner-section .carousel-dots {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.products-section {
  padding: 12px 12px 20px 12px;
  margin-top: 0;
}

/* Remover espaço entre categorias e produtos */
.categories-section + .products-section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

@media (max-width: 768px) {
  .categories-section {
    padding-bottom: 0px; /* Space for bottom navigation on mobile */
    margin-bottom: 0 !important;
  }
  
  .products-section {
    padding-top: 0 !important;
    padding-bottom: 140px; /* Space for bottom navigation on mobile */
    margin-top: 0 !important;
  }
  
  /* Remover espaço entre categorias e produtos no mobile */
  .categories-section + .products-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

@media (min-width: 769px) {
  .categories-section,
  .products-section {
    padding-bottom: 40px; /* Extra space on desktop */
  }

  /* Container principal com largura máxima no desktop */
  .header-content {
    max-width: 95%;
    margin: 0 auto;
  }

  .search-container {
    max-width: 95%;
    margin: 0 auto;
    padding: 30px 20px;
  }

  .header {
    padding: 30px 20px;
  }
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  margin-top: 0 !important;
}

.section-title {
  font-size: 20px;
  color: var(--text-primary);
  margin: 0;
}

.section-link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition);
}

.section-link:hover {
  color: var(--accent-color);
}

.categories-list {
  display: flex;
  gap: 13px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}

.categories-list::-webkit-scrollbar {
  display: none;
}

.category-item {
  background-color: var(--bg-card);
  padding: 12px 15px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 13px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(255, 114, 105, 0.1),
              0 0 15px rgba(255, 114, 105, 0.05);
  border: 1px solid rgba(255, 114, 105, 0.08);
  animation: neonGlowCategory 2.5s ease-in-out infinite alternate;
}

.category-item:hover {
  background-color: var(--bg-secondary);
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(255, 114, 105, 0.3),
              0 0 25px rgba(255, 114, 105, 0.2),
              0 0 35px rgba(255, 114, 105, 0.1);
  border-color: rgba(255, 114, 105, 0.3);
}

.category-item.active {
  background-color: var(--accent-color);
  box-shadow: 0 0 15px rgba(255, 114, 105, 0.6),
              0 0 30px rgba(255, 114, 105, 0.4),
              0 0 45px rgba(255, 114, 105, 0.2);
  border-color: rgba(255, 114, 105, 0.6);
  animation: neonGlowCategoryActive 1.5s ease-in-out infinite alternate;
}

@keyframes neonGlowCategory {
  from {
    box-shadow: 0 0 8px rgba(255, 114, 105, 0.1),
                0 0 15px rgba(255, 114, 105, 0.05);
  }
  to {
    box-shadow: 0 0 12px rgba(255, 114, 105, 0.2),
                0 0 25px rgba(255, 114, 105, 0.1);
  }
}

@keyframes neonGlowCategoryActive {
  from {
    box-shadow: 0 0 15px rgba(255, 114, 105, 0.6),
                0 0 30px rgba(255, 114, 105, 0.4),
                0 0 45px rgba(255, 114, 105, 0.2);
  }
  to {
    box-shadow: 0 0 20px rgba(255, 114, 105, 0.8),
                0 0 40px rgba(255, 114, 105, 0.6),
                0 0 60px rgba(255, 114, 105, 0.4);
  }
}

.category-item .emoji {
  font-size: 24px;
}

.category-item .name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.category-item.active .name {
  color: var(--text-primary);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  padding-bottom: 40px;
}

@media (max-width: 768px) {
  .products-grid {
    margin-bottom: 40px; /* Extra space before bottom nav on mobile */
  }
}

/* Desktop: Grid com mais colunas e melhor espaçamento */
@media (min-width: 769px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 95%;
    margin: 0 auto;
  }

  .products-section {
    max-width: 95%;
    margin: 0 auto;
    padding: 30px 20px;
  }

  .categories-section {
    max-width: 95%;
    margin: 0 auto;
    padding: 30px 20px;
  }
}

.product-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 10px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  box-shadow: 0 0 10px rgba(255, 114, 105, 0.15),
              0 0 20px rgba(255, 114, 105, 0.08);
  border: 1px solid rgba(255, 114, 105, 0.1);
  animation: neonGlowProductCard 3s ease-in-out infinite alternate;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(255, 114, 105, 0.4),
              0 0 40px rgba(255, 114, 105, 0.3),
              0 0 60px rgba(255, 114, 105, 0.2),
              0 0 80px rgba(255, 114, 105, 0.1);
  border-color: rgba(255, 114, 105, 0.4);
}

@keyframes neonGlowProductCard {
  from {
    box-shadow: 0 0 10px rgba(255, 114, 105, 0.15),
                0 0 20px rgba(255, 114, 105, 0.08);
  }
  to {
    box-shadow: 0 0 15px rgba(255, 114, 105, 0.25),
                0 0 30px rgba(255, 114, 105, 0.15);
  }
}

.product-image {
  width: 100%;
  height: 141px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  margin-bottom: 10px;
}

/* Desktop: Imagens dos produtos com altura maior */
@media (min-width: 769px) {
  .product-image {
    height: 200px;
    margin-bottom: 12px;
  }

  .product-card {
    padding: 16px;
  }

  .product-name {
    font-size: 16px;
  }

  .product-price {
    font-size: 18px;
  }
}

/* Desktop grande: Grid com 4 colunas */
@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  text-align: center;
}

.product-meta {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.product-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.product-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-color);
  text-align: center;
  margin-top: 4px;
}

.bottom-nav {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background-color: rgba(37, 40, 48, 0.95) !important;
  backdrop-filter: blur(4.5px);
  padding: 1px 0;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  display: flex !important;
  justify-content: space-around;
  align-items: flex-end;
  border-top: 1px solid var(--border-color);
  z-index: 9998 !important;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  overflow: visible;
  width: 100% !important;
}

@media (min-width: 769px) {
  .bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    margin-top: 0 !important;
    border-top: 1px solid var(--border-color);
    border-bottom: none;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  transition: var(--transition);
  position: relative;
}

.nav-item:hover,
.nav-item.active {
  color: var(--accent-color);
}

/* Botão de Pedidos em destaque */
.nav-item-orders {
  color: var(--text-primary) !important;
  font-weight: 600;
  background-color: var(--accent-color) !important;
  padding: 10px 16px !important;
  border-radius: 12px !important;
  min-width: 80px;
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 2px 8px rgba(255, 114, 105, 0.3);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1001;
  margin-bottom: -8px;
}

.nav-item-orders svg {
  color: var(--text-primary) !important;
  width: 26px !important;
  height: 26px !important;
}

.nav-item-orders span {
  color: var(--text-primary) !important;
  font-size: 13px !important;
  font-weight: 700;
}

.nav-item-orders:hover {
  background-color: var(--accent-hover) !important;
  transform: translateY(-10px) scale(1.15);
  box-shadow: 0 4px 12px rgba(255, 114, 105, 0.5);
}

.nav-item-orders:hover svg {
  color: var(--text-primary) !important;
}

.nav-item-orders:hover span {
  color: var(--text-primary) !important;
}

/* Badge de atualizações de pedidos */
.orders-update-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #f44336;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 14px;
  min-width: 22px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.5);
  animation: pulse-badge 1.5s ease-in-out infinite;
  z-index: 10;
  border: 2px solid var(--bg-primary);
}

@keyframes pulse-badge {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.5);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(244, 67, 54, 0.8);
  }
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background-color: var(--accent-color);
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Product Detail Modal */
.product-detail-modal {
  max-width: 90%;
  max-height: 90vh;
}

.product-detail-image {
  width: 100%;
  height: 300px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-info {
  margin-bottom: 20px;
}

.product-detail-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.product-detail-description {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.product-detail-meta {
  display: flex;
  gap: 21px;
  margin-bottom: 20px;
}

.product-detail-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.quantity-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent-color);
  background-color: transparent;
  color: var(--accent-color);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.quantity-btn:hover {
  background-color: var(--accent-color);
  color: var(--text-primary);
}

.quantity-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 30px;
  text-align: center;
}

/* Motoboy Section */
.motoboy-quick-access {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-color-dark));
  color: white;
  padding: 20px;
  margin: 20px 12px;
  border-radius: 12px;
  text-align: center;
}

.motoboy-quick-access h2 {
  margin: 0 0 20px 0;
  font-size: 24px;
}

.motoboy-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}

.stat-card {
  text-align: center;
}

.stat-card h3 {
  font-size: 28px;
  margin: 0;
  font-weight: bold;
}

.stat-card p {
  font-size: 12px;
  margin: 5px 0 0 0;
  opacity: 0.9;
}

.motoboy-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.motoboy-actions .btn {
  padding: 10px 20px;
  font-size: 14px;
}
