/* ================================================================
   subcategory_details.css
   Design tone: Clean-commercial — crisp white cards, teal accent
   stripe, strong discount chips, structured product grid.
   ================================================================ */

/* ── Root tokens ── */
:root {
  --sub-teal:         #0d6b55;
  --sub-teal-light:   #e6f5f1;
  --sub-teal-mid:     #1a9070;
  --sub-orange:       #e55a1c;
  --sub-text:         #1c2522;
  --sub-muted:        #607972;
  --sub-bg:           #f5faf8;
  --sub-card-bg:      #ffffff;
  --sub-border:       #d0e8e0;
  --sub-radius:       12px;
  --sub-shadow:       0 2px 16px rgba(13, 107, 85, .09);
}

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

/* ── 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(--sub-bg); }

/* ── Breadcrumb ── */
.breadcrumb-bar {
  background: var(--sub-card-bg);
  border-bottom: 1px solid var(--sub-border);
  padding: 0.6rem 1.5rem;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  font-size: 0.8rem;
  flex-wrap: wrap;
}
.breadcrumb-item + .breadcrumb-item::before {
  content: '›';
  color: var(--sub-muted);
  margin-right: 0.4rem;
}
.breadcrumb-item a {
  color: var(--sub-teal);
  text-decoration: none;
  font-weight: 600;
  transition: color .15s;
}
.breadcrumb-item a:hover { color: var(--sub-teal-mid); }
.breadcrumb-item.active { color: var(--sub-muted); }

/* ── Subcategory Info Banner ── */
.subcat-info-section {
  background: var(--sub-card-bg);
  border-bottom: 1px solid var(--sub-border);
  padding: 2rem 1.5rem;
}
.subcat-info-inner {
  display: flex;
  gap: 2rem;
  align-items: center;
  max-width: 1100px;
}
.subcat-info-img-col {
  flex: 0 0 280px;
  max-width: 280px;
}
.subcat-info-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--sub-radius);
  border: 1px solid var(--sub-border);
  box-shadow: var(--sub-shadow);
  display: block;
}
.subcat-info-content-col { flex: 1; }
.subcat-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sub-teal);
  background: var(--sub-teal-light);
  border: 1px solid #b2ddd4;
  border-radius: 20px;
  padding: 3px 12px;
  margin-bottom: 0.5rem;
}
.subcat-page-title {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--sub-teal);
  line-height: 1.25;
  margin-bottom: 0.6rem;
}
.subcat-title-rule {
  width: 40px;
  height: 3px;
  background: var(--sub-teal-mid);
  border-radius: 4px;
  margin-bottom: 1rem;
}
.subcat-page-desc {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--sub-muted);
  text-align: justify;
}
.subcat-title-only {
  padding: 1.5rem 1.5rem 0;
}

/* ── Products Section ── */
.products-section { padding: 2rem 1.5rem; }

.section-header { margin-bottom: 1.5rem; }
.section-title {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 600;
  color: var(--sub-text);
}
.section-title span { color: var(--sub-teal); }
.section-rule {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--sub-teal-mid), transparent);
  border-radius: 4px;
  margin-top: 0.5rem;
}

/* ── Product Grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.product-card-link { text-decoration: none; color: inherit; display: block; }

.product-card {
  position: relative;
  background: var(--sub-card-bg);
  border: 1px solid var(--sub-border);
  border-radius: var(--sub-radius);
  overflow: hidden;
  box-shadow: var(--sub-shadow);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(13, 107, 85, .16);
}

/* Discount chip */
.discount-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--sub-orange);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: .04em;
  z-index: 2;
}

/* Image */
.product-img-wrap {
  height: 160px;
  background: var(--sub-teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-img-wrap img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform .3s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.05); }

/* Card body */
.product-card-body {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.product-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sub-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.product-sale-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sub-teal);
}
.product-mrp {
  font-size: 0.8rem;
  color: var(--sub-muted);
  text-decoration: line-through;
}
.product-view-btn {
  margin-top: auto;
  padding: 6px 0;
  background: var(--sub-teal);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'Sora', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  width: 100%;
  letter-spacing: .02em;
}
.product-view-btn:hover { background: var(--sub-teal-mid); }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--sub-muted);
}
.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
  opacity: .5;
}
.empty-state p { font-size: 0.95rem; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .subcat-info-inner { flex-direction: column; align-items: flex-start; }
  .subcat-info-img-col { max-width: 240px; }
}
@media (max-width: 600px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.9rem; }
  .product-img-wrap { height: 130px; }
  .subcat-info-section, .products-section { padding: 1.25rem 1rem; }
}