/* Header navigation: balanced spacing, independent of the old text glyphs. */
.category-nav .category-nav-inner {
  min-height: 60px;
  gap: 8px;
  padding-block: 8px;
  scrollbar-width: thin;
}
#catalogMenuButton {
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: auto;
  min-width: 0;
  height: 44px;
  padding: 0 18px;
  margin: 0 10px 0 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}
#catalogMenuButton:hover, #catalogMenuButton[aria-expanded="true"] {
  background: rgb(255 255 255 / 8%);
  border-color: transparent;
}
#catalogMenuButton svg {
  display: block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#catalogMenuButton .catalog-button-chevron { width: 16px; height: 16px; opacity: .85; }
#catalogMenuButton[aria-expanded="true"] .catalog-button-chevron { transform: rotate(180deg); }
.category-nav .category-nav-inner > a {
  flex: 0 0 auto;
  justify-content: center;
  height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 550;
}
.category-nav .category-nav-inner > a.sale-link { margin-left: 0; }
.category-nav .category-nav-inner > :focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
@media (max-width: 760px) {
  .category-nav .category-nav-inner { gap: 4px; padding: 7px 12px; min-height: 58px; }
  #catalogMenuButton { gap: 10px; padding-inline: 16px; margin-right: 6px; font-size: 13px; }
  .category-nav .category-nav-inner > a { padding-inline: 13px; font-size: 13px; }
}

/* Progressive catalog navigation: every level uses the same compact cards. */
#catalog .catalog-level-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 30px;
}

#catalog .catalog-drill-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 86px;
  grid-template-columns: 58px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  padding: 12px 13px;
  color: var(--text);
  background: #fff;
  border: 1px solid #e0e7e5;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--motion-fast) var(--motion-ease-out), box-shadow var(--motion-fast) var(--motion-ease-out), transform var(--motion-fast) var(--motion-ease-out);
}

#catalog .catalog-drill-card:hover {
  border-color: #92c4bf;
  box-shadow: 0 10px 24px rgba(28, 54, 63, .08);
  transform: translateY(-2px);
}

#catalog .catalog-card-animal,
#catalog .catalog-card-product,
#catalog .catalog-card-symbol {
  display: block;
  width: 58px;
  height: 58px;
  overflow: hidden;
  background-color: #f5f7f4;
  border-radius: 13px;
}

#catalog .catalog-card-product img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#catalog .catalog-card-animal {
  background-image: url('./assets/catalog-pets.jpg');
  background-repeat: no-repeat;
  background-size: 300% 200%;
}

#catalog .catalog-card-animal-0 { background-position: 0 0; }
#catalog .catalog-card-animal-1 { background-position: 50% 0; }
#catalog .catalog-card-animal-2 { background-position: 100% 0; }
#catalog .catalog-card-animal-3 { background-position: 0 100%; }
#catalog .catalog-card-animal-4 { background-position: 50% 100%; }
#catalog .catalog-card-animal-5 { background-position: 100% 100%; }

#catalog .catalog-card-symbol {
  display: grid;
  place-items: center;
  color: var(--teal);
  background: #edf5f2;
  font-size: 24px;
  font-weight: 800;
}

#catalog .catalog-drill-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

#catalog .catalog-drill-copy strong {
  color: var(--navy);
  font-size: 14px;
  line-height: 1.3;
}

#catalog .catalog-drill-copy small {
  color: var(--muted);
  font-size: 10px;
}

#catalog .catalog-drill-card > i {
  color: var(--teal);
  font-size: 23px;
  font-style: normal;
}

#catalog .catalog-navigation-header.compact > div > span {
  display: block;
  margin-bottom: 5px;
}

#catalog .catalog-products-heading {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 3px 18px;
  margin: 6px 0 12px;
  padding-top: 22px;
  border-top: 1px solid #e6ebe9;
}

#catalog .catalog-products-heading[hidden] { display: none; }
#catalog .catalog-products-heading span {
  grid-column: 1 / -1;
  color: var(--teal);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
#catalog .catalog-products-heading h2,
#catalog .catalog-products-heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: 24px;
  line-height: 1.2;
}
#catalog .catalog-products-heading p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 960px) {
  #catalog .catalog-level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  #catalog .catalog-level-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 22px;
  }

  #catalog .catalog-drill-card {
    min-height: 72px;
    grid-template-columns: 44px minmax(0, 1fr) 12px;
    gap: 8px;
    padding: 8px;
    border-radius: 12px;
  }

  #catalog .catalog-card-animal,
  #catalog .catalog-card-symbol {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  #catalog .catalog-card-symbol { font-size: 20px; }
  #catalog .catalog-drill-copy strong { font-size: 11px; }
  #catalog .catalog-drill-copy small { font-size: 8.5px; }
  #catalog .catalog-drill-card > i { font-size: 18px; }

  #catalog .catalog-products-heading {
    display: block;
    margin-top: 2px;
    padding-top: 18px;
  }

  #catalog .catalog-products-heading span { display: block; margin-bottom: 4px; }
  #catalog .catalog-products-heading h3 { font-size: 20px; }
  #catalog .catalog-products-heading p { margin-top: 4px; font-size: 10px; }
}

/* Original TV-campaign animals; text remains live HTML, separate from the photo. */
.hero-tv-pets { background: #f1f3ec; }
.hero-tv-pets > img { position: absolute; inset: 0 0 0 auto; width: 64%; height: 100%; object-fit: cover; object-position: center; }
.hero-tv-pets::before { position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, #f1f3ec 0%, #f1f3ec 33%, rgb(241 243 236 / 92%) 39%, transparent 57%); content: ''; pointer-events: none; }
.hero-tv-pets .hero-content { z-index: 2; width: 47%; padding: 40px; }
.hero-tv-pets .hero-delivery { z-index: 2; right: 18px; bottom: 14px; padding: 10px 13px; }
@media (max-width: 1050px) and (min-width: 761px) {
  .hero-tv-pets { height: 380px; }
  .hero-tv-pets .hero-content { padding: 28px; }
  .hero-tv-pets h1 { font-size: 36px; }
}
@media (max-width: 760px) {
  .hero-tv-pets { display: flex; flex-direction: column; height: auto; }
  .hero-tv-pets::before, .hero-tv-pets::after { display: none; }
  .hero-tv-pets .hero-content { position: relative; order: 0; width: 100%; padding: 26px 24px; }
  .hero-tv-pets h1 { font-size: 34px; }
  .hero-tv-pets .hero-content p { margin-bottom: 18px; }
  .hero-tv-pets > img { position: relative; inset: auto; order: 1; display: block; width: 100%; height: auto; aspect-ratio: 1672 / 941; object-fit: contain; }
  .hero-tv-pets .hero-delivery { position: relative; inset: auto; order: 2; margin: 0; border-radius: 0; padding: 14px 24px; box-shadow: none; background: #f1f3ec; }
}

/* Catalog navigation: one landing view, then subcategories and products. */
#catalog { padding-top: 42px; scroll-margin-top: 238px; }
#catalog .catalog-layout { display: block; }
#catalog .catalog-navigation-header { margin-bottom: 24px; }
#catalog .catalog-navigation-header h2 { margin: 0 0 8px; font-size: 36px; line-height: 1.15; letter-spacing: -.035em; color: var(--navy); }
#catalog .catalog-navigation-header p { margin: 0; font-size: 14px; color: var(--muted); }
#catalog .catalog-navigation-header.compact { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
#catalogBreadcrumbs { margin: 0 0 22px; flex-wrap: wrap; }
#catalogBreadcrumbs button { font-size: 13px; min-height: 30px; }
.pet-departments { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.pet-department { display: flex; flex-direction: column; min-width: 0; padding: 12px 12px 18px; border: 1px solid #e6eae8; border-radius: 16px; background: #fff; text-align: left; cursor: pointer; }
.pet-department:hover { border-color: #087f79; }
.pet-portrait { display: block; width: 100%; aspect-ratio: 1; margin-bottom: 16px; background: #fff url('./assets/catalog-pets.jpg') no-repeat; background-size: 300% 200%; }
.pet-portrait-0 { background-position: 0 0; }
.pet-portrait-1 { background-position: 50% 0; }
.pet-portrait-2 { background-position: 100% 0; }
.pet-portrait-3 { background-position: 0 100%; }
.pet-portrait-4 { background-position: 50% 100%; }
.pet-portrait-5 { background-position: 100% 100%; }
.pet-department strong { min-height: 40px; font-size: 16px; line-height: 1.25; }
.pet-department small { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: #697a79; }
.pet-department small span { color: var(--teal); font-size: 21px; }
.shared-departments { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.shared-departments button { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 20px; border: 0; border-radius: 12px; background: #f2f6f4; text-align: left; cursor: pointer; }
.shared-departments strong { font-size: 16px; font-weight: 650; }
.shared-departments small { grid-column: 1; color: #697a79; font-size: 12px; }
.shared-departments span { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 22px; color: var(--teal); }
.shared-departments button:hover { background: #e5f0eb; }
#catalog .catalog-subcategory-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
#catalog .catalog-subcategory-chips button { min-height: 42px; padding: 10px 16px; border: 1px solid #e2e8e5; border-radius: 8px; background: #fff; font-size: 13px; line-height: 1.35; text-align: left; cursor: pointer; }
#catalog .catalog-subcategory-chips button.active { background: var(--teal); border-color: var(--teal); color: #fff; }
#catalog .catalog-subcategory-chips button:hover:not(.active) { border-color: var(--teal); }
#catalog .catalog-subcategory-chips b { margin-left: 6px; font-size: 11px; opacity: .65; }
#catalogTools { margin: 0 0 18px; padding: 0; justify-content: flex-end; }
#catalogTools select { height: 40px; font-size: 13px; }
#productGrid .product-volume { margin: 3px 0 7px; }
#productGrid .product-info h3 { margin: 0 0 5px; }

/* The header dropdown is a flat menu, without cards or a second page frame. */
#catalogMegaMenu { padding: 24px 0; background: #fff; max-height: calc(100dvh - 232px); overflow: auto; border-top: 1px solid #e6ebe8; box-shadow: 0 18px 24px #172a3a14; }
#catalogMegaMenu .catalog-mega-inner { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 32px; padding: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
#categoryTree { display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 0 18px 0 0; margin: 0; overflow: visible; max-height: none; border: 0; border-right: 1px solid #e6ebe8; border-radius: 0; background: #fff; }
#categoryTree .catalog-root-button { display: flex; min-width: 0; width: 100%; min-height: 40px; padding: 9px 12px; border: 0; border-radius: 7px; background: transparent !important; color: #34463f !important; font-size: 14px; font-weight: 550; box-shadow: none; }
#categoryTree .catalog-root-button span:not(.catalog-root-icon) { white-space: normal; }
#categoryTree .catalog-root-icon, #categoryTree b, #categoryTree i { display: none; }
#categoryTree .catalog-root-button.menu-active, #categoryTree .catalog-root-button:hover { color: var(--teal) !important; background: #edf5f1 !important; box-shadow: none; }
#catalogMegaMenu .mega-subcategories { padding: 0; }
#catalogMegaMenu .mega-menu-heading { min-height: 0; padding: 0 44px 0 0; margin: 0 0 12px; border: 0; }
#catalogMegaMenu .mega-menu-heading span { display: none; }
#catalogMegaMenu .mega-menu-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
#closeCatalogMenu { top: 0; right: 0; }
#catalogMegaMenu .mega-all-link { position: static; display: inline-flex; width: auto; min-height: 32px; gap: 8px; padding: 0; margin: 0 0 20px; border: 0; border-radius: 0; background: transparent; color: var(--teal); box-shadow: none; transform: none; }
#catalogMegaMenu .mega-all-link strong { font-size: 13px; font-weight: 550; }
#catalogMegaMenu .mega-all-link small { display: none; }
#catalogMegaMenu .mega-all-link i { position: static; transform: none; color: var(--teal); }
#catalogMegaMenu .mega-all-link:hover { text-decoration: underline; }
#catalogMegaMenu .mega-group-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
#catalogMegaMenu .mega-group-title { display: block; min-height: 28px; padding: 0; border: 0; }
#catalogMegaMenu .mega-group-title strong { font-size: 14px; line-height: 1.35; font-weight: 700; }
#catalogMegaMenu .mega-group-title small, #catalogMegaMenu .mega-group-title i, #catalogMegaMenu .mega-leaf-links small { display: none; }
#catalogMegaMenu .mega-leaf-links { padding: 5px 0 0; gap: 0; }
#catalogMegaMenu .mega-leaf-links button { padding: 6px 0; font-size: 13px; line-height: 1.4; color: #65716e; }
#catalogMegaMenu .mega-leaf-links button:hover { color: var(--teal); }
.menu-loading { font-size: 14px; color: var(--muted); }
.pet-department:focus-visible, .shared-departments button:focus-visible, #catalogMegaMenu button:focus-visible, #catalog button:focus-visible { outline: 3px solid #f0a356; outline-offset: 3px; }
#catalog [hidden], #catalogMegaMenu[hidden] { display: none !important; }
@media (max-width: 1050px) {
  .pet-departments { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pet-department { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 12px; padding: 14px; }
  .pet-portrait { width: 42%; margin: 0; grid-row: 1 / 3; }
  .pet-department { display: grid; grid-template-columns: 42% 1fr; }
  .pet-portrait { width: 100%; }
  .pet-department strong { align-self: end; min-height: 0; font-size: 14px; }
  .pet-department small { align-self: start; font-size: 11px; }
  #catalogMegaMenu .mega-group-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  #catalog { scroll-margin-top: 12px; padding-top: 32px; }
  #catalog .catalog-navigation-header h2 { font-size: 28px; }
  #catalog .catalog-navigation-header.compact { align-items: flex-start; flex-direction: column; gap: 0; }
  .pet-departments { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pet-department { display: flex; flex-direction: column; align-items: stretch; padding: 12px; }
  .pet-portrait { width: 100%; margin-bottom: 12px; }
  .pet-department strong { align-self: auto; min-height: 36px; font-size: 15px; }
  .pet-department small { align-self: auto; }
  .shared-departments { grid-template-columns: 1fr; gap: 8px; margin-top: 14px; }
  .shared-departments button { padding: 16px; }
  #catalog .catalog-subcategory-chips button { font-size: 12px; padding: 9px 12px; }
  #catalogMegaMenu { position: fixed; top: 0; bottom: 0; max-height: none; padding: 18px 0; z-index: 70; }
  body.mega-menu-open { overflow: hidden; }
  #catalogMegaMenu .catalog-mega-inner { display: flex; flex-direction: column; gap: 20px; width: calc(100% - 32px); }
  #categoryTree { flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 44px 0 16px; border: 0; border-bottom: 1px solid #e6ebe8; }
  #categoryTree .catalog-root-button { width: auto; padding: 9px 12px; min-height: 40px; background: #f6f7f6 !important; font-size: 13px; }
  #catalogMegaMenu .mega-subcategories { position: static; width: 100%; }
  #closeCatalogMenu { position: fixed; top: 14px; right: 16px; z-index: 1; }
  #catalogMegaMenu .mega-group-list { gap: 20px; }
  #catalogMegaMenu .mega-leaf-links button { min-height: 38px; font-size: 13px; }
}
