/* Angel category page — scoped layout (header/footer unchanged) */

.angel-category-page {
  --angel-cat-bg: #1c1c1c;
  --angel-cat-panel: #2b2b2b;
  --angel-cat-panel-alt: #353535;
  --angel-cat-border: #3d3d3d;
  --angel-cat-text: #ffffff;
  --angel-cat-muted: #a3a3a3;
  --angel-cat-accent: var(--primary-color, #67c7e8);
  --angel-cat-sale: #ef4444;
  --angel-cat-sidebar-w: 280px;
  font-family: var(--angel-font-family, "PingARLT", Tahoma, Arial, sans-serif);
  color: var(--angel-cat-text);
  padding-bottom: 48px;
}

/* —— Hero —— */
.angel-category-hero {
  background: #353535;
}

.angel-category-hero__inner {
  padding: 28px 0 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.angel-category-hero__content {
  flex: 1;
  min-width: 0;
}

.angel-category-hero__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--angel-cat-muted);
}

.angel-category-hero__breadcrumb a {
  color: var(--angel-cat-muted);
  text-decoration: none;
}

.angel-category-hero__breadcrumb a:hover {
  color: var(--angel-cat-text);
}

.angel-category-hero__breadcrumb-current {
  color: var(--angel-cat-muted);
}

.angel-category-hero__breadcrumb-sep {
  opacity: 0.6;
}

.angel-category-hero__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 12px;
}

.angel-category-hero__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--angel-cat-text);
}

.angel-category-hero__badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  background: var(--angel-cat-sale);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.angel-category-hero__desc {
  margin: 0;
  max-width: 720px;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
}

.angel-category-hero__media {
  flex-shrink: 0;
}

.angel-category-hero__img,
.angel-category-hero__img-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.angel-category-hero__img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--angel-cat-muted);
}

/* —— Layout —— */
.angel-category-page__container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 24px 0;
}

.angel-category-page__layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-top: 20px;
}

.angel-category-page__main {
  flex: 1;
  min-width: 0;
}

/* —— Sidebar (filter visuals: angel-side-filters.css) —— */
.angel-category-page__sidebar {
  max-width: 288px;
  flex-shrink: 0;
  width: 100%;
  position: sticky;
  top: 0;
  top: 16px;
  background: #282828;
  padding: 16px;
}

.angel-category-page__sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--angel-cat-border);
}

.angel-category-page__sidebar-title {
  font-size: 16px;
  font-weight: 700;
}

.angel-category-page__sidebar-close {
  border: none;
  background: transparent;
  color: var(--angel-cat-text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.angel-category-page__sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
}

body.angel-category-filter-open {
  overflow: hidden;
}

/* —— Toolbar (sort) —— */
.angel-category-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-block: 20px;
}

.angel-category-toolbar__filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--angel-cat-border);
  border-radius: 6px;
  background: var(--angel-cat-panel);
  color: var(--angel-cat-text);
  font-size: 14px;
  cursor: pointer;
}

.angel-category-toolbar__sort {
  display: flex;
  align-items: center;
  gap: 8px;
}

.angel-category-toolbar__sort-label {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: white;
  white-space: nowrap;
}

.angel-category-toolbar__sort-dropdown {
  position: relative;
}

.angel-category-toolbar__sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* min-width: 200px; */
  padding: 8px 12px;
  border: 1px solid #4b5563;
  border-radius: 6px;
  background: var(--angel-cat-panel);
  color: var(--angel-cat-text);
  font-size: 14px;
  /* font-weight: 600; */
  cursor: pointer;
  text-align: start;
}

.angel-category-toolbar__sort-chevron {
  flex-shrink: 0;
  margin-inline-start: auto;
  width: 12px;
  height: 12px;
  opacity: 0.85;
  color: currentColor;
}

.angel-category-toolbar__sort-menu.show {
  display: block;
}

.angel-category-toolbar__sort-menu {
  min-width: 100%;
  padding: 6px 0;
  border: 1px solid var(--angel-cat-border);
  border-radius: 6px;
  background: var(--angel-cat-panel-alt);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.angel-category-toolbar__sort-menu .dropdown-item {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--angel-cat-text);
}

.angel-category-toolbar__sort-menu .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--angel-cat-text);
}

/* —— Product grid —— */
.angel-category-page__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 28px;
}

.angel-category-page__grid .angel-product-card,
.angel-category-page__grid .product-item {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* —— Category banners —— */
.angel-category-banners {
  margin-top: 18px;
}

.angel-category-banners__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.angel-category-page--separate-banners .angel-category-banners__grid {
  grid-template-columns: 1fr;
}

.angel-category-banner {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: var(--angel-cat-panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.angel-category-banner__img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.angel-category-page--square-banners .angel-category-banner__img {
  aspect-ratio: 1 / 1;
  height: auto;
}

@media (max-width: 991px) {
  .angel-category-banners__grid {
    grid-template-columns: 1fr;
  }
}

/* —— Subcategories view (when hiding main products) —— */
.angel-category-page--hide-products .angel-category-toolbar {
  display: none;
}

.angel-category-subcats {
  margin-top: 10px;
}

.angel-category-subcats__grid {
  display: grid;
  grid-template-columns: repeat(var(--angel-subcats-cols-desktop, 6), minmax(0, 1fr));
  gap: 12px;
}

.angel-category-page--subcats-slider .angel-category-subcats__grid {
  display: flex;
  gap: 12px;
  overflow: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
}

.angel-category-page--subcats-slider .angel-category-subcat {
  flex: 0 0 220px;
  scroll-snap-align: start;
}

@media (max-width: 991px) {
  .angel-category-subcats__grid {
    grid-template-columns: repeat(var(--angel-subcats-cols-mobile, 2), minmax(0, 1fr));
  }
}

.angel-category-subcat {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 12px;
  overflow: hidden;
  background: var(--angel-cat-panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--angel-cat-text);
  min-height: 210px;
}

.angel-category-subcat:hover {
  color: var(--angel-cat-text);
  filter: brightness(1.02);
}

.angel-category-subcat__media {
  position: relative;
  display: block;
  padding-top: 82%;
  background: rgba(255, 255, 255, 0.05);
}

.angel-category-subcat__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.angel-category-subcat__img--placeholder {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.angel-category-subcat__body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.angel-category-subcat__desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.angel-category-subcat__promo {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}

.angel-category-subcat__title {
  font-size: 14px;
  font-weight: 700;
  margin-top: auto;
}

/* —— Subcategory products injected —— */
.angel-category-subcat-products {
  margin-top: 18px;
  padding: 16px;
  border-radius: 12px;
  background: var(--angel-cat-panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.angel-category-subcat-products__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.angel-category-subcat-products__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.angel-category-subcat-products__back {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

.angel-category-subcat-products__back:hover {
  filter: brightness(1.05);
}

.angel-category-page__empty {
  margin: 0 0 24px;
  padding: 32px 16px;
  text-align: center;
  color: var(--angel-cat-muted);
  font-size: 16px;
}

/* —— Testimonials swiper —— */
.angel-category-testimonials {
  margin: 16px 0 28px;
  padding-top: 80px;
  overflow: hidden;
  position: relative;
  min-height: 120px;
}

.angel-category-testimonials--loading .angel-category-testimonials__swiper {
  visibility: hidden;
}

.angel-category-testimonials__loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.angel-category-testimonials__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--angel-cat-accent, #67c7e8);
  border-radius: 50%;
  animation: angel-category-testimonials-spin 0.75s linear infinite;
}

@keyframes angel-category-testimonials-spin {
  to {
    transform: rotate(360deg);
  }
}

.angel-category-testimonials__swiper {
  overflow: visible;
}

.angel-category-testimonials__swiper .swiper-slide {
  height: auto;
  box-sizing: border-box;
}

.angel-category-testimonial-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0 16px 48px;
  border-radius: 8px;
  background: #353535;
  color: #fff;
  box-sizing: border-box;
}

.angel-category-testimonial-card__quote {
  position: absolute;
  top: 16px;
  z-index: 1;
  font-size: 30px;
  line-height: 1;
  opacity: 0.1;
  transform: scale(-1, -1);
  pointer-events: none;
}

.rtl .angel-category-testimonial-card__quote {
  left: 16px;
  right: auto;
}

.ltr .angel-category-testimonial-card__quote {
  right: 16px;
  left: auto;
}

.angel-category-testimonial-card__avatar-wrap {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  margin: -48px auto 14px;
  border-radius: 50%;
  overflow: hidden;
  background: #1a1a1a;
}

.angel-category-testimonial-card__avatar {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
}

.angel-category-testimonial-card__avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  font-size: 32px;
  font-weight: 700;
  color: var(--angel-cat-accent, #67c7e8);
  background: #1a1a1a;
}

.angel-category-testimonial-card__name {
  margin: 0 0 10px;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
}

.angel-category-testimonial-card__stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-bottom: 12px;
}

.angel-category-testimonial-card__star {
  display: block;
  height: auto;
  flex-shrink: 0;
}

.angel-category-testimonial-card__star path {
  fill: #fbbf24;
}

.angel-category-testimonial-card__comment {
  margin: 0;
  max-width: 100%;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

/* —— Pagination —— */
.angel-category-page__pagination-wrap .products-pagination {
  margin: 30px 0 0;
  padding: 0;
}

.angel-category-page__pagination-wrap .page-link {
  background: var(--angel-cat-panel);
  border-color: var(--angel-cat-border);
  color: var(--angel-cat-text);
}

.angel-category-page__pagination-wrap .page-link.active {
  background: var(--angel-cat-accent);
  border-color: var(--angel-cat-accent);
  color: #000;
}

/* —— Back to top —— */
.angel-category-page__back-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0 auto;
  padding: 14px 16px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.angel-category-page__back-top:hover {
  color: var(--angel-cat-accent);
}

.angel-category-page__back-top-icon {
  font-size: 16px;
  line-height: 1;
}

.angel-category-page__metafields {
  padding-top: 24px;
  padding-bottom: 24px;
  color: var(--angel-cat-muted);
}

/* —— Responsive —— */
@media (max-width: 1199px) {
  .angel-category-page__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .angel-category-page__sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 1050;
    width: min(320px, 92vw);
    max-height: none;
    border-radius: 0;
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .angel-side-filters-panel__inner {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .angel-category-page__sidebar .angel-category-filters,
  .angel-category-page__sidebar .angel-side-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
  }

  .angel-category-page__sidebar .product-attributes,
  .angel-category-page__sidebar .products-filters-container,
  .angel-category-page__sidebar .filter-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .angel-category-filters__clear {
    flex-shrink: 0;
    margin-top: auto;
  }

  .rtl .angel-category-page__sidebar {
    right: 0;
    left: auto;
    transform: translateX(100%);
  }

  .ltr .angel-category-page__sidebar {
    left: 0;
    right: auto;
    transform: translateX(-100%);
  }

  .angel-category-page__sidebar.is-open {
    transform: translateX(0) !important;
  }

  .angel-category-page__layout {
    flex-direction: column;
  }

  .angel-category-page__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .angel-category-toolbar {
    justify-content: space-between;
  }
}

@media (max-width: 575px) {
  .angel-category-page__container {
    padding-inline: 16px;
  }
  .angel-category-page__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 10px;
  }

  .angel-category-toolbar__sort-btn {
    min-width: 0;
    flex: 1;
  }
}
