/* Category hero */
.category-hero-banner {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    background-color: #f0f0f0;
}
.category-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 24px;
}
.cat-hero-badge {
    display: flex;
    align-items: center;
    gap: 16px;
}
.cat-hero-badge-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.cat-hero-badge-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.cat-hero-badge-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Category nav */
.category-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.cat-nav-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px 16px;
    background: color-mix(in srgb, var(--cat-color, #E38572) 8%, white);
    border-top: 4px solid var(--cat-color, #E38572);
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.cat-nav-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--cat-color, #E38572) 20%, transparent);
}
.cat-nav-icon {
    color: var(--cat-color, #E38572);
    flex-shrink: 0;
}
.cat-nav-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--cat-color, #E38572);
}
.cat-nav-desc {
    font-size: 13px;
    color: #8a7a94;
    text-align: center;
}

/* Full-bleed sections (break out of max-width wrapper) */
.full-bleed-wrapper {
    margin-left: -20px;
    margin-right: -20px;
}
.full-bleed-wrapper .rustore-award {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.full-bleed-wrapper .rustore-award-inner {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
}
.full-bleed-wrapper .pet-events-section,
.full-bleed-wrapper section.pet-events-section {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.full-bleed-wrapper .pet-events-section .container,
.full-bleed-wrapper section.pet-events-section .container {
    padding-left: 20px;
    padding-right: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Mobile: remove wrapper constraints so full-bleed sections reach screen edges */
@media (max-width: 768px) {
    .wrapper.category-page .category-content {
        max-width: 100% !important;
        padding: 0 !important;
    }
    .full-bleed-wrapper {
        margin-left: -12px;
        margin-right: -12px;
    }
}

/* Block sections (category page) */
.block {
    margin-bottom: 32px;
}
.block-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-brand);
    margin-bottom: 16px;
}
.latest-block {
    margin-top: 32px;
}
.category-text-block {
    margin-bottom: 32px;
}
.category-text {
    line-height: 1.7;
    color: var(--color-text);
    font-size: 0.95rem;
}
.category-text p {
    margin-bottom: 1em;
}

/* Category block (for forum listing) */
.category-block {
    margin-bottom: 32px;
}
.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-muted);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--color-accent);
}

/* Subcategory chips */
.subcategory-wrapper {
  margin-top: 18px;
}

.subcategories-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.subcategories-list {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
}

.subcategory-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 215px;
  height: 60px;
  background-color: var(--cat-color, #94A3AC);
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subcategory-item:hover {
  background-color: var(--cat-color, #94A3AC);
  filter: brightness(0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.subcategory-item.selected {
  background-color: var(--cat-color, #E38572);
  filter: brightness(1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.subcategory-item.selected:hover {
  filter: brightness(0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.subcategory-main {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-left: 18px;
  padding-right: 28px;
  gap: 10px;
}

.subcategory-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

.subcategory-title {
  font-size: 15px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
}

.category-image {
  width: 35px;
  height: 35px;
  object-fit: cover;
  flex-shrink: 0;
}

.categor_main_title {
  line-height: 100%;
  color: #ffffff;
  font-weight: 500;
  font-size: 20px;
}

/* Breed cards (element-card) */
.elements-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 28px;
  margin-bottom: 2rem;
}

.element-card {
  cursor: pointer;
  padding: 15px 15px 20px;
  transition: box-shadow 0.2s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 230px;
}

.element-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.element-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.element-category-image {
  width: 200px;
  height: 200px;
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  background: #e8e8e8;
}

.element-category-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.element-title-wrapper {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.element-title {
  font-size: 22px;
  line-height: 138%;
  letter-spacing: 0.05em;
  text-align: center;
}

/* Category description (photo page) */
.category-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: 20px;
}

@media screen and (max-width: 600px) {
  .subcategory-item {
    flex: 0 0 auto;
    height: 48px;
    min-width: unset;
    width: auto;
  }

  .category-image {
    width: 25px;
    height: 25px;
  }

  .categor_main_title {
    font-size: 15px;
  }

  .subcategories-section {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    scroll-snap-type: x proximity;
    padding: 0 8px 6px 8px;
    scrollbar-width: none;
  }

  .subcategories-section::-webkit-scrollbar {
    display: none;
  }

  .subcategories-list {
    display: contents;
  }

  .subcategory-wrapper {
    margin-top: 8px;
  }

  .element-card {
    width: 140px;
    padding: 10px 10px 16px;
    margin-bottom: 0;
  }

  .element-category-image {
    width: 120px;
    height: 120px;
  }

  .element-title-wrapper {
    margin-top: 12px;
  }

  .element-title {
    font-size: 16px;
  }

  .elements-grid {
    margin-bottom: 0;
    gap: 0.5rem;
  }
}

@media (max-width: 1024px) {
    .category-nav {
        grid-template-columns: repeat(4, 1fr);
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .category-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 100%;
    }
    .cat-nav-card {
        padding: 16px 12px;
    }
    .cat-nav-title {
        font-size: 16px;
    }
    .cat-nav-desc {
        font-size: 12px;
    }
    .cat-hero-badge-title {
        font-size: 20px;
    }
    .cat-hero-badge-circle {
        width: 48px;
        height: 48px;
    }
    .cat-hero-badge-icon {
        width: 28px;
        height: 28px;
    }
    .category-hero-banner {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 480px) {
    .category-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .cat-nav-card {
        padding: 12px 8px;
        gap: 4px;
    }
    .cat-nav-icon {
        width: 28px;
        height: 28px;
    }
    .cat-nav-title {
        font-size: 14px;
    }
    .cat-nav-desc {
        font-size: 11px;
    }
}
