/* Moved from new.head.tpl / new.scripts.tpl / new.modals.tpl — no inline <style> */

/* --- catalog filters (was new.head.tpl) --- */
.new-catalog-filter .size-filters select,
.new-catalog-filter .size-filters .new-filter-price input {
  width: 100%;
  border: 1px solid #c2cbc6;
  border-radius: 4px;
  background: #fff;
  height: 30px;
  font-size: 12px;
  padding: 5px 8px;
}
.new-catalog-filter .size-filters > fieldset > div {
  border-color: #c2cbc6;
}
.new-catalog-filter .mse2_number_slider {
  display: none !important;
}

/* --- footer (was new.head.tpl #new-footer-fix) --- */
.shop-footer .footer-catalog-list {
  display: none;
}
.shop-footer .footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #3c5149;
  color: #c6d6cc;
  font-size: 11px;
}
.shop-footer .footer-legal a {
  display: inline;
  margin: 0;
  color: inherit;
}
.shop-footer .footer-legal a:hover {
  color: #b4e5c4;
}
.shop-footer .footer-copy {
  margin: 0;
  color: #c6d6cc;
}
.shop-footer .section-footer-link {
  color: inherit;
}
.shop-footer .section-footer-link .section-icon {
  flex: none;
  opacity: 0.9;
}
.shop-footer .footer-feedback-btn {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.shop-footer .footer-feedback-btn:hover {
  color: #b4e5c4;
}

/* --- favorites heart (was new.scripts.tpl) --- */
.favorite-button[aria-pressed="true"] svg,
.favorite-button._active_ svg {
  fill: currentColor;
}
.favorite-button[aria-pressed="false"] svg {
  fill: none;
}

/* --- product gallery (was new.scripts.tpl) --- */
.product-detail .product-photo-frame[data-product-gallery] {
  position: relative;
}
.product-detail .product-photo-frame[data-product-gallery] > .gallery-image {
  display: none !important;
  margin-top: 0 !important;
  width: 100%;
}
.product-detail .product-photo-frame[data-product-gallery] > .gallery-image.is-active {
  display: flex !important;
}
.product-detail .gallery-thumbnails {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-top: 12px;
}
.product-detail .gallery-thumbnail {
  flex: 0 0 72px;
  padding: 4px;
  border: 1px solid #dce5df;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.product-detail .gallery-thumbnail.is-active,
.product-detail .gallery-thumbnail[aria-pressed="true"] {
  border-color: var(--green, #2f6b4f);
  box-shadow: 0 0 0 1px var(--green, #2f6b4f);
}
.product-detail .gallery-thumbnail-image {
  display: block;
  height: 56px;
  overflow: hidden;
  border-radius: 4px;
}
.product-detail .gallery-thumbnail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- filter submit always visible (was new.scripts.tpl) --- */
.new-catalog-filter .shop-filter button.button.primary.hidden,
.new-catalog-filter .shop-filter [type="submit"].hidden {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.new-catalog-filter .shop-filter .filter-reset {
  display: inline-flex !important;
  align-items: center;
  visibility: visible !important;
}

/* --- product card title (was new.scripts.tpl) --- */
.product-body > a.product-title,
.product-body a.product-title {
  min-height: 17px;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.35;
  color: inherit;
  text-decoration: none;
  display: block;
}
.product-body a.product-title:hover {
  color: var(--green, #1f7a45);
}
@media (max-width: 760px) {
  .product-body > a.product-title,
  .product-body a.product-title {
    min-height: 16px;
    font-size: 12px;
    line-height: 1.3;
  }
}

/* --- pagination (was new.scripts.tpl) --- */
.mse2_pagination.pagination,
nav.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin: 18px 0;
}
.mse2_pagination.pagination a,
nav.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line, #dce5df);
  background: #fff;
  border-radius: 4px;
  min-width: 32px;
  height: 32px;
  padding: 6px 10px;
  color: inherit;
  text-decoration: none;
  line-height: 1;
}
.mse2_pagination.pagination a.active,
nav.pagination a.active {
  background: var(--green, #287c40);
  color: #fff;
  border-color: var(--green, #287c40);
}
.mse2_pagination.pagination a.is-disabled,
nav.pagination a.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.mse2_pagination.pagination ul.pagin {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.mse2_pagination.pagination ul.pagin li {
  margin: 0;
  padding: 0;
}

/* --- feedback modal (was new.modals.tpl) --- */
.new-feedback-popup[hidden] {
  display: none !important;
}
.new-feedback-popup {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(20, 37, 56, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
}
.new-feedback-dialog {
  position: relative;
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid #cbd3dd;
  border-radius: 8px;
  padding: 22px 20px 18px;
  box-shadow: 0 16px 40px rgba(20, 37, 56, 0.2);
}
.new-feedback-dialog h2 {
  margin: 0 0 14px;
  font-size: 20px;
}
.new-feedback-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #142538;
}
.new-feedback-form {
  display: grid;
  gap: 10px;
}
.new-feedback-form input,
.new-feedback-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd3dd;
  border-radius: 5px;
  padding: 10px 12px;
  font: inherit;
}
.new-feedback-form button[type="submit"] {
  background: var(--green, #1f7a45);
  color: #fff;
  border: 0;
  border-radius: 5px;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
}
.new-feedback-agree {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  color: #5b6b7c;
}
.footer-feedback-btn {
  display: inline;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.footer-catalog-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.footer-catalog-list a {
  font-size: 13px;
}
.footer-legal {
  margin-top: 18px;
  padding-bottom: 24px;
  font-size: 12px;
  color: #5b6b7c;
}
.footer-copy {
  margin-top: 12px;
  font-size: 12px;
  color: #5b6b7c;
}

/* Hide thumb fallback when real gallery slides exist */
.product-detail .product-photo-frame:has(.gallery-image[data-gallery-slide]) .gallery-image-fallback {
  display: none !important;
}

/* Breadcrumbs: slash between crumbs */
.breadcrumbs li[aria-current="page"] span,
.breadcrumbs li[aria-current="page"] {
  color: var(--muted, #5b6b7c);
  text-decoration: none;
  cursor: default;
}

.breadcrumbs ol > li + li::before {
  content: "/";
  color: var(--muted, #5b6b7c);
  opacity: 0.75;
}

/* Color swatches: Бурый → Бело-бурый → Белый */
.color-options > [data-color="brown"] {
  order: 1;
}
.color-options > [data-color="white-brown"] {
  order: 2;
}
.color-options > [data-color="white"] {
  order: 3;
}

/* Catalog filters: no green outline; focus only the control itself */
.new-catalog-filter :is(a, button, summary, input, select, textarea):focus,
.new-catalog-filter :is(a, button, summary, input, select, textarea):focus-visible {
  outline: none !important;
  outline-offset: 0 !important;
}

/* Color / sort / price — highlight only the control */
.new-catalog-filter .size-filters > .new-filter-color:focus-within select,
.new-catalog-filter .size-filters > .shop-filter-sort:focus-within select,
.new-catalog-filter .size-filters > .new-filter-price:focus-within input,
.new-catalog-filter .size-filters select:focus,
.new-catalog-filter .size-filters select:focus-visible,
.new-catalog-filter .size-filters .new-filter-price input:focus,
.new-catalog-filter .size-filters .new-filter-price input:focus-visible {
  border-color: var(--green, #287c40) !important;
  box-shadow: 0 0 0 2px rgba(40, 124, 64, 0.28);
}

/* Size ranges — highlight the bordered pair-wrapper, not the whole filter */
.new-catalog-filter .size-filters > fieldset > div:focus-within {
  border-color: var(--green, #287c40);
  box-shadow: 0 0 0 2px rgba(40, 124, 64, 0.28);
}

.new-catalog-filter .type-tabs a:focus,
.new-catalog-filter .type-tabs a:focus-visible {
  border-color: var(--green, #287c40);
  box-shadow: 0 0 0 2px rgba(40, 124, 64, 0.28);
}

/* Catalog cards: show full photo like product page (not cropped /small thumb) */
.product-grid .product-card .gallery-image {
  height: clamp(200px, 22vw, 260px);
  background: #fff;
}
.product-grid .product-card .gallery-image > img {
  object-fit: contain !important;
  object-position: center;
  mix-blend-mode: normal !important;
  padding: 6px;
  width: 100%;
  height: 100%;
}
.product-grid .product-card .product-photo-frame {
  overflow: visible;
}
