/* ============================================================================
   House of BKN — shop archive
   Loaded only on /shop/ and the product category archives.

   The shop runs to a wider column than the rest of the site (1400px against
   1184px) — that is the original's own decision, so the filter rail and a
   three-up grid can sit side by side without either being cramped.
   ========================================================================= */

.bkn-shop-page {
  --bkn-shop-max: 1400px;
  --bkn-shop-pad: clamp(20px, 3vw, 40px);
}

/* the theme's own container is narrower; the archive takes over the width */
.bkn-shop-page #primary,
.bkn-shop-page #main.site-main {
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
}

.bkn-shop-page .woocommerce-products-header,
.bkn-shop-page .woocommerce-notices-wrapper,
.bkn-shop-page .bkn-shop-layout {
  max-width: var(--bkn-shop-max);
  margin-inline: auto;
  padding-inline: var(--bkn-shop-pad);
  width: 100%;
}
.bkn-shop-page .woocommerce-products-header { padding-block: 0; margin-block: 0; }

/* ------------------------------------------------------------- breadcrumb */

.bkn-shop-page .woocommerce-breadcrumb {
  max-width: none;
  margin: 0 0 0;
  padding-block: 14px;
  padding-inline: max(
    var(--bkn-shop-pad),
    calc((100% - var(--bkn-shop-max)) / 2 + var(--bkn-shop-pad))
  );
  background: #F3EFE7;
  border-bottom: 1px solid var(--bkn-line, #E9E2D6);
  font-size: 12.5px;
  color: var(--bkn-muted, #8A8175);
}
.bkn-shop-page .woocommerce-breadcrumb > span,
.bkn-shop-page .woocommerce-breadcrumb {
  display: block;
}
.bkn-shop-page .woocommerce-breadcrumb a {
  color: var(--bkn-muted, #8A8175);
  text-decoration: none;
}
.bkn-shop-page .woocommerce-breadcrumb a:hover { color: var(--bkn-green, #2A4635); }

/* --------------------------------------------------------- page intro */

.bkn-shop-intro { padding-bottom: 0; }
#bkn-sh-h1 .elementor-heading-title { max-width: 24ch; }
#bkn-sh-intro p { max-width: 64ch; }

/* ------------------------------------------------------- category tiles */

.bkn-shop-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.bkn-shop-tile {
  display: block;
  border: 1px solid var(--bkn-line, #E9E2D6);
  background: #fff;
  border-radius: 16px;
  padding: 18px 20px;
  color: var(--bkn-ink, #221F1B);
  text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.bkn-shop-tile:hover {
  border-color: var(--bkn-green, #2A4635);
  transform: translateY(-2px);
}
.bkn-shop-tile.is-active {
  background: var(--bkn-green, #2A4635);
  border-color: var(--bkn-green, #2A4635);
  color: var(--bkn-light, #F6F1E7);
}
.bkn-shop-tile-name {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 21px;
  line-height: 1.2;
}
.bkn-shop-tile-count {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .72;
}

/* ------------------------------------------------------------ the layout */

.bkn-shop-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  padding-top: 34px;
  padding-bottom: 90px;
}

/* --------------------------------------------------------- the filter rail */

.bkn-shop-rail {
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: sticky;
  top: 132px;
  background: #fff;
  border: 1px solid var(--bkn-line, #E9E2D6);
  border-radius: 20px;
  padding: 26px;
}
.bkn-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.bkn-rail-title {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bkn-muted, #8A8175);
}
.bkn-rail-clear,
.bkn-shop-clear {
  font-size: 12px;
  color: var(--bkn-terra, #B4553F);
  text-decoration: underline;
}
.bkn-rail-legend {
  margin: 0 0 12px;
  font: 700 13px/1.4 "Nunito Sans", system-ui, sans-serif;
  color: var(--bkn-ink, #221F1B);
}
.bkn-rail-rule { height: 1px; background: #EFE9DF; }

.bkn-rail-cats { display: flex; flex-direction: column; gap: 8px; }
.bkn-cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  padding: 8px 11px;
  border-radius: 10px;
  color: var(--bkn-ink, #221F1B);
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease;
}
.bkn-cat-row:hover { background: #F5F1E9; }
.bkn-cat-row.is-on {
  background: var(--bkn-green, #2A4635);
  color: var(--bkn-light, #F6F1E7);
  font-weight: 700;
}
.bkn-cat-row.is-on .bkn-filter-count { color: inherit; opacity: .75; }

/* the brand list is long by design; it scrolls inside the rail */
.bkn-rail-scroll {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
}
.bkn-rail-scroll::-webkit-scrollbar { width: 6px; }
.bkn-rail-scroll::-webkit-scrollbar-thumb { background: #DCD3C6; border-radius: 999px; }

.bkn-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #3D382F;
  text-decoration: none;
}
.bkn-filter-row:hover { color: var(--bkn-green, #2A4635); }
.bkn-filter-box {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.5px solid #DCD3C6;
  background: transparent;
  color: var(--bkn-light, #F6F1E7);
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .18s ease, border-color .18s ease;
}
.bkn-filter-row.is-on .bkn-filter-box {
  background: var(--bkn-green, #2A4635);
  border-color: var(--bkn-green, #2A4635);
}
.bkn-filter-label { flex: 1; }
.bkn-filter-count { font-size: 12px; color: var(--bkn-muted, #8A8175); }

.bkn-rail-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.bkn-rail-chip {
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #DCD3C6;
  color: #5C5750;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.bkn-rail-chip:hover { border-color: var(--bkn-green, #2A4635); color: var(--bkn-green, #2A4635); }
.bkn-rail-chip.is-on {
  background: var(--bkn-green, #2A4635);
  border-color: var(--bkn-green, #2A4635);
  color: var(--bkn-light, #F6F1E7);
}

.bkn-rail-help {
  display: block;
  text-align: center;
  background: #F3EFE7;
  border: 1px solid #E5DDD0;
  border-radius: 14px;
  padding: 16px;
  font-size: 13.5px;
  color: #4A443C;
  line-height: 1.6;
  text-decoration: none;
  transition: border-color .2s ease;
}
.bkn-rail-help:hover { border-color: var(--bkn-green, #2A4635); }

/* ---------------------------------------------------------- the toolbar */

.bkn-shop-results { min-width: 0; }

.bkn-shop-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--bkn-line, #E9E2D6);
  border-radius: 16px;
  padding: 14px 18px;
}
.bkn-shop-page .bkn-result-count {
  margin: 0;
  font-size: 14px;
  color: var(--bkn-body, #5C564D);
  float: none;
}
.bkn-shop-page .bkn-result-count span { color: var(--bkn-muted, #8A8175); }
.bkn-shop-page .woocommerce-ordering {
  margin: 0;
  float: none;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
/* the label the design puts before the control */
.bkn-shop-page .woocommerce-ordering::before {
  content: "Sort by";
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--bkn-muted, #8A8175);
}
.bkn-shop-page .woocommerce-ordering select {
  border: 1px solid #DCD3C6;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13.5px;
  background: #FCFAF6;
  outline: none;
  cursor: pointer;
  color: var(--bkn-ink, #221F1B);
}

/* active filter pills above the grid */
.bkn-shop-chips {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}
.bkn-shop-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  background: #EAF0E7;
  border: 1px solid #C6D7C0;
  color: var(--bkn-green, #2A4635);
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
}
.bkn-shop-chip span { opacity: .6; }
.bkn-shop-chip:hover { background: #DCE7D8; }

/* ------------------------------------------------------------- the grid */

.bkn-shop-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
  margin: 22px 0 0 !important;
  padding: 0;
  list-style: none;
}
.bkn-shop-page ul.products::before,
.bkn-shop-page ul.products::after { content: none !important; }
.bkn-shop-page ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  background: #fff;
  border: 1px solid var(--bkn-line, #E9E2D6);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.bkn-shop-page .bkn-card-blurb {
  font-size: 13.5px;
  color: #6C665C;
  line-height: 1.55;
  margin: 6px 0 10px;
  text-wrap: pretty;
}
.bkn-shop-page .bkn-card-stock {
  font-size: 12.5px;
  color: #3F6B52;
  margin: 0 0 14px;
}
.bkn-shop-page .bkn-card-stock.is-out { color: var(--bkn-terra, #B4553F); }

/* the buy row sits at the foot of the card whatever the blurb length */
.bkn-shop-page ul.products li.product > .button:first-of-type { margin-top: auto; }

/*
 * Add to cart is the solid green primary here, not the outlined version the
 * homepage grid uses, and it does not change on hover — the original treats it
 * as a plain affordance rather than something that reacts to the pointer.
 */
.bkn-shop-page ul.products li.product a.button,
.bkn-shop-page ul.products li.product a.button:hover,
.bkn-shop-page ul.products li.product a.button:focus,
.bkn-shop-page ul.products li.product a.button.added,
.bkn-shop-page ul.products li.product a.button.loading {
  background: var(--bkn-green, #2A4635) !important;
  border: 1px solid var(--bkn-green, #2A4635) !important;
  color: var(--bkn-light, #F6F1E7) !important;
  border-radius: 999px !important;
  padding: 13px !important;
  font: 700 11.5px/1 "Nunito Sans", system-ui, sans-serif !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  text-align: center;
  display: block;
  width: 100%;
  transform: none !important;
  box-shadow: none !important;
  transition: none !important;
}
.bkn-shop-page .bkn-card-view {
  display: block;
  text-align: center;
  border: 1px solid #DCD3C6;
  color: #4A443C;
  border-radius: 999px;
  padding: 12px;
  /* the gap the original puts between the two actions */
  margin-top: 9px;
  font: 700 11.5px/1 "Nunito Sans", system-ui, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease;
}
.bkn-shop-page .bkn-card-view:hover {
  border-color: var(--bkn-green, #2A4635);
  color: var(--bkn-green, #2A4635);
}

/* --------------------------------------------------------- no results */

.bkn-shop-page .woocommerce-info,
.bkn-shop-page .woocommerce-no-products-found {
  background: #fff;
  border: 1px solid var(--bkn-line, #E9E2D6);
  border-radius: 20px;
  padding: 60px 24px;
  text-align: center;
  margin-top: 22px;
  font-size: 15px;
  color: var(--bkn-body, #5C564D);
}

/* -------------------------------------------------------------- paging */

.bkn-shop-page .woocommerce-pagination {
  margin-top: 34px;
  text-align: center;
}
.bkn-shop-page .woocommerce-pagination ul.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  border: 0;
  padding: 0;
  margin: 0;
}
.bkn-shop-page .woocommerce-pagination ul.page-numbers li {
  border: 0;
  margin: 0;
  overflow: visible;
}
.bkn-shop-page .woocommerce-pagination .page-numbers {
  display: inline-block;
  min-width: 42px;
  text-align: center;
  border: 1px solid #DCD3C6;
  border-radius: 999px;
  padding: 11px 14px;
  font-size: 13.5px;
  color: var(--bkn-body2, #4A443C);
  background: transparent;
  text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.bkn-shop-page .woocommerce-pagination .page-numbers:hover {
  border-color: var(--bkn-green, #2A4635);
  color: var(--bkn-green, #2A4635);
}
.bkn-shop-page .woocommerce-pagination .page-numbers.current {
  background: var(--bkn-green, #2A4635);
  border-color: var(--bkn-green, #2A4635);
  color: var(--bkn-light, #F6F1E7);
  font-weight: 700;
}
.bkn-shop-page .woocommerce-pagination .page-numbers.dots {
  border-color: transparent;
  min-width: 0;
  padding: 11px 4px;
}

/* ----------------------------------------------------------- closing CTA */

.bkn-shop-cta {
  margin-top: 40px;
  background: var(--bkn-green, #2A4635);
  color: #DCE4D7;
  border-radius: 22px;
  padding: 34px;
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.bkn-shop-cta-copy { max-width: 52ch; }
.bkn-shop-cta-eyebrow {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #B9C8B3;
}
.bkn-shop-cta h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.16;
  color: var(--bkn-light, #F6F1E7);
  margin: 12px 0 0;
}
.bkn-shop-cta p { font-size: 15px; line-height: 1.8; margin: 12px 0 0; }
.bkn-shop-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.bkn-shop-cta-primary,
.bkn-shop-cta-ghost {
  border-radius: 999px;
  padding: 15px 28px;
  font: 700 11.5px/1 "Nunito Sans", system-ui, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.bkn-shop-cta-primary { background: var(--bkn-light, #F6F1E7); color: var(--bkn-ink, #221F1B); }
.bkn-shop-cta-primary:hover { background: #fff; color: var(--bkn-ink, #221F1B); }
.bkn-shop-cta-ghost { border: 1px solid rgba(246, 241, 231, .45); color: var(--bkn-light, #F6F1E7); }
.bkn-shop-cta-ghost:hover { background: var(--bkn-light, #F6F1E7); color: var(--bkn-ink, #221F1B); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1100px) {
  .bkn-shop-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 26px; }
  .bkn-shop-rail { padding: 20px; gap: 20px; }
}

@media (max-width: 860px) {
  /*
   * The rail stops being a column and becomes a panel above the grid. It is
   * a <details> only in spirit here — collapsing it would need JS, so instead
   * it keeps its own scroll so it cannot push the products off the screen.
   */
  .bkn-shop-layout {
    grid-template-columns: 1fr;
    padding-bottom: 64px;
  }
  .bkn-shop-rail {
    position: static;
    max-height: 420px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .bkn-shop-page ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .bkn-shop-page ul.products li.product { padding: 10px; }
  .bkn-shop-page .bkn-card-blurb,
  .bkn-shop-page .bkn-card-view { display: none; }
  .bkn-shop-cta { padding: 26px; }
}

@media (max-width: 560px) {
  .bkn-shop-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bkn-shop-tile { padding: 14px 15px; }
  .bkn-shop-tile-name { font-size: 18px; }
  .bkn-shop-toolbar { padding: 12px 14px; }
}

/* category archives keep their own heading, styled like the shop's */
.bkn-shop-page .woocommerce-products-header__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  color: var(--bkn-ink, #221F1B);
  margin: 44px 0 0;
}
.bkn-shop-page .term-description {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--bkn-body2, #4A443C);
  max-width: 64ch;
  margin: 16px 0 0;
}
