/* Fuente y resets */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  background: #f4f6f8;
  color: #111827;
}

/* Header */
.header {
  background: linear-gradient(135deg, #0b132b 0%, #1c2541 100%);
  color: #fff;
  padding: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  background: #5bc0be; color: #0b132b;
  border-radius: 10px;
  font-weight: 800;
}
.brand h1 { font-size: 1.25rem; margin: 0; letter-spacing: .5px; }

.nav {
  margin-top: 10px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.tab {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .06s ease, background .2s ease, border-color .2s ease;
}
.tab:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.35); }
.tab.active { background: #5bc0be; color: #0b132b; border-color: transparent; }

#search {
  margin-left: auto;
  min-width: 220px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  outline: none;
}

/* Grid de productos */
.grid {
  padding: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(17,24,39,.08);
  overflow: hidden;
  display: grid;
  grid-template-rows: 160px auto;
  transition: transform .08s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(17,24,39,.12); }

.thumb { background: #eef2f7; display: grid; place-items: center; }
.thumb img { width: 100%; height: 160px; object-fit: cover; }

.info { padding: 14px; display: grid; gap: 8px; }
.info h3 { margin: 0; font-size: 1rem; line-height: 1.25rem; }
.info p { margin: 0; color: #4b5563; font-size: .9rem; min-height: 40px; }
.price { font-weight: 700; font-size: 1.05rem; }
.btn {
  appearance: none;
  border: 0; border-radius: 12px;
  background: #0b132b; color: #fff;
  padding: 10px 12px;
  cursor: pointer;
}
.btn:hover { background: #111b3a; }

.empty, .error {
  background: #fff;
  border: 1px dashed #cbd5e1;
  color: #334155;
  padding: 16px;
  border-radius: 12px;
}

/* Footer */
.footer {
  padding: 18px;
  text-align: center;
  color: #6b7280;
}
/* Modal */
.modal.hidden { display: none; }
.modal { position: fixed; inset: 0; z-index: 50; }
.modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(2px); }
.modal__card {
  position: relative; z-index: 51; margin: 40px auto; max-width: 980px; background: #fff; color:#111;
  border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.25); overflow: hidden; display: grid; grid-template-columns: 1fr 1fr;
}
@media (max-width: 920px){ .modal__card { grid-template-columns: 1fr; margin: 10px; } }

.modal__close {
  position: absolute; top: 10px; right: 10px; border:0; background:#0b132b; color:#fff; width:36px; height:36px;
  border-radius: 999px; cursor:pointer; font-size: 20px; line-height: 36px;
}

.modal__media { padding: 16px; background: #eef2f7; display: grid; gap: 10px; align-content: start; }
.modal__media img { width: 100%; height: auto; border-radius: 12px; }
.modal__thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.modal__thumbs img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent;
}
.modal__thumbs img.active { border-color: #0b132b; }

.modal__content { padding: 18px; display: grid; gap: 12px; }
.modal__meta { display: flex; gap: 16px; flex-wrap: wrap; color:#374151; }
.modal__meta div { background:#f3f4f6; padding:6px 10px; border-radius: 8px; }

.modal__stock { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  display:inline-block; padding: 4px 8px; border-radius: 999px; font-size: .85rem; font-weight: 600;
}
.badge.ok { background:#d1fae5; color:#065f46; }
.badge.low { background:#fef3c7; color:#92400e; }
.badge.out { background:#fee2e2; color:#991b1b; }
/* ====== HERO ====== */
.hero { position: relative; height: 360px; border-radius: 0; overflow: hidden; }
.hero__slide {
  position: relative; width: 100%; height: 100%;
  background: #0b132b url('img/hero-1.jpg') center/cover no-repeat;
  display: grid; place-items: center; isolation: isolate;
}
.hero__slide::after { /* degradado oscuro para legibilidad */
  content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.55));
  z-index: 0;
}
.hero__content { position: relative; z-index: 1; color: #fff; text-align: center; padding: 16px; }
.hero__content h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); margin: 0 0 8px; }
.hero__content p { margin: 0 0 16px; opacity: .9; }
.hero__cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-light { background: #ffffff; color: #0b132b; }

.hero__dots { position: absolute; bottom: 10px; left: 0; right: 0; display:flex; gap:6px; justify-content:center; z-index:1; }
.hero__dots .dot {
  width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.45);
}
.hero__dots .dot.active { background: #fff; }

/* ====== BENEFITS BAR ====== */
.benefits {
  background: #0b132b; color: #e5f9f8;
  display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 12px; padding: 16px;
}
.benefit { display: flex; align-items: center; gap: 10px; }
.benefit__icon { font-size: 1.4rem; }

/* ====== HOME CATEGORIES ====== */
.home-cats {
  padding: 20px; display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
}
.home-cat {
  position: relative; cursor: pointer; overflow: hidden; border-radius: 16px;
  box-shadow: 0 10px 24px rgba(17,24,39,.1);
}
.home-cat img { width: 100%; height: 180px; object-fit: cover; transition: transform .3s ease; display:block; }
.home-cat:hover img { transform: scale(1.05); }
.home-cat__label {
  position: absolute; bottom: 10px; left: 10px; background: rgba(0,0,0,.55);
  color: #fff; padding: 6px 10px; border-radius: 999px; font-weight: 600;
}

.topbar{
  background:#0b132b; color:#cfe9ff; font-size:.9rem;
  display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:8px; padding:8px 12px; align-items:center;
}
.topbar a{ color:#e8f6ff; text-decoration:none; }
.topbar__item{ text-align:center; }
.home-cat{ border:1px solid #eef2f7; }
.home-cat__label{ backdrop-filter:saturate(140%) blur(2px); }
.featured{ padding: 12px 20px; }
.featured__head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.ribbon{
  position:absolute; top:10px; left:-8px; background:#10b981; color:#fff;
  padding:4px 12px; font-size:.8rem; font-weight:700; transform:rotate(-8deg);
  border-radius:6px;
}
.ribbon.out{ background:#ef4444; }
.wa-float{
  position:fixed; right:16px; bottom:16px; width:54px; height:54px;
  display:grid; place-items:center; font-size:1.4rem; text-decoration:none;
  background:#25D366; color:#fff; border-radius:999px; box-shadow:0 10px 22px rgba(0,0,0,.2); z-index:60;
}
.wa-float:hover{ filter:brightness(.95); }
.stock-list ul { list-style: none; padding-left: 0; margin: 6px 0 0; }
.stock-list li { display: flex; gap: 8px; align-items: center; font-weight: 600; }
