/* =====================================================
   CATEGORIAS PAGE v2.1 — assets/css/categorias-v2.css
   ===================================================== */

/* ══ HERO ══ */
.cats-hero {
  position: relative;
  background: linear-gradient(160deg, #3d3280 0%, #5b4ca7 45%, #a76bcc 100%);
  padding-top: calc(var(--nav-h, 68px) + 3rem);
  padding-bottom: 5.5rem;
  overflow: hidden;
  text-align: center;
}
.cats-hero__bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 15% 50%, rgba(255,154,217,0.25) 0%, transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(142,231,239,0.20) 0%, transparent 40%);
  pointer-events: none;
}
.cats-hero__label {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.cats-hero__title {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.cats-hero__accent {
  color: #ff9ad9;
  position: relative;
}
.cats-hero__sub {
  color: rgba(255,255,255,0.82);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  max-width: 460px;
  margin: 0 auto 2rem;
}

/* Buscador hero */
.cats-searchbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.4rem 0.4rem 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  max-width: 680px;
  margin: 0 auto;
  flex-wrap: nowrap;
}
.cats-searchbar__wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.cats-searchbar__icon {
  position: absolute; left: 1rem; top: 50%;
  transform: translateY(-50%); color: #aaa; pointer-events: none;
}
.cats-searchbar__input {
  width: 100%; border: none; outline: none; background: transparent;
  padding: 0.6rem 2.8rem 0.6rem 2.8rem;
  font-family: 'Poppins', sans-serif; font-size: 0.9rem; color: #333;
}
.cats-searchbar__input::placeholder { color: #bbb; }
.cats-searchbar__clear {
  position: absolute; right: 0.6rem; top: 50%;
  transform: translateY(-50%);
  color: #bbb; font-size: 0.8rem; text-decoration: none;
  transition: color 0.15s;
}
.cats-searchbar__clear:hover { color: #5b4ca7; }
.cats-searchbar__select {
  border: none; border-left: 1px solid rgba(91,76,167,0.12);
  outline: none; background: transparent;
  padding: 0.6rem 0.8rem;
  font-family: 'Poppins', sans-serif; font-size: 0.85rem; color: #555;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.cats-searchbar__btn {
  background: #ff8e74; color: #fff;
  border: none; border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-family: 'Poppins', sans-serif; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background 0.18s, transform 0.18s;
}
.cats-searchbar__btn:hover { background: #ff7655; transform: translateY(-1px); }

.cats-hero__wave {
  position: absolute; bottom: 0; left: 0; right: 0; line-height: 0;
}
.cats-hero__wave svg { display: block; width: 100%; height: 55px; }

@media (max-width: 600px) {
  .cats-searchbar {
    flex-wrap: wrap;
    border-radius: 1.2rem;
    padding: 0.75rem;
    gap: 0.5rem;
  }
  .cats-searchbar__select { border-left: none; border-top: 1px solid rgba(91,76,167,0.1); width: 100%; }
  .cats-searchbar__btn { width: 100%; justify-content: center; border-radius: 999px; }
}

/* ══ RESULTADOS ══ */
.cats-results { background: #fff7fc; padding: 2.5rem 0 1rem; }
.cats-results__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap;
}
.cats-results__title {
  font-family: 'Baloo 2', cursive; font-size: 1.5rem;
  font-weight: 700; color: #5b4ca7; margin: 0;
}
.cats-results__count {
  background: rgba(91,76,167,0.10); color: #5b4ca7;
  font-size: 0.8rem; font-weight: 700;
  padding: 0.2rem 0.7rem; border-radius: 999px;
  margin-left: 0.5rem; vertical-align: middle;
}
.cats-results__clear {
  color: #5b4ca7; font-size: 0.88rem; font-weight: 500; text-decoration: none;
}
.cats-results__clear:hover { text-decoration: underline; }
.cats-empty-search {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.75rem; text-align: center; padding: 3rem 1rem;
  color: #999;
}

/* ══ GRID CATEGORÍAS ══ */
.cats-grid-section {
  background: #fff7fc;
  padding: 3rem 0 4rem;
}
.cats-grid-header { text-align: center; margin-bottom: 2rem; }
.cats-grid-title {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800; color: #5b4ca7; margin-bottom: 0.4rem;
}
.cats-grid-sub { color: #aaa; font-size: 0.92rem; }

.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
@media (max-width: 480px) {
  .cats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}

/* Tile */
.cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 2.2rem 1rem 1.8rem;
  border-radius: 1.3rem;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.22s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
  min-height: 160px;
}
.cat-tile:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 36px rgba(0,0,0,0.20);
  text-decoration: none;
}
.cat-tile__emoji {
  font-size: 2.6rem; line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
  transition: transform 0.22s;
}
.cat-tile:hover .cat-tile__emoji { transform: scale(1.15) rotate(-5deg); }
.cat-tile__name {
  font-family: 'Baloo 2', cursive;
  font-size: 1.1rem; font-weight: 700;
  color: #fff; text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.cat-tile__count {
  font-size: 0.72rem; font-weight: 600;
  color: rgba(255,255,255,0.78);
  background: rgba(255,255,255,0.15);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
}
.cat-tile__shine {
  position: absolute; top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
  pointer-events: none;
}
.cat-tile:hover .cat-tile__shine { left: 130%; }

/* Tile especial creador */
.cat-tile--creador {
  background: linear-gradient(135deg, #5b4ca7, #a76bcc);
  border: 2px dashed rgba(255,255,255,0.4);
}

/* ══ BANNER WA ══ */
.cats-wa-banner {
  background: #fff;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid rgba(91,76,167,0.07);
}
.cats-wa-inner {
  background: linear-gradient(135deg, #25d366 0%, #1ebe5d 100%);
  border-radius: 1.3rem;
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 8px 32px rgba(37,211,102,0.25);
}
.cats-wa-text h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.3rem; font-weight: 700;
  color: #fff; margin-bottom: 0.2rem;
}
.cats-wa-text p { color: rgba(255,255,255,0.88); font-size: 0.92rem; margin: 0; }
.cats-wa-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #fff; color: #16a34a;
  font-size: 0.95rem; font-weight: 700;
  padding: 0.75rem 1.8rem; border-radius: 999px;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transition: transform 0.18s, box-shadow 0.18s;
}
.cats-wa-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0,0,0,0.16);
  color: #16a34a;
}
@media (max-width: 600px) {
  .cats-wa-inner { padding: 1.5rem; flex-direction: column; }
  .cats-wa-btn { width: 100%; justify-content: center; }
}