/* =========================================================
   BOTANAS GIO – APP.CSS COMPLETO
   Tema BLANCO · Elegante · Responsive · Mobile First
   ========================================================= */

/* ===== RESET BÁSICO ===== */
*{
  box-sizing:border-box;
}
html,body{
  margin:0;
  padding:0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
}
a{
  text-decoration:none;
  color:inherit;
}
img{
  max-width:100%;
  display:block;
}

/* ===== COLORES BASE ===== */
:root{
  --primary:#c62828;      /* rojo elegante */
  --text:#111111;
  --muted:#666666;
  --border:#e5e5e5;
  --bg:#f6f6f6;
  --card:#ffffff;
}

/* ===== BODY ===== */
body.bg{
  background:var(--bg);
  color:var(--text);
}

/* ===== CONTENEDOR ===== */
.container{
  max-width:1200px;
  margin:0 auto;
}

/* =========================================================
   HEADER / APP BAR
   ========================================================= */
.appbar{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  background:#ffffff;
  border-bottom:1px solid var(--border);
}

.appbrand{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:900;
  font-size:16px;
}

.appico{
  font-size:20px;
}

.app-actions{
  display:flex;
  gap:10px;
}

.iconbtn{
  width:40px;
  height:40px;
  border-radius:10px;
  background:#ffffff;
  border:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  cursor:pointer;
}

/* =========================================================
   BUSCADOR
   ========================================================= */
.searchbar{
  padding:10px 14px;
  background:#ffffff;
  border-bottom:1px solid var(--border);
}
.searchform{
  display:flex;
  gap:10px;
}
.searchform input{
  flex:1;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  font-size:14px;
}
.searchform button{
  padding:10px 14px;
  border-radius:12px;
  border:none;
  background:var(--primary);
  color:#fff;
  font-weight:900;
}

/* =========================================================
   TABS CATEGORÍAS
   ========================================================= */
.tabs{
  position:sticky;
  top:64px;
  z-index:40;
  display:flex;
  gap:10px;
  padding:10px 14px;
  background:#ffffff;
  border-bottom:1px solid var(--border);
  overflow-x:auto;
}
.tabs::-webkit-scrollbar{
  display:none;
}
.tab{
  white-space:nowrap;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  font-weight:700;
  font-size:13px;
  background:#ffffff;
}
.tab.active{
  background:var(--primary);
  color:#ffffff;
  border:none;
}

/* =========================================================
   ENCABEZADO DE PÁGINA
   ========================================================= */
.pagehead{
  padding:14px 14px 0 14px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
}
.pagehead h1{
  margin:0;
  font-size:24px;
  font-weight:900;
}
.clearq{
  font-size:13px;
  color:var(--primary);
  font-weight:800;
}

/* =========================================================
   GRID DE PRODUCTOS
   ========================================================= */
.pgrid{
  padding:14px;
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:14px;
  padding-bottom:90px; /* espacio barra inferior */
}
@media (min-width:900px){
  .pgrid{
    grid-template-columns:repeat(4, minmax(0,1fr));
  }
}

/* =========================================================
   TARJETA DE PRODUCTO (ELEGANTE)
   ========================================================= */
.pcard{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  display:flex;
  flex-direction:column;
  box-shadow:0 6px 18px rgba(0,0,0,.05);
}

/* imagen pequeña */
.pimg{
  padding:14px;
  background:#ffffff;
}
.pimg img{
  max-width:120px;
  margin:0 auto;
  aspect-ratio:1/1;
  object-fit:contain;
}

/* info */
.pinfo{
  padding:6px 10px 8px 10px;
  text-align:center;
}
.pname{
  font-size:14px;
  font-weight:700;
  line-height:1.2;
  min-height:34px;
}
.pprice{
  margin-top:6px;
  font-size:15px;
  font-weight:900;
  color:var(--primary);
}

/* =========================================================
   STEPPER + / -
   ========================================================= */
.stepper{
  padding:8px 10px 12px 10px;
  display:flex;
  align-items:center;
  gap:8px;
}
.step{
  width:36px;
  height:36px;
  border-radius:10px;
  border:1px solid var(--border);
  background:#f2f2f2;
  font-size:20px;
  font-weight:900;
  cursor:pointer;
}
.step-qty{
  flex:1;
  height:36px;
  border-radius:10px;
  border:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  background:#ffffff;
}

/* =========================================================
   BARRA INFERIOR (CARRITO)
   ========================================================= */
.bottombar{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:60;
  background:#ffffff;
  border-top:1px solid var(--border);
  padding:10px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.bb-left{
  display:flex;
  align-items:center;
  gap:10px;
}
.bb-badge{
  width:40px;
  height:40px;
  border-radius:12px;
  background:var(--primary);
  color:#ffffff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
}
.bb-title{
  font-weight:900;
}
.bb-sub{
  font-size:12px;
  color:var(--muted);
  font-weight:700;
}
.bb-btn{
  padding:12px 18px;
  border-radius:14px;
  background:var(--primary);
  color:#ffffff;
  font-weight:900;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer{
  padding:20px;
  text-align:center;
  font-size:13px;
  color:var(--muted);
}
