/* ================================================================
   category_details.css
   Design tone: Earthy-editorial — forest green palette, generous
   whitespace, strong typography, warm organic card aesthetics.
   ================================================================ */

/* ── Root tokens ── */
:root {
  --cat-green-deep:   #1a4d2e;
  --cat-green-mid:    #2e7d52;
  --cat-green-light:  #d6ede2;
  --cat-green-wash:   #f0f9f4;
  --cat-amber:        #e8a320;
  --cat-text:         #1e2a1f;
  --cat-text-muted:   #5a6b5c;
  --cat-border:       #c8e0d0;
  --cat-radius:       14px;
  --cat-shadow:       0 4px 20px rgba(30, 77, 46, 0.10);
}

/* ── Base ── */
.hbody { padding-bottom: 3rem; }

/* ── Page layout (flex wrapper defined in sidebar.css) ── */
.page-wrapper { min-height: calc(100vh - var(--header-h, 88px) - var(--footer-h, 60px)); }
.home-content  { background: var(--cat-green-wash); }

/* ── Breadcrumb ── */
.breadcrumb-bar {
  background: #fff;
  border-bottom: 1px solid var(--cat-border);
  padding: 0.65rem 1.5rem;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  font-size: 0.82rem;
  flex-wrap: wrap;
}
.breadcrumb-item + .breadcrumb-item::before {
  content: '›';
  color: var(--cat-text-muted);
  margin-right: 0.4rem;
}
.breadcrumb-item a {
  color: var(--cat-green-mid);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}
.breadcrumb-item a:hover { color: var(--cat-green-deep); }
.breadcrumb-item.active { color: var(--cat-text-muted); }

/* ── Category Hero ── */
.cat-hero {
  padding: 2rem 1.5rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid var(--cat-border);
}
.cat-hero-inner {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  max-width: 1100px;
}

/* Image column */
.cat-hero-img-col {
  flex: 0 0 420px;
  max-width: 420px;
}
.cat-main-img-wrap {
  border-radius: var(--cat-radius);
  overflow: hidden;
  box-shadow: var(--cat-shadow);
  aspect-ratio: 4/3;
  background: var(--cat-green-light);
}
.cat-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.cat-main-img:hover { transform: scale(1.03); }

/* Highlights strip */
.cat-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}
.highlight-item { text-align: center; }
.highlight-img-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--cat-green-light);
  background: #fff;
  margin: 0 auto 0.4rem;
  box-shadow: 0 2px 10px rgba(30, 77, 46, .15);
}
.highlight-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.highlight-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cat-green-deep);
  line-height: 1.3;
}

/* Content column */
.cat-hero-content-col {
  flex: 1;
  padding-top: 0.25rem;
}
.cat-title-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cat-amber);
  background: #fef5e4;
  border: 1px solid #f0d08a;
  border-radius: 20px;
  padding: 3px 12px;
  margin-bottom: 0.6rem;
}
.cat-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--cat-green-deep);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.cat-divider {
  width: 52px;
  height: 4px;
  background: linear-gradient(90deg, var(--cat-green-mid), var(--cat-amber));
  border-radius: 4px;
  margin-bottom: 1.25rem;
}
.cat-desc {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--cat-text-muted);
  text-align: justify;
}

/* ── Section shared styles ── */
.section-header { text-align: center; margin-bottom: 1.75rem; }
.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--cat-green-deep);
}
.section-title span { color: var(--cat-green-mid); }
.section-rule {
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, var(--cat-green-mid), transparent);
  border-radius: 4px;
  margin: 0.6rem auto 0;
}

/* ── Subcategory section ── */
.subcategory-section {
  padding: 2rem 1.5rem;
}

/* Card grid */
.subcat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}
.subcat-card-link { text-decoration: none; color: inherit; display: block; }
.subcat-card {
  border-radius: var(--cat-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--cat-shadow);
  border: 1px solid var(--cat-border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.subcat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(30, 77, 46, .16);
}
.subcat-img-wrap {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: var(--cat-green-light);
}
.subcat-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.subcat-card:hover .subcat-img-wrap img { transform: scale(1.06); }
.subcat-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 2.5rem;
  color: var(--cat-green-mid);
}
.subcat-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,77,46,.6) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.75rem;
  opacity: 0;
  transition: opacity .25s ease;
}
.subcat-card:hover .subcat-overlay { opacity: 1; }
.subcat-view-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: var(--cat-green-mid);
  border-radius: 20px;
  padding: 4px 14px;
  letter-spacing: .03em;
}
.subcat-card-body {
  padding: 0.85rem 1rem;
  background: #fff;
}
.subcat-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cat-green-deep);
  text-align: center;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .cat-hero-inner { flex-direction: column; }
  .cat-hero-img-col { flex: unset; max-width: 100%; width: 100%; }
  .cat-hero-img-col { max-width: 480px; }
}
@media (max-width: 600px) {
  .subcat-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
  .subcat-img-wrap { height: 130px; }
  .cat-hero { padding: 1.25rem 1rem; }
  .subcategory-section { padding: 1.25rem 1rem; }
}