.shower-calc-section {
  padding: 8px 0 40px;
}

.shower-calc-section .wrap {
  width: min(1560px, calc(100% - 24px));
}

.shc {
  scroll-margin-top: 104px;
  display: grid;
  grid-template-columns: minmax(340px, 0.78fr) minmax(520px, 1.42fr);
  align-items: start;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(17, 17, 17, 0.08);
  overflow: hidden;
}

.shc__form {
  padding: 22px 22px 18px;
  min-width: 0;
}

.shc__title {
  margin: 0 0 16px;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.shc__step {
  margin: 0 0 14px;
}

.shc__label {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 700;
}

.shc__types {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.shc__type {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 78px;
  padding: 8px 4px 7px;
  border: 1.5px solid #e3e3e3;
  border-radius: 12px;
  background: #fff;
  color: #222;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
}

.shc__num {
  position: absolute;
  top: 3px;
  left: 4px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  pointer-events: none;
}

.shc__type.is-active .shc__num {
  background: #111;
  color: #fff;
}

.shc__type svg {
  width: 34px;
  height: 28px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shc__type.is-active {
  border-color: #111;
  background: #f3f4f6;
  box-shadow: inset 0 0 0 1px #111;
}

.shc__dims {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 92px;
  gap: 10px;
  align-items: end;
}

.shc__dim[hidden],
.shc__pill[hidden] {
  display: none !important;
}

.shc__dim span,
.shc__group-name {
  display: block;
  margin-bottom: 4px;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 700;
}

.shc__dim input[type="number"] {
  width: 100%;
  height: 38px;
  padding: 0 8px;
  border: 1.5px solid #e3e3e3;
  border-radius: 10px;
  background: #fff;
  color: #111;
  font: inherit;
  font-weight: 700;
  text-align: center;
}

.shc__dim input[type="range"] {
  width: 100%;
  margin: 8px 0 0;
  accent-color: #111;
}

.shc__sketch {
  width: 92px;
  height: 78px;
}

.shc__sketch text {
  font-size: 11px;
  fill: #6b7280;
  font-family: inherit;
}

.shc__group + .shc__group {
  margin-top: 8px;
}

.shc__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shc__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1.5px solid #e3e3e3;
  border-radius: 999px;
  background: #fff;
  color: #222;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.shc__pill.is-active {
  border-color: #111;
  background: #111;
  color: #fff;
}

.shc__swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: var(--swatch, #c5c8ce);
}

.shc__pill.is-active .shc__swatch {
  border-color: rgba(255, 255, 255, 0.7);
}

.shc__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.shc__price-label {
  margin: 0;
  color: #6b7280;
  font-size: 0.84rem;
}

.shc__price {
  margin: 2px 0 0;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.shc__note {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 0.75rem;
  line-height: 1.35;
}

.shc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shc__actions .btn {
  min-height: 42px;
  padding: 10px 16px;
  font-size: 0.86rem;
}

.shc__visual {
  min-width: 0;
  background: #f7f5f1;
}

.shc__photo {
  position: relative;
  width: 100%;
  /* Same ratio as the photo file → full size, no crop, no empty bars */
  aspect-ratio: 4 / 3;
  background: #ebe6de;
  isolation: isolate;
  overflow: hidden;
}

.shc__photo img[data-shc-photo] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* photo is already 4:3 — fill the box 1:1 with the mask */
  object-fit: fill;
  object-position: center center;
  image-rendering: auto;
  transition: opacity 0.2s ease;
  z-index: 1;
}

/* SVG glass fill — vectors stay sharp at any scale (PNG mask was rounding corners when scaled) */
.shc__glass-tint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  overflow: visible;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.shc__glass-tint path {
  stroke: none;
  stroke-linejoin: miter;
  stroke-linecap: butt;
}

.shc__photo[data-shc-glass]:not([data-shc-glass=""]) .shc__glass-tint {
  opacity: 1;
}

.shc__photo[data-shc-glass="graphite"] .shc__glass-tint {
  color: rgba(42, 48, 58, 0.55);
}

.shc__photo[data-shc-glass="bronze"] .shc__glass-tint {
  color: rgba(120, 72, 36, 0.48);
}

.shc__photo[data-shc-glass="extra"] .shc__glass-tint {
  color: rgba(245, 250, 255, 0.22);
}

.shc__photo[data-shc-glass="satin"] .shc__glass-tint,
.shc__photo[data-shc-glass="satin-art"] .shc__glass-tint {
  color: rgba(232, 236, 242, 0.55);
}

.shc__caption {
  padding: 12px 16px 16px;
  border-top: 1px solid #ece7e0;
  background: #fff;
}

.shc__caption strong,
.shc__caption span {
  display: block;
}

.shc__caption strong {
  font-size: 0.92rem;
}

.shc__caption span {
  margin-top: 2px;
  color: #4b5563;
  font-size: 0.78rem;
  line-height: 1.35;
}

@media (max-width: 980px) {
  .shc__types {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .shc__visual {
    position: sticky;
    top: 12px;
  }
}

@media (max-width: 1099px) and (min-width: 861px) {
  .shc {
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.25fr);
  }
}

@media (max-width: 860px) {
  .shc {
    grid-template-columns: 1fr;
  }

  .shc__visual {
    order: -1;
  }

  .shc__photo img[data-shc-photo] {
    object-fit: fill;
    object-position: center;
  }

  .shc__dims {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shc__sketch {
    display: none;
  }
}

@media (max-width: 560px) {
  .shc__form {
    padding: 16px 14px 14px;
  }

  .shc__types {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shc__dims {
    grid-template-columns: 1fr;
  }

  .shc__actions,
  .shc__actions .btn {
    width: 100%;
  }
}
