/* wind 3.13: стили окна товара и карточек каталога */
:root {
  --wind-title-font: var(--fx-title-font, "PT Serif", serif);
  --wind-text-font: var(--fx-text-font, Arial, sans-serif);
  --wind-maroon: #930c2c;
  --wind-grey: #4f4f4f;
  --wind-muted: #8a8a8a;
  --wind-line: #e4e0e0;
  --wind-zoom: 1.7;
}

.t-catalog__card__title,
.t-store__card__title,
.t1002__title {
  font-family: var(--wind-title-font) !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  color: var(--wind-maroon) !important;
  text-align: center !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 61px;
  max-height: 61px;
  margin: 0 0 4px;
}

.t-catalog__card__sku,
.t-store__card__sku {
  font-family: var(--wind-text-font) !important;
  font-size: 12px !important;
  color: var(--wind-muted) !important;
  text-align: center !important;
}

.js-catalog-price-wrapper,
.t-catalog__card__price-wrapper,
.t-store__card__price-wrapper,
.t-catalog__card__price,
.t-store__card__price,
.js-catalog-price {
  color: #4f4f4f !important;
  font-family: var(--fx-text-font, Arial, sans-serif) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  text-align: center !important;
  font-variant-numeric: tabular-nums;
}
.js-catalog-price-wrapper *,
.t-catalog__card__price-wrapper *,
.t-store__card__price-wrapper *,
.t-catalog__card__price *,
.t-store__card__price *,
.js-catalog-price * {
  color: #4f4f4f !important;
  font-family: var(--fx-text-font, Arial, sans-serif) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  background: transparent !important;
}
.t-catalog__prod__price-portion,
.t-catalog__card__price-portion,
.t-store__card__price-portion,
[class*="price-portion"] {
  white-space: nowrap;
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.t-catalog__card__btn,
.t-store__card__btn {
  font-family: var(--wind-text-font) !important;
  font-size: 12px !important;
  letter-spacing: .03em;
  text-transform: uppercase;
  border-radius: 6px;
}

html.wind-card-open { overflow: hidden; }

#wc-ov {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2.2vw, 30px);
  background: rgba(28, 24, 23, .55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

#wc-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  --wc-w: min(94vw, 1000px);
  width: var(--wc-w);
  height: auto;
  min-height: min(430px, 85vh);
  max-height: 85vh;
  background: #fff;
  border: 0;
  border-radius: .85em;
  overflow: hidden;
  box-shadow: 0 1.2em 3em rgba(0, 0, 0, .28);
  font-size: clamp(13px, 1.5vw, 15.5px);
  font-family: var(--fx-text-font, Arial, sans-serif);
  line-height: 1.4;
  color: #4f4f4f;
}

#wc-media {
  position: relative;
  overflow: hidden;
  background: #fff;
  min-height: 0;
}
#wc-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transform-origin: center center;
  transition: transform .6s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}
#wc-media.is-hover img { transform: scale(var(--wind-zoom, 1.7)); }

#wc-side {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  max-height: 85vh;
  padding: 1.45em 1.8em 1.05em;
  text-align: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
#wc-side::-webkit-scrollbar { width: 6px; }
#wc-side::-webkit-scrollbar-thumb { background: #e6e1e1; border-radius: 3px; }

#wc-body {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#wc-title {
  flex: 0 0 auto;
  font-family: var(--wind-title-font);
  color: var(--wind-maroon);
  font-size: 1.35em;
  line-height: 1.18;
  font-weight: 700;
  margin: 0 auto .08em;
  padding: 0 1.9em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

#wc-art {
  flex: 0 0 auto;
  font-size: .76em;
  font-weight: 400;
  color: var(--wind-muted);
  margin: 0 0 1.05em;
  padding: 0;
}
#wc-art:empty { display: none; }

#wc-price {
  flex: 0 0 auto;
  display: table;
  margin: 0 auto 1.05em;
  padding: .28em 1.05em;
  border-radius: .3em;
  background: #8a8a8a;
  color: #fff;
  font-family: var(--fx-text-font, Arial, sans-serif);
  font-size: .95em;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}
#wc-price.wc-loading { background: transparent; color: #b3b3b3; }
#wc-specs.wc-loading { color: #b3b3b3; }

#wc-specs {
  flex: 0 0 auto;
  columns: 2;
  column-gap: 2.2em;
  text-align: left;
  font-size: .76em;
  line-height: 1.5;
  color: var(--wind-grey);
  margin: 0 0 .9em;
}
.wc-spec {
  break-inside: avoid;
  margin: 0 0 .2em;
  overflow-wrap: anywhere;
}
.wc-spec span { color: #4f4f4f; font-weight: 600; }
.wc-spec b { color: #5f5f5f; font-weight: 400; }
.wc-spec--wide { column-span: all; white-space: normal; }

#wc-descr {
  flex: 0 0 auto;
  text-align: left;
  font-size: .76em;
  line-height: 1.55;
  color: #6d6664;
  margin: .4em 0 1em;
  padding: 0 .2em 0 0;
  max-height: 32vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
#wc-descr::-webkit-scrollbar { width: 4px; }
#wc-descr::-webkit-scrollbar-thumb { background: #e6e1e1; border-radius: 2px; }
#wc-descr:empty { display: none; }
#wc-descr p { margin: 0 0 .45em; }
#wc-descr p:last-child { margin-bottom: 0; }
#wc-descr .wc-descr__lead {
  font-family: var(--wind-title-font);
  font-size: 1.06em;
  color: #4f4f4f;
  margin-bottom: .35em;
}
#wc-descr ul,
#wc-descr ol { margin: 0 0 .45em; padding-left: 1.15em; }
#wc-descr li { margin: 0 0 .15em; }
#wc-descr b,
#wc-descr strong { color: #4f4f4f; font-weight: 600; }
#wc-descr a { color: var(--wind-maroon); }

#wc-vars:empty { display: none; }
#wc-vars { flex: 0 0 auto; margin: 0 0 .55em; }

.wc-var {
  display: flex;
  align-items: stretch;
  height: 2.5em;
  border: 1px solid #e3dede;
  border-radius: .55em;
  background: #fff;
  overflow: hidden;
  font-size: .92em;
  color: var(--wind-grey);
  margin: 0 0 .45em;
}
.wc-var:last-child { margin-bottom: 0; }
.wc-var__field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  background: #f7f5f5;
}
.wc-var select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  color: #333;
  padding: 0 1.8em 0 .85em;
  text-align: left;
  cursor: pointer;
  outline: none;
  max-width: 100%;
}
.wc-var__chevron {
  position: absolute;
  right: .65em;
  width: .72em;
  height: .44em;
  stroke: #8a8a8a;
  stroke-width: 1.6;
  fill: none;
  pointer-events: none;
}
.wc-var__label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 .9em;
  border-left: 1px solid #e3dede;
  background: #fff;
  color: #4f4f4f;
  white-space: nowrap;
}

#wc-bar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 2.5em minmax(0, 1fr) 2.5em auto;
  align-items: stretch;
  border: 1px solid #e3dede;
  border-radius: .55em;
  overflow: hidden;
  height: 2.5em;
  margin: 0;
  background: #fff;
}
#wc-bar > * + * { border-left: 1px solid #e3dede; }
#wc-bar button {
  border: 0;
  background: #fff;
  color: var(--wind-maroon);
  font: 400 1.3em/1 Arial, sans-serif;
  cursor: pointer;
  padding: 0;
}
#wc-bar button:hover { background: #fbf4f5; }

.wc-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  line-height: 1;
}
.wc-qty { cursor: text; padding: 0 .3em; gap: .2em; }
.wc-qty input {
  width: 3.4em;
  border: 0;
  outline: none;
  text-align: right;
  font: 400 1em/1 Arial, sans-serif;
  color: #333;
  padding: 0;
  background: transparent;
  cursor: text;
}
#wc-unit {
  font: 400 .86em/1 Arial, sans-serif;
  color: #4f4f4f;
  white-space: nowrap;
  pointer-events: none;
}
.wc-total { justify-content: flex-end; padding: 0 .8em; }
.wc-total b {
  font-size: .95em;
  color: var(--wind-maroon);
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}
#wc-sumcap {
  flex: 0 0 auto;
  text-align: right;
  font-size: .6em;
  line-height: 1;
  color: #b0b0b0;
  margin: .18em 0 .75em;
  padding-right: .5em;
}

#wc-actions {
  flex: 0 0 auto;
  display: flex;
  gap: .55em;
  margin: .55em 0 0;
  padding: 0;
}
#wc-actions button {
  height: 2.2em;
  border-radius: .5em;
  font: 700 .76em/1 Arial, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  padding: 0 .7em;
  transition: background .2s, color .2s, border-color .2s;
}
#wc-actions .wc-go { flex: 1.35 1 0; background: #fff; border: 1px solid var(--wind-maroon); color: var(--wind-maroon); }
#wc-actions .wc-go:hover { background: #fbf4f5; }
#wc-actions .wc-add { flex: 1 1 0; background: var(--wind-maroon); border: 1px solid var(--wind-maroon); color: #fff; }
#wc-actions .wc-add:hover { background: #7d0a25; }
#wc-actions .wc-add.is-added,
#wc-actions .wc-add.is-added:hover { background: #c9c9c9; border-color: #c9c9c9; color: #fff; }
#wc-actions .wc-add:disabled { background: #ddd; border-color: #ddd; cursor: default; }

.wc-x {
  position: absolute;
  right: .7em;
  top: .6em;
  width: 1.6em;
  height: 1.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #9b8e91;
  font-size: 1.4em;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  box-shadow: none;
  padding: 0;
  text-shadow: 0 0 3px rgba(255, 255, 255, .9);
  -webkit-appearance: none;
  appearance: none;
}
.wc-x:hover { color: var(--wind-maroon); background: transparent; }

#wc-dialog:focus,
#wc-dialog:focus-visible { outline: none; }
#wc-actions button:focus,
#wc-bar button:focus,
.wc-x:focus,
.wc-var select:focus,
.wc-qty input:focus { outline: none; }
.wc-var:focus-within { box-shadow: inset 0 0 0 1px rgba(147, 12, 44, .3); }
#wc-actions button:focus-visible,
.wc-x:focus-visible,
#wc-bar button:focus-visible {
  outline: 2px solid var(--wind-maroon);
  outline-offset: 1px;
  border-radius: .4em;
}
.wc-qty:focus-within { box-shadow: inset 0 0 0 1px rgba(147, 12, 44, .3); }

@media (max-width: 1100px) {
  #wc-dialog { width: min(94vw, 780px); font-size: 15px; }
}

@media (max-width: 700px) {
  #wc-ov { padding: 0; background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  #wc-dialog {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    box-shadow: none;
    font-size: 15px;
  }
  #wc-media { height: 33vh; min-height: 170px; flex: 0 0 auto; }

  #wc-side {
    position: static;
    padding: .95em .95em 0;
    flex: 1 1 auto;
    min-height: 0;
  }
  #wc-body { flex: 0 0 auto; }

  .wc-x {
    position: fixed;
    right: .7em;
    top: .7em;
    width: 2.2em;
    height: 2.2em;
    font-size: 1.3em;
  }
  #wc-title { font-size: 1.26em; padding: 0 .8em; }
  #wc-art { font-size: .8em; margin: 0 0 .65em; }
  #wc-price { font-size: .95em; margin: 0 auto .8em; }
  #wc-specs { font-size: .75em; column-gap: 1.4em; margin: 0 0 .8em; }

  #wc-vars { margin: 0 0 .6em; }
  .wc-var { font-size: .94em; height: 2.7em; }

  #wc-bar { height: 2.75em; grid-template-columns: 2.4em minmax(0, 1fr) 2.4em auto; }
  #wc-bar button { font-size: 1.45em; }
  .wc-qty input { width: 3.2em; font-size: 1.05em; }
  #wc-unit { font-size: .85em; }
  .wc-total { padding: 0 .6em; }
  #wc-sumcap { margin: .15em 0 .7em; font-size: .62em; }

  #wc-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    margin: auto -.95em 0;
    padding: .65em .95em calc(.65em + env(safe-area-inset-bottom));
    border-top: 1px solid #f0eded;
    gap: .5em;
  }
  #wc-actions button { height: 2.8em; font-size: .78em; }
}

@media (max-width: 380px) {
  #wc-media { height: 27vh; }
  #wc-title { font-size: 1.2em; }
  #wc-specs { font-size: .72em; column-gap: 1em; }
  #wc-bar { grid-template-columns: 2.2em minmax(0, 1fr) 2.2em auto; }
  .wc-total b { font-size: .9em; }
}

@media (max-width: 360px) {
  #wc-media { height: 25vh; min-height: 140px; }
  #wc-title { font-size: 1.14em; padding: 0 .5em; }
  #wc-specs { columns: 1; font-size: .73em; }
  #wc-bar button { font-size: 1.3em; }
  .wc-qty input { width: 2.8em; }
  #wc-unit { font-size: .8em; }
  .wc-total { padding: 0 .45em; }
  #wc-actions button { font-size: .7em; padding: 0 .4em; }
}

@media (max-width: 700px) and (max-height: 560px) {
  #wc-media { height: 24vh; min-height: 110px; }
  #wc-title { font-size: 1.12em; }
  #wc-art { margin-bottom: .45em; }
  #wc-price { margin-bottom: .6em; }
  #wc-specs { font-size: .7em; margin-bottom: .6em; }
  #wc-sumcap { display: none; }
}

@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  #wc-dialog { display: grid; grid-template-columns: 40% minmax(0, 1fr); }
  #wc-media { height: 100%; min-height: 0; }
  #wc-side { padding: .7em .85em; }
  #wc-title { padding: 0 2.4em; }
  #wc-actions {
    position: static;
    margin: .5em 0 0;
    padding: 0;
    border-top: 0;
    background: transparent;
  }
  #wc-sumcap { display: none; }
}
