/*
 * Herbal Cure Life — Shared Category Archive V1.
 *
 * Category-specific layout and filter UI only.
 * Product cards remain owned by featured-products.css.
 */

#hcl-category-main {
  --hcl-category-forest:#183F31;
  --hcl-category-green:#2F6B3D;
  --hcl-category-gold:#C9963D;
  --hcl-category-border:#D3DAD3;
  --hcl-category-ivory:#FBF8F1;
  display:block;
  width:100%;
  max-width:none;
  margin:0;
  padding:0;
  background:#fff;
  color:#1F241F;
  font-family:Montserrat,system-ui,sans-serif;
}

#hcl-category-main .hcl-category-banner,
#hcl-category-main .hcl-category-banner picture,
#hcl-category-main .hcl-category-banner img {
  display:block;
  width:100%;
  max-width:none;
  height:auto;
  margin:0;
  padding:0;
}

#hcl-category-main .hcl-category-banner {
  line-height:0;
  background:var(--hcl-category-ivory);
}

#hcl-category-main .hcl-category-banner img {
  object-fit:contain;
}

#hcl-category-main .hcl-category-products {
  margin-block-start:0;
}

#hcl-category-main .hcl-category-tabs {
  display:flex;
  align-items:center;
  gap:9px;
  overflow-x:auto;
  scrollbar-width:none;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
  padding:2px 0 6px;
  margin:0 0 20px;
}

#hcl-category-main .hcl-category-tabs::-webkit-scrollbar {
  display:none;
}

#hcl-category-main .hcl-category-tab {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  flex:none;
  min-height:40px;
  padding:0 16px;
  border:1px solid var(--hcl-category-border);
  border-radius:9px;
  background:#fff;
  color:var(--hcl-category-forest);
  font:600 12px Montserrat,system-ui,sans-serif;
  white-space:nowrap;
  cursor:pointer;
}

#hcl-category-main .hcl-category-tab.is-active {
  background:var(--hcl-category-forest);
  border-color:var(--hcl-category-forest);
  color:#fff;
}

#hcl-category-main .hcl-category-tab:disabled {
  opacity:.72;
  cursor:not-allowed;
}

#hcl-category-main .hcl-category-tab:hover:not(:disabled):not(.is-active) {
  background:#EAF2DF;
  border-color:var(--hcl-category-green);
}

#hcl-category-main .hcl-category-toolbar {
  display:flex;
  align-items:center;
  gap:9px;
}

#hcl-category-main .hcl-category-filter-trigger,
#hcl-category-main #hcl-category-sort {
  height:44px;
  min-height:44px;
  border:1px solid var(--hcl-category-border);
  border-radius:6px;
  background:#fff;
  color:var(--hcl-category-forest);
  font:600 12px Montserrat,system-ui,sans-serif;
  cursor:pointer;
}

#hcl-category-main .hcl-category-filter-trigger {
  width:116px;
  box-sizing:border-box;
}

#hcl-category-main .hcl-category-filter-trigger.is-filtered {
  position:relative;
  padding-left:10px;
  padding-right:36px;
  text-align:left;
  white-space:nowrap;
  background:var(--hcl-category-forest);
  border-color:var(--hcl-category-forest);
  color:#fff;
}

#hcl-category-main .hcl-category-filter-count {
  position:absolute;
  right:9px;
  top:50%;
  transform:translateY(-50%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  padding:0 3px;
  box-sizing:border-box;
  border-radius:999px;
  background:#E4B550;
  color:var(--hcl-category-forest);
  font:800 11px/1 Montserrat,system-ui,sans-serif;
  pointer-events:none;
}

#hcl-category-main #hcl-category-sort {
  width:174px;
  padding:0 10px;
}

#hcl-category-main .hcl-category-sort-label {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}

#hcl-category-main .hcl-category-filter-trigger:hover:not(.is-filtered),
#hcl-category-main #hcl-category-sort:hover {
  background:#EAF2DF;
  border-color:var(--hcl-category-green);
}

#hcl-category-main .hcl-category-count {
  margin:0 0 12px;
  color:#405C48;
  font:600 14px/1.5 Montserrat,system-ui,sans-serif;
}

#hcl-category-main .hcl-category-empty {
  padding:34px 20px;
  text-align:center;
  border:1px solid var(--hcl-category-border);
  border-radius:10px;
  background:#fff;
  color:#405C48;
}

#hcl-category-main .hcl-category-empty h3 {
  margin:0 0 10px;
  color:var(--hcl-category-forest);
  font:600 19px/1.45 Montserrat,system-ui,sans-serif;
}

#hcl-category-main .hcl-category-empty p {
  margin:0;
  font:500 13px/1.65 Montserrat,system-ui,sans-serif;
}

#hcl-category-main .hcl-category-pagination {
  display:flex;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin:16px auto 40px;
  padding:0 14px;
}

#hcl-category-main .hcl-category-pagination .page-numbers {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  min-height:44px;
  padding:9px 13px;
  border:1px solid var(--hcl-category-border);
  border-radius:6px;
  background:#fff;
  color:var(--hcl-category-forest);
  font:600 12px Montserrat,system-ui,sans-serif;
  text-decoration:none;
}

#hcl-category-main .hcl-category-pagination .current {
  background:var(--hcl-category-forest);
  border-color:var(--hcl-category-forest);
  color:#fff;
}

#hcl-category-main .hcl-category-pagination a:hover {
  background:#EAF2DF;
  border-color:var(--hcl-category-green);
}

/* One native dialog owner, without html/body overflow changes. */

#hcl-category-dialog {
  position:fixed;
  inset:0 0 0 auto;
  width:min(410px,100vw);
  height:100dvh;
  max-width:100vw;
  max-height:100dvh;
  margin:0;
  padding:0;
  border:0;
  border-radius:16px 0 0 16px;
  overflow:hidden;
  background:#fff;
  color:#1F241F;
  font-family:Montserrat,system-ui,sans-serif;
  box-shadow:-16px 0 56px rgba(24,63,49,.2);
}

#hcl-category-dialog,
#hcl-category-dialog * {
  box-sizing:border-box;
}

#hcl-category-dialog:modal {
  overscroll-behavior:contain;
}

#hcl-category-dialog::backdrop {
  background:rgba(13,29,20,.48);
}

#hcl-category-dialog .hcl-filter-shell {
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
}

#hcl-category-dialog .hcl-filter-head {
  flex:none;
  padding:16px 22px;
  background:#FBF8F1;
  border-bottom:1px solid #E5E6DF;
}

#hcl-category-dialog .hcl-filter-headline {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

#hcl-category-dialog .hcl-filter-title {
  margin:0;
  color:#183F31;
  font:700 20px/1.35 Montserrat,system-ui,sans-serif;
}

#hcl-category-dialog .hcl-filter-close {
  flex:none;
  min-width:44px;
  min-height:44px;
  border:1px solid #D3DAD3;
  border-radius:9px;
  background:#fff;
  color:#183F31;
  font-size:23px;
  cursor:pointer;
}

#hcl-category-dialog .hcl-filter-body {
  flex:1;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:8px 22px 20px;
}

#hcl-category-dialog .hcl-filter-group {
  padding:2px 0;
  border-bottom:1px solid #E5E6DF;
}

#hcl-category-dialog .hcl-filter-group summary {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  min-height:56px;
  list-style:none;
  color:#183F31;
  font:600 13px Montserrat,system-ui,sans-serif;
  cursor:pointer;
}

#hcl-category-dialog .hcl-filter-group summary::-webkit-details-marker {
  display:none;
}

#hcl-category-dialog .hcl-filter-group summary::after {
  content:'';
  flex:none;
  width:8px;
  height:8px;
  margin-right:5px;
  border-right:2px solid #65766A;
  border-bottom:2px solid #65766A;
  transform:rotate(45deg);
}

#hcl-category-dialog .hcl-filter-group[open] summary::after {
  transform:rotate(225deg);
}

#hcl-category-dialog .hcl-filter-content {
  display:grid;
  gap:10px;
  padding:0 0 17px;
}

#hcl-category-dialog .hcl-filter-option-list {
  display:grid;
  gap:0;
}

#hcl-category-dialog .hcl-filter-option {
  display:flex;
  align-items:center;
  gap:12px;
  min-height:44px;
  height:44px;
  margin:0;
  padding:0 2px;
  border:0;
  border-radius:0;
  background:transparent;
  color:#405C48;
  font:500 12px/1.4 Montserrat,system-ui,sans-serif;
  cursor:pointer;
}

#hcl-category-dialog .hcl-filter-option:has(input:checked) {
  background:transparent;
  color:#183F31;
  font-weight:600;
}

#hcl-category-dialog .hcl-filter-option input {
  flex:none;
  width:17px;
  height:17px;
  accent-color:#2F6B3D;
}

#hcl-category-dialog .hcl-filter-option small {
  margin-left:auto;
  color:#667066;
}

#hcl-category-dialog .hcl-filter-field {
  display:grid;
  gap:7px;
  color:#405C48;
  font:600 12px Montserrat,system-ui,sans-serif;
}

#hcl-category-dialog .hcl-filter-input {
  width:100%;
  min-width:0;
  min-height:44px;
  padding:9px 12px;
  border:1px solid #C5D1C5;
  border-radius:8px;
  background:#fff;
  color:#183F31;
  font:500 13px Montserrat,system-ui,sans-serif;
}

#hcl-category-dialog .hcl-filter-price {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:10px;
}

#hcl-category-dialog .hcl-filter-muted {
  margin:0;
  padding:11px;
  border:1px dashed #D3DAD3;
  border-radius:8px;
  background:#FAFBF8;
  color:#667066;
  font:500 11px/1.6 Montserrat,system-ui,sans-serif;
}

#hcl-category-dialog .hcl-filter-foot {
  display:grid;
  grid-template-columns:115px minmax(0,1fr);
  gap:10px;
  flex:none;
  padding:14px 22px;
  border-top:1px solid #E5E6DF;
  background:#fff;
}

#hcl-category-dialog .hcl-filter-foot button {
  min-height:50px;
  border-radius:8px;
  font:700 12px Montserrat,system-ui,sans-serif;
  cursor:pointer;
}

#hcl-category-dialog .hcl-filter-clear {
  border:1px solid #C9D2CA;
  background:#fff;
  color:#183F31;
}

#hcl-category-dialog .hcl-filter-apply {
  border:1px solid #2F6B3D;
  background:#2F6B3D;
  color:#fff;
}

#hcl-category-dialog .hcl-filter-apply:hover {
  border-color:#183F31;
  background:#183F31;
}

#hcl-category-main :is(button,select,a):focus-visible,
#hcl-category-dialog :is(button,input,summary):focus-visible {
  outline:3px solid #C9963D;
  outline-offset:2px;
}

@media (max-width:740px) {
  #hcl-category-main .hcl-category-tabs {
    gap:8px;
  }

  #hcl-category-main .hcl-category-tab {
    min-height:38px;
    padding:0 13px;
    font-size:11px;
  }

  #hcl-category-main .hcl-category-products .section-heading {
    grid-template-columns:minmax(0,1fr);
    gap:12px;
  }

  #hcl-category-main .hcl-category-products .section-actions {
    justify-self:start;
    max-width:100%;
  }

  #hcl-category-main .hcl-category-filter-trigger {
    width:105px;
    font-size:11px;
  }

  #hcl-category-main .hcl-category-filter-trigger.is-filtered {
    padding-left:8px;
    padding-right:30px;
  }

  #hcl-category-main .hcl-category-filter-count {
    right:6px;
    min-width:20px;
    height:20px;
    font-size:10px;
  }

  #hcl-category-main #hcl-category-sort {
    width:155px;
    font-size:10px;
  }

  #hcl-category-main .hcl-category-count {
    font-size:13px;
  }

  #hcl-category-main .hcl-category-pagination {
    gap:6px;
  }

  #hcl-category-dialog {
    width:100vw;
    border-radius:0;
  }

  #hcl-category-dialog .hcl-filter-head {
    padding:16px;
  }

  #hcl-category-dialog .hcl-filter-body {
    padding:8px 16px 20px;
  }

  #hcl-category-dialog .hcl-filter-foot {
    padding:12px 16px max(12px,env(safe-area-inset-bottom));
  }
}
