/* ==========================================================================
   Australian Tea Masters — Left Sidebar Filter & Card Origin Badges (v1.3.0)
   - W Cosmetics Sticky Sidebar Pattern:
     * Outer sidebar (`aside.atm-left-sidebar`) is sticky (`position: sticky; top: 96px; max-height: calc(100vh - 110px); overflow-y: auto`)
     * Inner filter lists (`ul.atm-filter-list`) have ZERO scrollbars (`max-height: none; overflow: visible`)
     * Collapsible `<details class="atm-filter-accordion">` sections so all 6 filter headings are easy to reach
   ========================================================================== */

@media (min-width: 1025px) {
  .woocommerce-page .rey-siteContainer > .rey-siteRow {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 36px !important;
  }
  .woocommerce-page .atm-left-sidebar {
    width: 280px !important;
    flex: 0 0 280px !important;
    position: sticky !important;
    top: 96px !important;
    max-height: calc(100vh - 112px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 18px;
    border-right: 1px solid #e6e3dd;
    scrollbar-width: thin;
    scrollbar-color: #c9c4ba transparent;
  }
  .woocommerce-page .atm-left-sidebar::-webkit-scrollbar {
    width: 5px;
  }
  .woocommerce-page .atm-left-sidebar::-webkit-scrollbar-track {
    background: transparent;
  }
  .woocommerce-page .atm-left-sidebar::-webkit-scrollbar-thumb {
    background-color: #c9c4ba;
    border-radius: 10px;
  }
  .woocommerce-page main#main.rey-siteMain {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: calc(100% - 316px) !important;
  }
}

/* Sidebar Typography & W Cosmetics-Style Accordions */
.atm-left-sidebar {
  font-family: inherit;
  color: #2c2b29;
  margin-bottom: 32px;
}
.atm-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 2px solid #2c2b29;
}
.atm-sidebar-header h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}
.atm-reset-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: #8c6d46;
  text-decoration: underline;
  cursor: pointer;
  display: none;
}

/* W Cosmetics-style Collapsible <details> Filter Sections */
.atm-filter-accordion {
  border-bottom: 1px solid #ebe8e2;
  padding: 14px 0;
}
.atm-filter-accordion:last-of-type {
  border-bottom: none;
}
.atm-filter-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2c2b29;
  cursor: pointer;
  user-select: none;
}
.atm-filter-summary::-webkit-details-marker {
  display: none;
}
.atm-filter-summary:hover {
  color: #8c6d46;
}
.atm-accordion-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 14px;
  font-weight: 600;
  color: #6e6a63;
  transition: transform 0.2s ease;
}
.atm-filter-accordion[open] .atm-accordion-chevron {
  transform: rotate(180deg);
}

/* Inner Filter List — NO internal scrollbar (`max-height: none; overflow: visible`) */
.atm-filter-list {
  list-style: none;
  padding: 12px 0 2px 0;
  margin: 0;
  max-height: none !important;
  overflow: visible !important;
}
.atm-filter-item {
  margin-bottom: 8px;
}
.atm-filter-item:last-child {
  margin-bottom: 0;
}
.atm-filter-item--child {
  padding-left: 18px;
}
.atm-filter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #44423e;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
  gap: 8px;
}
.atm-filter-label:hover {
  color: #8c6d46;
}
.atm-filter-label.is-selected {
  font-weight: 600;
  color: #1f1e1c;
}
.atm-filter-label-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.atm-filter-label-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.atm-filter-remove-x {
  display: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  color: #999;
  background-color: #ffffff;
  border: 1px solid #e0dbd0;
  transition: all 0.15s ease;
}
.atm-filter-label.is-selected .atm-filter-remove-x {
  display: inline-flex;
}
.atm-filter-label.is-selected:hover {
  background-color: #ffffff !important;
}
.atm-filter-label.is-selected:hover .atm-filter-remove-x,
.atm-filter-remove-x:hover {
  color: #e53935 !important;
  background-color: #ffffff !important;
  border-color: #e53935 !important;
  transform: scale(1.15);
}
.atm-filter-checkbox {
  width: 15px;
  height: 15px;
  accent-color: #2c2b29;
  cursor: pointer;
  margin: 0;
}
.atm-filter-count {
  font-size: 11px;
  color: #7a7670;
  background: #f4f1ea;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
}
.atm-show-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 2px 0;
  background: none;
  border: none;
  font-size: 12.5px;
  font-weight: 600;
  color: #8c6d46;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.atm-show-more-btn:hover {
  color: #2c2b29;
}
.atm-search-input {
  width: 100%;
  padding: 8px 11px;
  font-size: 13px;
  border: 1px solid #d8d3c8;
  border-radius: 4px;
  margin-bottom: 6px;
  background: #fff;
  color: #2c2b29;
}

/* Active Filter Chips Bar above Product Grid */
.atm-active-chips-bar {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px 14px;
  background: #f8f6f2;
  border: 1px solid #e6e3dd;
  border-radius: 6px;
}
.atm-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ffffff !important;
  color: #2c2b29 !important;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #d8d3c8 !important;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.atm-active-chip .atm-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  color: #888888;
  background: transparent !important;
  transition: all 0.15s ease;
}
.atm-active-chip:hover {
  background: #ffffff !important;
  color: #2c2b29 !important;
  border-color: #e53935 !important;
}
.atm-active-chip:hover .atm-chip-x {
  color: #e53935 !important;
  background: transparent !important;
  transform: scale(1.2);
}

/* Country Badge ONLY on Product Cards */
.atm-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 6px 0 4px 0;
}
.atm-card-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 3px;
  line-height: 1.3;
}
.atm-card-badge--country {
  background: #f4f1ea;
  color: #3d3935;
  border: 1px solid #e0dbd0;
}

/* Ensure product thumbnails render cleanly inside grid */
ul.products li.product .rey-productThumbnail img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #faf9f6;
}

/* Infinite Scroll Sentinel & Status */
.atm-infinite-scroll-sentinel {
  text-align: center;
  padding: 28px 0 44px;
  font-size: 13px;
  font-weight: 500;
  color: #7a7670;
}
