.tebba-size {
  --tebba-purple: #5b256e;
  --tebba-purple-dark: #4a1e59;
  --tebba-purple-hover: #6d3384;
  --tebba-bg: #f7f2fa;
  --tebba-border: #e6d8ee;
  --tebba-text: #3f2a47;
  --tebba-muted: #7a6a80;
  margin: 54px 0 60px;
  color: var(--tebba-text);
}

.tebba-size *,
.tebba-size *::before,
.tebba-size *::after {
  box-sizing: border-box;
}

.tebba-size__shell {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  overflow: hidden;
  border: 1px solid var(--tebba-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(74, 30, 89, .11);
}

.tebba-size__guide {
  position: relative;
  min-height: 500px;
  padding: 58px 54px 38px;
  overflow: hidden;
  background: linear-gradient(145deg, #4a1e59 0%, #652879 100%);
  color: #fff;
}

.tebba-size__guide::before,
.tebba-size__guide::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 50%;
}

.tebba-size__guide::before {
  width: 280px;
  height: 280px;
  right: -150px;
  top: -115px;
}

.tebba-size__guide::after {
  width: 200px;
  height: 200px;
  left: -105px;
  bottom: -110px;
}

.tebba-size__eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .17em;
  color: #ead9f0;
}

.tebba-size__guide h2 {
  margin: 0 0 16px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 3.2vw, 47px);
  font-weight: 400;
  line-height: 1.08;
}

.tebba-size__intro {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 16px;
  line-height: 1.65;
}

.tebba-size__steps {
  display: grid;
  gap: 16px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.tebba-size__steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  color: rgba(255, 255, 255, .9);
  font-size: 14px;
  line-height: 1.45;
}

.tebba-size__step-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 50%;
  font-weight: 700;
}

.tebba-size__foot {
  position: absolute;
  right: 30px;
  bottom: 20px;
  width: 230px;
  opacity: .14;
  pointer-events: none;
}

.tebba-size__foot svg {
  display: block;
  width: 100%;
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.tebba-size__foot .tebba-size__ruler {
  stroke-width: 1.5;
}

.tebba-size__calculator {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 54px;
  background: linear-gradient(180deg, #fff 0%, #fdfafd 100%);
}

.tebba-size__field label,
.tebba-size__allowance legend {
  display: block;
  width: auto;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  color: var(--tebba-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.tebba-size__input-wrap {
  position: relative;
}

.tebba-size__input-wrap input {
  width: 100%;
  height: 54px;
  padding: 0 64px 0 18px;
  border: 1px solid var(--tebba-border);
  border-radius: 14px;
  background: #fff;
  color: var(--tebba-text);
  font-size: 18px;
  font-weight: 600;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.tebba-size__input-wrap input:focus {
  border-color: var(--tebba-purple);
  box-shadow: 0 0 0 3px rgba(91, 37, 110, .12);
}

.tebba-size__input-wrap span {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tebba-muted);
  font-weight: 600;
}

.tebba-size__field > small {
  display: block;
  margin-top: 7px;
  color: var(--tebba-muted);
  font-size: 12px;
}

.tebba-size__error {
  margin-top: 8px;
  color: #9e455a;
  font-size: 13px;
  font-weight: 600;
}

.tebba-size__allowance {
  min-width: 0;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.tebba-size__choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tebba-size__choices label {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.tebba-size__choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.tebba-size__choices label > span {
  display: flex;
  min-height: 74px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border: 1px solid var(--tebba-border);
  border-radius: 14px;
  background: #fff;
  text-align: center;
  transition: border-color .2s, background .2s, box-shadow .2s;
}

.tebba-size__choices strong {
  color: var(--tebba-purple-dark);
  font-size: 18px;
}

.tebba-size__choices small {
  margin-top: 3px;
  color: var(--tebba-muted);
  font-size: 11px;
  font-weight: 400;
}

.tebba-size__choices input:checked + span {
  border-color: var(--tebba-purple);
  background: var(--tebba-bg);
  box-shadow: inset 0 0 0 1px var(--tebba-purple);
}

.tebba-size__choices input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(91, 37, 110, .16);
}

.tebba-size__calculate,
.tebba-size__products {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--tebba-purple);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background .2s, transform .2s, box-shadow .2s;
}

.tebba-size__calculate {
  width: 100%;
  margin-top: 24px;
}

.tebba-size__calculate:hover,
.tebba-size__calculate:focus,
.tebba-size__products:hover,
.tebba-size__products:focus {
  background: var(--tebba-purple-hover);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(74, 30, 89, .18);
  transform: translateY(-1px);
  outline: none;
}

.tebba-size__result {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--tebba-border);
  border-radius: 16px;
  background: var(--tebba-bg);
  text-align: center;
}

.tebba-size__result[hidden] {
  display: none;
}

.tebba-size__result-label {
  display: block;
  color: var(--tebba-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tebba-size__result > strong {
  display: block;
  margin: 6px 0;
  color: var(--tebba-purple-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 400;
}

.tebba-size__result p {
  margin: 0;
  color: var(--tebba-text);
}

.tebba-size__result > small {
  display: block;
  margin-top: 5px;
  color: var(--tebba-muted);
}

.tebba-size__products {
  margin-top: 16px;
  padding: 0 26px;
}

.tebba-size__note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 20px 0 0;
  color: var(--tebba-muted);
  font-size: 11px;
  line-height: 1.5;
}

.tebba-size__note svg {
  width: 17px;
  min-width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.5;
}

@media (max-width: 991px) {
  .tebba-size {
    margin: 40px 0 48px;
  }

  .tebba-size__shell {
    grid-template-columns: 1fr;
  }

  .tebba-size__guide {
    min-height: 0;
    padding: 42px 38px;
  }

  .tebba-size__foot {
    right: 22px;
    bottom: 8px;
    width: 190px;
  }

  .tebba-size__calculator {
    padding: 42px 38px;
  }
}

@media (max-width: 575px) {
  .tebba-size {
    margin: 30px 0 38px;
  }

  .tebba-size__shell {
    border-radius: 18px;
  }

  .tebba-size__guide,
  .tebba-size__calculator {
    padding: 32px 22px;
  }

  .tebba-size__guide h2 {
    font-size: 34px;
  }

  .tebba-size__intro {
    font-size: 15px;
  }

  .tebba-size__steps {
    margin-top: 26px;
  }

  .tebba-size__foot {
    display: none;
  }

  .tebba-size__choices {
    grid-template-columns: 1fr;
  }

  .tebba-size__choices label > span {
    min-height: 58px;
    flex-direction: row;
    gap: 8px;
  }

  .tebba-size__choices small {
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tebba-size *,
  .tebba-size *::before,
  .tebba-size *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Odkaz z detailu produktu – zobrazuje se pouze u nastavených kategorií obuvi. */
@media (min-width: 992px) {
  #product-product .tebba-gallery {
    padding-right: 12px !important;
  }

  #product-product .tebba-buy-column {
    padding-left: 12px !important;
  }
}

#product-product .tebba-cart-row {
  flex-wrap: wrap;
}

#product-product .tebba-cart-row > #button-cart {
  width: auto;
  min-width: 180px;
  flex: 1 1 180px;
}

.tebba-size-product-link {
  display: flex;
  flex: 1 0 100%;
  width: 100%;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid #e6d8ee;
  border-radius: 12px;
  background: #f7f2fa;
  color: #4a1e59;
  text-decoration: none;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .2s;
}

#product-product .tebba-cart-row > .tebba-size-product-link {
  order: 20;
}

.tebba-size-product-link:hover,
.tebba-size-product-link:focus {
  border-color: #5b256e;
  background: #fff;
  color: #5b256e;
  text-decoration: none;
  box-shadow: 0 7px 18px rgba(74, 30, 89, .1);
  transform: translateY(-1px);
  outline: none;
}

.tebba-size-product-link__icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 50%;
  background: #5b256e;
  color: #fff;
}

.tebba-size-product-link__icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.tebba-size-product-link__copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  line-height: 1.35;
}

.tebba-size-product-link__copy strong {
  color: inherit;
  font-size: 14px;
}

.tebba-size-product-link__copy small {
  margin-top: 2px;
  color: #7a6a80;
  font-size: 11px;
}

.tebba-size-product-link__arrow {
  flex: 0 0 auto;
  font-size: 21px;
  line-height: 1;
}

.tebba-footwear-benefits {
  display: grid;
  width: 100%;
  flex: 1 0 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 17px 0 0;
  padding: 17px 0 0;
  border-top: 1px solid #ece5ed;
}

#product-product .tebba-cart-row > .tebba-footwear-benefits {
  order: 30;
}

.tebba-footwear-benefit {
  display: grid;
  min-width: 0;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 0 12px;
}

.tebba-footwear-benefit:first-child {
  padding-left: 0;
}

.tebba-footwear-benefit:last-child {
  padding-right: 0;
}

.tebba-footwear-benefit + .tebba-footwear-benefit {
  border-left: 1px solid #ece5ed;
}

.tebba-footwear-benefit__icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #5b256e;
}

.tebba-footwear-benefit__icon svg {
  display: block;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.tebba-footwear-benefit__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.25;
}

.tebba-footwear-benefit__copy strong {
  color: #3f2a47;
  font-size: 11px;
  font-weight: 700;
}

.tebba-footwear-benefit__copy small {
  margin-top: 3px;
  color: #7a6a80;
  font-size: 9px;
}

@media (max-width: 575px) {
  #product-product .tebba-cart-row > #button-cart {
    width: 100%;
    flex-basis: 100%;
  }

  .tebba-size-product-link {
    padding: 12px;
  }

  .tebba-footwear-benefits {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .tebba-footwear-benefit,
  .tebba-footwear-benefit:first-child,
  .tebba-footwear-benefit:last-child {
    padding: 0;
  }

  .tebba-footwear-benefit + .tebba-footwear-benefit {
    padding-top: 11px;
    border-top: 1px solid #f0eaf1;
    border-left: 0;
  }

  .tebba-footwear-benefit__copy strong {
    font-size: 12px;
  }

  .tebba-footwear-benefit__copy small {
    font-size: 10px;
  }
}
