:root {
  --primary: #1f8a3b;
  --primary-dark: #166a2c;
  --primary-soft: #eaf6ed;
  --bg: #f6f8f7;
  --surface: #ffffff;
  --text: #162019;
  --muted: #5c6b61;
  --border: #e3e8e5;
  --radius: 16px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Header */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 800; color: var(--primary);
  letter-spacing: -0.3px;
}
.brand-badge {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 18px;
}
.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.search-form {
  flex: 1 1 280px; display: flex; align-items: center;
  background: #f1f5f2; border: 1px solid var(--border);
  border-radius: 12px; padding: 4px 6px 4px 14px;
}
.search-form:focus-within { border-color: var(--primary); background: #fff; }
.search-form input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 14.5px; color: var(--text); padding: 8px 4px;
}
.search-form button {
  border: 0; background: var(--primary); color: #fff;
  padding: 8px 16px; border-radius: 9px; font-weight: 600;
  font-size: 13.5px; cursor: pointer;
}
.search-form button:hover { background: var(--primary-dark); }

.nav-pills { display: flex; gap: 8px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
}
.pill.active, .pill:hover {
  border-color: var(--primary); background: var(--primary-soft); color: var(--primary);
}

/* Main */
main { padding: 20px 0 48px; }
.section { margin-top: 26px; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px; gap: 12px;
}
.section-head h2 { margin: 0; font-size: 19px; font-weight: 800; }
.section-link { font-size: 13.5px; font-weight: 600; color: var(--primary); }

/* Hero / Banners */
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.hero-banner {
  position: relative; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, #166a2c, #27a348);
  color: #fff; min-height: 190px;
  display: flex; align-items: flex-end;
}
.hero-banner img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.62), rgba(0,0,0,0.08));
}
.hero-content { position: relative; z-index: 2; padding: 22px; max-width: 620px; }
.hero-content h1 { margin: 0 0 6px; font-size: 24px; line-height: 1.2; }
.hero-content p { margin: 0; font-size: 14px; opacity: 0.92; }

/* Categories strip */
.cat-strip {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: thin;
}
.cat-item {
  flex: 0 0 112px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 10px 8px; text-align: center;
  transition: transform 0.15s, border-color 0.15s;
}
.cat-item:hover { transform: translateY(-2px); border-color: var(--primary); }
.cat-thumb {
  width: 56px; height: 56px; border-radius: 12px; margin: 0 auto 8px;
  background: var(--primary-soft); overflow: hidden;
  display: grid; place-items: center; color: var(--primary); font-weight: 700;
}
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-name { font-size: 12.5px; font-weight: 600; color: var(--text); }

/* Grids */
.grid-cards {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.card-media {
  position: relative; aspect-ratio: 16 / 10; background: #eef3ef; overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.badge-type {
  position: absolute; top: 10px; left: 10px;
  background: rgba(22, 32, 25, 0.78); color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
}
.badge-type.service { background: var(--primary); }
.card-body { padding: 14px; display: flex; flex-direction: column; flex: 1; gap: 6px; }
.card-cat { font-size: 11.5px; font-weight: 600; color: var(--primary); }
.card-title { margin: 0; font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.card-desc { margin: 0; font-size: 13px; color: var(--muted); }
.card-meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.card-foot {
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.price { font-size: 16.5px; font-weight: 800; color: var(--text); }
.price-old { font-size: 12.5px; color: #8c9890; text-decoration: line-through; margin-left: 6px; }

/* Store cards */
.store-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  display: flex; align-items: center; gap: 12px;
}
.store-card:hover { border-color: var(--primary); }
.store-logo {
  width: 58px; height: 58px; border-radius: 14px; overflow: hidden;
  background: var(--primary-soft); flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; color: var(--primary);
}
.store-logo img { width: 100%; height: 100%; object-fit: cover; }
.status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px;
  background: #1f8a3b;
}
.status-dot.off { background: #d64545; }

/* Detail pages */
.detail-layout {
  display: grid; gap: 20px; grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .detail-layout { grid-template-columns: 1.15fr 1fr; align-items: start; }
}
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.gallery-main {
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 11; background: #eef3ef; border: 1px solid var(--border);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; }
.gallery-thumbs img {
  width: 72px; height: 72px; border-radius: 10px; object-fit: cover;
  border: 2px solid transparent; cursor: pointer;
}
.gallery-thumbs img.active { border-color: var(--primary); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 11px; font-weight: 700; font-size: 14.5px;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.chip {
  font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  background: #f1f5f2; color: var(--text);
}
.chip.green { background: var(--primary-soft); color: var(--primary); }
.chip.red { background: #fdecec; color: #b83232; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.empty {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; text-align: center; color: var(--muted);
}
.footer {
  border-top: 1px solid var(--border); background: var(--surface);
  padding: 20px 0; color: var(--muted); font-size: 13px;
}
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }


/* Full-bleed Hero Carousel */
.hero-bleed {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: -20px;
  overflow: hidden;
  background: #102416;
  color: #fff;
}
.hero-track {
  display: flex;
  width: 100%;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: clamp(380px, 54vw, 640px);
  display: flex;
  align-items: flex-end;
}
.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.28) 52%,
    rgba(0, 0, 0, 0.12) 100%
  );
}
.hero-slide-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 56px 36px;
  box-sizing: border-box;
}
.hero-copy {
  max-width: 640px;
}
.hero-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.6vw, 40px);
  line-height: 1.15;
  font-weight: 800;
}
.hero-copy p {
  margin: 0 0 18px;
  font-size: clamp(14px, 1.5vw, 17px);
  opacity: 0.94;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14.5px;
  transition: background 0.15s, transform 0.15s;
}
.hero-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}
.hero-arrow.prev { left: 14px; }
.hero-arrow.next { right: 14px; }
.hero-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 8px;
}
.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}
.hero-dot.active {
  width: 24px;
  background: #fff;
}
@media (max-width: 640px) {
  .hero-slide { height: clamp(320px, 76vw, 440px); }
  .hero-slide-inner { padding: 20px 44px 30px; }
  .hero-arrow { width: 34px; height: 34px; font-size: 20px; }
}


/* Secciones con espacio lateral listo para avisos o promociones */
.section-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.section-main {
  min-width: 0;
}
.section-main .section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.promo-rail {
  display: none;
}
@media (min-width: 1024px) {
  .section-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .promo-rail {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 1px;
  }
}
.promo-slot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.promo-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.promo-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.promo-card-media {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #eef3ef;
}
.promo-card-media.no-img {
  min-height: 34px;
  background: transparent;
}
.promo-card-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8;
  max-height: 120px;
  object-fit: cover;
  border-radius: 12px;
}
.promo-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(22, 32, 25, 0.84);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.promo-card-body {
  padding: 2px 2px 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.promo-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.promo-card-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.promo-card-btn {
  margin-top: 6px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  transition: background 0.15s;
}
.promo-card-btn:hover {
  background: var(--primary-dark);
}
