/**
 * TeachAcademy — Shop / Product Archive Styles
 *
 * Covers the main shop page, product category archives,
 * and product taxonomy archives.
 */


/* Breadcrumb */
ol.breadcrumb.flex-nowrap.mb-0 {
    --bs-breadcrumb-item-active-color: #ffffff !important;
}
.breadcrumb-item a {
    color: #e0e0e0 !important;
    text-decoration: none;
    transition: color 0.15s;
}
.breadcrumb-item+.breadcrumb-item {
    color: #e0e0e0;
}
/* ============================================================
   Page Header — Teach Academy branded
   ============================================================ */
.ta-shop-header {
  position: relative;
  background: linear-gradient(135deg, #27282c 0%, #2d5f57 60%, #3d8b80 100%);
  border-bottom: none;
  padding: 32px 0 36px;
  overflow: hidden;
}

/* Specific hero image for the "Vara kreatorer" page */
.ta-shop-header--creators {
  background-image:
    linear-gradient(135deg, rgba(39, 40, 44, 0.86) 0%, rgba(45, 95, 87, 0.78) 60%, rgba(61, 139, 128, 0.74) 100%),
    url('https://cdn.teachacademy.se/wp-content/uploads/2022/05/DSC07221-scaled.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Decorative background icons */
.ta-shop-header__decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
}

.ta-shop-header__icon {
  position: absolute;
  color: #fff;
}

.ta-shop-header__icon--left {
  font-size: 6rem;
  top: -12px;
  left: -10px;
  transform: rotate(-15deg);
  animation: fadeInLeft 1s ease-out 0.3s both;
}

.ta-shop-header__icon--right {
  font-size: 4.5rem;
  top: 30%;
  right: -8px;
  transform: rotate(25deg);
  animation: fadeInRight 1s ease-out 0.5s both;
}

.ta-shop-header__icon--bottom {
  font-size: 3.5rem;
  bottom: -6px;
  right: 12%;
  transform: rotate(12deg);
  animation: fadeInBottom 1s ease-out 0.4s both;
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-50px) rotate(-15deg); }
  to   { opacity: 1; transform: translateX(0) rotate(-15deg); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(50px) rotate(25deg); }
  to   { opacity: 1; transform: translateX(0) rotate(25deg); }
}

@keyframes fadeInBottom {
  from { opacity: 0; transform: translateY(50px) rotate(12deg); }
  to   { opacity: 1; transform: translateY(0) rotate(12deg); }
}

/* Breadcrumb */
.ta-shop-breadcrumb {
  margin-bottom: 14px;
}

.ta-shop-breadcrumb,
.ta-shop-breadcrumb nav,
.ta-shop-breadcrumb nav[aria-label],
.ta-shop-breadcrumb .woocommerce-breadcrumb {
  background: transparent !important;
  border: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
}

.ta-shop-breadcrumb .woocommerce-breadcrumb {
  font-size: 14px;
  font-weight: 500;
  color: #fff !important;
}

.ta-shop-breadcrumb .woocommerce-breadcrumb a {
  color: rgba(255, 255, 255, 0.85) !important;
  text-decoration: none;
  transition: color 0.15s ease;
}

.ta-shop-breadcrumb .woocommerce-breadcrumb a:hover {
  color: #6CD3C2 !important;
}

/* Breadcrumb separator */
.ta-shop-breadcrumb .woocommerce-breadcrumb > span,
.ta-shop-breadcrumb .woocommerce-breadcrumb > * {
  color: #fff !important;
}

/* Title + count badge */
.ta-shop-header__title {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ta-shop-header__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  border-radius: 15px;
  background: rgba(108, 211, 194, 0.25);
  backdrop-filter: blur(8px);
  color: #6CD3C2;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid rgba(108, 211, 194, 0.3);
}

/* Shop index header row (title left, CTA right) */
.ta-shop-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.ta-shop-header__left {
  flex: 1;
  min-width: 0;
}

.ta-shop-header__subtitle {
  color: rgba(255, 255, 255, 0.75);
  font-size: 16px;
  margin: 4px 0 0;
  line-height: 1.5;
}

.ta-shop-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.ta-shop-header__cta:hover {
  background: rgba(108, 211, 194, 0.25);
  border-color: rgba(108, 211, 194, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.ta-shop-header__cta i {
  font-size: 15px;
}

/* Archive / taxonomy description */
.ta-shop-header__content .term-description,
.ta-shop-header__content .page-description {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 8px;
  max-width: 640px;
  line-height: 1.6;
}

.ta-shop-header__content .term-description p:last-child,
.ta-shop-header__content .page-description p:last-child {
  margin-bottom: 0;
}

.ta-shop-header__content .term-description a {
  color: #6CD3C2;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ta-shop-header__content .term-description a:hover {
  color: #fff;
}


/* ============================================================
   Main Content Area
   ============================================================ */
.ta-shop-content {
  padding: 24px 0 56px;
}

/* Hide default entry-header on shop pages */
.post-type-archive-product .entry-header,
.tax-product_cat .entry-header,
.tax-product_tag .entry-header,
.tax-pa_amne .entry-header,
.tax-pa_arskurs .entry-header,
.tax-pa_resurstyp .entry-header,
.tax-subjekt .entry-header,
.tax-resurstyp .entry-header {
  display: none !important;
}


/* ============================================================
   Mobile Filter Button
   ============================================================ */
.ta-shop-mobile-filter {
  margin-bottom: 16px;
}

.ta-shop-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #27282c;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}

.ta-shop-filter-btn:hover {
  border-color: #6CD3C2;
  color: #6CD3C2;
}

.ta-shop-filter-btn svg {
  flex-shrink: 0;
}


/* ============================================================
   Toolbar — Result Count + Ordering
   (Bootscore wraps these in a Bootstrap .row at priorities 15-32)
   ============================================================ */
.ta-shop-content .woocommerce-result-count {
  font-size: 14px;
  color: #71717a;
  margin: 0;
  line-height: 40px;
}

.ta-shop-content .woocommerce-ordering {
  margin: 0;
}

.ta-shop-content .woocommerce-ordering select.orderby {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 32px 8px 14px;
  font-size: 14px;
  color: #27282c;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2327282c' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 10px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  height: 40px;
}

.ta-shop-content .woocommerce-ordering select.orderby:focus {
  border-color: #6CD3C2;
  outline: none;
  box-shadow: 0 0 0 3px rgba(108, 211, 194, 0.15);
}


/* ============================================================
   Product Grid
   ============================================================ */
.ta-shop-content ul.products {
  margin-bottom: 0;
  row-gap: 24px;
}

.ta-shop-content ul.products .product-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

/* Ensure card image has rounded top */
.ta-shop-content ul.products .product-card .product-card__image-wrapper img {
  border-radius: 8px 8px 0 0;
}


/* ============================================================
   Pagination
   ============================================================ */
.ta-shop-content nav.woocommerce-pagination {
  margin-top: 48px;
  text-align: center;
}

.ta-shop-content nav.woocommerce-pagination ul {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  padding: 6px;
  margin: 0;
  list-style: none;
  background: #f5f5f5;
  border-radius: 12px;
}

.ta-shop-content nav.woocommerce-pagination ul li {
  border: none;
  padding: 0;
  margin: 0;
}

.ta-shop-content nav.woocommerce-pagination ul li a,
.ta-shop-content nav.woocommerce-pagination ul li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 6px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: #52525b;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ta-shop-content nav.woocommerce-pagination ul li a:hover,
.ta-shop-content nav.woocommerce-pagination ul li a:focus {
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.ta-shop-content nav.woocommerce-pagination ul li span.current {
  background: #fff;
  color: #1a1a1a;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,.10);
}

/* Prev / Next arrows */
.ta-shop-content nav.woocommerce-pagination ul li a.prev,
.ta-shop-content nav.woocommerce-pagination ul li a.next {
  min-width: auto;
  padding: 0 14px;
  font-weight: 600;
  color: #6CD3C2;
}

.ta-shop-content nav.woocommerce-pagination ul li a.prev:hover,
.ta-shop-content nav.woocommerce-pagination ul li a.next:hover {
  background: #fff;
  color: #5ac4b3;
}

/* Dots */
.ta-shop-content nav.woocommerce-pagination ul li span.dots {
  border: none;
  background: transparent;
  color: #a1a1aa;
  pointer-events: none;
  min-width: 28px;
}


/* ============================================================
   Empty State — No Products Found
   ============================================================ */
.ta-shop-empty {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 64px 24px;
  text-align: center;
}

.ta-shop-empty__icon {
  margin-bottom: 16px;
  color: #d1d5db;
}

.ta-shop-empty__title {
  font-size: 20px;
  font-weight: 700;
  color: #27282c;
  margin: 0 0 8px;
}

.ta-shop-empty__text {
  font-size: 15px;
  color: #71717a;
  margin: 0 0 24px;
}

.ta-shop-empty__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: #6CD3C2;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}

.ta-shop-empty__btn:hover {
  background: #55c4b2;
  color: #fff;
  text-decoration: none;
}


/* ============================================================
   Active Filters (BeRocket AJAX Product Filters)
   ============================================================ */
.ta-shop-content .berocket_aapf_widget_selected_area {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.ta-shop-content .berocket_aapf_widget_selected_area a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  background: #f0fdf9;
  border: 1px solid rgba(108, 211, 194, 0.4);
  border-radius: 20px;
  font-size: 13px;
  color: #27282c;
  text-decoration: none;
  transition: all 0.15s ease;
}

.ta-shop-content .berocket_aapf_widget_selected_area a:hover {
  background: #6CD3C2;
  border-color: #6CD3C2;
  color: #fff;
}


/* ============================================================
   Sidebar Enhancements (shop context)
   ============================================================ */

/* Hide Bootscore's default sidebar toggle (we have our own mobile button) */
.ta-shop-content .col-lg-3 > aside > button.d-lg-none {
  display: none !important;
}

/* Sidebar offcanvas header on mobile */
.ta-shop-content #sidebar .offcanvas-header {
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 20px;
}

.ta-shop-content #sidebar .offcanvas-title {
  font-size: 16px;
  font-weight: 700;
  color: #27282c;
}

/* Filter widgets inside sidebar */
.ta-shop-content #sidebar .widget {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f3f4f6;
}

.ta-shop-content #sidebar .widget:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.ta-shop-content #sidebar .widget-title,
.ta-shop-content #sidebar .bapf_head h3 {
  font-size: 14px;
  font-weight: 700;
  color: #27282c;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* BeRocket filter checkboxes */
.ta-shop-content #sidebar .bapf_body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ta-shop-content #sidebar .bapf_body ul li {
  margin-bottom: 4px;
}

.ta-shop-content #sidebar .bapf_body ul li label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ta-shop-content #sidebar .bapf_body ul li label:hover {
  background: #f3f4f6;
}

.ta-shop-content #sidebar .bapf_body ul li.checked label,
.ta-shop-content #sidebar .bapf_body ul li label.checked {
  background: #f0fdf9;
  color: #27282c;
  font-weight: 600;
}

/* Price slider (BeRocket) */
.ta-shop-content #sidebar .ui-slider {
  background: #e5e7eb;
  border: none;
  border-radius: 4px;
  height: 6px;
}

.ta-shop-content #sidebar .ui-slider .ui-slider-range {
  background: #6CD3C2;
  border-radius: 4px;
}

.ta-shop-content #sidebar .ui-slider .ui-slider-handle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #6CD3C2;
  top: -6px;
  cursor: grab;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}


/* ============================================================
   WooCommerce Notices (on shop page)
   ============================================================ */
.ta-shop-content .woocommerce-notices-wrapper {
  margin-bottom: 16px;
}

.ta-shop-content .woocommerce-info,
.ta-shop-content .woocommerce-message {
  background: #f0fdf9;
  border: 1px solid rgba(108, 211, 194, 0.3);
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 14px;
  color: #27282c;
}

.ta-shop-content .woocommerce-error {
  background: #fef2f2;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 14px;
  color: #991b1b;
}


/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991.98px) {
  .ta-shop-header {
    padding: 24px 0 28px;
  }

  .ta-shop-header__title {
    font-size: 26px;
  }

  .ta-shop-header__subtitle {
    font-size: 15px;
  }

  .ta-shop-header__icon--left {
    font-size: 4rem;
  }

  .ta-shop-header__icon--right {
    font-size: 3rem;
  }

  .ta-shop-header__icon--bottom {
    font-size: 2.5rem;
  }

  .ta-shop-content {
    padding: 16px 0 32px;
  }

  .ta-shop-content ul.products {
    row-gap: 16px;
  }
}

@media (max-width: 767.98px) {
  .ta-shop-header__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .ta-shop-header__cta {
    align-self: flex-start;
    padding: 10px 20px;
  }

  .ta-shop-header__title {
    font-size: 22px;
  }

  .ta-shop-header__subtitle {
    font-size: 14px;
  }

  .ta-shop-header__count {
    height: 24px;
    min-width: 24px;
    padding: 0 7px;
    font-size: 12px;
  }

  .ta-shop-header__icon--left {
    font-size: 3rem;
  }

  .ta-shop-header__icon--right,
  .ta-shop-header__icon--bottom {
    font-size: 2rem;
  }

  /* Stack toolbar on small screens */
  .ta-shop-content .woocommerce-result-count {
    text-align: center;
    line-height: 1.4;
    margin-bottom: 8px;
  }

  .ta-shop-content .woocommerce-ordering select.orderby {
    width: 100%;
  }

  /* Smaller pagination */
  .ta-shop-content nav.woocommerce-pagination ul {
    gap: 2px;
    padding: 4px;
  }

  .ta-shop-content nav.woocommerce-pagination ul li a,
  .ta-shop-content nav.woocommerce-pagination ul li span {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
    border-radius: 7px;
  }

  .ta-shop-content nav.woocommerce-pagination ul li a.prev,
  .ta-shop-content nav.woocommerce-pagination ul li a.next {
    padding: 0 10px;
  }

  /* Empty state */
  .ta-shop-empty {
    padding: 40px 16px;
  }
}

/* ============================================================
   Custom Filter Bar
   ============================================================ */

/* Toolbar: result count row */
.ta-shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 12px;
}

.ta-shop-result-count {
  font-size: 13px;
  color: #71717a;
  margin: 0;
}

/* Filter form */
.ta-filter-form {
  margin-top: 20px;
}

/* Bar: horizontal row of dropdowns */
.ta-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}

.ta-filter-spacer {
  flex: 1;
}

/* Each filter group (trigger + panel) */
.ta-filter-group {
  position: static;
}

/* Trigger button */
.ta-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #27282c;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}

.ta-filter-trigger:hover {
  border-color: #6CD3C2;
  color: #6CD3C2;
}

.ta-filter-trigger.has-active {
  border-color: #6CD3C2;
  background: #f0faf9;
  color: #27282c;
}

.ta-filter-trigger .ta-filter-caret {
  transition: transform 0.2s;
  flex-shrink: 0;
}

.ta-filter-trigger[aria-expanded="true"] .ta-filter-caret {
  transform: rotate(180deg);
}

/* Active count badge on trigger */
.ta-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #6CD3C2;
  border-radius: 9px;
}

/* Dropdown panel — container-width mega menu */
.ta-filter-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 200;
  width: 100%;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,.10);
  padding: 0;
  overflow: hidden;
}

.ta-filter-panel.is-open {
  display: block;
}

/* Panel header with title + close */
.ta-filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 8px;
  border-bottom: 1px solid #f0f0f0;
}

.ta-filter-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.ta-filter-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  cursor: pointer;
  color: #666;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.ta-filter-close:hover {
  background: #e8e8e8;
  color: #333;
}

/* ── Slide viewport ── */
.ta-filter-slide-viewport {
  position: relative;
  overflow: hidden;
}

/* Parent list (slide 0) */
.ta-filter-list {
  list-style: none;
  margin: 0;
  padding: 10px 20px 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0 16px;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), opacity 0.3s ease;
}

/* Fewer items → fewer columns (JS adds data-cols on panel) */
.ta-filter-panel[data-cols="1"] .ta-filter-list { grid-template-columns: 1fr; }
.ta-filter-panel[data-cols="2"] .ta-filter-list { grid-template-columns: repeat(2, 1fr); }
.ta-filter-panel[data-cols="3"] .ta-filter-list { grid-template-columns: repeat(3, 1fr); }

/* When drilled into a child: parent list stays in flow but options hide */
.ta-filter-panel.is-drilled .ta-filter-list {
  /* keep list in flow — don't use position:absolute or opacity:0
     because .ta-filter-children lives inside .ta-filter-list */
  grid-template-columns: 1fr;
}

/* Hide only the top-level option items when drilled (not the children pane) */
.ta-filter-panel.is-drilled .ta-filter-list > .ta-filter-option {
  display: none;
}

/* …except the one whose children are active */
.ta-filter-panel.is-drilled .ta-filter-list > .ta-filter-option:has(> .ta-filter-children.is-active) {
  display: block;
}

/* Hide the parent's own label + drill arrow + child-count badge when drilled */
.ta-filter-panel.is-drilled .ta-filter-option:has(> .ta-filter-children.is-active) > .ta-filter-label,
.ta-filter-panel.is-drilled .ta-filter-option:has(> .ta-filter-children.is-active) > .ta-filter-drill,
.ta-filter-panel.is-drilled .ta-filter-option:has(> .ta-filter-children.is-active) > .ta-filter-child-count {
  display: none;
}

/* Children list — hidden by default */
.ta-filter-children {
  display: none;
  list-style: none;
  padding: 10px 20px 14px;
  margin: 0;
}

/* Active child pane — slides in from right, multi-column grid */
.ta-filter-children.is-active {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 24px;
  animation: ta-slide-in 0.3s cubic-bezier(.4,0,.2,1);
}

/* Each parent option — flex row for label + drill arrow */
.ta-filter-option {
  display: flex;
  align-items: center;
}

.ta-filter-option .ta-filter-label {
  flex: 1;
  min-width: 0;
}

/* Selected-children count badge on parent option */
.ta-filter-child-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #6CD3C2;
  border-radius: 9px;
  flex-shrink: 0;
  margin-left: 6px;
  margin-right: 2px;
  line-height: 18px;
  box-sizing: border-box;
}

/* Drill-in arrow for parents with children */
.ta-filter-drill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #bbb;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.ta-filter-drill:hover {
  background: #f0f0f0;
  color: #374151;
}

@keyframes ta-slide-in {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* Back button in child view */
.ta-filter-back {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #6CD3C2;
  transition: color 0.15s;
  width: 100%;
  border-bottom: 1px solid #f0f0f0;
}

.ta-filter-back:hover {
  color: #4fb8a7;
}

.ta-filter-back svg {
  flex-shrink: 0;
}

.ta-filter-panel.is-drilled .ta-filter-back {
  display: flex;
}

/* Child view title (parent name) */
.ta-filter-child-title {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 10px 20px 4px;
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
}

.ta-filter-panel.is-drilled .ta-filter-child-title {
  display: flex;
}

.ta-filter-list::-webkit-scrollbar { width: 4px; }
.ta-filter-list::-webkit-scrollbar-track { background: transparent; }
.ta-filter-list::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 2px; }

/* Each option row */
.ta-filter-option {
  padding: 0;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

/* Terms with 0 matching products (unchecked) fade out */
.ta-filter-option.is-unavailable .ta-filter-label {
  opacity: 0.38;
}
.ta-filter-option.is-unavailable .ta-filter-count {
  color: #d1d5db;
}

.ta-filter-option.ta-filter-child {
  padding-left: 0;
}

.ta-filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  transition: background 0.1s;
  user-select: none;
  margin: 0;
  white-space: nowrap;
}

.ta-filter-label:hover {
  background: #f0faf9;
}

/* Hide native checkbox */
.ta-filter-check {
  display: none;
}

/* Custom checkbox box */
.ta-filter-check-box {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
  flex-shrink: 0;
}

.ta-filter-check:checked + .ta-filter-check-box {
  background: #6CD3C2;
  border-color: #6CD3C2;
}

.ta-filter-check:checked + .ta-filter-check-box::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.ta-filter-name {
  flex: 1;
}

/* Bold parent (top-level) terms */
.ta-filter-option:not(.ta-filter-child) > .ta-filter-label .ta-filter-name {
  font-weight: 600;
  color: #1a1a1a;
}

.ta-filter-count {
  font-size: 11px;
  color: #9ca3af;
  margin-left: auto;
  flex-shrink: 0;
}

/* Sort select */
.ta-filter-sort {
  flex-shrink: 0;
}

.ta-sort-select {
  padding: 8px 32px 8px 12px;
  font-size: 13px;
  color: #27282c;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.ta-sort-select:hover,
.ta-sort-select:focus {
  border-color: #6CD3C2;
  outline: none;
}

/* Active filter chips row */
.ta-filter-active-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
  padding: 10px 0 0;
}

.ta-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ta-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #27282c;
  background: #f0faf9;
  border: 1.5px solid #6CD3C2;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s;
}

.ta-active-chip:hover {
  background: #d8f5f0;
}

.ta-filter-clear-all {
  font-size: 12px;
  color: #9ca3af;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  text-decoration: underline;
  transition: color 0.15s;
}

.ta-filter-clear-all:hover {
  color: #ef4444;
}

/* Product grid */
#ta-products-grid {
  position: relative;
  transition: opacity 0.2s;
}

/* ── Skeleton loading cards ─────────────────────────────────────────────── */
@keyframes ta-shimmer {
  0%   { background-position: -700px 0; }
  100% { background-position:  700px 0; }
}

.ta-skeleton-grid {
  pointer-events: none;
}

/* Skeleton card — mirrors .product-card.card.h-100 */
.ta-skel-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Image area */
.ta-skel-image-wrap {
  position: relative;
  width: 100%;
}
.ta-skel-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  background: linear-gradient(90deg, #f2f3f5 25%, #e6e8eb 50%, #f2f3f5 75%);
  background-size: 700px 100%;
  animation: ta-shimmer 1.5s infinite linear;
}
/* Category badge pill (mirrors .product-card__badge) */
.ta-skel-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 52px;
  height: 20px;
  border-radius: 4px;
  background: rgba(39, 40, 44, 0.18);
}

/* Card body — mirrors .product-card__body (padding: 0.75rem, text-align center) */
.ta-skel-body {
  padding: 12px 12px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Shared shimmer line */
.ta-skel-line {
  border-radius: 4px;
  background: linear-gradient(90deg, #f2f3f5 25%, #e6e8eb 50%, #f2f3f5 75%);
  background-size: 700px 100%;
  animation: ta-shimmer 1.5s infinite linear;
}

/* Title: 2 centred lines */
.ta-skel-title-a { width: 78%; height: 14px; }
.ta-skel-title-b { width: 55%; height: 14px; }

/* Price */
.ta-skel-price { width: 28%; height: 16px; }

/* Vendor row — mirrors .product-card__vendor */
.ta-skel-vendor-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding-top: 6px;
  border-top: 1px solid #f3f4f6;
}
.ta-skel-avatar {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  background: linear-gradient(90deg, #f2f3f5 25%, #e6e8eb 50%, #f2f3f5 75%);
  background-size: 700px 100%;
  animation: ta-shimmer 1.5s infinite linear;
}
.ta-skel-vname { width: 80px; height: 12px; }

/* Action area — mirrors .product-card__action */
.ta-skel-action {
  border-top: 1px solid #f3f4f6;
  padding: 11px 12px;
  display: flex;
  justify-content: center;
}
.ta-skel-btn { width: 55%; height: 13px; }

/* Pagination wrapper */
.ta-shop-pagination {
  margin-top: 24px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .ta-filter-bar {
    gap: 6px;
  }

  .ta-filter-trigger {
    padding: 7px 10px;
    font-size: 12px;
  }

  .ta-filter-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    max-height: 75vh;
    overflow-y: auto;
    box-shadow: 0 -4px 24px rgba(0,0,0,.15);
  }

  .ta-filter-panel-header {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    padding: 16px 16px 10px;
  }

  .ta-filter-list {
    max-height: none;
    grid-template-columns: 1fr !important;
    padding: 10px 16px 14px;
  }

  .ta-filter-children {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ta-filter-children.is-active {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0 12px;
  }

  .ta-filter-back {
    padding: 10px 16px;
  }

  .ta-sort-select {
    font-size: 12px;
    padding: 7px 28px 7px 10px;
  }
}
