/* ==========================================================================
   category.css — the Category listing page. Requires common.css and
   featured-products.css (reuses the .product-card styles for each product).
   ========================================================================== */

.adorable-category__inner {
  padding-top: 2.4rem;
  padding-bottom: 5rem;
}

/* --- Breadcrumb ----------------------------------------------------------- */
.adorable-category__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2.4rem;
  font-size: 1.3rem;
  color: rgba(var(--text-color), 0.6);
}

.adorable-category__breadcrumb a {
  color: rgba(var(--text-color), 0.6);
  text-decoration: none;
  transition: color 0.2s ease;
}

.adorable-category__breadcrumb a:hover {
  color: rgb(var(--text-color));
}

.adorable-category__breadcrumb-sep {
  color: rgba(var(--text-color), 0.3);
}

.adorable-category__breadcrumb-current {
  color: rgb(var(--text-color));
}

/* --- Heading + description ------------------------------------------------ */
.adorable-category__head {
  margin-bottom: 2.5rem;
}

.adorable-category__title {
  margin: 0;
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.2;
}

.adorable-category__description {
  margin-top: 1rem;
  font-size: 1.5rem;
  line-height: 1.6;
  color: rgba(var(--text-color), 0.75);
}

.adorable-category__description p {
  margin: 0 0 1rem;
}

.adorable-category__description :last-child {
  margin-bottom: 0;
}

/* --- Sub-categories ------------------------------------------------------- */
.adorable-category__subcats {
  margin-bottom: 3.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(var(--text-color), 0.12);
}

.adorable-category__subcats-title {
  margin: 0 0 1.6rem;
  font-size: 1.8rem;
  font-weight: 500;
}

.adorable-category__subcats-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.adorable-subcat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  color: rgb(var(--text-color));
  text-decoration: none;
}

.adorable-subcat__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 9rem;
  height: 9rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(var(--text-color), 0.12);
  border-radius: 50%;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.adorable-subcat:hover .adorable-subcat__media {
  border-color: rgb(var(--text-color));
  transform: translateY(-0.2rem);
}

.adorable-subcat__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.adorable-subcat__placeholder {
  width: 3.4rem;
  height: 3.4rem;
  color: rgba(var(--text-color), 0.3);
}

.adorable-subcat__name {
  font-size: 1.4rem;
  line-height: 1.3;
  text-align: center;
}

/* --- Toolbar (result count + sort) --------------------------------------- */
.adorable-category__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.adorable-category__count {
  margin: 0;
  font-size: 1.4rem;
  color: rgba(var(--text-color), 0.7);
}

.adorable-category__sort {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.adorable-category__sort-label {
  font-size: 1.4rem;
  color: rgba(var(--text-color), 0.7);
}

.adorable-category__sort-select {
  height: 4rem;
  padding: 0 3.2rem 0 1.4rem;
  font-size: 1.4rem;
  font-family: inherit;
  color: rgb(var(--text-color));
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%23121212' d='M9.354.646a.5.5 0 0 0-.708 0L5 4.293 1.354.646a.5.5 0 0 0-.708.708l4 4a.5.5 0 0 0 .708 0l4-4a.5.5 0 0 0 0-.708'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.2rem center;
  background-size: 1rem;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease;
}

.adorable-category__sort-select:focus {
  border-color: rgb(var(--text-color));
}

/* --- Products grid (mirrors the search/wishlist grid) -------------------- */
.adorable-category__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.adorable-category__grid .product-card {
  height: 100%;
}

/* --- Pagination ----------------------------------------------------------- */
.adorable-category__pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 3.5rem;
}

.adorable-category__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
  height: 4rem;
  padding: 0 1rem;
  font-size: 1.4rem;
  color: rgb(var(--text-color));
  text-decoration: none;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.adorable-category__page:hover {
  background: rgba(var(--text-color), 0.06);
}

.adorable-category__page.is-active {
  color: #fff;
  background: #121212;
  border-color: #121212;
  cursor: default;
}

/* --- Empty state ---------------------------------------------------------- */
.adorable-category__empty {
  text-align: center;
  padding: 5rem 0;
}

.adorable-category__empty p {
  margin: 0 0 2rem;
  font-size: 1.8rem;
  color: rgba(var(--text-color), 0.7);
}

.adorable-category__browse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 4.4rem;
  padding: 0 2.4rem;
  background: #121212;
  color: #fff;
  font-size: 1.4rem;
  letter-spacing: 0.05rem;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.adorable-category__browse:hover {
  background: #000;
}

@media (min-width: 750px) {
  .adorable-category__subcats-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .adorable-category__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 990px) {
  .adorable-category__inner {
    padding-top: 3.2rem;
  }
  .adorable-category__title {
    font-size: 4rem;
  }
  .adorable-subcat__media {
    width: 11rem;
    height: 11rem;
  }
  .adorable-category__subcats-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .adorable-category__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
  }
}
