.yatbt-product-catalog {
  padding: 8px 0 clamp(62px, 7vw, 108px);
  color: var(--yatbt-section-text, #173f2a);
  background: var(--yatbt-section-background, #fff);
}

.yatbt-product-catalog__layout {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: clamp(30px, 4vw, 62px);
  padding-top: clamp(34px, 5vw, 62px);
}

.yatbt-product-sidebar {
  position: sticky;
  top: 184px;
  align-self: start;
  padding: 0;
  background: transparent;
}

.admin-bar .yatbt-product-sidebar { top: 216px; }
.yatbt-product-sidebar h2 { margin: 0 0 13px; color: #173f2a; font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.yatbt-product-categories-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
  border-top: 1px solid #e5e8e4;
  list-style: none;
}

.yatbt-product-categories-list > li {
  border-bottom: 1px solid #e5e8e4;
}

.yatbt-sidebar-all-products a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 50px;
  padding: 11px 16px;
  color: #58615b;
  font-size: 13.5px;
  font-weight: 720;
  letter-spacing: .025em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease, background 160ms ease, padding 160ms ease;
}

.yatbt-sidebar-all-products a:hover,
.yatbt-sidebar-all-products a.is-active {
  color: #fff;
  background: #173f2a;
}

.yatbt-sidebar-all-products a:hover {
  padding-left: 20px;
}

.yatbt-sidebar-all-products strong {
  color: #8b948e;
  font-size: 11px;
  font-weight: 700;
}

.yatbt-sidebar-all-products a.is-active strong {
  color: #b9dbaa;
}

/* Parent category row */
.yatbt-sidebar-parent-row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  position: relative;
  background: #fff;
  transition: background 160ms ease;
}

.yatbt-sidebar-parent-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 11px 12px 11px 16px;
  color: #34343c;
  font-size: 14px;
  font-weight: 680;
  letter-spacing: .01em;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, padding 160ms ease;
}

.yatbt-sidebar-parent-link strong {
  color: #8b948e;
  font-size: 11px;
  font-weight: 700;
  margin-left: auto;
}

.yatbt-sidebar-parent-link:hover {
  color: #173f2a;
  background: #f4f7f2;
  padding-left: 20px;
}

.yatbt-sidebar-parent-link.is-active {
  color: #fff;
  background: #173f2a;
}

.yatbt-sidebar-parent-link.is-active strong {
  color: #b9dbaa;
}

/* Toggle chevron button */
.yatbt-sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: #68716b;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.yatbt-sidebar-parent-link.is-active + .yatbt-sidebar-toggle {
  background: #173f2a;
  color: #fff;
}

.yatbt-sidebar-parent-link:hover + .yatbt-sidebar-toggle {
  background: #f4f7f2;
  color: #173f2a;
}

.yatbt-sidebar-toggle:hover {
  background: #e9efe7;
  color: #173f2a;
}

.yatbt-sidebar-chevron {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 220ms ease;
}

.yatbt-sidebar-group.is-open .yatbt-sidebar-chevron {
  transform: rotate(90deg);
}

/* Subcategories list */
.yatbt-product-subcategories {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 4px 0 6px;
  background: #f8faf7;
  border-top: 1px solid #edf0ec;
}

.yatbt-product-subcategories[hidden] {
  display: none;
}

.yatbt-sidebar-child-item {
  border-bottom: 1px solid #edf0ec;
}

.yatbt-sidebar-child-item:last-child {
  border-bottom: 0;
}

.yatbt-sidebar-child-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 8px 16px 8px 30px;
  color: #58615b;
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
  transition: color 140ms ease, background 140ms ease, padding 140ms ease;
}

.yatbt-sidebar-child-item a:hover {
  color: #173f2a;
  background: #eef3eb;
  padding-left: 34px;
}

.yatbt-sidebar-child-item a.is-active {
  color: #fff;
  background: #82bd66;
  font-weight: 700;
}

.yatbt-sidebar-child-item strong {
  color: #8b948e;
  font-size: 11px;
  font-weight: 600;
}

.yatbt-sidebar-child-item a.is-active strong {
  color: #fff;
}

.yatbt-product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2vw, 28px); }
.yatbt-product-card { overflow: hidden; min-width: 0; border: 1px solid rgb(23 63 42 / 9%); border-radius: 20px; background: #fff; box-shadow: 0 14px 38px rgb(23 63 42 / 5%); transition: transform 180ms ease, box-shadow 180ms ease; }
.yatbt-product-card:hover { transform: translateY(-4px); box-shadow: 0 22px 54px rgb(23 63 42 / 10%); }
.yatbt-product-card__media { display: block; overflow: hidden; aspect-ratio: 1.16 / 1; background: #f0f3ed; }
.yatbt-product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 260ms ease; }
.yatbt-product-card:hover .yatbt-product-card__media img { transform: scale(1.035); }
.yatbt-product-card__body { display: flex; min-height: 190px; flex-direction: column; padding: 23px; }
.yatbt-product-card__meta { margin: 0 0 10px; color: #77b858; font-size: 13px; font-weight: 760; letter-spacing: .035em; text-transform: uppercase; }
.yatbt-product-card h2 { margin: 0 0 20px; font-size: clamp(19px, 1.45vw, 23px); line-height: 1.28; letter-spacing: -.02em; }
.yatbt-product-card h2 a { color: inherit; text-decoration: none; }
.yatbt-product-card__link { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; color: #173f2a; font-size: 15px; font-weight: 720; text-decoration: none; }
.yatbt-product-card__link span { color: #77b858; font-size: 21px; transition: transform 160ms ease; }
.yatbt-product-card__link:hover span { transform: translateX(4px); }

.yatbt-product-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(38px, 5vw, 62px); }
.yatbt-product-pagination .page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 8px 14px; border: 1px solid rgb(23 63 42 / 12%); border-radius: 12px; color: #173f2a; background: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
.yatbt-product-pagination .page-numbers.current,
.yatbt-product-pagination a.page-numbers:hover { border-color: #82bd66; background: #82bd66; }
.yatbt-product-empty { padding: clamp(40px, 6vw, 80px); border: 1px dashed rgb(23 63 42 / 20%); border-radius: 22px; background: #fff; text-align: center; }
.yatbt-product-empty h2 { margin-top: 0; }
.yatbt-product-empty a { color: #528e39; font-weight: 700; }

body.yatbt-product-modal-open { overflow: hidden; }

.yatbt-product-modal[hidden],
.yatbt-product-modal__content[hidden],
.yatbt-product-modal__loading[hidden] { display: none; }

.yatbt-product-modal {
  position: fixed;
  z-index: 10010;
  inset: 0;
  display: grid;
  overflow: auto;
  place-items: center;
  padding: clamp(18px, 4vw, 52px);
}

.yatbt-product-modal__backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgb(8 18 12 / 78%);
  cursor: default;
}

.yatbt-product-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1050px, 100%);
  max-height: calc(100vh - clamp(36px, 8vw, 104px));
  overflow: auto;
  background: #fff;
  box-shadow: 0 30px 90px rgb(0 0 0 / 28%);
  outline: none;
}

.yatbt-product-modal__close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  color: #68716b;
  background: rgb(255 255 255 / 92%);
  font-size: 29px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.yatbt-product-modal__close:hover { color: #173f2a; }
.yatbt-product-modal__loading { display: grid; min-height: 520px; place-items: center; padding: 48px; color: #496052; font-size: 17px; font-weight: 700; text-align: center; }
.yatbt-product-modal__content { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); min-height: 520px; }
.yatbt-product-modal__visual { min-width: 0; min-height: 520px; overflow: hidden; background: #f0f2ef; }
.yatbt-product-modal__visual img { display: block; width: 100%; max-width: 100%; height: 100%; min-height: 520px; object-fit: cover; }
.yatbt-product-modal__details { min-width: 0; align-self: center; padding: clamp(42px, 5vw, 72px) clamp(32px, 4.5vw, 60px); }
.yatbt-product-modal__meta { margin: 0 0 12px; color: #7ab95c; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.yatbt-product-modal__details h2 { margin: 0 0 20px; color: #173f2a; font-size: clamp(25px, 2.4vw, 36px); line-height: 1.15; text-align: left; }
.yatbt-product-modal__description { margin: 0 0 26px; color: #67736b; font-size: 15px; line-height: 1.75; }
.yatbt-product-modal__specifications { border-top: 2px solid #173f2a; }
.yatbt-product-modal__specification { display: grid; grid-template-columns: minmax(0, 1fr) minmax(105px, .72fr); gap: 20px; padding: 14px 4px; border-bottom: 1px solid #dde2de; color: #67736b; font-size: 14px; }
.yatbt-product-modal__specification strong { color: #173f2a; font-weight: 800; }

@media (max-width: 1180px) {
  .yatbt-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .yatbt-product-catalog__layout { grid-template-columns: 1fr; }
  .yatbt-product-sidebar { position: static; }
  .yatbt-product-sidebar .yatbt-product-categories-list,
  .yatbt-product-sidebar .yatbt-product-subcategories { display: flex; flex-direction: column; }
  .yatbt-product-modal { align-items: start; padding: 14px; }
  .yatbt-product-modal__dialog { max-height: calc(100vh - 28px); }
  .yatbt-product-modal__content { grid-template-columns: 1fr; min-height: 0; }
  .yatbt-product-modal__visual,
  .yatbt-product-modal__visual img { min-height: 290px; max-height: 380px; }
  .yatbt-product-modal__details { padding: 34px 26px 38px; }
  .yatbt-product-modal__loading { min-height: 460px; }
}

@media (max-width: 540px) {
  .yatbt-product-grid { grid-template-columns: 1fr; }
  .yatbt-product-card__media { aspect-ratio: 1.35 / 1; }
}
