/* styles.css - atualizado com controles (categoria + dropdown)
   Mobile-first, palette quente, tipografia maior, espaçamentos generosos.
*/

/* ========== Variables ========== */
:root{
  --bg-1: #ffefb8;
  --bg-2: #f7d86b;
  --accent: #d1981c;
  --card-bg: #ffffff;
  --muted: #6b6b6b;
  --radius: 18px;
  --container-padding: 16px;
  --max-width: 1100px;
  --shadow: 0 8px 20px rgba(15,15,15,0.06);
  --text: #2b2b2b;
}

/* ========== Base ========== */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color:var(--text);
  background: linear-gradient(180deg,var(--bg-1), #fff 60%);
  -webkit-font-smoothing:antialiased;
  line-height:1.35;
}

/* Container */
.container{
  width:100%;
  max-width:var(--max-width);
  margin:0 auto;
  padding:0 var(--container-padding);
}

/* Header / Hero */
.site-header{
  background: linear-gradient(180deg,var(--bg-2), #fbe8a8 60%);
  padding:18px 0 20px;
  border-bottom-left-radius:32px;
  border-bottom-right-radius:32px;
}
.header-inner{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.logo{ font-weight:800; font-size:28px; color:#ffffff; letter-spacing:0.5px; }
.menu-btn{ width:44px;height:44px;border-radius:10px;background:transparent;border:none; display:flex;align-items:center;justify-content:center;padding:8px; }
.menu-btn span{display:block;width:22px;height:3px;background:#fff;border-radius:3px;margin:3px 0;opacity:0.95}

.hero{ padding:14px 0; }
.hero-title{ font-size:48px; margin:8px 0 12px; font-weight:800; color:#5b3f0f; }

/* Controls (categories + sort) */
.controls{ display:flex; gap:12px; align-items:center; justify-content:space-between; flex-wrap:wrap; margin-top:6px; }
.categories{ display:flex; gap:10px; flex-wrap:wrap; }
.pill{ background:rgba(255,255,255,0.6); border:none; padding:10px 14px; border-radius:30px; font-size:15px; cursor:pointer; color:#4a3a27; }
.pill.active{ background: rgba(255,255,255,0.95); box-shadow: var(--shadow); }

.sort select{
  padding:10px 12px; border-radius:10px; border:1px solid rgba(0,0,0,0.06); font-size:15px;
}

/* Accessibility helper */
.sr-only{ position:absolute !important; height:1px; width:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); white-space:nowrap; }

/* Main / Product list */
.main{ padding:18px 0 80px; }
.product-list{ display:flex; flex-direction:column; gap:16px; }

/* Product card */
.product-card{ display:flex; gap:14px; align-items:center; background:var(--card-bg); padding:16px; border-radius:16px; box-shadow: var(--shadow); overflow:hidden; transition: transform 180ms ease; }
.product-card:focus-within, .product-card:focus{ transform: translateY(-3px); }

/* Media */
.product-media{ flex:0 0 88px; height:88px; background:#fdeecb; border-radius:12px; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.product-media img{ width:72px; height:72px; object-fit:cover; border-radius:12px; transition: transform 300ms ease; }

/* Info */
.product-info{ flex:1; text-align:left; }
.product-title{ font-size:20px; margin:0 0 6px; font-weight:700; }
.product-desc{ margin:0 0 8px; color:var(--muted); font-size:14px; }
.product-price{ font-weight:700; font-size:16px; color:var(--text) }

/* Hover zoom (imagem) */
.product-card:hover .product-media img,
.product-card:focus-within .product-media img{ transform: scale(1.06); }

/* Footer */
.site-footer{ margin-top:36px; padding:22px 0; background: transparent; }
.footer-inner{ display:flex; flex-direction:column; gap:14px; align-items:flex-start; }
.footer-right h3{ margin:0 0 6px 0; font-size:16px; }
.footer-copy{ margin:6px 0 0; color:var(--muted) }

/* Notification fixed */
.fixed-notice{
  position:fixed; right:16px; bottom:16px;
  width:320px; max-width:calc(100% - 32px);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.96));
  border-radius:12px; box-shadow:0 14px 40px rgba(15,15,15,0.15); padding:12px;
  transform: translateY(12px); opacity:0; transition: transform 350ms cubic-bezier(.2,.9,.25,1), opacity 300ms ease;
  z-index:1200;
}
.fixed-notice.show{ transform: translateY(0); opacity:1; }
.notice-close{ position:absolute; right:8px; top:8px; border:none; background:transparent; font-size:18px; cursor:pointer; color:#7a6b43; }
.notice-content h4{ margin:0 0 6px 0; font-size:14px; color:#4c3a18; }
.notice-content p{ margin:0 0 8px 0; color:var(--muted); font-size:14px; }
.fixed-notice.hidden{ transform: translateY(18px); opacity:0; pointer-events:none; }

/* Scroll animation helper */
.animate-on-scroll{ opacity:0; transform: translateY(12px); transition: transform 500ms cubic-bezier(.2,.9,.25,1), opacity 420ms ease; }
.animate-on-scroll.in-view{ opacity:1; transform: translateY(0); }

/* Desktop tweaks */
@media (min-width:800px){
  .hero-title{ font-size:64px; }
  .product-list{ gap:22px; }
  .product-card{ padding:22px; align-items:center; border-radius:20px; }
  .product-media{ flex:0 0 120px; height:120px; border-radius:16px; }
  .product-media img{ width:96px; height:96px; }
  .product-title{ font-size:24px; }
  .footer-inner{ flex-direction:row; justify-content:space-between; align-items:center; }
  .fixed-notice{ right:36px; bottom:36px; width:360px; }
}

/* Focus outline */
:focus{ outline: 3px solid rgba(209,164,48,0.15); outline-offset:3px; border-radius:6px; }

/* Fundo escuro */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 9999;
}

/* Conteúdo do popup */
.popup-content {
  background: white;
  border-radius: 18px;
  max-width: 420px;
  width: 100%;
  padding: 22px;
  animation: popupFade 0.3s ease;
  position: relative;
  text-align: center;
}

@keyframes popupFade {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Botão de fechar */
.close-popup {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #444;
}

/* Imagem */
.popup-img {
  width: 100%;
  height: auto;
  max-height: 300px; /* altura segura e sem corte */
  object-fit: contain;
  display: block;
  margin: 0 auto 15px;
}




/* Lista de infos */
.popup-info {
  padding: 0;
  list-style: none;
  margin: 18px 0;
  text-align: left;
}

.popup-info li {
  margin-bottom: 8px;
  font-size: 16px;
}

/* Frase motivadora */
.popup-phrase {
  margin-top: 12px;
  font-size: 17px;
  font-weight: 600;
  color: #d13b3b;
}