:root {
  --forest-dark: #0e3d2f;
  --forest-dark-hover: #144e3d;
  --wood: #b78a48;
  --wood-hover: #9d7338;
}

/* ==========================================================================
   Section 1: Products Hero Banner
   ========================================================================== */
.products-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  padding: 136px 0 92px;
  background: linear-gradient(90deg, rgba(8, 21, 16, 0.88) 0%, rgba(8, 21, 16, 0.58) 55%, rgba(8, 21, 16, 0.28) 100%),
              url("../images/about-banner.png") center right / cover no-repeat;
  overflow: hidden;
}

.products-hero__bg-fx {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 50%, rgba(183, 138, 72, 0.16) 0%, transparent 60%);
  pointer-events: none;
}

.products-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.products-hero__content {
  max-width: 640px;
  color: #ffffff;
}

.products-hero__kicker {
  margin: 0 0 10px;
  color: #e5cbab;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1;
}

.products-hero__title {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: clamp(38px, 4.5vw, 56px);
  font-weight: 900;
  letter-spacing: 1.5px;
  line-height: 1.1;
  text-transform: uppercase;
}

.products-hero__subtitle {
  max-width: 580px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(15.5px, 1.35vw, 18px);
  font-weight: 500;
  line-height: 1.55;
}

.products-hero__breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.products-hero__breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.22s ease;
}

.products-hero__breadcrumb a:hover {
  color: #e5cbab;
}

.breadcrumb-separator {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
}

.products-hero__breadcrumb span:last-child {
  color: #e5cbab;
  font-weight: 700;
}

/* Vertical Architectural Typography (from Design Mockup) */
.products-hero__vertical-tag {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: right;
  color: rgba(229, 203, 171, 0.8);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 5px;
  line-height: 1.2;
  user-select: none;
}

.products-hero__vertical-tag span {
  display: block;
}

/* ==========================================================================
   Section 2: Products Main Layout
   ========================================================================== */
.products-section {
  padding: 72px 0 108px;
  background: #ffffff;
}

.products-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

/* ==========================================================================
   Sidebar: 2-Level Nested Categories Tree
   ========================================================================== */
.products-sidebar {
  position: sticky;
  top: 0px;
}

.category-panel {
  background: #faf8f5;
  border-radius: 8px;
  border: 1px solid #ede8e0;
  padding: 22px 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
}

.category-panel__title {
  margin: 0 0 14px;
  padding: 0 8px 14px;
  color: var(--forest-dark);
  font-size: 17.5px;
  font-weight: 800;
  letter-spacing: -0.2px;
  border-bottom: 1px solid #e8e3da;
}

.category-tree {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-tree__node {
  position: relative;
}

/* Top-level Item Row */
.category-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-radius: 6px;
  border-bottom: 1px solid #ede7df;
  transition: all 0.22s ease;
  overflow: hidden;
}

.category-tree__node:last-child .category-item-row {
  border-bottom-color: transparent;
}

.category-item-row--single {
  width: 100%;
}

.category-item--top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: #3b4240;
  font-size: 13.8px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.22s ease;
}

.category-item__label {
  display: inline-block;
}

.category-arrow-right {
  font-size: 11px;
  color: #79837f;
  transition: transform 0.22s ease, color 0.22s ease;
  margin-right: 2px;
}

.category-item__count {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 7px;
  background: #eae5dc;
  color: #636b68;
  border-radius: 10px;
  transition: all 0.2s ease;
}

/* Accordion Toggle Arrow Button */
.category-toggle-btn {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: #79837f;
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 4px;
  margin-right: 4px;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.category-toggle-btn i {
  font-size: 11px;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.category-toggle-btn:hover {
  background: rgba(14, 61, 47, 0.08);
  color: var(--forest-dark);
}

/* Open Accordion State */
.category-tree__node.is-open > .category-item-row .category-toggle-btn i {
  transform: rotate(180deg);
}

/* Hover States */
.category-item-row:hover:not(.is-active) {
  background: rgba(14, 61, 47, 0.04);
}

.category-item-row:hover:not(.is-active) .category-item--top {
  color: var(--forest-dark);
}

.category-item-row:hover:not(.is-active) .category-arrow-right {
  color: var(--forest-dark);
  transform: translateX(2px);
}

/* Active Top-level Category */
.category-item-row.is-active,
.category-item--top.is-active {
  background: var(--forest-dark);
  color: #ffffff;
  border-radius: 6px;
  border-bottom-color: transparent;
  box-shadow: 0 4px 14px rgba(14, 61, 47, 0.18);
}

.category-item-row.is-active .category-item--top {
  color: #ffffff;
  background: transparent;
}

.category-item-row.is-active .category-toggle-btn,
.category-item-row.is-active .category-arrow-right {
  color: #ffffff;
}

.category-item-row.is-active .category-item__count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* When a parent has an active sub-child */
.category-item-row.has-active-child {
  background: rgba(14, 61, 47, 0.05);
  font-weight: 700;
}

.category-item-row.has-active-child .category-item--top {
  color: var(--forest-dark);
}

/* Level 2 Submenu */
.category-submenu {
  display: none;
  padding: 6px 0 8px 12px;
  margin: 4px 0 6px 14px;
  border-left: 2px solid #dfd8cc;
  flex-direction: column;
  gap: 3px;
}

.category-tree__node.is-open > .category-submenu {
  display: flex;
}

.category-subitem {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #555d5a;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.subitem-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #aab2af;
  flex: 0 0 5px;
  transition: all 0.2s ease;
}

.category-subitem:hover {
  color: var(--forest-dark);
  background: rgba(14, 61, 47, 0.05);
  padding-left: 16px;
}

.category-subitem:hover .subitem-dot {
  background: var(--wood);
  transform: scale(1.4);
}

.category-subitem.is-active {
  color: var(--forest-dark);
  font-weight: 700;
  background: rgba(14, 61, 47, 0.08);
  padding-left: 14px;
}

.category-subitem.is-active .subitem-dot {
  background: var(--wood);
  transform: scale(1.6);
  box-shadow: 0 0 6px rgba(183, 138, 72, 0.6);
}

/* Need a Custom Solution? Promo Card */
.sidebar-promo {
  position: relative;
  margin-top: 28px;
  border-radius: 8px;
  border: 1px solid #e6ded3;
  padding: 32px 24px 28px;
  background: linear-gradient(135deg, rgba(250, 248, 245, 0.96) 0%, rgba(244, 239, 232, 0.92) 100%),
              url("../images/index-cta.png") center bottom / cover no-repeat;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.sidebar-promo__decor {
  position: absolute;
  top: -24px;
  right: -24px;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(183, 138, 72, 0.22) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.sidebar-promo__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--forest-dark);
  display: grid;
  place-items: center;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  margin-bottom: 18px;
}

.sidebar-promo__title {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--forest-dark);
}

.sidebar-promo__desc {
  margin: 0 0 20px;
  font-size: 13px;
  color: #5d6360;
  line-height: 1.55;
  font-weight: 500;
}

.sidebar-promo__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  background: var(--wood);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(183, 138, 72, 0.28);
  transition: all 0.25s ease;
}

.sidebar-promo__btn i {
  font-size: 11.5px;
  transition: transform 0.2s ease;
}

.sidebar-promo__btn:hover {
  background: var(--wood-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(183, 138, 72, 0.38);
}

.sidebar-promo__btn:hover i {
  transform: translateX(4px);
}

/* ==========================================================================
   Active Filter Pill Bar & Result Count
   ========================================================================== */
.active-filter-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 6px 14px;
  background: #f4efe8;
  border-radius: 20px;
  font-size: 12.5px;
}

.filter-tag-label {
  color: #727a76;
  font-weight: 600;
}

.filter-tag {
  color: var(--forest-dark);
  font-weight: 800;
}

.filter-clear-btn {
  width: 18px;
  height: 18px;
  border: 0;
  background: #ded5c7;
  color: #555;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-clear-btn:hover {
  background: var(--forest-dark);
  color: #fff;
}

/* Result count */
.products-count {
  margin: 0 0 24px;
  color: #676e6b;
  font-size: 13.5px;
  font-weight: 500;
}

/* ==========================================================================
   Product Grid & Cards (Matching Design Mockup)
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.product-item {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #ece8e1;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
}

.product-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(14, 61, 47, 0.12);
  border-color: rgba(183, 138, 72, 0.45);
}

.product-item[hidden] {
  display: none !important;
}

.product-item__img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
  background: #f4f1eb;
}

.product-item__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(14, 61, 47, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.3px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product-item__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-item:hover .product-item__img-wrap img {
  transform: scale(1.06);
}

.product-item__body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-item__title {
  margin: 0 0 12px;
  color: #111217;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  transition: color 0.22s ease;
}

.product-item:hover .product-item__title {
  color: var(--forest-dark);
}

.product-item__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--forest-dark);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  margin-top: auto;
  transition: all 0.22s ease;
}

.product-item__link i {
  font-size: 11px;
  transition: transform 0.22s ease;
}

.product-item:hover .product-item__link {
  color: var(--wood);
}

.product-item:hover .product-item__link i {
  transform: translateX(4px);
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.products-empty {
  text-align: center;
  padding: 64px 20px;
  background: #faf8f5;
  border-radius: 8px;
  border: 1px dashed #ded8ce;
  margin: 20px 0;
}

.products-empty i {
  font-size: 42px;
  color: #adb5b2;
  margin-bottom: 16px;
}

.products-empty h3 {
  margin: 0 0 8px;
  color: var(--forest-dark);
  font-size: 20px;
  font-weight: 800;
}

.products-empty p {
  margin: 0 0 20px;
  color: #646b68;
  font-size: 14px;
}

.products-empty__reset {
  padding: 10px 22px;
  background: var(--forest-dark);
  color: #ffffff;
  border: 0;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.products-empty__reset:hover {
  background: var(--forest-dark-hover);
}

/* ==========================================================================
   Pagination (Matching Design Mockup)
   ========================================================================== */
.product-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination-btn {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: 1px solid #dedede;
  background: #ffffff;
  color: #2b3330;
  font-size: 13.5px;
  font-weight: 600;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(.is-active):not(:disabled) {
  background: #f6f4ef;
  border-color: var(--wood);
  color: var(--forest-dark);
}

.pagination-btn.is-active {
  background: var(--forest-dark);
  color: #ffffff;
  border-color: var(--forest-dark);
  font-weight: 700;
}

.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-ellipsis {
  padding: 0 6px;
  color: #8c9390;
  font-size: 15px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1200px) {
  .products-layout {
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 32px;
  }

  .product-grid {
    gap: 18px;
  }
}

@media (max-width: 980px) {
  .products-hero {
    min-height: 400px;
    padding: 110px 0 70px;
  }

  .products-hero__vertical-tag {
    display: none;
  }

  .products-section {
    padding: 56px 0 80px;
  }

  .products-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .products-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: stretch;
  }

  .sidebar-promo {
    margin-top: 0;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .products-sidebar {
    display: flex;
    flex-direction: column;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }
}
