/* mobile-first tienda style.css
   Diseñado para pantallas pequeñas primero, escala a escritorio.
*/

:root{
  --bg: #f7f8fb;
  --card: #ffffff;
  --primary: #ff4d6d; /* accent rojo/rosado tipo marketplace */
  --accent-2: #0b84ff;
  --muted: #6b7280;
  --shadow-sm: 0 6px 18px rgba(13,30,59,0.06);
  --shadow-lg: 0 20px 50px rgba(13,30,59,0.12);
  --radius: 12px;
  --gap: 12px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color-scheme: light;
}

/* Reset ligero */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:#0f172a;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-size:15px;
  line-height:1.35;
}

/* Container */
.container{
  max-width:1180px;
  margin:0 auto;
  padding:0 14px;
}

/* Sticky header - mobile first */
.site-header{
  position:sticky;
  top:0;
  z-index:60;
  background:linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.92));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(15,23,42,0.04);
}
.header-inner{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  padding:10px 0;
}
.brand{
  font-weight:700;
  font-size:1.05rem;
  letter-spacing: -0.25px;
}
.search-wrap{
  flex:1;
  margin-left:12px;
  display:flex;
  align-items:center;
}
#search{
  width:100%;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,0.06);
  background:#fff;
  box-shadow: var(--shadow-sm);
  font-size:0.95rem;
}

/* hero / category header */
.hero{
  padding:14px 0 6px;
}
.hero h2{ margin:0; font-size:1.2rem; }
.hero p{ margin:6px 0 0; color:var(--muted); font-size:0.95rem;}

/* filter bar (sticky below header on mobile) */
.filter-bar{
  display:flex;
  gap:8px;
  margin:12px 0;
  overflow-x:auto;
  padding-bottom:6px;
}
.chip{
  flex:0 0 auto;
  background:#fff;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,0.04);
  font-size:0.9rem;
  box-shadow: var(--shadow-sm);
  cursor:pointer;
}
.chip.active{ background:var(--primary); color:white; border-color:transparent; box-shadow:none; }

/* Grid - mobile: two columns compact, single column very small */
.grid{
  display:grid;
  gap: var(--gap);
  grid-template-columns: repeat(2, 1fr);
  margin-bottom:80px; /* space for bottom bar */
}

/* Card design */
.card{
  background:var(--card);
  border-radius:12px;
  overflow:hidden;
  box-shadow: var(--shadow-sm);
  display:flex;
  flex-direction:column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.media{
  position:relative;
  width:100%;
  padding-top:100%; /* square aspect on mobile */
  overflow:hidden;
  background:linear-gradient(180deg,#fafafa,#fff);
}
.media img, .media video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.badge{
  position:absolute;
  left:8px;
  top:8px;
  background:var(--primary);
  color:white;
  padding:6px 8px;
  border-radius:999px;
  font-size:0.8rem;
  font-weight:700;
  box-shadow: 0 6px 18px rgba(11,77,66,0.08);
}

/* card body */
.card-body{
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.title{
  font-weight:600;
  font-size:0.98rem;
  margin:0;
  min-height:2.4em; /* limit lines visually */
  overflow:hidden;
  text-overflow:ellipsis;
}
.desc{ color:var(--muted); font-size:0.86rem; margin:0; min-height:1.6em; overflow:hidden; }

/* price + actions row */
.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.price{
  font-weight:800;
  color: #111827;
  font-size:1.02rem;
}
.price small{ font-weight:600; color:var(--muted); font-size:0.85rem; margin-left:6px; }

/* action buttons */
.actions{
  display:flex;
  gap:8px;
  margin-top:6px;
}
.btn{
  border:0;
  padding:8px 10px;
  border-radius:10px;
  cursor:pointer;
  font-weight:700;
  font-size:0.9rem;
}
.btn-primary{
  background:var(--primary);
  color:white;
  flex:1;
}
.btn-outline{
  background:white;
  border:1px solid rgba(15,23,42,0.06);
  color:var(--muted);
  width:44px;
  height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
}

/* bottom quick bar (fixed) */
.bottom-bar{
  position:fixed;
  bottom:10px;
  left:50%;
  transform:translateX(-50%);
  width:calc(100% - 28px);
  max-width:1180px;
  display:flex;
  gap:10px;
  padding:8px;
  background:rgba(255,255,255,0.96);
  border-radius:999px;
  box-shadow: 0 20px 50px rgba(2,6,23,0.12);
  z-index:70;
  justify-content:center;
}

/* Desktop / larger screens */
@media (min-width:740px){
  .grid{ grid-template-columns: repeat(3, 1fr); }
  .media{ padding-top:72%; }
  .title{ font-size:1rem; }
  .hero h2{ font-size:1.4rem; }
  .search-wrap{ max-width:520px; }
  .bottom-bar{ bottom:18px; }
}

@media (min-width:1024px){
  .grid{ grid-template-columns: repeat(4, 1fr); gap:18px; }
  .media{ padding-top:68%; }
  .card-body{ padding:12px; }
  .container{ padding:0 24px; }
}

/* Utilities */
.hidden{ display:none; }
.center{ text-align:center; }
.small{ font-size:0.85rem; color:var(--muted); }
