.woocommerce-page .ast-container,
.woocommerce .ast-container {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  gap: 2.5rem !important;
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 0 1.5rem !important;
}

.kc-shop-sidebar {
  width: 260px;
  min-width: 240px;
  flex-shrink: 0;
  order: 1;
  font-family: inherit;
  color: #1a1a1a;
  margin-top: 60px;
  /* no border — sections use bottom rules instead */
}

/* "Shopping Options" heading */
.kc-sidebar__heading {
  font-size: 1rem; /* ~16 px */
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: #1a1a1a;
  margin: 0 0 0.75rem 0;
  padding: 0;
  line-height: 1.3;
}

/* strip WC/theme default form margins */
#kc-sidebar-filter-form {
  margin: 0;
  padding: 0;
}

.kc-filter-section {
  border-top: 1px solid #d8d8d8;
}

/* last child also gets a bottom rule */
.kc-filter-section:last-child {
  border-bottom: 1px solid #d8d8d8;
}

/* Toggle button — the full-width clickable row */
.kc-filter-section__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 0.85rem 0;
  cursor: pointer;
  text-align: left;
  color: #1a1a1a;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  box-shadow: none;
}

button.kc-filter-section__toggle:hover,
button.kc-filter-section__toggle:focus {
  background-color: transparent !important;
  color: #1a1a1a;
}

/* Chevron icon — pure CSS, no icon font needed */
.kc-filter-section__icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  position: relative;
  margin-left: 8px;
}

.kc-filter-section__icon::before,
.kc-filter-section__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease;
}

.kc-filter-section__icon::before {
  left: 1px;
  transform: translateY(-50%) rotate(45deg);
}

.kc-filter-section__icon::after {
  right: 1px;
  transform: translateY(-50%) rotate(-45deg);
}

/* Chevron points UP when section is open */
.kc-filter-section.is-open .kc-filter-section__icon::before {
  transform: translateY(-50%) rotate(-45deg);
}
.kc-filter-section.is-open .kc-filter-section__icon::after {
  transform: translateY(-50%) rotate(45deg);
}

.kc-filter-section__body {
  display: none; /* collapsed by default — jQuery slideDown/Up owns display */
  padding: 0 0 1rem 0;
}

.kc-filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kc-filter-list__item {
  margin: 0;
  padding: 0;
}

/* Label row */
.kc-filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.875rem; /* 14 px */
  font-weight: 400;
  color: #1a1a1a;
  cursor: pointer;
  line-height: 1.4;
  user-select: none;
}

.kc-filter-label:hover {
  color: #000;
}

/* Native checkbox — keep it simple, override only what's needed */
.kc-filter-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #1a1a1a; /* checked colour = near-black to match theme */
  cursor: pointer;
  margin: 0;
}

/* Count badge */
.kc-filter-label__count {
  color: #888;
  font-size: 0.8125rem;
  margin-left: 2px;
}

/* Parent label is slightly bolder */
.kc-filter-label strong {
  font-weight: 600;
  font-size: 0.875rem;
}

/* Sub-list (child terms) — indented */
.kc-filter-list--sub {
  padding-left: 24px;
  margin-top: 2px;
}

.kc-filter-clear {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8125rem;
  color: #555;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.kc-filter-clear:hover {
  color: #000;
}

.kc-sidebar__apply-btn {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  background: #1a1a1a;
  color: #fff;
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s;
}

.kc-sidebar__apply-btn:hover {
  background: #333;
}

#primary.content-area {
  flex: 1 !important;
  min-width: 0 !important;
  order: 2 !important;
  padding: 0 !important;
}

#primary.content-area main {
  float: none !important;
  width: 100% !important;
}

/* Product grid — 4 columns */
ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1.5rem !important;
  margin: 0 !important;
  padding: 0 !important;
}

ul.products li.product {
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  float: none !important;
}

/* Notices */
.woocommerce-info,
.woocommerce-message,
.woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-info {
  grid-column: 1 / -1 !important;
  text-align: center !important;
  width: 100% !important;
}

.woocommerce-info {
  background-color: #f8f8f8;
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  border-radius: 4px;
  font-size: 1rem;
  color: #333;
}

.woocommerce-notices-wrapper {
  width: 100%;
}

.woocommerce-notices-wrapper .woocommerce-info {
  width: 100%;
  text-align: center;
}

.woocommerce-result-count,
.woocommerce-ordering {
  margin: 0 0 1rem 0 !important;
}

@media (max-width: 1100px) {
  ul.products {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .woocommerce-page .ast-container,
  .woocommerce .ast-container {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  .kc-shop-sidebar {
    width: 100%;
    min-width: unset;
  }

  #primary.content-area {
    width: 100% !important;
  }

  ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  ul.products {
    grid-template-columns: 1fr !important;
  }
}
