/* "Тениска по ваш дизайн" — product page customizer (inc/custom-tee.php). */
.mm-tee-page {
  --tee-red: #e30613;
  --tee-red-dark: #c4000f;
  --tee-ink: #181314;
  --tee-muted: #655b5e;
  --tee-line: #ebe5e6;
  --tee-soft: #f6f3f4;
}

/* Product header, preview and WooCommerce summary. */
.mm-tee-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 40px);
  clear: both;
  margin-bottom: 28px;
}
.mm-tee-layout > * { min-width: 0; }
.mm-tee-layout > .mm-tee-stage { grid-column: 1; }
.mm-tee-page.single-product div.product .mm-tee-layout > div.summary {
  grid-column: 2;
  float: none !important;
  width: 100% !important;
  margin: 0;
}
.mm-tee-layout + * { clear: both; }
.mm-tee-intro .product_title {
  max-width: 28ch;
  margin: 0 0 12px !important;
  color: var(--tee-ink);
  font-size: clamp(26px, 4vw, 44px) !important;
  line-height: 1.13 !important;
  letter-spacing: -.035em;
}
.mm-tee-intro .woocommerce-product-details__short-description p {
  max-width: 64ch;
  margin: 0;
  color: var(--tee-muted);
  font-size: 16px;
  line-height: 1.55;
}
.mm-tee-stage {
  position: sticky;
  top: 20px;
  padding: clamp(12px, 2vw, 22px);
  border: 1px solid #ddd9d8;
  border-radius: 22px;
  background: #fff;
}
.admin-bar .mm-tee-stage { top: 52px; }
.mm-tee-stage__top {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.mm-tee-views {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid #ded9d9;
  border-radius: 12px;
  background: #fff;
}
.mm-tee-views button,
.mm-tee-tabs button {
  min-height: 44px;
  font-family: inherit;
  font-weight: 700;
}
.mm-tee-views button {
  margin: 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--tee-muted);
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
}
.mm-tee-views button.is-active { background: var(--tee-ink); color: #fff; }
.mm-tee-jump { display: none; }
.mm-tee-stage, .mm-tee { scroll-margin-top: 72px; }
.mm-tee-canvas {
  position: relative;
  aspect-ratio: 500 / 560;
  width: min(100%, 460px);
  margin: 10px auto 0;
}
.mm-tee-svg {
  display: none;
  width: 100%;
  height: 100%;
  overflow: visible;
  user-select: none;
  -webkit-user-select: none;
}
.mm-tee-svg.is-active { display: block; animation: mm-tee-in .28s ease-out; }
@keyframes mm-tee-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }

.mm-tee-zone {
  fill: rgba(255, 255, 255, .025);
  stroke: rgba(255, 255, 255, .28);
  stroke-width: 1.4;
  stroke-dasharray: 6 5;
  transition: stroke .2s, fill .2s;
}
.mm-tee-zone.is-active {
  fill: rgba(227, 6, 19, .1);
  stroke: #ff3341;
  stroke-width: 2;
}
.mm-tee-zone-label {
  display: none;
  fill: rgba(255, 255, 255, .7);
  font: 800 10px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}
.mm-tee-zone-label.is-active { display: block; }
.mm-tee-zone-label[data-zone="left"] { font-size: 8px; letter-spacing: .08em; }
.mm-tee-item { cursor: grab; touch-action: none; }
.mm-tee-item__box {
  fill: transparent;
  stroke: rgba(255, 255, 255, .9);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0;
  transition: opacity .2s;
}
.mm-tee-item.is-selected .mm-tee-item__box { opacity: 1; }

.mm-tee-stage__hint {
  margin: 8px 0 0 !important;
  color: var(--tee-muted) !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  text-align: center;
}
.mm-tee-stage__hint b { color: var(--tee-ink); }

/* ---------- controls ---------- */
.mm-tee {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--tee-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(24, 19, 20, .06);
}
.mm-tee__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0 0 12px;
}
.mm-tee__head h2 {
  margin: 0 !important;
  color: var(--tee-ink);
  font-size: 22px !important;
  line-height: 1.25;
}
.mm-tee :is(button, input):focus-visible,
.mm-tee-stage :is(button, a):focus-visible,
.mm-tee a:focus-visible,
.mm-tee-drop:focus-within {
  outline: 2px solid var(--tee-ink);
  outline-offset: 3px;
}

.mm-tee-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
  border-radius: 14px;
  background: var(--tee-soft);
}
.mm-tee-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 10px 8px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--tee-muted);
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.mm-tee-tabs button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mm-tee-tabs button.is-active { background: #fff; color: var(--tee-ink); box-shadow: 0 4px 12px rgba(24, 19, 20, .08); }
.mm-tee-tabs button i { display: none; width: 7px; height: 7px; border-radius: 50%; background: #1fae55; }
.mm-tee-tabs button.has-content i { display: inline-block; }

.mm-tee-panel[hidden] { display: none !important; }
.mm-tee-field { margin: 0 0 14px; }
.mm-tee-field:last-child { margin-bottom: 0; }
.mm-tee-field.is-off { display: none; }
.mm-tee-label {
  display: flex;
  justify-content: space-between;
  margin: 0 0 7px;
  color: var(--tee-ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.mm-tee-label output { color: var(--tee-muted); font-weight: 700; letter-spacing: 0; text-transform: none; }

.mm-tee-drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px !important;
  padding: 16px;
  border: 2px dashed #e3b8bc;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7f8, #fff);
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.mm-tee-drop:hover, .mm-tee-drop.is-over { border-color: var(--tee-red); background: #fff1f2; }
.mm-tee-drop.is-over { transform: scale(1.01); }
.mm-tee-drop[hidden] { display: none; }
.mm-tee-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mm-tee-drop__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--tee-red);
  color: #fff;
  box-shadow: 0 10px 20px rgba(227, 6, 19, .25);
}
.mm-tee-drop__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mm-tee-drop__text b { display: block; color: var(--tee-ink); font-size: 16px; font-weight: 900; }
.mm-tee-drop__text small { display: block; margin-top: 3px; color: var(--tee-muted); font-size: 12.5px; line-height: 1.35; }

.mm-tee-file {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid var(--tee-line);
  border-radius: 16px;
  background: var(--tee-soft);
}
.mm-tee-file[hidden] { display: none; }
.mm-tee-file img {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: contain;
  background: #1a1a1c;
}
.mm-tee-file div { flex: 1 1 auto; min-width: 0; }
.mm-tee-file b { display: block; overflow: hidden; color: var(--tee-ink); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.mm-tee-file small { display: block; color: var(--tee-muted); font-size: 12px; }
.mm-tee-file small.is-warn { color: #b25a00; }
.mm-tee-link, .mm-tee-icon-btn {
  flex: 0 0 auto;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.mm-tee-link { min-height: 44px; padding: 8px 4px; color: var(--tee-red); font-size: 13px; font-weight: 800; }
.mm-tee-icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fff;
  color: var(--tee-ink);
  font-size: 20px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px var(--tee-line);
}

.mm-tee-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mm-tee-chip { position: relative; margin: 0 !important; cursor: pointer; }
.mm-tee-chip input { position: absolute; opacity: 0; pointer-events: none; }
.mm-tee-chip span {
  display: block;
  height: 100%;
  padding: 9px 10px;
  border: 1.5px solid var(--tee-line);
  border-radius: 13px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.mm-tee-chip b { display: block; color: var(--tee-ink); font-size: 14px; font-weight: 800; line-height: 1.2; }
.mm-tee-chip small { display: block; margin-top: 2px; color: var(--tee-muted); font-size: 11.5px; line-height: 1.3; }
.mm-tee-chip input:checked + span { border-color: var(--tee-red); background: #fff5f6; box-shadow: 0 0 0 3px rgba(227, 6, 19, .1); }
.mm-tee-chip input:focus-visible + span { outline: 2px solid var(--tee-ink); outline-offset: 2px; }


.mm-tee-range {
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  --p: 50%;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.mm-tee-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--tee-red) var(--p), #e9e2e3 var(--p));
}
.mm-tee-range::-moz-range-track { height: 6px; border-radius: 99px; background: #e9e2e3; }
.mm-tee-range::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--tee-red); }
.mm-tee-range::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--tee-red);
  box-shadow: 0 3px 10px rgba(24, 19, 20, .25);
  -webkit-appearance: none;
}
.mm-tee-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--tee-red);
  box-shadow: 0 3px 10px rgba(24, 19, 20, .25);
}

.mm-tee-error {
  margin: 12px 0 0 !important;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff1f2;
  color: var(--tee-red-dark) !important;
  font-size: 14px !important;
  font-weight: 700;
  line-height: 1.4 !important;
}
.mm-tee-error[hidden] { display: none; }
.mm-tee.is-shake { animation: mm-tee-shake .4s; }
@keyframes mm-tee-shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

/* Cart thumbnails of the generated mockup. */
.mm-tee-cart-thumb { object-fit: cover; background: #efeaeb; }

@media (max-width: 768px) {
  .mm-tee-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .mm-tee-page.single-product div.product .mm-tee-layout > div.summary { grid-column: 1; }
  .mm-tee-stage {
    position: relative;
    top: auto !important;
  }
  .mm-tee-stage__top { justify-content: space-between; }
  .mm-tee-canvas { width: min(100%, 300px, 43svh); }
  .mm-tee-jump {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--tee-ink);
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .mm-tee { padding: 14px; }
}
@media (max-width: 480px) {
  .mm-tee-chip span { padding: 8px 6px; }
  .mm-tee-chip b { font-size: 13px; }
  .mm-tee-drop { padding: 12px; }
  .mm-tee-drop__icon { width: 40px; height: 40px; border-radius: 12px; }
  .mm-tee-file { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .mm-tee-svg.is-active, .mm-tee.is-shake { animation: none; }
}

/* ---------- logo-only: two chips, "same on back" switch, reuse button ---------- */
.mm-tee-chips--2 { grid-template-columns: repeat(2, 1fr); }
.mm-tee-same {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px !important;
  padding: 12px;
  border: 1.5px solid var(--tee-line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.mm-tee-same.is-off { display: none; }
.mm-tee-same input { position: absolute; opacity: 0; pointer-events: none; }
.mm-tee-same__switch {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  border-radius: 99px;
  background: #ddd5d6;
  transition: background .2s;
}
.mm-tee-same__switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(24, 19, 20, .25);
  transition: transform .2s;
}
.mm-tee-same input:checked + .mm-tee-same__switch { background: var(--tee-red); }
.mm-tee-same input:checked + .mm-tee-same__switch::after { transform: translateX(18px); }
.mm-tee-same input:focus-visible + .mm-tee-same__switch { outline: 2px solid var(--tee-ink); outline-offset: 2px; }
.mm-tee-same:has(input:checked) { border-color: var(--tee-red); background: #fff5f6; }
.mm-tee-same b { display: block; color: var(--tee-ink); font-size: 14px; font-weight: 800; line-height: 1.25; }
.mm-tee-same small { display: block; color: var(--tee-muted); font-size: 12px; line-height: 1.3; }
.mm-tee-use-front {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: -4px 0 14px;
  padding: 11px 12px;
  border: 1.5px solid var(--tee-line);
  border-radius: 14px;
  background: var(--tee-soft);
  color: var(--tee-ink);
  font: 800 14px/1.2 inherit;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.mm-tee-use-front:hover { border-color: var(--tee-red); background: #fff5f6; }
.mm-tee-use-front[hidden] { display: none; }
.mm-tee-use-front svg { width: 18px; height: 18px; fill: none; stroke: var(--tee-red); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mm-tee-link[hidden] { display: none; }

/* ---------- live price ---------- */
.mm-tee-total {
  margin: 4px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--tee-soft);
  font-size: 14px;
}
.mm-tee-total div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; color: var(--tee-muted); }
.mm-tee-total div span:last-child { color: var(--tee-ink); font-weight: 700; white-space: nowrap; }
.mm-tee-total .mm-tee-total__sum { margin-top: 6px; padding-top: 9px; border-top: 1px solid var(--tee-line); color: var(--tee-ink); font-weight: 800; }
.mm-tee-total .mm-tee-total__sum span:last-child { color: var(--tee-red); font-size: 18px; font-weight: 900; }
.mm-tee-price { white-space: nowrap; color: var(--tee-red); font-weight: 800; }

/* ---------- quantity discount + bulk popup ---------- */
.mm-tee-total .mm-tee-total__off span:last-child,
.mm-tee-bulk__sum .mm-tee-total__off b { color: #1a8a46; }
.mm-tee-bulk-open {

  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1.5px dashed var(--tee-red, #e30613);
  border-radius: 14px;
  background: #fff5f6;
  color: var(--tee-ink, #181314);
  text-align: left;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.mm-tee-bulk-open:hover { background: #ffe9eb; transform: translateY(-1px); }
.mm-tee-bulk-open svg { flex: 0 0 auto; width: 26px; height: 26px; padding: 6px; border-radius: 10px; background: var(--tee-red, #e30613); fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; box-sizing: content-box; }
.mm-tee-bulk-open b { display: block; font-size: 15px; font-weight: 900; line-height: 1.25; }
.mm-tee-bulk-open small { display: block; margin-top: 2px; color: var(--tee-red-dark, #c4000f); font-size: 12.5px; font-weight: 700; }

.mm-tee-bulk {
  width: min(560px, calc(100vw - 24px));
  max-height: min(92vh, 860px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #fff;
  color: var(--tee-ink, #181314);
  box-shadow: 0 30px 80px rgba(24, 19, 20, .35);
  overflow: auto;
}
.mm-tee-bulk::backdrop { background: rgba(24, 19, 20, .55); backdrop-filter: blur(3px); }
.mm-tee-bulk[open] { animation: mm-tee-pop .22s ease-out; }
@keyframes mm-tee-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.mm-tee-bulk__inner { display: grid; gap: 14px; margin: 0; padding: 18px; }
.mm-tee-bulk__head { display: flex; align-items: flex-start; gap: 12px; }
.mm-tee-bulk__head img { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 12px; object-fit: contain; background: #fff; box-shadow: inset 0 0 0 1px #ebe5e6; }
.mm-tee-bulk__head div { flex: 1 1 auto; min-width: 0; }
.mm-tee-bulk__head h2 { margin: 0 0 4px !important; font-size: 21px !important; font-weight: 900 !important; line-height: 1.15 !important; }
.mm-tee-bulk__head p { margin: 0 !important; color: var(--tee-muted, #7b7071); font-size: 13.5px !important; line-height: 1.4 !important; }
.mm-tee-bulk__close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--tee-soft, #f6f3f4);
  color: var(--tee-ink, #181314);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.mm-tee-bulk__tiers { display: flex; gap: 8px; overflow-x: auto; }
.mm-tee-bulk__tiers:empty { display: none; }
.mm-tee-bulk__tiers span {
  flex: 1 0 auto;
  padding: 8px 10px;
  border: 1.5px solid var(--tee-line, #ebe5e6);
  border-radius: 12px;
  color: var(--tee-muted, #7b7071);
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  transition: border-color .2s, background .2s;
}
.mm-tee-bulk__tiers b { display: block; color: var(--tee-ink, #181314); font-size: 16px; font-weight: 900; }
.mm-tee-bulk__tiers span.is-active { border-color: #1fae55; background: #effaf3; }
.mm-tee-bulk__tiers span.is-active b { color: #1a8a46; }
.mm-tee-bulk__sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mm-tee-bulk__size {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 10px 8px;
  border: 1.5px solid var(--tee-line, #ebe5e6);
  border-radius: 14px;
  transition: border-color .2s, background .2s;
}
.mm-tee-bulk__size b { font-size: 15px; font-weight: 900; }
.mm-tee-bulk__size.has-qty { border-color: var(--tee-red, #e30613); background: #fff5f6; }
.mm-tee-bulk__size.is-out { opacity: .5; }
.mm-tee-bulk__size small { color: var(--tee-muted, #7b7071); font-size: 11.5px; }
.mm-tee-step { display: flex; align-items: center; width: 100%; max-width: 132px; border-radius: 10px; background: var(--tee-soft, #f6f3f4); }
.mm-tee-step button {
  flex: 0 0 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--tee-ink, #181314);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.mm-tee-step button:hover { background: #ebe5e6; }
.mm-tee-step input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 36px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--tee-ink, #181314);
  font-size: 16px !important;
  font-weight: 800;
  text-align: center;
  -moz-appearance: textfield;
}
.mm-tee-step input::-webkit-inner-spin-button, .mm-tee-step input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.mm-tee-bulk__sum { padding: 12px 14px; border-radius: 14px; background: var(--tee-soft, #f6f3f4); font-size: 14px; }
.mm-tee-bulk__sum > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; color: var(--tee-muted, #7b7071); }
.mm-tee-bulk__sum > div b { color: var(--tee-ink, #181314); white-space: nowrap; }
.mm-tee-bulk__sum del { color: var(--tee-muted, #7b7071); font-weight: 600; }
.mm-tee-bulk__total { margin-top: 6px; padding-top: 9px !important; border-top: 1px solid var(--tee-line, #ebe5e6); color: var(--tee-ink, #181314) !important; font-weight: 800; }
.mm-tee-bulk__total b { color: var(--tee-red, #e30613) !important; font-size: 20px; font-weight: 900; }
.mm-tee-bulk__next { margin: 8px 0 0 !important; padding: 8px 10px; border-radius: 10px; background: #fff; color: var(--tee-ink, #181314); font-size: 13px !important; line-height: 1.35 !important; text-align: center; }
.mm-tee-bulk__next b { color: var(--tee-red, #e30613); }
.mm-tee-bulk__add {
  width: 100%;
  margin: 0;
  padding: 15px 16px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #f10a17, #c4000f);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(207, 0, 13, .25);
}
.mm-tee-bulk__add:disabled { background: #d9d2d3; box-shadow: none; cursor: not-allowed; }
.mm-tee-bulk .mm-tee-error { margin: 0 !important; }
@media (max-width: 520px) {
  .mm-tee-bulk {
    width: 100vw;
    max-width: 100vw;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
  }
  .mm-tee-bulk__inner { padding: 16px 14px calc(14px + env(safe-area-inset-bottom)); gap: 12px; }
  .mm-tee-bulk__sizes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mm-tee-bulk__head img { width: 58px; height: 58px; }
  .mm-tee-bulk__add { position: sticky; bottom: 0; }
}

/* ---------- model switch (Мъжка / Дамска / Детска) ---------- */
.mm-tee-models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 0 16px; padding: 4px; border-radius: 16px; background: var(--tee-soft, #f6f3f4); }
.mm-tee-model { position: relative; margin: 0 !important; cursor: pointer; }
.mm-tee-model input { position: absolute; opacity: 0; pointer-events: none; }
.mm-tee-model span { display: block; padding: 9px 6px; border-radius: 12px; text-align: center; transition: background .2s, box-shadow .2s; }
.mm-tee-model b { display: block; color: var(--tee-muted, #7b7071); font-size: 15px; font-weight: 900; line-height: 1.2; }
.mm-tee-model small, .mm-tee-model small .amount { display: block; color: var(--tee-muted, #7b7071) !important; font-size: 11.5px !important; font-weight: 700 !important; }
.mm-tee-model input:checked + span { background: #fff; box-shadow: 0 4px 12px rgba(24, 19, 20, .1), inset 0 0 0 1.5px var(--tee-red, #e30613); }
.mm-tee-model input:checked + span b { color: var(--tee-ink, #181314); }
.mm-tee-model input:focus-visible + span { outline: 2px solid var(--tee-ink, #181314); outline-offset: 2px; }
/* The model is chosen above; its row in the variations table stays hidden, as do sizes of other models. */
body.mm-tee-page.single-product div.product form.variations_form table.variations tr:has(select[name="attribute_pa_model"]),
body.mm-tee-page .mm-mobile-variation-popup__form form.variations_form table.variations tr:has(select[name="attribute_pa_model"]) { display: none !important; }
body.mm-tee-page.single-product div.product form.variations_form table.variations .variable-items-wrapper .variable-item.disabled,
body.mm-tee-page.single-product div.product form.variations_form table.variations .variable-items-wrapper .variable-item.wvs-disabled,
body.mm-tee-page .mm-mobile-variation-popup__form .variable-items-wrapper .variable-item.disabled,
body.mm-tee-page .mm-mobile-variation-popup__form .variable-items-wrapper .variable-item.wvs-disabled { display: none !important; }
/* Size order (term order is alphabetical): XS S M L XL XL+ XXL XXXL, kids by height. */
.mm-tee-page .variable-item[data-value="xs"] { order: 1; }
.mm-tee-page .variable-item[data-value="s"] { order: 2; }
.mm-tee-page .variable-item[data-value="m"] { order: 3; }
.mm-tee-page .variable-item[data-value="l"] { order: 4; }
.mm-tee-page .variable-item[data-value="xl"] { order: 5; }
.mm-tee-page .variable-item[data-value="xl-plus"] { order: 6; }
.mm-tee-page .variable-item[data-value="xxl"] { order: 7; }
.mm-tee-page .variable-item[data-value="xxxl"] { order: 8; }
.mm-tee-page .variable-item[data-value="98"] { order: 10; }
.mm-tee-page .variable-item[data-value="110"] { order: 11; }
.mm-tee-page .variable-item[data-value="122"] { order: 12; }
.mm-tee-page .variable-item[data-value="132"] { order: 13; }
.mm-tee-page .variable-item[data-value="144"] { order: 14; }
.mm-tee-page .variable-item[data-value="156"] { order: 15; }
.mm-tee-page .variable-item[data-value="168"] { order: 16; }
/* Bulk popup: model tabs */
.mm-tee-bulk__models { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--tee-soft, #f6f3f4); }
.mm-tee-bulk__models button { margin: 0; padding: 9px 6px; border: 0; border-radius: 11px; background: transparent; color: var(--tee-muted, #7b7071); font-size: 14px; font-weight: 800; cursor: pointer; }
.mm-tee-bulk__models button.is-active { background: #fff; color: var(--tee-ink, #181314); box-shadow: 0 4px 12px rgba(24, 19, 20, .08); }
.mm-tee-bulk__models i { display: inline-block; min-width: 18px; margin-left: 4px; padding: 1px 5px; border-radius: 99px; background: var(--tee-red, #e30613); color: #fff; font-size: 11px; font-style: normal; }
.mm-tee-bulk__size[hidden] { display: none !important; }

/* Nested spans inside a zone chip are inline text, not chip boxes. */
.mm-tee-chip small span { display: inline !important; height: auto !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; }

/* Short description above the price in the summary column. */
.mm-tee-page.single-product div.product .summary .woocommerce-product-details__short-description { margin: 0 0 14px; }
.mm-tee-page.single-product div.product .summary .woocommerce-product-details__short-description p { margin: 0 !important; color: var(--tee-muted, #7b7071); font-size: 16px; line-height: 1.55; }
@media (max-width: 768px) {
  .mm-tee-page.single-product div.product .summary .woocommerce-product-details__short-description { display: block !important; }
  .mm-tee-page.single-product div.product .summary .woocommerce-product-details__short-description p { font-size: 15px; }
}

/* ---------- model switch v2: cards, selected = full red with a check ---------- */
.mm-tee-models { gap: 10px; padding: 0; background: none; margin: 0 0 18px; padding-top: 8px; }
.mm-tee-model span {
  position: relative;
  padding: 14px 8px 12px;
  border: 1.5px solid var(--tee-line, #ebe5e6);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(24, 19, 20, .05);
  transition: background .2s, border-color .2s, box-shadow .2s, transform .15s;
}
.mm-tee-model:hover span { border-color: #e3b8bc; transform: translateY(-1px); }
.mm-tee-model b { color: var(--tee-ink, #181314); font-size: 16px; }
.mm-tee-model small, .mm-tee-model small .amount { margin-top: 3px; color: var(--tee-muted, #7b7071) !important; }
.mm-tee-model input:checked + span {
  border-color: transparent;
  background: linear-gradient(135deg, #f10a17, #c4000f);
  box-shadow: 0 12px 26px rgba(207, 0, 13, .32);
}
.mm-tee-model input:checked + span b,
.mm-tee-model input:checked + span small { color: #fff !important; }
.mm-tee-model__check {
  position: absolute;
  top: -9px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(24, 19, 20, .25), 0 0 0 2px #e30613;
  opacity: 0;
  transform: scale(.4);
  transition: opacity .18s, transform .22s cubic-bezier(.3, 1.6, .5, 1);
}
.mm-tee-model__check svg { width: 15px; height: 15px; fill: none; stroke: #e30613; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.mm-tee-model input:checked + span .mm-tee-model__check { opacity: 1; transform: scale(1); }

/* Model badge: in the stage top row, before the Отпред/Гръб switch */
.mm-tee-model-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px 7px 9px;
  border: 1px solid #f5c6cb;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff7f8 0%, #ffe8ea 100%);
  color: #b3000d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(227, 6, 19, .1);
}
.mm-tee-model-badge svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f10a17, #c4000f);
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linejoin: round;
  box-sizing: border-box;
}
.mm-tee-model-badge.is-pop { animation: mm-tee-badge-pop .35s ease-out; }
@keyframes mm-tee-badge-pop { 0% { transform: scale(.92); opacity: .6; } 60% { transform: scale(1.04); } 100% { transform: none; opacity: 1; } }
@media (max-width: 768px) { .mm-tee-model-badge { font-size: 12px; padding: 6px 10px 6px 7px; } .mm-tee-model-badge svg { width: 18px; height: 18px; } }
@media (prefers-reduced-motion: reduce) { .mm-tee-model-badge.is-pop { animation: none; } }

.mm-tee-stage__top:has(.mm-tee-model-badge--image) {
  justify-content: flex-start;
}
.mm-tee-model-badge.mm-tee-model-badge--image {
  width: min(230px, 48%);
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
.mm-tee-model-badge--image img {
  display: block;
  width: 100%;
  height: auto;
}

/* Selected model: green check */
.mm-tee-model__check { background: #1fae55; box-shadow: 0 3px 10px rgba(24, 19, 20, .25), 0 0 0 2.5px #fff; }
.mm-tee-model__check svg { stroke: #fff; }

/* Cap: one size, so the size picker is not shown (the only variation is preselected). */
body.mm-tee-kind-cap.single-product div.product form.variations_form table.variations,
body.mm-tee-kind-cap .mm-mobile-variation-popup__form table.variations { display: none !important; }
body.mm-tee-kind-cap .mm-tee-tabs[hidden] { display: none !important; }

/* ---------- "Виж дизайна" ---------- */
.mm-tee-preview-open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px auto 0;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--tee-ink, #181314);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(24, 19, 20, .2);
  transition: transform .15s, background .2s, opacity .2s;
}
.mm-tee-preview-open svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mm-tee-preview-open:hover:not(:disabled) { background: #e30613; transform: translateY(-1px); }
.mm-tee-preview-open:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.mm-tee-preview-open.is-loading { opacity: .7; }
.mm-tee-preview {
  width: min(980px, calc(100vw - 24px));
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(24, 19, 20, .4);
  overflow: auto;
}
.mm-tee-preview::backdrop { background: rgba(24, 19, 20, .7); backdrop-filter: blur(3px); }
.mm-tee-preview[open] { animation: mm-tee-pop .22s ease-out; }
.mm-tee-preview__inner { margin: 0; padding: 14px 16px 16px; }
.mm-tee-preview header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mm-tee-preview header strong { font-size: 18px; font-weight: 900; }
.mm-tee-preview img { display: block; width: 100%; max-height: 76vh; object-fit: contain; border-radius: 14px; background: #fff; }
.mm-tee-preview p { margin: 10px 0 0 !important; color: var(--tee-muted, #7b7071); font-size: 13px !important; text-align: center; }

/* ---------- delivery time ---------- */
.mm-tee-ship {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 0 !important;
  padding: 11px 14px;
  border: 1px solid #cdebd8;
  border-radius: 14px;
  background: #f1fbf4;
}
.mm-tee-ship svg { flex: 0 0 auto; width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: #1fae55; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; box-sizing: border-box; }
.mm-tee-ship b { display: block; color: #146c39; font-size: 14.5px; font-weight: 900; line-height: 1.25; }
.mm-tee-ship small { display: block; color: #4f7a5f; font-size: 12.5px; line-height: 1.3; }

/* Touch: the print area of a placed logo is a drag handle (no page panning there); elsewhere the page scrolls. */
.mm-tee-svg.has-logo .mm-tee-zone.is-active,
.mm-tee-svg .mm-tee-item { touch-action: none; cursor: grab; }
