/* ================================================================
   Shop / product archive only
   ================================================================ */

/* ---------- Shop page shell ---------- */

.tkk-shop-section {
  padding: 14px 0 48px;
  background: #f1f2f4;
}

.tkk-shop-container {
  width: min(var(--tkk-container, 1320px), calc(100% - 32px));
  max-width: var(--tkk-container, 1320px);
  margin-inline: auto;
  padding: 0;
  gap: 10px;
}

.tkk-shop-toolbar {
  position: relative;
  z-index: 10;
  width: 100%;
  color: #101828;
  font-size: 14px;
}

.tkk-shop-toolbar__row {
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  border-bottom: 1px solid #e9ebef;
}

.tkk-shop-toolbar__filter-row {
  margin-bottom: 10px;
}

.tkk-shop-toolbar__label {
  flex: 0 0 auto;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- Price filter ---------- */

.tkk-shop-price-filter {
  position: relative;
  margin: 0;
}

.tkk-shop-price-filter > summary {
  min-height: 30px;
  padding: 3px 2px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  color: #111827;
  cursor: pointer;
  user-select: none;
}

.tkk-shop-price-filter > summary::-webkit-details-marker {
  display: none;
}

.tkk-shop-price-filter__chevron {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  display: inline-block;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.tkk-shop-price-filter[open] .tkk-shop-price-filter__chevron {
  margin-top: 3px;
  transform: rotate(225deg);
}

.tkk-shop-price-filter__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: -8px;
  z-index: 20;
  width: min(410px, calc(100vw - 40px));
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 9px;
  border: 1px solid #dfe5ee;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(24, 32, 51, 0.13);
}

.tkk-shop-price-filter__panel label {
  min-width: 0;
  margin: 0;
  display: grid;
  gap: 5px;
  color: #667085;
  font-size: 12px;
}

.tkk-shop-price-filter__panel input[type="number"] {
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 9px;
  border: 1px solid #d7dde7;
  border-radius: 4px;
  background: #fff;
  color: #101828;
  font: inherit;
  font-size: 13px;
  outline: 0;
  box-shadow: none;
}

.tkk-shop-price-filter__panel input[type="number"]:focus {
  border-color: var(--tkk-blue-500, #5b8be3);
  box-shadow: 0 0 0 2px rgba(64, 120, 213, 0.1);
}

.tkk-shop-price-filter__panel button {
  height: 36px;
  margin: 0;
  padding: 0 13px;
  border: 1px solid var(--tkk-blue-600, #4078d5);
  border-radius: 4px;
  background: var(--tkk-blue-600, #4078d5);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.tkk-shop-price-filter__panel button:hover {
  background: var(--tkk-blue-700, #2f66c8);
}

.tkk-shop-price-filter__reset {
  grid-column: 1 / -1;
  justify-self: start;
  color: #667085;
  font-size: 12px;
  text-decoration: underline;
}

/* ---------- Sorting row ---------- */

.tkk-shop-sort-options {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 13px;
}

.tkk-shop-sort-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.tkk-shop-sort-option:hover,
.tkk-shop-sort-option.is-active {
  color: #111827;
}

.tkk-shop-sort-option__dot {
  position: relative;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  display: inline-block;
  border: 1px solid #6b7280;
  border-radius: 50%;
  background: #fff;
}

.tkk-shop-sort-option.is-active .tkk-shop-sort-option__dot {
  border-color: var(--tkk-blue-600, #4078d5);
}

.tkk-shop-sort-option.is-active .tkk-shop-sort-option__dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--tkk-blue-600, #4078d5);
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
  .tkk-shop-container {
    width: calc(100% - 24px);
  }
}

@media (max-width: 767px) {
  .tkk-shop-section {
    padding-top: 8px;
  }

  .tkk-shop-container {
    width: calc(100% - 16px);
    gap: 8px;
  }

  .tkk-shop-toolbar__row {
    min-height: 44px;
    padding: 7px 9px;
    gap: 10px;
  }

  .tkk-shop-toolbar__sort-row {
    display: block;
    overflow: hidden;
  }

  .tkk-shop-toolbar__sort-row .tkk-shop-toolbar__label {
    margin-bottom: 8px;
    display: block;
  }

  .tkk-shop-sort-options {
    margin-inline: -2px;
    padding: 0 2px 3px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .tkk-shop-price-filter__panel {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(430px, calc(100vw - 24px));
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 480px) {

  .tkk-shop-price-filter__panel {
    grid-template-columns: 1fr 1fr;
  }

  .tkk-shop-price-filter__panel button {
    grid-column: 1 / -1;
  }
}



/* ================================================================
   TKK WooCommerce Product Archive
   Product cards are defined once in style.css.
   This file only styles the native Bricks archive shell + standard-loop fallback.
   ================================================================ */

.tkk-product-archive-heading {
  width: 100%;
  padding: 16px 18px;
  display: grid;
  gap: 6px;
  border: 1px solid #e7ebf0;
  border-radius: 8px;
  background: #fff;
}

.tkk-product-archive-title {
  margin: 0;
  color: #101828;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

.tkk-product-archive-description {
  color: #667085;
  font-size: 14px;
  line-height: 1.65;
}

.tkk-product-archive-description:empty {
  display: none;
}

.tkk-product-archive-description > * {
  margin-top: 6px;
}

.tkk-product-archive-description > *:last-child {
  margin-bottom: 0;
}

/*
 * Standard Woo loop fallback.
 * Native Bricks Products uses .tkk-products and is styled by
 * the shared product-card rules in style.css. This class keeps non-Bricks Woo loops identical.
 */
.products.tkk-products-grid {
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  list-style: none;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  border-left: 1px solid #e5e7eb;
}

.products.tkk-products-grid .tkk-product-card {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  border: 0;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  box-shadow: none;
}

.products.tkk-products-grid .tkk-product-card:hover {
  box-shadow: inset 0 0 0 1px #c9d8f2;
}

/*
 * Only storefront archives force the catalog 5/3/2 column system.
 * Related, up-sell and cross-sell loops reuse the card skin but can keep their
 * own native column count from Bricks/WooCommerce.
 */
.tkk-product-listing-archive .products.tkk-products-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Standard Woo pagination fallback. Native .tkk-products pagination already
 * receives equivalent shared rules from style.css. */
.tkk-product-listing-archive .woocommerce-pagination {
  width: 100%;
  margin-top: 22px;
}

.tkk-product-listing-archive .woocommerce-pagination ul.page-numbers {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  border: 0;
}

.tkk-product-listing-archive .woocommerce-pagination ul.page-numbers li {
  margin: 0;
  border: 0;
}

.tkk-product-listing-archive .woocommerce-pagination .page-numbers a,
.tkk-product-listing-archive .woocommerce-pagination .page-numbers span {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dce3ee;
  border-radius: 5px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  line-height: 1;
}

.tkk-product-listing-archive .woocommerce-pagination .page-numbers .current,
.tkk-product-listing-archive .woocommerce-pagination .page-numbers a:hover {
  border-color: var(--tkk-blue-600, #4078d5);
  background: var(--tkk-blue-600, #4078d5);
  color: #fff;
}

@media (max-width: 991px) {
  .tkk-product-listing-archive .products.tkk-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .tkk-product-listing-archive .products.tkk-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tkk-product-archive-heading {
    padding: 13px;
  }

  .tkk-product-archive-title {
    font-size: 21px;
  }
}
