/* =========================
   PYMESOFT QRMENU - STYLE.CSS (LIMPIO)
========================= */
:root{
  --orange:#f47c20;
  --orange-soft: rgba(244,124,32,.14);
  --orange-border: rgba(244,124,32,.42);
  --bg:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* =========================
   TOPBAR
========================= */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 14px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}

.brand{ flex:0 0 auto; }

.top-logo{
  height:40px;
  width:auto;
  display:block;
}

/* =========================
   SEARCH
========================= */
.search{
  flex:1;
  display:flex;
  align-items:center;
  gap:6px;
  background:#f9fafb;
  border:1px solid var(--line);
  border-radius:999px;
  padding:6px 10px;
  transition:.15s ease;
}

.search input{
  flex:1;
  border:0;
  outline:none;
  background:transparent;
  font-size:14px;
  color: var(--text);
}

.search button{
  border:0;
  background:transparent;
  font-size:16px;
  cursor:pointer;
  color:var(--muted);
}

/* foco naranjo suave */
.search:focus-within{
  background: var(--orange-soft);
  border-color: var(--orange-border);
  box-shadow: 0 0 0 3px rgba(244,124,32,.16);
}
.search:focus-within button{ color: var(--orange); }

/* =========================
   CATEGORÍAS (WRAP)
========================= */
.cats-wrap{
  position: sticky;
  top: 64px;
  z-index: 45;
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}

/* ☰ DISCRETO (sin círculo) */
.cat-menu{
  width: 34px;
  height: 28px;
  padding: 0;
  margin-right: 2px;

  display:flex;
  align-items:center;
  justify-content:center;

  background: transparent;
  border: 0;
  box-shadow: none;

  color: var(--orange);
  font-size: 20px;
  font-weight: 900;
  cursor:pointer;
}
.cat-menu:active{ opacity:.65; }

/* barra horizontal */
.cats{
  flex:1;
  display:flex;
  gap:8px;
  overflow-x:auto;
  white-space:nowrap;
  padding-bottom:2px;
}

.cats::-webkit-scrollbar{ height:6px; }
.cats::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.18);
  border-radius:999px;
}

/* botones categoría */
.cat{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
  font-size:14px;
  transition:.15s ease;
}

.cat:hover{ background:#f9fafb; }

.cat.active{
  background: var(--orange-soft);
  border-color: var(--orange-border);
  color: var(--orange);
  font-weight:800;
}

/* badge cantidad */
.cat-badge{
  min-width:26px;
  padding:3px 8px;
  border-radius:999px;
  background: var(--orange-soft);
  border:1px solid var(--orange-border);
  font-size:12px;
  font-weight:900;
  text-align:center;
  line-height:1;
}

/* =========================
   CONTENIDO
========================= */
.container{
  padding:16px 14px 40px;
}

.meta{
  font-weight:800;
  margin-bottom:12px;
  color: var(--text);
}

.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(170px,1fr));
  gap:12px;
}

.card{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:92px;
  background:#fff;
}

.card .desc{ font-size:14px; }

.card .price{
  margin-top:8px;
  font-weight:900;
  color: var(--orange);
}

/* =========================
   LOADING / EMPTY
========================= */
.loadingMore{
  text-align:center;
  color:var(--muted);
  padding:14px;
}

.empty{
  text-align:center;
  color:var(--muted);
  padding:20px;
}

/* =========================
   FOOTER
========================= */
.footer{
  border-top:1px solid var(--line);
  padding:26px 14px;
  text-align:center;
}

.actions{
  display:flex;
  gap:12px;
  justify-content:center;
  margin-bottom:16px;
}

.btn-action{
  padding:10px 20px;
  border-radius:999px;
  border:0;
  background: var(--orange);
  color:#fff;
  text-decoration:none;
  font-weight:900;
}

.footer-block{
  margin-top:10px;
  color:#374151;
}

.footer-email{
  margin-top:12px;
  font-weight:800;
}

.footer-brand{
  margin-top:18px;
  font-size:12px;
  color:var(--muted);
}

/* =========================
   BOTÓN TOP
========================= */
.btn-top{
  position:fixed;
  right:16px;
  bottom:20px;
  width:48px;
  height:48px;
  border-radius:50%;
  border:0;
  background: var(--orange);
  color:#fff;
  font-size:18px;
  display:none;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:60;
  box-shadow: 0 10px 26px rgba(244,124,32,.35);
}
.btn-top.show{ display:flex; }

/* =========================
   MODAL CATEGORÍAS
========================= */
.modal{
  position:fixed;
  inset:0;
  display:none;
  z-index:70;
}
.modal.open{ display:block; }

.modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.35);
}

.modal-card{
  position:absolute;
  left:0; right:0; bottom:0;
  background:#fff;
  border-radius:22px 22px 0 0;
  max-height:80%;
  display:flex;
  flex-direction:column;
  animation: slideUp .25s ease;
}

@keyframes slideUp{
  from{ transform: translateY(100%); }
  to{ transform: translateY(0); }
}

.modal-head{
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background: var(--orange);
  color:#fff;
  border-radius:22px 22px 0 0;
}

.modal-title{ font-weight:900; }

.modal-close{
  background:transparent;
  border:0;
  color:#fff;
  font-size:20px;
  cursor:pointer;
}

.modal-body{
  padding:12px;
  overflow:auto;
}

.modal-item{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid var(--line);
  background:#fff;
  margin-bottom:10px;
  font-size:15px;
  cursor:pointer;
}

.modal-item:hover{ background:#f9fafb; }

.mi-badge{
  min-width:44px;
  padding:6px 10px;
  border-radius:999px;
  background: var(--orange-soft);
  border:1px solid var(--orange-border);
  font-weight:900;
  text-align:center;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 480px){
  .grid{
    grid-template-columns: repeat(2,1fr);
  }
}