/* Milaquerales — estilos. Femenino, moderno, elegante, delicado. Mobile-first. */
* { box-sizing: border-box; }

/* El atributo hidden debe ganarle a cualquier display del CSS
   (p. ej. .card { display: flex } o .wa-btn { display: inline-block });
   sin esto, hidden no oculta esos elementos. */
[hidden] { display: none !important; }

:root {
  --pink-soft: #fdeef1;
  --pink: #f8dfe6;
  --dusty: #d99aa8;
  --dusty-dark: #b96f80;
  --beige: #f7f1e8;
  --gold: #c9a227;
  --gold-soft: #e8d9a0;
  --ink: #4a323a;
  --ink-soft: #7a5a64;
  --white: #ffffff;
  --radius: 16px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--beige);
  line-height: 1.5;
  overflow-x: hidden;
}

img, video { max-width: 100%; }

a { color: var(--dusty-dark); }

/* ---------- Pantalla de entrada ---------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #f9d3d7;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.6s ease;
}

.splash.hidden { opacity: 0; pointer-events: none; }

.splash-img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- Header ---------- */
.site-header {
  text-align: center;
  padding: 24px 16px 16px;
  background: linear-gradient(180deg, var(--pink-soft) 0%, var(--pink) 55%, var(--beige) 100%);
  border-bottom: 2px solid var(--gold-soft);
}

.logo {
  width: min(220px, 60vw);
  height: auto;
  border-radius: 50%;
  border: 3px solid var(--gold-soft);
  background: var(--white);
  display: block;
  margin: 0 auto 12px;
  animation: logo-float 4s ease-in-out infinite;
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.tagline {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  color: var(--dusty-dark);
  font-style: italic;
}

.welcome {
  margin: 0 auto 16px;
  max-width: 640px;
  font-size: 1rem;
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.social a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--gold-soft);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.social a:hover, .social a:focus-visible { background: var(--pink); }

/* ---------- Layout ---------- */
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 12px 32px;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  color: var(--dusty-dark);
  margin: 28px 0 12px;
}

/* ---------- Toolbar ---------- */
.toolbar { background: var(--white); border-radius: var(--radius); padding: 16px; box-shadow: 0 2px 10px rgba(74, 50, 58, 0.08); }

.search-label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.95rem; }

.search {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--pink);
  border-radius: 999px;
  font-size: 1rem;
  outline: none;
  background: var(--pink-soft);
  color: var(--ink);
}

.search:focus { border-color: var(--dusty-dark); background: var(--white); }

.fav-toggle {
  margin-top: 12px;
  border: 1.5px solid var(--gold);
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.fav-toggle.active { background: var(--gold-soft); }

.result-count { margin: 10px 0 0; font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Botones de categorías: ícono grande arriba, texto abajo ---------- */
.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 4px;
}

.cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 86px;
  border: 1.5px solid var(--dusty);
  background: var(--white);
  color: var(--ink);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}

.cat-btn.active { background: var(--dusty-dark); border-color: var(--dusty-dark); color: var(--white); font-weight: 700; }

.cat-icon { font-size: 1.9rem; line-height: 1.2; }

/* ---------- Encabezado de vista de categoría ---------- */
.cat-header {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 2px 10px rgba(74, 50, 58, 0.08);
  margin: 16px 0 4px;
  text-align: center;
}

.cat-header h2 { margin: 10px 0; }

.cat-subtitle { color: var(--ink-soft); margin: 0 0 14px; }

.back-btn {
  border: 1px solid var(--gold-soft);
  background: var(--pink-soft);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  cursor: pointer;
}

.wa-btn {
  display: inline-block;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 999px;
}

.wa-btn:hover, .wa-btn:focus-visible { background: #1fb857; }

.recipes-empty {
  text-align: center;
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 16px;
  margin: 16px 0;
  box-shadow: 0 2px 10px rgba(74, 50, 58, 0.08);
}

.recipes-empty-title { font-weight: 700; font-size: 1.1rem; }

/* ---------- Carrusel de destacados ---------- */
.carousel-wrap { position: relative; }

.carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.carousel-card {
  flex: 0 0 46%;
  scroll-snap-align: start;
  background: var(--white);
  border: 1.5px solid var(--gold-soft);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.carousel-card .card-img { height: 140px; }

.carousel-card h3 { font-size: 0.95rem; margin: 8px 0; }

.carousel-card p { font-size: 0.88rem; color: var(--ink-soft); margin: 0 0 10px; flex: 1; }

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: var(--dusty-dark);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 8px rgba(74, 50, 58, 0.25);
  z-index: 2;
}

.carousel-arrow.prev { left: 2px; }
.carousel-arrow.next { right: 2px; }

/* ---------- Lo más destacado (6 productos) ---------- */
.top-picks-sub { color: var(--ink-soft); margin: -6px 0 12px; }

/* ---------- Product grid ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.card, .pick-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(74, 50, 58, 0.08);
  border: 1px solid #f3dbe0;
  display: flex;
  flex-direction: column;
}

.card-visual {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-emoji { font-size: 64px; line-height: 1; }

.card-img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  background: #fff;
  display: block;
}

.visual-skincare { background: linear-gradient(135deg, #fdeef1, #f6cdd6); }
.visual-beauty { background: linear-gradient(135deg, #fdf3e3, #f6ddc0); }
.visual-hair { background: linear-gradient(135deg, #f3e9f7, #e2c9ec); }
.visual-home { background: linear-gradient(135deg, #eef3e6, #d9e6c4); }
.visual-decor { background: linear-gradient(135deg, #fdf0dd, #f5d9a8); }
.visual-fav { background: linear-gradient(135deg, #fff6d8, #f5e08a); }

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--dusty-dark);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(74, 50, 58, 0.2);
}

.fav-btn.active { background: var(--dusty-dark); color: var(--white); }

.card-body { padding: 14px; display: flex; flex-direction: column; flex: 1; }

.card-cat {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dusty-dark);
}

.card-body h3 { font-size: 1.02rem; margin: 6px 0; line-height: 1.35; }

.card-body p { margin: 0 0 12px; color: var(--ink-soft); font-size: 0.95rem; flex: 1; }

.buy-btn {
  display: block;
  text-align: center;
  background: var(--dusty-dark);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  padding: 12px 10px;
  border-radius: 999px;
}

.buy-btn:hover, .buy-btn:focus-visible { background: #9c5a6c; }

/* Botón Compartir link del producto (por tarjeta) */
.share-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  color: var(--dusty-dark);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.92rem;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  font-family: inherit;
}

.share-link:hover, .share-link:focus-visible { text-decoration: underline; }

/* Tarjeta destacada al abrir un link directo de producto */
.card.highlight { outline: 3px solid var(--gold); outline-offset: -3px; }

/* Botones con icono de marca (tarjetas con compra en varias tiendas) */
.buy-btn-tiktok {
  display: block;
  text-align: center;
  background: #111;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  padding: 12px 10px;
  border-radius: 999px;
  margin-top: 8px;
}
.buy-btn-tiktok:hover, .buy-btn-tiktok:focus-visible { background: #333; }

.video-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  color: var(--dusty-dark);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
}

.btn-icon { font-size: 1.15rem; line-height: 1; }
.btn-icon-svg { flex: 0 0 auto; display: block; }
.btn-with-icon { display: flex; align-items: center; justify-content: center; gap: 8px; }

.empty-state { text-align: center; font-size: 1rem; margin: 24px 0; }

/* ---------- Videos ---------- */
.videos { margin-top: 8px; }

.video-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  background: #fff8e1;
  border: 1px solid var(--gold-soft);
  border-radius: 12px;
  padding: 10px 12px;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.video-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 2px 10px rgba(74, 50, 58, 0.08);
  text-align: center;
}

.video-item video {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  background: #000;
  display: block;
}

.video-title { font-weight: 700; margin: 10px 0; }

.video-btn {
  border: none;
  background: var(--gold);
  color: var(--white);
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.95rem;
  cursor: pointer;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #f8ecef;
  text-align: center;
  padding: 28px 16px;
}

.site-footer .social a { background: transparent; color: #f8ecef; border-color: #a98a90; }

.disclosure { max-width: 680px; margin: 0 auto 16px; font-size: 0.92rem; }
.copyright { font-size: 0.85rem; color: #cbb3ba; margin: 16px 0 0; }

/* ---------- Wider screens ---------- */
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .carousel-card { flex-basis: 31%; }
  .video-grid { grid-template-columns: repeat(3, 1fr); }
  main { padding-left: 20px; padding-right: 20px; }
}

@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .carousel-card { flex-basis: 23%; }
}

/* ---------- Portada de La Tiendita de Mila (página principal) ---------- */
.social a.tiendita-nav {
  background: #b3123f;
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
}

.social a.tiendita-nav:hover { background: #8f0d31; text-decoration: none; }

.tiendita-cover {
  position: relative;
  max-width: 1180px;
  margin: 6px auto 12px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(179, 18, 63, 0.14);
  line-height: 0;
}

.tiendita-cover img {
  width: 100%;
  height: auto;
  display: block;
}

.tiendita-cover .tc-btn {
  position: absolute;
  left: 61.5%;
  top: 71.2%;
  transform: translate(-50%, -50%);
  width: 25%;
  height: 9.5%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #b3123f;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 16px;
  line-height: 1;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(179, 18, 63, 0.35);
  white-space: nowrap;
}

.tiendita-cover .tc-btn:hover { background: #8f0d31; }

@media (max-width: 760px) {
  .tiendita-cover { border-radius: 16px; }
  .tiendita-cover .tc-btn {
    top: 65.5%;
    width: 37%;
    height: 11%;
    font-size: 12px;
  }
}
