/* ── Breadcrumb ─────────────────────────────────────────────── */
.sub-breadcrumb {
  padding: 12px 32px;
  background: #fff;
  border-bottom: 1px solid #e8ede9;
}
.sub-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: left;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  margin: 0;
  padding: 0;
  list-style: none;
  letter-spacing: 0.01em;
}
.sub-breadcrumb a {
  color: #2e7d52;
  text-decoration: none;
  transition: color 0.15s;
}
.sub-breadcrumb a:hover { color: #1b5436; }
.sub-breadcrumb .sep    { color: #b0bdb3; font-size: 0.7rem; }
.sub-breadcrumb .active { color: #6b7b70; }

/* ── Hero (split layout) ─────────────────────────────────────── */
.sub-hero {
  background: #fff;
  border-bottom: 1px solid #e8ede9;
  overflow: hidden;
}

.sub-hero__container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 34px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.92fr);
  align-items: start;
  gap: 40px;
}

.sub-hero__content {
   color: #1b3a26;
   text-align: left;
   max-width: 760px;
   margin: 0;
}

.sub-hero__media {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Text side */
.sub-hero__title {
  font-family: var(--font-display);
  font-size: calc(var(--text-3xl) * 0.75);
  font-weight: 800;
  margin: 0 0 14px 24px;
  line-height: 1.08;
  color: ##1b3a26;
  letter-spacing: 0;
  text-align: left;
}

.sub-hero__desc {
   font-size: var(--text-base);
   color: #6b7b70;
   max-width: 760px;
   margin: 0 0 0 24px;
   line-height: 1.45;
   text-align: left;
 }

/* Image side */
.sub-hero__media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.sub-hero__image {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #e4ebe6;
  transition: transform 0.3s ease;
}
.sub-hero__image:hover { transform: scale(1.02); }

.sub-hero__placeholder {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 0.75;
  background: #eaf3ec;
  border-radius: 10px;
  border: 1px solid #c8dece;
  display: flex;
  flex-direction: column;
  align-items: left;
  justify-content: center;
  gap: 12px;
  color: #5a9e74;
}
.sub-hero__placeholder .material-icons {
  font-size: 3rem;
  opacity: 0.4;
}
.sub-hero__placeholder span {
  font-weight: 600;
  font-size: var(--text-base);
  color: #3d7a57;
}

/* ── Sort / Filter Toolbar ───────────────────────────────────── */
.sub-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 32px;
  background: #fff;
  border-bottom: 1px solid #e8ede9;
  flex-wrap: wrap;
  gap: 10px;
  top: var(--header-h);
  z-index: 100;
}

.sub-toolbar__showing {
  font-size: 0.78rem;
  color: #8a9e90;
  letter-spacing: 0.01em;
}
.sub-toolbar__showing strong {
  color: #1b3a26;
  font-weight: 600;
}

.sub-toolbar__right { display: flex; align-items: center; gap: 8px; }

/* Sort dropdown */
.sub-sort-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-sort-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b7b70;
  white-space: nowrap;
}

.sub-sort-select {
  padding: 6px 32px 6px 12px;
  border: 1px solid #d5e4da;
  border-radius: 2px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7b70' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  -webkit-appearance: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1b3a26;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 160px;
}
.sub-sort-select:hover {
  border-color: #2e7d52;
}
.sub-sort-select:focus {
  outline: none;
  border-color: #1b5436;
  box-shadow: 0 0 0 3px rgba(46, 125, 82, 0.12);
}

/* ── Section ─────────────────────────────────────────────────── */
.sub-section {
  padding: 36px 0 64px;
  background: #f5f7f5;
}

.sub-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Product Grid ────────────────────────────────────────────── */
.sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

/* ── Product Card (now an <a> tag) ───────────────────────────── */
.prod-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e4ebe6;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.prod-card:hover {
  transform: translateY(-4px);
  border-color: #a8cdb5;
  box-shadow: 0 8px 24px rgba(27, 84, 54, 0.1);
}

/* Site refresh overrides */
.sub-breadcrumb {
  background: #f8fbf9;
}

.sub-hero {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 250, 246, 0.96) 100%),
    radial-gradient(circle at 88% 18%, rgba(47, 155, 88, 0.16), transparent 30%);
}

.sub-hero__container {
  padding: 38px 40px;
}

.sub-hero__title {
  color: #102818;
  font-size: var(--text-3xl);
  letter-spacing: 0;
}

.sub-hero__desc {
   color: #53675a;
   font-size: var(--text-base);
   text-align: left;
   margin: 0 0 0 24px;
}

.sub-hero__image,
.sub-hero__placeholder {
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(19, 74, 39, 0.12);
}

.sub-toolbar {
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(19, 74, 39, 0.06);
  border-bottom-color: #dfeae3;
}

.sub-sort-select {
  border-radius: 8px;
}

.sub-section {
  background: linear-gradient(180deg, #f3f8f4 0%, #ffffff 100%);
}

.sub-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

.prod-card {
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(19, 74, 39, 0.08);
  min-height: 100%;
}

.prod-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 50px rgba(19, 74, 39, 0.15);
}

.prod-card__img-wrap {
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background:
    linear-gradient(135deg, #eaf3ec, #f7fbf8);
}

.prod-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.prod-card:hover .prod-card__img { transform: scale(1.05); }

.prod-card__img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaf3ec;
}
.prod-card__img-placeholder .material-icons {
  font-size: 2.6rem;
  color: #5a9e74;
  opacity: 0.3;
}

/* Card body */
.prod-card__body {
  padding: 14px 15px 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.prod-card__name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: var(--text-base);
  font-weight: 800;
  margin: 0;
  line-height: 1.28;
  color: #102818;
  transition: color 0.15s;
}
.prod-card:hover .prod-card__name { color: #176b3a; }

.prod-card__desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-line-orient: vertical;
  font-size: var(--text-sm);
  color: #5d7064;
  line-height: 1.38;
  margin: 0;
  flex: 1;
  text-align: justify;
  text-justify: inter-word;
}

/* ── Empty State ─────────────────────────────────────────────── */
.sub-empty {
  text-align: center;
  padding: 72px 20px;
  color: #8a9e90;
}
.sub-empty .material-icons {
  font-size: 3.2rem;
  color: #ccd8ce;
  display: block;
  margin-bottom: 14px;
}
.sub-empty p {
  font-size: 0.9rem;
  margin-bottom: 24px;
  line-height: 1.6;
}
.sub-empty strong { color: #3d5c45; }
.sub-empty__back {
  display: inline-block;
  padding: 10px 26px;
  background: #1b5436;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  transition: background 0.2s, transform 0.2s;
}
.sub-empty__back:hover {
  background: #2e7d52;
  color: #fff;
  transform: translateY(-2px);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sub-hero__container {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 20px;
  }
  .sub-hero__media { order: -1; }
  .sub-hero__image,
  .sub-hero__placeholder {
    max-width: min(100%, 340px);
    margin: 0 auto;
  }
  .sub-hero__desc {
  max-width: 100%;
  text-align: left;
}
  .sub-toolbar { padding: 10px 16px; }
  .sub-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
  .sub-container { padding: 0 16px; }
}

@media (max-width: 480px) {
  .sub-hero__title { font-size: var(--text-3xl); }
  .sub-sort-select { font-size: 0.72rem; min-width: 140px; }
  .sub-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .prod-card__body { padding: 10px 11px 12px; }
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.pagination__link,
.pagination__ellipsis {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #d5e4da;
  background: #fff;
  color: #1b5436;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: 8px;
}

.pagination__link:hover {
  border-color: #2e7d52;
  background: #edf7ef;
  color: #1b5436;
}

.pagination__link--current {
  border-color: #1b5436;
  background: #1b5436;
  color: #fff;
}

.pagination__link--disabled,
.pagination__link--disabled:hover {
  color: #aab5ae;
  border-color: #e2e9e4;
  background: #f7faf8;
  cursor: not-allowed;
}

.pagination__ellipsis {
  border-color: transparent;
  background: transparent;
  color: #8a9e90;
}
/* Final hero title override */
.sub-hero .sub-hero__container .sub-hero__content .sub-hero__title {
  font-size: 24px !important;
  line-height: 1.12 !important;
  text-align: left !important;
}
/* Final subcategory hero left spacing */
.sub-hero__content {
  padding-left: 28px !important;
  box-sizing: border-box;
}

.sub-hero__title,
.sub-hero__desc {
  text-align: left !important;
}
/* Final subcategory hero left spacing + justification */
.sub-hero__content {
  padding-left: 28px !important;
  box-sizing: border-box;
}

.sub-hero__title {
  text-align: left !important;
}

.sub-hero__desc {
  text-align: justify !important;
  text-justify: inter-word;
}

@media (max-width: 768px) {
  .sub-hero__content {
    padding-left: 8px !important;
  }

  .sub-hero__desc {
    text-align: left !important;
  }
}
