/* ===========================
   FreshMart — style.css
   =========================== */

:root {
  --green-dark:   #14532d;
  --green-mid:    #16a34a;
  --green-light:  #4ade80;
  --green-pale:   #f0fdf4;
  --orange:       #ea580c;
  --orange-light: #fb923c;
  --orange-pale:  #fff7ed;
  --white:        #ffffff;
  --gray-light:   #f8fafc;
  --text-dark:    #0f2318;
  --text-gray:    #6b7280;
  --shadow:       0 4px 24px rgba(20,83,45,.1);
  --radius:       14px;
  --transition:   .3s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; background: var(--white); color: var(--text-dark); }
.container { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }

/* HEADER */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--green-dark);
  box-shadow: 0 2px 16px rgba(20,83,45,.25);
}
.header-inner {
  display: flex; align-items: center; gap: 1.5rem;
  height: 68px; flex-wrap: wrap;
}
.logo {
  font-family: 'Nunito', sans-serif;
  font-size: 1.8rem; font-weight: 900;
  color: var(--white); text-decoration: none;
  white-space: nowrap;
}
.logo span { color: var(--orange-light); }

.search-bar {
  flex: 1; display: flex; gap: .5rem;
  background: rgba(255,255,255,.12); border-radius: 40px;
  padding: .3rem .3rem .3rem 1rem;
  border: 1px solid rgba(255,255,255,.2);
  max-width: 520px;
}
.search-bar input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--white); font-size: .95rem;
  font-family: 'Poppins', sans-serif;
}
.search-bar input::placeholder { color: rgba(255,255,255,.65); }
.search-btn {
  background: var(--orange); color: var(--white);
  border: none; padding: .45rem 1.1rem; border-radius: 30px;
  font-weight: 700; font-size: .88rem; cursor: pointer;
  transition: var(--transition);
}
.search-btn:hover { background: var(--orange-light); }

.header-info { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.header-badge {
  background: var(--orange); color: var(--white);
  padding: .3rem .8rem; border-radius: 20px;
  font-size: .78rem; font-weight: 700; white-space: nowrap;
}
.hamburger {
  display: none; background: none; border: none;
  font-size: 1.5rem; color: var(--white); cursor: pointer;
}

/* SUBNAV */
.subnav { background: var(--green-mid); }
.subnav-inner { display: flex; gap: 0; }
.subnav-inner a {
  color: rgba(255,255,255,.85); text-decoration: none;
  padding: .6rem 1.2rem; font-size: .88rem; font-weight: 600;
  transition: var(--transition);
}
.subnav-inner a:hover { background: rgba(255,255,255,.12); color: var(--white); }

/* BANNER */
.banner {
  margin-top: 106px;
  position: relative; overflow: hidden;
  min-height: 380px;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
}
.banner-slide {
  display: none;
  min-height: 380px;
  padding: 4rem 5%;
  align-items: center; gap: 2rem;
}
.banner-slide.active { display: flex; }
.banner-content { flex: 1; max-width: 560px; }
.banner-tag {
  display: inline-block;
  background: var(--orange); color: var(--white);
  padding: .3rem .9rem; border-radius: 20px;
  font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 1.2rem;
}
.banner-content h1 {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--white); font-weight: 900;
  line-height: 1.15; margin-bottom: 1rem;
}
.banner-content h1 em { color: var(--orange-light); font-style: normal; }
.banner-content p { color: rgba(255,255,255,.8); font-size: 1rem; margin-bottom: 1.8rem; }

.btn-primary {
  display: inline-block;
  background: var(--orange); color: var(--white);
  padding: .85rem 2rem; border-radius: 40px;
  font-weight: 700; font-size: .95rem;
  text-decoration: none; border: none; cursor: pointer;
  box-shadow: 0 6px 20px rgba(234,88,12,.35);
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.1); }

.banner-visual {
  flex: 0 0 auto; font-size: clamp(4rem, 10vw, 7rem);
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.25));
  letter-spacing: .5rem;
}
.banner-dots {
  position: absolute; bottom: 1.2rem; left: 50%;
  transform: translateX(-50%); display: flex; gap: .6rem;
}
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.4); border: none; cursor: pointer;
  transition: var(--transition);
}
.dot.active { background: var(--white); transform: scale(1.3); }

/* SECTION HEADER */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 2.1rem; color: var(--green-dark);
  font-weight: 900; margin-bottom: .5rem;
}
.section-header p { color: var(--text-gray); }

/* DEPARTAMENTOS */
.departamentos { padding: 90px 0; background: var(--green-pale); }
.dep-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 1.5rem;
}
.dep-card {
  background: var(--white); border-radius: var(--radius);
  padding: 2rem 1.5rem; text-align: center;
  box-shadow: var(--shadow); transition: var(--transition);
  border-bottom: 4px solid transparent;
}
.dep-card:hover {
  border-bottom-color: var(--green-mid);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(20,83,45,.12);
}
.dep-icon { font-size: 2.8rem; display: block; margin-bottom: .8rem; }
.dep-card h3 { font-family: 'Nunito', sans-serif; font-weight: 900; color: var(--green-dark); font-size: 1.1rem; }
.dep-card p { font-size: .85rem; color: var(--text-gray); margin-top: .3rem; }

/* OFERTAS */
.ofertas { padding: 90px 0; background: var(--white); }
.oferta-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px,1fr)); gap: 2rem;
}
.prod-card {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: var(--transition);
  background: var(--white);
}
.prod-card:hover { transform: translateY(-6px); box-shadow: 0 14px 40px rgba(20,83,45,.15); }
.prod-card.hidden { display: none; }

.prod-img {
  height: 180px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.green-bg  { background: linear-gradient(135deg, #d1fae5, #6ee7b7); }
.orange-bg { background: linear-gradient(135deg, #fff7ed, #fed7aa); }
.prod-emoji { font-size: 5rem; }
.desc-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--orange); color: var(--white);
  font-size: .78rem; font-weight: 900;
  padding: .25rem .65rem; border-radius: 20px;
}

.prod-body { padding: 1.2rem; }
.prod-nome { font-size: 1rem; color: var(--text-dark); font-weight: 700; margin-bottom: .25rem; }
.prod-dept { font-size: .78rem; color: var(--green-mid); font-weight: 600; margin-bottom: .7rem; }
.price-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem; }
.preco-old { font-size: .85rem; color: var(--text-gray); text-decoration: line-through; }
.preco { font-size: 1.25rem; font-weight: 700; color: var(--green-mid); }
.btn-add {
  width: 100%; background: var(--green-mid); color: var(--white);
  border: none; padding: .65rem; border-radius: 8px;
  font-size: .9rem; font-weight: 700; cursor: pointer;
  transition: var(--transition); font-family: 'Poppins', sans-serif;
}
.btn-add:hover { background: var(--green-dark); }

.no-results {
  text-align: center; padding: 4rem 2rem; color: var(--text-gray);
}
.no-results span { font-size: 3rem; display: block; margin-bottom: 1rem; }
.no-results p { margin-bottom: 1.5rem; }

/* FOOTER */
.footer { background: var(--green-dark); color: rgba(255,255,255,.85); padding: 60px 0 0; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; }
.footer .logo { color: var(--white); }
.footer .logo span { color: var(--orange-light); }
.footer-brand p { margin-top: .7rem; opacity: .7; font-size: .88rem; }
.footer-horario { margin-top: .5rem; font-size: .82rem; opacity: .65; }
.footer-links, .footer-contact { display: flex; flex-direction: column; gap: .6rem; }
.footer-links h4, .footer-contact h4 { color: var(--green-light); margin-bottom: .4rem; font-family: 'Nunito', sans-serif; font-weight: 900; }
.footer-links a { color: rgba(255,255,255,.7); text-decoration: none; font-size: .9rem; transition: var(--transition); }
.footer-links a:hover { color: var(--green-light); }
.footer-contact p { opacity: .7; font-size: .88rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center; padding: 1.2rem;
  font-size: .85rem; opacity: .5;
}

/* TOAST */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%);
  background: var(--green-dark); color: var(--white);
  padding: .75rem 1.5rem; border-radius: 40px;
  font-weight: 600; font-size: .9rem;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease; z-index: 300;
}
.toast.show { opacity: 1; }

/* HIGHLIGHT no busca */
.highlight { background: #fef9c3; border-radius: 3px; padding: 0 2px; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .banner-slide.active { flex-direction: column; text-align: center; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .search-bar { max-width: 100%; }
}
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: .8rem 1.5rem; gap: .6rem; }
  .banner { margin-top: 130px; }
  .header-badge { display: none; }
  .hamburger { display: block; }
  .subnav { display: none; }
  .subnav.open { display: block; }
  .subnav-inner { flex-direction: column; }
  .footer-inner { grid-template-columns: 1fr; }
}
