/* components.css — Layout compartido + botones, cards, forms, banner, hero */

/* ===== Botones ===== */
.btn-primario, .btn-secundario, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 50px; font-weight: 600;
  font-size: .92rem; border: none; cursor: pointer; transition: all .2s;
  text-decoration: none;
}
.btn-primario { background: var(--rosa); color: #fff; }
.btn-primario:hover { background: #b02a56; transform: translateY(-2px); }
.btn-primario:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-secundario { background: var(--blanco); color: var(--texto); border: 1px solid var(--borde); }
.btn-secundario:hover { background: var(--gris-bg); }
.btn-ghost { background: transparent; color: var(--rosa); }
.btn-ghost:hover { background: var(--rosa-bg); }
.btn-full { width: 100%; padding: 14px; font-size: 1rem; }

/* ===== Badges ===== */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.badge-18 { background: #d32f2f; color: #fff; }
.badge-nuevo { background: var(--rosa); color: #fff; }

/* ===== Form ===== */
.form-grupo { margin-bottom: 14px; }
.form-grupo label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.form-grupo input, .form-grupo select, .form-grupo textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--borde);
  border-radius: var(--radio-sm); font-size: .92rem; font-family: inherit;
  outline: none; transition: border .2s; background: #fff;
}
.form-grupo input:focus, .form-grupo select:focus, .form-grupo textarea:focus { border-color: var(--rosa); }

/* ===== Splash ===== */
#splash-screen {
  position: fixed; inset: 0; background: var(--rosa-bg);
  display: flex; justify-content: center; align-items: center;
  flex-direction: column; z-index: 9999; transition: opacity .7s ease;
}
.splash-logo { width: 130px; height: 130px; border-radius: 50%; animation: pulse 3s infinite; }
.splash-text { margin-top: 25px; font-family: var(--fuente-cursiva); font-size: 2rem; color: var(--rosa); opacity: 0; animation: fadeIn 2s forwards .8s; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes fadeIn { to { opacity: 1; } }

/* ===== Banner horario ===== */
.banner-horario { padding: 12px 22px; text-align: center; font-weight: 500; font-size: .92rem; }
.banner-horario.comercial { background: #e7f5e8; color: #1e6b28; }
.banner-horario.nocturno { background: #2a2440; color: #f5e1a4; }
.banner-horario.cerrado { background: #ffe9d6; color: #a1490e; }

/* ============ LAYOUT COMPARTIDO ============ */

/* ===== Header ===== */
.site-header {
  background: var(--blanco);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--texto);
  flex-shrink: 0;
}
.site-header .logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.site-header .logo span {
  font-family: var(--fuente-cursiva);
  font-size: 1.6rem;
  color: var(--rosa);
  font-weight: 700;
  white-space: nowrap;
}
.top-nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  align-items: center;
}
.top-nav a {
  text-decoration: none;
  color: var(--texto-suave);
  font-weight: 500;
  font-size: .95rem;
  padding: 6px 0;
  transition: color .2s;
  white-space: nowrap;
}
.cart-btn {
  position: relative;
  background: var(--rosa);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  transition: transform .2s;
  flex-shrink: 0;
}
.cart-btn:hover { transform: scale(1.05); }
.cart-btn span {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #fff;
  color: var(--rosa);
  font-size: .7rem;
  font-weight: 700;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* ===== Hero ===== */
.hero, .hero-after {
  padding: 60px 22px;
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-text strong, .hero-after strong {
  font-family: var(--fuente-cursiva);
  font-size: 1.4rem;
}
.hero-text h1, .hero-after h1 {
  font-family: var(--fuente-titulo);
  font-size: 3rem;
  line-height: 1.15;
  margin: 12px 0 18px;
}
.hero-text p, .hero-after p {
  font-size: 1.05rem;
  margin-bottom: 24px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-img img {
  width: 100%;
  max-width: 500px;
  margin: auto;
}

/* ===== Secciones ===== */
.seccion, .seccion-after { padding: 60px 22px; }
.seccion-titulo, .titulo-centrado { text-align: center; margin-bottom: 40px; }
.seccion-titulo h2, .seccion-after h2 {
  font-family: var(--fuente-titulo);
  font-size: 2.4rem;
  margin-bottom: 8px;
}
.seccion-titulo p, .seccion-after .sub { font-size: 1.05rem; }

/* ===== Grid productos ===== */
.grid-productos, .grid-after {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.grid-after {
  margin: 40px auto 0;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* ===== Cards ===== */
.producto-card, .card-after {
  border-radius: var(--radio);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.producto-card:hover, .card-after:hover { transform: translateY(-4px); }
.producto-img {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--gris-bg);
}
.producto-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.producto-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.producto-info h3 { font-size: .98rem; font-weight: 600; }
.producto-info p { font-size: .82rem; flex: 1; }
.producto-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.precio { font-weight: 700; font-size: 1.05rem; }

/* ===== CTA Band ===== */
.cta-band, .cta-band-after { padding: 60px 22px; text-align: center; }
.cta-band h2, .cta-band-after h2 {
  font-family: var(--fuente-titulo);
  font-size: 2rem;
  margin-bottom: 12px;
}
.cta-band p, .cta-band-after p {
  font-size: 1.05rem;
  margin-bottom: 22px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Footer ===== */
.site-footer { padding: 30px 22px; text-align: center; font-size: .85rem; }
.site-footer a { text-decoration: none; }
.site-footer p { margin: 4px 0; }

/* ===== Banner 18 en cards ===== */
.banner-18 {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #d32f2f;
  color: #fff;
  font-weight: 700;
  font-size: .7rem;
  padding: 3px 8px;
  border-radius: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero, .hero-after { grid-template-columns: 1fr; text-align: center; }
  .hero .hero-img, .hero-after .hero-img { order: -1; }
  .hero-text h1, .hero-after h1 { font-size: 2rem; }
  .top-nav { display: none; }
}
@media (max-width: 560px) {
  .grid-productos, .grid-after { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .producto-info { padding: 10px; }
  .producto-info h3 { font-size: .88rem; }
  .site-header { padding: 10px 14px; }
  .site-header .logo span { font-size: 1.3rem; }
}