/* Ajustes propios sobre Pico CSS */
:root {
  --price-color: #0a7d4f;
  --hero-from: #0f172a;
  --hero-to: #1e3a8a;
}
@media (prefers-color-scheme: dark) {
  :root { --price-color: #34d399; }
}

.brand { font-weight: 800; font-size: 1.15rem; text-decoration: none; }
.site-header { padding-block: .25rem; }
.site-footer { padding-block: 2rem; text-align: center; opacity: .75; }

/* ---------- Mensaje grande (hero) ---------- */
.hero {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: #fff;
  padding: clamp(3.5rem, 10vw, 7.5rem) 0;
  text-align: center;
  margin-bottom: 3rem;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 6.5vw, 4.75rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.hero p {
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  max-width: 46rem;
  margin: 0 auto 2rem;
  color: rgba(255, 255, 255, .88);
  text-wrap: pretty;
}
.hero [role="button"].contrast { background: #fff; border-color: #fff; color: #0f172a; font-weight: 700; }
.hero [role="button"] { padding-inline: 2rem; }

.section-title { margin-bottom: 1.5rem; }
.empty { text-align: center; padding: 3rem 0; opacity: .7; }

/* ---------- Tarjetas de producto ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.75rem;
}
.product-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.product-body { padding: 1.25rem 1.25rem 0; flex: 1; }
.product-brand {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: .2rem;
  color: var(--pico-muted-color);
}
.product-model { margin: 0 0 .6rem; font-size: 1.3rem; }
.product-description { white-space: pre-line; font-size: .95rem; margin-bottom: 0; }
.product-card > footer {
  margin: 1rem 0 0;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.product-price {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--price-color);
  margin: 0;
  line-height: 1;
}
.pay-btn { width: 100%; font-weight: 700; }

/* ---------- Carrusel ---------- */
.carousel { position: relative; background: var(--pico-muted-border-color); }
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  aspect-ratio: 1 / 1;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 3px solid var(--pico-primary); outline-offset: -3px; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: center; margin: 0; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
}
.carousel-btn:hover { background: rgba(0, 0, 0, .7); }
.carousel-btn.prev { left: .6rem; }
.carousel-btn.next { right: .6rem; }
.carousel-dots {
  position: absolute;
  bottom: .7rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: .4rem;
}
.carousel-dots button {
  width: .65rem;
  height: .65rem;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 0 2px rgba(0, 0, 0, .5);
}
.carousel-dots button[aria-current="true"] { background: #fff; transform: scale(1.25); }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: 100%; max-width: 26rem; }
.login-card h1 { margin-bottom: .25rem; }

/* ---------- Admin ---------- */
.alert { padding: .8rem 1rem; border-radius: var(--pico-border-radius); margin-bottom: 1.25rem; }
.alert ul { margin: .4rem 0 0; }
.alert.ok { background: #d1fae5; color: #065f46; }
.alert.error { background: #fee2e2; color: #991b1b; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.inline-form { display: inline; margin: 0; }
.inline-form button { margin: 0; }
.small { padding: .3rem .7rem; font-size: .85rem; width: auto; margin: 0; }
button.danger { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.actions-row { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.nowrap { white-space: nowrap; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.badge { padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; }
.badge.on { background: #d1fae5; color: #065f46; }
.badge.off { background: #e5e7eb; color: #374151; }
.image-list { display: flex; gap: .75rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.image-item { display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: .85rem; }
.image-list img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; }
.form-actions { display: flex; gap: 1rem; }
.form-actions > * { width: auto; margin: 0; }
.admin nav ul:last-child { flex-wrap: wrap; }
