:root {
  --pyb-ink: #152029;
  --pyb-forest: #234e52;
  --pyb-leaf: #2f6f73;
  --pyb-sand: #dce8e6;
  --pyb-paper: #eef4f3;
  --pyb-cream: #f5f8f7;
  --pyb-accent: #b8892d;
  --pyb-muted: #5d6b6c;
  --pyb-shadow: 0 18px 40px rgba(21, 32, 41, 0.14);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --appbar-h: 3.5rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--pyb-ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(47, 111, 115, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(184, 137, 45, 0.12), transparent 50%),
    linear-gradient(180deg, var(--pyb-cream) 0%, var(--pyb-paper) 45%, #e4eeec 100%);
  padding-top: var(--appbar-h);
}

.pyb-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(28, 36, 33, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 36, 33, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 65%);
  z-index: 0;
}

.pyb-hero,
.pyb-section,
.pyb-list-top,
.pyb-main,
.pyb-footer {
  position: relative;
  z-index: 1;
}

/* —— App menu —— */
.pyb-appbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--appbar-h);
  background: #152029;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pyb-appbar-inner {
  height: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pyb-appbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.12rem, 3.4vw, 1.45rem);
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 42;
  white-space: nowrap;
}

.pyb-appbar-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  position: relative;
  z-index: 42;
}

.pyb-appbar-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.nav-open .pyb-appbar-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.nav-open .pyb-appbar-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .pyb-appbar-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.pyb-appnav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.pyb-appnav a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.pyb-appnav a:hover,
.pyb-appnav a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.pyb-nav-drawer {
  display: none;
}

.pyb-appnav-mobile {
  display: none;
}

@media (max-width: 860px) {
  .pyb-appbar-toggle { display: inline-flex; }
  .pyb-appnav-desktop { display: none; }

  .pyb-nav-drawer {
    position: fixed;
    top: var(--appbar-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 39;
    display: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #152029;
    padding: 0.75rem 1rem 1.5rem;
  }

  .pyb-nav-drawer:not([hidden]) {
    display: block;
  }

  body.nav-open {
    overflow: hidden;
  }

  .pyb-appnav-mobile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .pyb-appnav-mobile a {
    padding: 0.95rem 1rem;
    font-size: 1.05rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
  }
}

.pyb-catmenu {
  position: relative;
}

.pyb-catmenu-trigger {
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

.pyb-catmenu-trigger:hover,
.pyb-catmenu.is-open .pyb-catmenu-trigger {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.pyb-catmenu-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: min(22rem, 78vw);
  max-height: min(70vh, 32rem);
  overflow-y: auto;
  padding: 0.55rem 0;
  background: #1b2c38;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  z-index: 50;
}

.pyb-catmenu-item {
  display: block;
  color: rgba(255, 255, 255, 0.88) !important;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.42rem 1rem;
  border-radius: 0 !important;
  background: transparent !important;
}

.pyb-catmenu-item:hover,
.pyb-catmenu-item.is-active {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

.pyb-catmenu-item.nivel-1 { padding-left: 1.65rem; }
.pyb-catmenu-item.nivel-2 { padding-left: 2.3rem; }
.pyb-catmenu-item.nivel-3 { padding-left: 2.95rem; }
.pyb-catmenu-item.nivel-4 { padding-left: 3.6rem; }

.pyb-catmenu-mobile-title {
  margin: 0.75rem 0 0.2rem;
  padding: 0 0.25rem;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .pyb-nav-drawer .pyb-catmenu-item {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    font-size: 0.95rem;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.04) !important;
  }
  .pyb-nav-drawer .pyb-catmenu-item.nivel-0 { font-weight: 600; }
}

/* —— Hero / portada —— */
.pyb-cta-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 1rem auto 0;
  width: 100%;
  max-width: 28rem;
  padding: 1.05rem 1.7rem;
  border-radius: 16px;
  background: var(--pyb-sand);
  color: var(--pyb-ink);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, background 0.15s ease;
}

.pyb-cta-all:hover {
  background: #fff;
  color: var(--pyb-ink);
  transform: translateY(-2px);
}

.pyb-cta-all-solid {
  margin-top: 0;
  background: var(--pyb-forest);
  color: #fff;
  box-shadow: 0 10px 24px rgba(21, 32, 41, 0.12);
}

.pyb-cta-all-solid:hover {
  background: var(--pyb-leaf);
  color: #fff;
}

.pyb-hero {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem) 2rem;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(21, 32, 41, 0.94), rgba(35, 78, 82, 0.9)),
    url("data:image/svg+xml,%3Csvg width='160' height='160' viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.06'%3E%3Cpath d='M0 80h160M80 0v160'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover, 80px 80px;
}

.pyb-hero-copy {
  max-width: 44rem;
  width: 100%;
  animation: pyb-rise 0.7s ease both;
}

.pyb-hero > #marcas {
  width: 100%;
  max-width: 1100px;
}

.pyb-empty-hero {
  margin: 1.25rem auto 0;
  max-width: 36rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
}

.pyb-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 7.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.pyb-lead {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
}

.pyb-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pyb-search-hero {
  margin: 0 auto;
  max-width: 28rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pyb-search-hero input {
  color: #fff;
}

.pyb-search-hero input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.pyb-search-hero button {
  background: var(--pyb-sand);
  color: var(--pyb-ink);
}

.pyb-search-hero button:hover {
  background: #fff;
}

.pyb-link-catalogo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  padding: 0.8rem 1.45rem;
  border-radius: 999px;
  background: var(--pyb-sand);
  color: var(--pyb-ink);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.pyb-link-catalogo:hover {
  background: #fff;
  color: var(--pyb-ink);
  transform: translateY(-2px);
}

.pyb-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  background: var(--pyb-sand);
  color: var(--pyb-ink);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.pyb-cta:hover {
  background: #fff;
  transform: translateY(-2px);
}

.pyb-cta-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.pyb-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.pyb-hero-count {
  margin: 0.55rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.pyb-home-cat {
  margin-top: 1.75rem;
}

.pyb-home-cat:first-of-type {
  margin-top: 0.35rem;
}

.pyb-home-cat-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 2.6vw, 1.7rem);
  letter-spacing: -0.02em;
}

.pyb-home-cat-title a {
  color: inherit;
  text-decoration: none;
}

.pyb-home-cat-title a:hover {
  color: var(--pyb-forest);
}

/* —— Sections —— */
.pyb-section {
  padding: 2.5rem clamp(1rem, 4vw, 3rem);
}

.pyb-section-alt {
  background: rgba(255, 255, 255, 0.35);
}

.pyb-section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.pyb-section-title {
  margin: 0 0 1.15rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
}

.pyb-section-text {
  margin: 0.4rem 0 1.25rem;
  color: var(--pyb-muted);
}

.pyb-search {
  display: flex;
  gap: 0.5rem;
  max-width: 36rem;
  padding: 0.35rem;
  border-radius: 999px;
}

.pyb-search-solid {
  background: #fff;
  border: 1px solid rgba(21, 32, 41, 0.08);
  box-shadow: 0 10px 28px rgba(21, 32, 41, 0.06);
}

.pyb-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--pyb-ink);
  padding: 0.7rem 1rem;
  font: inherit;
  outline: none;
}

.pyb-search button {
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--pyb-forest);
  cursor: pointer;
}

.pyb-search button:hover { background: var(--pyb-leaf); }

.pyb-brands-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
}

.pyb-brands-hero {
  margin: 1.45rem auto 0;
  width: 100%;
  max-width: 1100px;
}

.pyb-brands-hero .pyb-brand-chip {
  width: 100px;
  min-height: 58px;
  background: #fff;
}

.pyb-brands-landing {
  margin: 0.35rem 0 0.4rem;
  justify-content: flex-start;
}

.pyb-brands-landing .pyb-brand-chip {
  width: 100px;
  min-height: 58px;
  background: #fff;
}

.pyb-list-tools {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  margin: 0.15rem 0 1rem;
  max-width: 36rem;
}

.pyb-list-tools .pyb-search {
  max-width: none;
}

.pyb-list-tools .pyb-cta-all {
  width: 100%;
}

.pyb-brands-home {
  padding-bottom: 0.5rem;
}

.pyb-brands-home .pyb-brand-chip {
  width: 132px;
  min-height: 72px;
  background: #fff;
}

.pyb-lineas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

@media (min-width: 720px) {
  .pyb-lineas-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .pyb-lineas-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
  }
}

.pyb-linea-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  text-decoration: none;
  color: #fff;
  aspect-ratio: 16 / 10;
  box-shadow: var(--pyb-shadow);
  background: #234e52;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pyb-linea-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px rgba(21, 32, 41, 0.2);
}

.pyb-linea-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.pyb-linea-card:hover img {
  transform: scale(1.04);
}

.pyb-linea-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.6rem 0.9rem 0.85rem;
  font-size: 1.05rem;
  font-weight: 600;
  background: linear-gradient(180deg, transparent, rgba(12, 18, 16, 0.85));
}

.pyb-family-count {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0.85;
}

.pyb-cats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .pyb-cats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .pyb-cats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.pyb-cat-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  min-height: 108px;
  padding: 1.1rem;
  text-decoration: none;
  color: var(--pyb-ink);
  background: linear-gradient(160deg, #fff, #f0f6f5);
  border: 1px solid rgba(21, 32, 41, 0.06);
  border-radius: 18px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pyb-cat-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--pyb-shadow);
}

.pyb-cat-tile img {
  height: 36px;
  max-width: 100%;
  object-fit: contain;
}

.pyb-cat-tile strong {
  font-size: 1.02rem;
  font-weight: 600;
}

.pyb-cat-meta {
  font-size: 0.85rem;
  color: var(--pyb-muted);
}

.pyb-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin: 0.35rem 0 0.75rem;
  font-size: 0.9rem;
  color: var(--pyb-muted);
}

.pyb-breadcrumb a {
  color: var(--pyb-forest);
  text-decoration: none;
  font-weight: 500;
}

.pyb-breadcrumb a:hover {
  text-decoration: underline;
}

.pyb-browse-grid {
  margin-top: 0.25rem;
}

.pyb-brands-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .pyb-brands-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .pyb-brands-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.pyb-brand-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 120px;
  padding: 1rem 0.85rem;
  text-decoration: none;
  color: var(--pyb-ink);
  background: #fff;
  border: 1px solid rgba(21, 32, 41, 0.06);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(21, 32, 41, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pyb-brand-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--pyb-shadow);
}

.pyb-brand-tile img {
  width: min(100%, 140px);
  height: 56px;
  object-fit: contain;
}

.pyb-brand-tile span {
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
}

.pyb-browse-alt {
  margin: 1.25rem 0 0;
  text-align: center;
}

.pyb-browse-alt a {
  color: var(--pyb-forest);
  font-weight: 500;
}

.pyb-contact {
  text-align: center;
  max-width: 34rem;
}

.pyb-contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.pyb-contact .pyb-cta {
  margin-top: 0;
  background: var(--pyb-forest);
  color: #fff;
}

.pyb-contact .pyb-cta:hover { background: var(--pyb-leaf); }

.pyb-link-plain {
  align-self: center;
  color: var(--pyb-forest);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.pyb-link-plain:hover { border-color: currentColor; }

/* —— Listado —— */
.pyb-list-top {
  padding: 1.25rem clamp(1rem, 4vw, 3rem) 0.5rem;
}

.pyb-back {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--pyb-forest);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
}

.pyb-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pyb-section-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.pyb-section-head p {
  margin: 0;
  color: var(--pyb-muted);
  font-size: 0.95rem;
}

.pyb-list-filters {
  margin-top: 0.9rem;
}

.pyb-brands-track,
.pyb-cats-track {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}

.pyb-brand-chip,
.pyb-cat-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--pyb-ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(28, 36, 33, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.pyb-brand-chip {
  width: 120px;
  min-height: 56px;
  height: auto;
  border-radius: 14px;
  padding: 0.5rem;
}

.pyb-brand-chip img {
  width: 100%;
  height: auto;
  max-height: 88px;
  object-fit: contain;
  display: block;
}

.pyb-cat-chip {
  height: 2.35rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
}

.pyb-brand-chip:hover,
.pyb-cat-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(28, 36, 33, 0.1);
}

.pyb-brand-chip.is-active,
.pyb-cat-chip.is-active {
  border-color: var(--pyb-leaf);
  box-shadow: 0 0 0 2px rgba(61, 122, 92, 0.22);
  background: #fff;
}

.pyb-main {
  padding: 1.25rem clamp(1rem, 4vw, 3rem) 3rem;
}

.pyb-main-split {
  display: grid;
  gap: 1.5rem;
  max-width: 1240px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .pyb-main-split {
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
  }
}

.pyb-tree {
  display: none;
}

@media (min-width: 900px) {
  .pyb-tree {
    display: block;
    position: sticky;
    top: calc(var(--appbar-h) + 1rem);
    max-height: calc(100vh - var(--appbar-h) - 2rem);
    overflow-y: auto;
    padding: 0.85rem 0.7rem;
    background: #fff;
    border: 1px solid rgba(21, 32, 41, 0.08);
    border-radius: 16px;
  }
}

.pyb-tree-title {
  margin: 0 0 0.55rem;
  padding: 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pyb-muted);
}

.pyb-tree-nav {
  display: flex;
  flex-direction: column;
}

.pyb-tree-item {
  display: block;
  color: var(--pyb-ink);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.3;
  padding: 0.38rem 0.5rem;
  border-radius: 8px;
}

.pyb-tree-item:hover { background: rgba(35, 78, 82, 0.08); }
.pyb-tree-item.is-ancestor { font-weight: 600; color: var(--pyb-forest); }
.pyb-tree-item.is-active {
  background: rgba(61, 122, 92, 0.14);
  color: var(--pyb-forest);
  font-weight: 700;
}

.pyb-tree-item.nivel-1 { padding-left: 1.15rem; }
.pyb-tree-item.nivel-2 { padding-left: 1.8rem; }
.pyb-tree-item.nivel-3 { padding-left: 2.45rem; }
.pyb-tree-item.nivel-4 { padding-left: 3.1rem; }

.pyb-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .pyb-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
  }
}

@media (min-width: 1100px) {
  .pyb-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.pyb-card {
  animation: pyb-rise 0.55s ease both;
  animation-delay: var(--delay, 0ms);
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--pyb-shadow);
  border: 1px solid rgba(21, 32, 41, 0.05);
}

.pyb-card-hit {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  cursor: zoom-in;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.95), rgba(238, 244, 243, 0.7));
  aspect-ratio: 1 / 1;
}

.pyb-card-hit:hover img,
.pyb-card-hit:focus-visible img {
  transform: scale(1.04);
}

.pyb-card-hit img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.1rem;
  transition: transform 0.35s ease;
}

.pyb-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 0.95rem 1rem;
  text-align: left;
}

.pyb-card-code {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--pyb-leaf);
  text-transform: uppercase;
}

.pyb-card-name {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--pyb-ink);
}

.pyb-card-meta {
  font-size: 0.82rem;
  color: var(--pyb-muted);
  line-height: 1.3;
}

.pyb-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--pyb-muted);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 18px;
}

.pyb-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.pyb-pager a {
  color: var(--pyb-forest);
  text-decoration: none;
  font-weight: 600;
}

.pyb-footer {
  padding: 2rem clamp(1rem, 4vw, 3rem) 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--pyb-muted);
  border-top: 1px solid rgba(28, 36, 33, 0.08);
}

.pyb-footer a {
  color: var(--pyb-forest);
  text-decoration: none;
  font-weight: 500;
}

.pyb-lightbox[hidden] { display: none; }

.pyb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1.25rem 3.2rem;
  background: rgba(12, 18, 16, 0.84);
  backdrop-filter: blur(6px);
  touch-action: pan-y;
}

.pyb-lightbox figure {
  margin: 0;
  max-width: min(920px, 100%);
  width: 100%;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.pyb-lightbox figure.is-slide-left {
  animation: pyb-lb-in-left 0.22s ease;
}

.pyb-lightbox figure.is-slide-right {
  animation: pyb-lb-in-right 0.22s ease;
}

@keyframes pyb-lb-in-left {
  from { opacity: 0.35; transform: translateX(28px); }
  to { opacity: 1; transform: none; }
}

@keyframes pyb-lb-in-right {
  from { opacity: 0.35; transform: translateX(-28px); }
  to { opacity: 1; transform: none; }
}

.pyb-lightbox img {
  display: block;
  width: 100%;
  max-height: min(72vh, 720px);
  object-fit: contain;
  background: linear-gradient(180deg, #fff, #eef4f3);
  padding: 1.5rem;
  pointer-events: none;
  user-select: none;
}

.pyb-lightbox figcaption {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pyb-lightbox figcaption strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.pyb-lightbox figcaption span {
  color: var(--pyb-muted);
  font-size: 0.92rem;
}

.pyb-lightbox-count {
  margin-top: 0.35rem;
  font-size: 0.8rem !important;
  letter-spacing: 0.04em;
}

.pyb-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--pyb-ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.pyb-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--pyb-ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.pyb-lightbox-prev { left: 0.55rem; }
.pyb-lightbox-next { right: 0.55rem; }

@media (max-width: 720px) {
  .pyb-lightbox {
    padding: 3.4rem 0.7rem 1rem;
  }
  .pyb-lightbox-nav {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.5rem;
  }
}

@keyframes pyb-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
