:root{
  --bg:#f7f7f7;
  --card:#fff;
  --text:#111;
  --accent:#0ea5e9;
}

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

body{
  font-family:Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  margin:0;
}

/* HEADER */

header{
  position:sticky;
  top:0;
  background:#fff;
  padding:10px;
  display:flex;
  gap:10px;
  box-shadow:0 2px 8px rgba(0,0,0,.1);
  z-index:20;
}

header input{
  flex:1;
  padding:10px;
  border-radius:10px;
  border:1px solid #ddd;
  outline:none;
}

/* FILTROS */

.filtros{
  display:flex;
  justify-content:center;
  padding:15px;
  background:#fff;
  position:sticky;
  top:60px;
  z-index:15;
  box-shadow:0 2px 10px rgba(0,0,0,.08);
}

.filtros select{
  padding:10px 15px;
  border-radius:10px;
  border:1px solid #ddd;
  font-weight:bold;
  background:#fff;
  outline:none;
}

/* CARRITO */

.cart-bar{
  position:sticky;
  top:120px;
  z-index:14;

  background:#111;
  color:#fff;

  padding:12px;

  display:flex;
  justify-content:center;
  gap:10px;

  font-weight:bold;

  box-shadow:0 2px 10px rgba(0,0,0,.2);
}

/* FEED */

#feed{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(170px,1fr));
  gap:15px;
  padding:15px;
}

/* CARD */

.card{
  position:relative;
  background:var(--card);
  border-radius:15px;
  overflow:hidden;
  box-shadow:0 5px 15px rgba(0,0,0,.08);
  transition:.2s;
}

.card:hover{
  transform:translateY(-5px);
  box-shadow:0 10px 25px rgba(0,0,0,.15);
}

/* BADGES */

.badges{
  position:absolute;
  top:10px;
  left:10px;
  display:flex;
  flex-direction:column;
  gap:5px;
  z-index:5;
}

.badge{
  color:#fff;
  font-size:11px;
  font-weight:bold;
  padding:5px 8px;
  border-radius:20px;
  width:max-content;
  box-shadow:0 2px 8px rgba(0,0,0,.2);
}

.badge.nuevo{
  background:#10b981;
}

.badge.oferta{
  background:#f59e0b;
}

.badge.agotado-badge{
  background:#6b7280;
}

/* CARRUSEL */

.carousel{
  position:relative;
  overflow:hidden;
}

.carousel-track{
  display:flex;
  transition:transform .3s ease;
}

.carousel img{
  width:100%;
  min-width:100%;
  height:190px;
  object-fit:cover;
  background:#f1f1f1;
}

/* DOTS */

.dots{
  position:absolute;
  bottom:8px;
  width:100%;
  text-align:center;
}

.dots span{
  display:inline-block;
  width:7px;
  height:7px;
  margin:2px;
  border-radius:50%;
  background:#fff;
  opacity:.5;
}

.dots .active{
  opacity:1;
}

/* INFO */

.info{
  padding:10px;
}

.info h3{
  font-size:15px;
  margin-bottom:5px;
}

.info p{
  margin-bottom:6px;
  font-size:14px;
}

/* ACTIONS */

.actions{
  display:flex;
  gap:6px;
  margin-top:10px;
}

.actions button{
  flex:1;
  padding:8px;
  border:none;
  border-radius:10px;
  color:#fff;
  font-size:12px;
  cursor:pointer;
  transition:.2s;
}

.actions button:hover{
  transform:scale(1.03);
}

/* BOTONES */

.buy{
  background:#10b981;
}

.apartar{
  background:#f59e0b;
}

.del{
  background:#111;
}

/* ESTADOS */

.card.agotado{
  opacity:.5;
  filter:grayscale(100%);
}

.card.vendido{
  opacity:.4;
  filter:grayscale(100%);
}

/* BOTÓN DESACTIVADO */

.card button:disabled{
  background:#999;
  cursor:not-allowed;
}

/* FAB */

.fab{
  position:fixed;
  bottom:15px;
  right:15px;
  width:55px;
  height:55px;
  background:#111;
  color:#fff;
  border-radius:50%;
  display:none;
  align-items:center;
  justify-content:center;
  font-size:25px;
  cursor:pointer;
  z-index:50;
}

/* MODAL */

.modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.5);
  justify-content:center;
  align-items:center;
  z-index:60;
}

.modal-content{
  background:#fff;
  padding:20px;
  width:90%;
  max-width:350px;
  border-radius:12px;
}

.modal-content input,
.modal-content select{
  width:100%;
  margin:5px 0;
  padding:10px;
  border-radius:8px;
  border:1px solid #ddd;
}

.modal-content button{
  width:100%;
  margin-top:8px;
  padding:10px;
  border:none;
  border-radius:8px;
  cursor:pointer;
}
