:root {
  --primary: #ffffff;
  --text-dark: #2c3e50;
  --secondary: #bb6d27;
  --highlight: #2ecc71;
  --info-green: #00cc44;
  --border: #e2e2e2;
  --bg-light: #f8f7f3;
  --store-bg: rgb(205 178 146);
  --btn-bg: #ffffff;
  --btn-hover: #f0f0f0;
  --shadow: rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  padding-bottom: 80px;
}

/* HERO */
.hero {
  width: 100vw;
  max-width: 100%;
  height: 200px;
  margin-left: calc(-50vw + 50%);
  overflow: hidden;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* STORE INFO */
.store-block {
  position: relative;
  background: var(--store-bg);
  margin: -78px 0 0;
  padding: 50px 1rem 1rem;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -9px 6px var(--shadow);
}
.logo-wrapper {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
}
.logo-hero {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 5px solid #fff;
  object-fit: cover;
  background: var(--primary);
  box-shadow: 0 4px 12px var(--shadow);
}
.status {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.status.aberto {
  background: var(--highlight);
  color: #fff;
}
.status.fechado {
  background: #e53e3e;
  color: #fff;
}
.store-info {
  text-align: center;
  margin-top: 8px;
}
.store-info h1 {
  font-size: 1.75rem;
}
.store-info .tagline {
  font-size: 1rem;
  color: #555;
}
.ellipsis {
  text-align: center;
  font-size: 1.5rem;
  color: var(--secondary);
  margin-top: 4px;
}

/* WRAPPER STICKY */
.search-category-wrapper {
  position: sticky;
  top: 0;
  background: var(--store-bg);
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* SEARCH + BOTÕES */
.search-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1rem;
}
.search-bar {
  position: relative;
  width: 100%;
  max-width: 400px;
}
.search-bar i {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: #aaa;
}
.search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--btn-bg);
}
.search-input::placeholder {
  color: #999;
}
.action-buttons {
  display: flex;
  gap: 0.5rem;        /* espaço entre eles */
  width: 100%;
  max-width: 400px;   /* a mesma largura do input de busca */
  margin: 0 auto;
}
.btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--secondary);
  background: var(--btn-bg);
  border-radius: 6px;
  color: var(--secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn i {
  margin-right: 0.5rem;
}
.btn:hover {
  background: var(--btn-hover);
}

/* CATEGORIES */
.category-nav {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.category-nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  padding: 0.5rem 1rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.category-nav ul::-webkit-scrollbar {
  display: none;
}
.category-nav li {
  position: relative;
  padding: 0.5rem 0;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-dark);
  transition: color 0.2s;
}
.category-nav li::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  transition: background 0.2s;
}
.category-nav li.active,
.category-nav li:hover {
  color: var(--secondary);
}
.category-nav li.active::after,
.category-nav li:hover::after {
  background: var(--secondary);
}

/* PRODUTOS */
.products-section {
  max-width: 1024px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.category-block {
  margin-bottom: 2rem;
}
.category-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary);
}
.category-title::before {
  content: "▶";
}

/* GRID 2 colunas NO DESKTOP */
@media (min-width: 769px) {
  .category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}
/* MOBILE 1 coluna */
@media (max-width: 768px) {
  .category-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}

/* CARD */
.product-card {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  background: var(--primary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  height: 125px; 
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}
.product-details {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.product-name {
  font-weight: 600;
}
.product-description {
  font-size: 0.9rem;
  color: #666;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.product-price {
  color: var(--info-green);
  font-weight: 700;
}
.product-image {
  width: 120px;
  height: 100%;
  object-fit: cover;
}

/* CART BAR */
.cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #eda666;
  border-top: 1px solid var(--border);
  padding: 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
}

/* MODALS */
.hidden { display: none !important; }
#modal-overlay, #schedule-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
}
#modal-container, #schedule-container {
  position: fixed; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 101;
}
#modal-content, #schedule-content {
  position: relative;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  text-align: center;
}
#modal-close, #schedule-close {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}
body.modal-open { overflow: hidden; height: 100vh; }
