body {
  font-family: Arial, sans-serif;
  background-color: #fff;
  margin: 0;
  padding: 0;
}

h1, h2, h3 {
  color: #333;
  margin: 10px 0;
}

.top-bar {
  background-color: #007bff;
  color:inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 2px solid #0056b3;
  flex-wrap: wrap;
}

.top-bar a {
  color: inherit;
  text-decoration: none;
  margin-left: 15px;
  font-size: 14px;
}

.top-bar a:hover {
  text-decoration: underline;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-bar-left h1 {
  margin: 0;
  font-size: 20px;
  color:inherit;
}

.top-bar-right a {
  color: inherit;
  text-decoration: none;
  margin-left: 15px;
  font-weight: bold;
  font-size: 14px;
}

.header-search-btn {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.header-search-btn:hover {
  background-color: rgba(255,255,255,0.1);
}

.header-search-bar {
  display: none;
  background: white;
  border-bottom: 1px solid #eee;
  padding: 10px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-input {
  flex: 1;
  padding: 10px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

.search-input:focus {
  border-color: #007bff;
}

.search-close-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.search-close-btn:hover {
  background: #c82333;
}

.restaurant-logo {
  height: 40px;
  width: auto;
  border-radius: 8px;
}

/* Top bar styles */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
}

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

.top-bar-left h1 {
  margin: 0;
  font-size: 1.4rem;
}

.top-bar-right {
  display: flex;
  align-items: center;
}

.header-search-btn {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.header-search-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Search bar styles */
.header-search-bar {
  background: white;
  border-bottom: 1px solid #eee;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-content {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 600px;
  margin: 0 auto;
}

.search-input-field {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 25px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input-field:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-close-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-close-btn:hover {
  background: #c82333;
}

.store-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #333;
  color: white;
  padding: 8px 15px;
  margin-bottom: 15px;
  font-size: 14px;
}

.store-info-bar a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.store-info-bar a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 10px auto;
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}



.category-section {

  padding-top: 20px; /* espaço extra para evitar sobreposição */
}


.category-section h2 {

  font-size: 16px;
  margin-bottom: 12px;
  border-left: 5px solid #007bff;
  padding-left: 10px;
  color: #222;

}



/* Produtos Mais Pedidos */
.product-card.featured {
  border: 2px solid #ffcc00;
  padding: 15px;
  border-radius: 12px;
  background: #fff8e1;
  text-align: center;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 280px;
  flex: 0 0 auto; /* impede que o card se estique */
  width: 180px; /* largura fixa */
  height: auto; /* altura automática */
  scroll-snap-align: start

}

.product-card.featured img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.product-card.featured h3 {
  font-size: 1rem;
  margin: 6px 0 4px;
  color: #333;
}

.product-card.featured .price {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 8px;
}

.product-card.featured .btn {
  background-color: #ffcc00;
  color: #000;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.product-card.featured .btn:hover {
  background-color: #ffb300;
}



/* Produtos */
.products-grid {

  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));

  gap: 15px;

  grid-auto-rows: auto; /* garante que cada linha se ajuste à altura do conteúdo */

  padding-bottom: 20px; /* evita que o último card fique colado no rodapé */

  margin-top: 10px;

  align-items: stretch; /* força todos os cards a ocupar a mesma altura */

}

.product-card {
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 10px;
  background: #f9f9f9;
  text-align: center;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
  height: 100%;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transform: scale(1.02);
}

.product-card h3 {
  font-size: 16px;
  margin: 5px 0;
}

.product-card p {
  font-size: 13px;
  margin: 5px 0;
}

.product-image-small,

.small-product-image {

  width: 70px;

  height: 70px;

  border-radius: 8px;

  margin: 0 auto 8px;

  object-fit: contain;

}

.product-image-large {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.price {
  font-size: 16px;
  color: #28a745;
  font-weight: bold;
  margin: 8px 0;
}

.price-section {
  margin: 15px 0;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-grow: 1;
}

.original-price {
  font-size: 0.9rem !important;
  text-decoration: line-through !important;
  color: #999 !important;
  margin: 0 !important;
}

.discount-badge {
  background: #e74c3c !important;
  color: white !important;
  padding: 4px 10px !important;
  border-radius: 12px !important;
  font-size: 0.8rem !important;
  font-weight: bold !important;
  display: inline-block !important;
  margin: 5px 0 !important;
}

.stock-warning {
  color: #f39c12 !important;
  font-size: 0.8rem !important;
  font-weight: bold !important;
  margin: 5px 0 !important;
}

.btn {
  background-color: #007bff;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-size: 13px;
}

.btn:hover {
  background-color: #0056b3;
}

.btn-success {
  background-color: #28a745;
}

.btn-success:hover {
  background-color: #218838;
}

.btn-danger {
  background-color: #dc3545;
}

.btn-danger:hover {
  background-color: #c82333;
}

.cart-item {
  border: 1px solid #ddd;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.page-title {
  text-align: center;
  margin-top: 15px;
  font-size: 24px;
  color: #444;
}

.card {
  display: flex;
  align-items: center;
  background-color: #f8f8f8;
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-size: 14px;
}

.card h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.card p {
  margin: 4px 0 0 0;
  color: #555;
}

.icon {
  font-size: 28px;
  margin-right: 15px;
  color: #e07b00;
}

.stars {
  font-size: 16px;
  color: #FFD700;
}

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

.quantity-selector button {
  padding: 4px 8px;
  font-size: 16px;
  cursor: pointer;
}

/* Grid com 2 colunas no celular */
@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    grid-auto-rows:auto;
    align-items: stretch; /* garante que todos os cards tenham mesma altura */
    padding-bottom: 20px; /* evita que o último card fique colado no rodapé*/
    row-gap:20px;
  }


  .product-card {



    padding: 12px;

    display: flex;

    flex-direction: column;

    justify-content: flex-start;

    height: auto; /* ocupa toda a altura disponível */

    margin-bottom: 0px;

    grid-auto-rows: minmax(10, auto);
    position: relative; /* necessário para elementos internos com position absolute */
}

  .product-card img {
    width: 70px;
    height: 70px;
  }

  .product-card h3 {
    font-size: 14px;
  }

  .product-card p {
    font-size: 11px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-word;
    overflow-wrap: break-word


  }


  .btn {
    padding: 5px 8px;
    font-size: 12px;
    margin-bottom: 15px;
  }

  .top-bar-left h1 {
    font-size: 18px;
  }

  .store-info-bar {
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }


  .price-section {
    margin: 10px 0;
    padding: 8px 0;
  }
}

.product-link {
  text-decoration: none;
  color: inherit;
}

.product-link:hover .product-card {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
  transform: scale(1.03);
}
.floating-cart-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #28a745;
  color: white;
  padding: 12px 18px;
  border-radius: 30px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  text-decoration: none;
  font-size: 16px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
}

.floating-cart-button:hover {
  background-color: #218838;
}
.product-badge {
  background-color: #ffc107;
  color: #333;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: bold;
  border-radius: 4px;
  position: absolute;
  top: 10px;
  left: 10px;
}
.product-badge {
position: absolute;
top: 10px;
left: 10px;
background-color: #ffc107;
color: #333;
font-size: 10px;
font-weight: bold;
padding: 4px 6px;
border-radius: 4px;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
text-transform: uppercase;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 16px;
}
