:root {
  --gold: #B8923A;
  --gold-light: #D4AA5C;
  --gold-pale: #F5EDD8;
  --dark: #1A1A18;
  --charcoal: #2C2C2A;
  --mid: #6B6B64;
  --soft: #9C9C92;
  --cream: #FAF8F3;
  --white: #FFFFFF;
  --border: #E8E3D8;
  --sidebar-w: 300px;
}
.sidebar-all { display: none !important; }

/* Page layout */
.page-wrap { display: flex; min-height: 60vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.sidebar-header h3 { font-size: 16px; font-weight: 600; color: var(--dark); margin: 0; }
.sidebar-nav { padding: 8px 0; }
.sidebar-close { display: none; }

/* Tree categories */
.tree-cat { border-left: 3px solid transparent; transition: all 0.15s; }
.tree-cat:hover { background: var(--cream); border-left-color: var(--gold-light); }
.tree-cat.active { border-left-color: var(--gold); background: var(--gold-pale); }
.tree-cat-label-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  gap: 8px;
  color: inherit;
}
.tree-cat-label-link span { font-size: 15px; font-weight: 500; color: var(--charcoal); line-height: 1.3; }
.tree-cat:hover .tree-cat-label-link span { color: var(--gold); }
.tree-cat.active .tree-cat-label-link span { color: var(--dark) !important; }
.tree-chevron { width: 14px; height: 14px; color: var(--soft); transition: transform 0.25s; flex-shrink: 0; }
.tree-cat.active .tree-chevron { transform: rotate(90deg); color: var(--gold); }

/* Sub items */
.tree-sub { display: none; background: #ebf3eb; border-top: 1px solid var(--border); }
.tree-cat.active .tree-sub { display: block; }
.tree-sub-item {
  display: flex;
  align-items: center;
  padding: 9px 12px 9px 22px;
  font-size: 13.5px;
  color: #1F5320;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1.35;
}
.tree-sub-item:hover { background: rgba(184,146,58,0.06); border-left-color: var(--gold-light); color: var(--gold); }
.tree-sub-item.active { background: rgba(184,146,58,0.12); border-left-color: var(--gold); color: var(--dark); font-weight: 500; }
.tree-sub-item::before { content: "\203A"; margin-right: 8px; color: var(--gold-light); font-size: 15px; }

/* tree-cat-label (non-link) */
.tree-cat-label {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; gap: 8px; cursor: pointer;
}
.tree-cat-label span { font-size: 15px; font-weight: 500; color: var(--charcoal); line-height: 1.3; }
.tree-cat.active .tree-cat-label span { color: var(--dark); }

/* Main content */
.page-wrap main { flex: 1; padding: 30px 40px; min-width: 0; }

/* Page title */
.page-title-area h1 { font-size: 28px; font-weight: 600; color: var(--dark); margin-bottom: 8px; }
.page-title-area h1 em { font-style: normal; color: var(--gold); }

/* Breadcrumb */
.back-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 28px; font-size: 12px; color: var(--soft); flex-wrap: wrap;
}
.back-breadcrumb a { color: var(--soft); text-decoration: none; transition: color 0.2s; }
.back-breadcrumb a:hover { color: var(--gold); }
.back-breadcrumb .bc-sep { color: var(--border); }
.back-breadcrumb .bc-cur { color: var(--gold); font-weight: 500; }

/* Overview cards (Products page) */
.ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.ov-card {
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.ov-card:hover { box-shadow: 0 6px 20px rgba(184,146,58,0.12); border-color: var(--gold-light); }
.ov-card a { text-decoration: none; color: inherit; display: block; }
.ov-card-img img { width: 100%; display: block; }
.ov-card-body { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.ov-card-body h3 { font-size: 16px; font-weight: 500; color: var(--dark); margin: 0; }
.ov-arrow { color: var(--gold); font-size: 18px; }

/* Type cards (category pages) */
.types-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.type-card {
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.type-card:hover { box-shadow: 0 6px 20px rgba(184,146,58,0.12); border-color: var(--gold-light); }
.type-card a { text-decoration: none; color: inherit; display: block; }
.type-card-img img { width: 100%; display: block; }
.type-card-body { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.type-card-body h3 { font-size: 16px; font-weight: 500; color: var(--dark); margin: 0; }
.type-arrow { color: var(--gold); font-size: 18px; }

/* Product detail (grade pages) */
.product-detail-wrap {
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; transition: box-shadow 0.25s;
}
.product-detail-wrap:hover { box-shadow: 0 10px 36px rgba(184,146,58,0.12); border-color: var(--gold-light); }
.p-detail-left { padding: 36px; }
.p-gallery-right { position: relative; overflow: hidden; background: var(--gold-pale); border-radius: 8px; }
.g-slides { display: flex; height: 100%; }
.g-slide { min-width: 100%; height: 100%; flex-shrink: 0; }
.g-slide img { width: auto; max-width: 100%; height: auto; max-height: 350px; object-fit: contain; display: block; margin: 0 auto; }

/* Detail typography */
.p-product-title { font-size: clamp(18px, 2vw, 26px); font-weight: 500; color: var(--dark); line-height: 1.2; margin-bottom: 6px; }
.p-subtitle { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 20px; }
.p-divider { height: 1px; background: var(--border); margin-bottom: 24px; }
.p-meta { display: flex; flex-direction: column; gap: 22px; margin-bottom: 28px; flex: 1; }
.m-col-title { font-size: 20px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.m-col ul { list-style: none; display: flex; flex-direction: column; gap: 7px; padding: 0; margin: 0; }
.m-col ul li { font-size: 16px; color: var(--mid); display: flex; align-items: flex-start; gap: 9px; line-height: 1.5; }
.m-col ul li::before { content: ""; width: 5px; height: 5px; background: var(--gold-light); border-radius: 50%; flex-shrink: 0; margin-top: 7px; }
.p-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--dark); color: var(--gold-pale); padding: 13px 28px; border-radius: 2px;
  font-size: 11px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase;
  text-decoration: none; transition: background 0.2s; align-self: flex-start; margin-top: auto;
}
.p-cta:hover { background: var(--gold); color: var(--white); }

/* Product row layout */
.product-row { display: flex; flex-wrap: wrap; }
.product-col { flex: 0 0 50%; max-width: 50%; padding: 15px; box-sizing: border-box; }
.product-col .p-gallery-right { min-height: auto; max-height: 350px; border-radius: 8px; overflow: hidden; }
.product-col .p-gallery-right img { width: auto; max-width: 100%; height: auto; max-height: 350px; object-fit: contain; display: block; margin: 0 auto; }

/* Grades heading */
.grades-heading-area { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.grades-heading-area h2 { font-size: 20px; font-weight: 500; color: var(--dark); line-height: 1.2; margin-bottom: 0; }

/* Mobile: CSS-only checkbox sidebar */
#sidebar-toggle { display: none; }
.sidebar-overlay-label { display: none; }
.mobile-filter-btn { display: none; }

@media (max-width: 767px) {
  .page-wrap { flex-direction: column; }
  .sidebar {
    position: fixed; top: 0; left: -320px; width: 278px; height: 100vh;
    z-index: 1000; transition: left 0.3s ease; box-shadow: none;
  }
  #sidebar-toggle:checked ~ .page-wrap .sidebar { left: 284px; box-shadow: 4px 0 20px rgba(0,0,0,0.15); }
  #sidebar-toggle:checked ~ .sidebar-overlay-label { display: block; }
  .sidebar-overlay-label {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4); z-index: 999; cursor: pointer;
  }
  .sidebar-close {
    display: block; position: absolute; top: 12px; right: 12px;
    background: none; border: none; font-size: 22px; color: var(--mid); cursor: pointer; z-index: 2;
  }
  .mobile-filter-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px;
    background: var(--cream); border: 1px solid var(--border); border-radius: 6px;
    font-size: 14px; color: var(--charcoal); cursor: pointer; margin-bottom: 20px;
  }
  .page-wrap main { padding: 20px 16px; }
  .product-col { flex: 0 0 100%; max-width: 100%; }
  .p-gallery-right { min-height: 260px; }
  .p-detail-left { padding: 24px; }
}

@media (max-width: 600px) {
  .g-thumbs { display: none; }
}
