*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #f5f0e8;
  font-family: 'DM Sans', sans-serif;
}

/* ══════════════════════════
       HEADER INTRODUCTORIO
    ══════════════════════════ */
.cat-header {
  background: #eeebe4;
  padding: 5rem 8% 4.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 3rem;
  border-bottom: 1px solid #ddd9d0;
}

.cat-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #9a8a72;
  margin-bottom: 1.4rem;
}

.cat-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--accent, #b5732a);
}

.cat-header-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.1;
  color: #2e2318;
}

.cat-header-title em {
  font-style: italic;
  font-weight: 300;
  color: #8a6a3a;
}

.cat-header-rule {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.cat-header-rule-line {
  height: 1px;
  width: 60px;
  background: linear-gradient(90deg, #b5732a, transparent);
}

.cat-header-rule-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b5732a;
  opacity: 0.5;
}

.cat-header-right {
  padding-bottom: 0.2rem;
}

.cat-header-desc {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.85;
  color: #7a6448;
  max-width: 380px;
}

.cat-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #2e2318;
  text-decoration: none;
  border-bottom: 1px solid #b5732a;
  padding-bottom: 2px;
  transition: gap 0.25s ease, color 0.25s ease;
}

.cat-header-cta:hover {
  gap: 0.9rem;
  color: #8a6a3a;
}

/* ══════════════════════════
       GALLERY (v2 original)
    ══════════════════════════ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 75vh;
  min-height: 500px;
  gap: 3px;
  background: #d4c9b0;
}

.cat-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.cat-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
  filter: brightness(0.9) saturate(0.85) sepia(0.15);
  transform-origin: center bottom;
}

.cat-card:hover img {
  transform: scale(1.12) translateY(-2%);
  filter: brightness(0.35) saturate(1.4) sepia(0);
}

.cat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--accent);
  z-index: 3;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-card:hover::before {
  transform: scaleX(1);
}

.cat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.08) 40%, rgba(0, 0, 0, 0.75) 100%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.cat-card:hover::after {
  opacity: 1;
}

.cat-card:nth-child(1) {
  --accent: #c8a85a;
}

.cat-card:nth-child(2) {
  --accent: #b5732a;
}

.cat-card:nth-child(3) {
  --accent: #c0392b;
}

.cat-card:nth-child(4) {
  --accent: #7d9e4e;
}

.cat-card:nth-child(5) {
  --accent: #c8a85a;
}

.cat-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.cat-idle {
  padding: 1.4rem 1.2rem;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.cat-card:hover .cat-idle {
  opacity: 0;
  transform: translateY(6px);
}

.cat-idle-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
}

.cat-hover {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transform: translateY(100%);
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-card:hover .cat-hover {
  transform: translateY(0);
}

.cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

.cat-tag::before {
  content: '';
  display: block;
  width: 18px;
  height: 1px;
  background: var(--accent);
}

.cat-hover-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 600;
  font-style: italic;
  color: #fff;
  line-height: 1.05;
}

.cat-hover-desc {
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  max-width: 220px;
}

.cat-hover-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  margin-top: 0.3rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.25s ease, color 0.25s ease;
}

.cat-hover-btn:hover {
  background: var(--accent);
  color: #fff;
}

.cat-idle-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  z-index: 1;
  transition: opacity 0.4s ease;
}

.cat-card:hover .cat-idle-overlay {
  opacity: 0;
}

/* ══════════════════════════
       RESPONSIVE MÓVIL
    ══════════════════════════ */
@media (max-width: 600px) {
  .cat-header {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 3rem 6%;
  }

  .cat-grid {
    display: block;
    position: relative;
    height: 440px;
    overflow: hidden;
    background: transparent;
    gap: 0;
  }

  .cat-card {
    position: absolute;
    top: 0;
    height: 100%;
    width: 78vw;
    transition: left 0.5s cubic-bezier(0.77, 0, 0.175, 1),
      transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    cursor: pointer;
    will-change: left, transform;
    margin-right: 0;
  }

  .cat-hover-desc {
    font-size: 0.85rem;
    /*font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    max-width: 220px;*/
  }

  .cat-hover-btn {
    font-size: 0.75rem;

  }

  .cat-card.active {
    transform: scale(1.03);
    z-index: 2;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
  }

  .cat-card.peek {
    transform: scale(0.97);
    z-index: 1;
    cursor: pointer;
  }

  .cat-card.behind {
    transform: scale(0.94);
    z-index: 0;
  }

  /* Panel activado */
  .cat-card.active img {
    transform: scale(1.12) translateY(-2%);
    filter: brightness(0.35) saturate(1.4) sepia(0);
  }

  .cat-card.active::before {
    transform: scaleX(1);
  }

  .cat-card.active::after {
    opacity: 1;
  }

  .cat-card.active .cat-idle-overlay {
    opacity: 0;
  }

  .cat-card.active .cat-idle {
    opacity: 0 !important;
    transform: translateY(6px) !important;
  }

  .cat-card.active .cat-hover {
    transform: translateY(0);
  }

  /* Nombre siempre visible en cards no activas */
  .cat-idle {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Dots */
  .cat-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.8rem;
    background: #eeebe4;
    border-top: 1px solid #ddd9d0;
  }

  .cat-scroll-hint-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d4c9b0;
    transition: background 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
  }

  .cat-scroll-hint-dot.active {
    background: #b5732a;
    transform: scale(1.4);
  }
}

.cat-scroll-hint {
  display: none;
}