:root {
  color-scheme: dark;
  --page: #030405;
  --surface: #080a0d;
  --surface-soft: #10141a;
  --surface-raised: #0d1015;
  --text: #ffffff;
  --muted: #9da8b7;
  --border: #202631;
  --cyan: #009eee;
  --cyan-soft: rgba(0, 158, 238, 0.16);
  --pink: #ff1493;
  --pink-soft: rgba(255, 20, 147, 0.18);
  --violet: #a86cff;
  --green-bright: #28e343;
  --panel-blue: #11142a;
  --panel-blue-soft: #171b3b;
  --field-dark: #0d111c;
  --danger: #ff5a7d;
  --success: #1fbf4a;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 20, 147, 0.18), transparent 26rem),
    radial-gradient(circle at 88% 14%, rgba(0, 158, 238, 0.22), transparent 28rem),
    linear-gradient(180deg, #050607 0%, #030405 58%, #061722 100%);
  background-attachment: fixed;
  color: var(--text);
}

body.is-product-page-body {
  min-height: 0;
  background: #000000;
  background-attachment: initial;
}

button,
input,
select,
textarea {
  font: inherit;
}

.calculator {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding-bottom: 14px;
  font-weight: 700;
}

.product-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.product-card {
  display: grid;
  align-content: center;
  gap: 9px;
  min-height: 96px;
  padding: 15px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 20, 26, 0.94), rgba(5, 6, 7, 0.94));
  color: var(--text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.product-card:hover {
  border-color: var(--cyan);
}

.product-card.is-active {
  border-color: var(--pink);
  background:
    linear-gradient(180deg, rgba(255, 20, 147, 0.18), rgba(0, 158, 238, 0.08)),
    var(--surface);
  box-shadow: 0 0 0 1px rgba(255, 20, 147, 0.28), 0 18px 48px rgba(0, 0, 0, 0.45);
}

.product-name {
  color: #ffffff;
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  font-weight: 950;
  line-height: 1.05;
  text-shadow: 0 0 14px rgba(0, 158, 238, 0.25);
}

.product-copy {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.25;
}

.preset-sizes,
.finish-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.preset-sizes.has-graphic-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 124px;
  gap: 10px;
}

.custom-size-heading,
.preset-size-heading {
  margin: 2px 0 -2px;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.2;
}

.preset-size-heading {
  margin-top: 2px;
}

.preset-size {
  border: 1px solid transparent;
  border-radius: 10px;
  background: #192048;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.preset-size-graphic {
  height: 100%;
  min-height: 0;
  padding: 8px 8px 10px;
  border-color: var(--cyan);
  border-radius: 8px;
  background: #0b1020;
  display: grid;
  grid-template-rows: 80px auto;
  justify-items: center;
  align-items: end;
  gap: 7px;
  overflow: hidden;
}

.preset-size:hover,
.preset-size.is-active {
  background: var(--violet);
  border-color: var(--green-bright);
  color: #10131f;
  box-shadow: none;
}

.preset-size-art {
  width: 100%;
  height: 80px;
  min-height: 0;
  display: grid;
  place-items: end center;
}

.preset-size-ghost {
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 9px 12px rgba(0, 0, 0, 0.38));
  pointer-events: none;
}

.preset-ghost-5 {
  width: 43px;
  max-height: 56px;
}

.preset-ghost-7 {
  width: 58px;
  max-height: 68px;
}

.preset-ghost-9 {
  width: 78px;
  max-height: 82px;
}

.preset-ghost-12 {
  width: min(196px, 150%);
  max-width: none;
  max-height: 132px;
  transform: translateY(1px) scale(1.22);
  transform-origin: center bottom;
}

.preset-size-label {
  font-size: 0.9rem;
  font-weight: 950;
  letter-spacing: 0;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.74fr) minmax(430px, 1.25fr) minmax(280px, 0.82fr);
  gap: 10px;
  align-items: start;
}

.controls-column,
.summary-column {
  display: grid;
  gap: 10px;
}

.panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 0;
  border-radius: 18px;
  background: var(--panel-blue);
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.25;
}

.panel h2::after {
  content: "";
  display: block;
  width: 38px;
  height: 2px;
  margin-top: 6px;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
}

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

.product-options-grid {
  grid-template-columns: minmax(0, 1fr);
}

.dimensions-grid input {
  text-align: center;
  font-weight: 800;
}

label {
  display: grid;
  gap: 5px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.field-help {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid #6f7783;
  border-radius: 50%;
  color: #aeb6c2;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  cursor: help;
  outline: none;
}

.field-help::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 5;
  width: min(280px, 72vw);
  max-width: calc(100vw - 32px);
  padding: 8px 10px;
  border: 1px solid rgba(0, 158, 238, 0.35);
  border-radius: 8px;
  background: #10141a;
  color: #d6e3ef;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  pointer-events: none;
}

.field-help:hover::after,
.field-help:focus::after,
.field-help:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .field-help::after {
    left: 0;
    right: auto;
    width: min(250px, calc(100vw - 44px));
  }
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(166, 180, 220, 0.22);
  border-radius: 10px;
  background: var(--field-dark);
  color: var(--text);
  padding: 8px 10px;
  outline-color: var(--cyan);
  font-weight: 800;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 158, 238, 0.18);
}

textarea {
  min-height: 64px;
  resize: vertical;
}

.hint,
.error {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.32;
}

.hint {
  color: var(--muted);
}

.contact-note a {
  color: var(--cyan);
  font-weight: 800;
  text-decoration: none;
}

.contact-note {
  text-align: center;
}

.contact-note a:hover {
  text-decoration: underline;
}

.error {
  color: var(--danger);
  font-weight: 700;
}

.secondary-action,
.primary-action,
.link-action {
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

.secondary-action {
  justify-self: start;
  border: 1px solid var(--cyan);
  background: rgba(0, 158, 238, 0.1);
  color: var(--cyan);
  padding: 8px 10px;
}

.add-line-action {
  width: 100%;
  justify-self: stretch;
  border-color: #19a934;
  background: #19a934;
  color: #ffffff;
}

.add-line-action:hover {
  filter: brightness(1.06);
}

.link-action {
  width: 100%;
  border: 1px solid rgba(0, 158, 238, 0.72);
  background: rgba(0, 158, 238, 0.1);
  color: var(--cyan);
  padding: 8px 10px;
}

.link-action:hover {
  background: rgba(0, 158, 238, 0.18);
}

.primary-action {
  width: 100%;
  border: 1px solid var(--pink);
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  color: #ffffff;
  padding: 11px 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.primary-action:hover {
  filter: brightness(1.08);
}

.primary-action:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  filter: none;
}

.price-panel {
  gap: 6px;
  border-color: rgba(0, 158, 238, 0.42);
}

.calculator.is-product-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding-bottom: 14px;
}

.calculator.is-product-page .product-picker,
.calculator.is-product-page .order-steps,
.calculator.is-product-page .finish-buttons {
  display: none !important;
}

.calculator.is-product-page .calculator-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.74fr) minmax(430px, 1.25fr) minmax(280px, 0.82fr);
  gap: 10px;
  align-items: start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.calculator.is-product-page .controls-column,
.calculator.is-product-page .summary-column {
  display: grid;
  gap: 10px;
}

.calculator.is-product-page .panel {
  gap: 12px;
  padding: 18px;
  border: 0;
  border-radius: 18px;
  background: var(--panel-blue);
  box-shadow: var(--shadow);
}

.calculator.is-product-page .panel h2::after {
  display: block;
}

.calculator.is-product-page .compact-options h2,
.calculator.is-product-page .upload-panel h2 {
  font-size: 0.86rem;
}

.calculator.is-product-page .dimensions-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calculator.is-product-page .field-grid {
  gap: 7px;
}

.calculator.is-product-page label {
  gap: 4px;
  font-size: 0.82rem;
}

.calculator.is-product-page input,
.calculator.is-product-page select,
.calculator.is-product-page textarea {
  min-height: 0;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 0.84rem;
}

.calculator.is-product-page textarea {
  min-height: 52px;
}

.calculator.is-product-page .hint,
.calculator.is-product-page .error {
  font-size: 0.78rem;
  line-height: 1.24;
}

.calculator.is-product-page .custom-size-heading {
  margin-top: 0;
  font-size: 0.82rem;
}

.calculator.is-product-page .preset-sizes,
.calculator.is-product-page .finish-buttons {
  gap: 8px;
}

.calculator.is-product-page .preset-sizes.has-graphic-presets {
  grid-auto-rows: 120px;
  gap: 10px;
}

.calculator.is-product-page .preset-size {
  padding: 8px 12px;
  font-size: 0.78rem;
}

.calculator.is-product-page .preset-size.preset-size-graphic {
  height: 100%;
  min-height: 0;
  padding: 8px 8px 10px;
  font-size: 0.88rem;
}

.calculator.is-product-page .preset-size-art {
  height: 74px;
  min-height: 0;
}

.calculator.is-product-page .preset-ghost-5 {
  width: 41px;
}

.calculator.is-product-page .preset-ghost-7 {
  width: 56px;
}

.calculator.is-product-page .preset-ghost-9 {
  width: 76px;
}

.calculator.is-product-page .preset-ghost-12 {
  width: min(190px, 150%);
  max-height: 126px;
  transform: translateY(1px) scale(1.25);
}

.calculator.is-product-page .pricing-main {
  min-height: 0;
  align-self: stretch;
  align-content: start;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 8px;
}

.calculator.is-product-page .pricing-heading {
  display: grid;
}

.calculator.is-product-page .price-panel {
  border-color: rgba(0, 158, 238, 0.42);
}

.calculator.is-product-page .price-panel .label,
.calculator.is-product-page .price-panel .net-price {
  font-size: 0.78rem;
}

.calculator.is-product-page .price-panel .price {
  font-size: clamp(1.75rem, 2.5vw, 2.45rem);
}

.calculator.is-product-page table {
  border-spacing: 0 2px;
  font-size: 0.82rem;
}

.calculator.is-product-page th,
.calculator.is-product-page td {
  padding: 5px 8px;
}

.calculator.is-product-page th:nth-child(3),
.calculator.is-product-page td:nth-child(3) {
  color: #ffffff;
  font-weight: 950;
  text-shadow: 0 0 12px rgba(0, 158, 238, 0.22);
}

.calculator.is-product-page tr.is-selected td:nth-child(3) {
  color: #07120b;
  text-shadow: none;
}

.calculator.is-product-page .custom-quantity {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin-top: 0;
  padding-top: 8px;
}

.calculator.is-product-page .contact-note {
  font-size: 0.76rem;
}

.quantity-savings {
  display: grid;
  gap: 3px;
  justify-items: center;
  width: 100%;
  align-self: end;
  margin-top: 4px;
  padding: 13px 14px;
  border-radius: 9px;
  background: #2d2550;
  text-align: center;
}

.quantity-savings span {
  color: #b8c0d1;
  font-size: 0.78rem;
  font-weight: 900;
}

.quantity-savings strong {
  color: #68ff91;
  font-size: clamp(1.35rem, 2vw, 1.62rem);
  font-weight: 950;
  line-height: 1.05;
  text-shadow: 0 0 14px rgba(34, 232, 91, 0.22);
}

.calculator.is-product-page .file-preview {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  padding: 6px;
}

.calculator.is-product-page .file-preview img,
.calculator.is-product-page .file-preview-badge {
  width: 52px;
  height: 40px;
}

.calculator.is-product-page .add-line-action {
  padding: 9px 10px;
}

.label,
.net-price {
  color: var(--muted);
}

.price {
  color: #ffffff;
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  line-height: 1;
  text-shadow: 0 0 18px rgba(0, 158, 238, 0.45);
}

.shipping-note.is-free {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid rgba(31, 191, 74, 0.42);
  border-radius: 999px;
  background: rgba(31, 191, 74, 0.12);
  color: #7ff0a1;
  padding: 5px 9px;
  font-weight: 900;
}

.summary-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.summary-list div {
  display: grid;
  grid-template-columns: minmax(110px, 0.72fr) minmax(0, 1.28fr);
  gap: 7px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}

.summary-list div:last-child {
  border-bottom: 0;
}

.summary-list dt {
  color: var(--muted);
  font-size: 0.9rem;
}

.summary-list dd {
  margin: 0;
  font-weight: 800;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
}

.pricing-main {
  position: relative;
  min-height: 100%;
  background: var(--panel-blue);
}

.pricing-main::before {
  content: none;
}

.pricing-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.pricing-heading h2 {
  font-size: 1.05rem;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  font-size: 0.93rem;
}

th,
td {
  padding: 8px 9px;
  border-bottom: 0;
  text-align: right;
  font-weight: 800;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

thead th {
  color: var(--cyan);
  font-weight: 800;
  padding-top: 2px;
  padding-bottom: 4px;
}

tbody tr {
  cursor: pointer;
  background: transparent;
  outline: 0;
  box-shadow: none;
  transition: transform 0.16s ease;
}

tbody td {
  background: #151928;
  transition: box-shadow 0.16s ease, background 0.16s ease;
}

tbody tr:hover {
  transform: translateY(-1px);
}

tbody tr:hover td {
  background: rgba(0, 158, 238, 0.12);
  box-shadow: inset 0 0 0 1px rgba(0, 158, 238, 0.6);
}

tr.is-selected {
  color: #07120b;
}

tr.is-selected td,
tr.is-selected:hover td {
  background: var(--violet);
}

tr.is-selected td:first-child {
  box-shadow:
    inset 1px 0 0 rgba(40, 227, 67, 0.68),
    inset 0 1px 0 rgba(40, 227, 67, 0.68),
    inset 0 -1px 0 rgba(40, 227, 67, 0.68);
}

tr.is-selected td:not(:first-child):not(:last-child) {
  box-shadow:
    inset 0 1px 0 rgba(40, 227, 67, 0.68),
    inset 0 -1px 0 rgba(40, 227, 67, 0.68);
}

tr.is-selected td:last-child {
  box-shadow:
    inset -1px 0 0 rgba(40, 227, 67, 0.68),
    inset 0 1px 0 rgba(40, 227, 67, 0.68),
    inset 0 -1px 0 rgba(40, 227, 67, 0.68);
}

tr.is-selected td,
tr.is-selected .table-select {
  color: #07120b;
  text-shadow: none;
}

.table-select {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  font-weight: 800;
  font-size: 0.93rem;
  cursor: pointer;
}

tbody tr td:first-child {
  border-radius: 10px 0 0 10px;
}

tbody tr td:last-child {
  border-radius: 0 10px 10px 0;
}

.compact-options {
  gap: 8px;
}

.compact-options h2,
.upload-panel h2 {
  font-size: 1rem;
}

.tag {
  display: inline-block;
  margin-left: 5px;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  vertical-align: middle;
}

.custom-quantity {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(32, 38, 49, 0.95);
}

.custom-quantity input {
  font-weight: 800;
  text-align: center;
}

[hidden] {
  display: none !important;
}

.payload {
  display: none;
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.28s ease, transform 0.28s ease, border-color 0.18s ease, background 0.18s ease;
}

.payload.is-success {
  border-color: rgba(31, 191, 74, 0.42);
  background: rgba(31, 191, 74, 0.12);
  color: #7ff0a1;
  font-weight: 800;
}

.payload.is-error {
  border-color: rgba(255, 86, 134, 0.58);
  background: rgba(255, 86, 134, 0.12);
  color: #ffb4c9;
  font-weight: 800;
}

.payload.is-loading {
  position: relative;
  padding-left: 38px;
  border-color: rgba(166, 102, 255, 0.6);
  background: rgba(45, 37, 80, 0.9);
  color: #ffffff;
  font-weight: 900;
}

.payload.is-loading::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #68ff91;
  border-radius: 50%;
  animation: bg-spin 0.72s linear infinite;
}

.payload.is-hiding {
  opacity: 0;
  transform: translateY(6px);
}

.add-line-action.is-loading {
  position: relative;
  color: transparent;
}

.add-line-action.is-loading::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.48);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: bg-spin 0.72s linear infinite;
}

@keyframes bg-spin {
  to {
    transform: rotate(360deg);
  }
}

.file-preview {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(0, 158, 238, 0.35);
  border-radius: 8px;
  background: rgba(0, 158, 238, 0.08);
}

.file-preview img,
.file-preview-badge {
  width: 68px;
  height: 52px;
  border-radius: 7px;
}

.file-preview img {
  object-fit: cover;
  background: #ffffff;
}

.file-preview-badge {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 20, 147, 0.95), rgba(0, 158, 238, 0.95));
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

.file-preview strong,
.file-preview span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-preview strong {
  color: #ffffff;
  font-size: 0.86rem;
}

.file-preview span {
  color: var(--muted);
  font-size: 0.78rem;
}

.order-steps {
  position: relative;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(0, 158, 238, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 20, 147, 0.16), transparent 18rem),
    radial-gradient(circle at 92% 6%, rgba(0, 158, 238, 0.18), transparent 20rem),
    rgba(8, 10, 13, 0.92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.order-steps::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 20, 147, 0.22), transparent 22%, transparent 78%, rgba(0, 158, 238, 0.2)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%);
}

.steps-heading {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  text-align: center;
}

.steps-heading span {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.steps-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.1;
  text-shadow: 0 0 18px rgba(0, 158, 238, 0.24);
}

.steps-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 188px;
  padding: 14px;
  border: 1px solid rgba(32, 38, 49, 0.95);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(16, 20, 26, 0.92), rgba(5, 6, 7, 0.92)),
    var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.step-card::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  opacity: 0.8;
}

.step-number {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(0, 158, 238, 0.5);
  border-radius: 50%;
  background: rgba(0, 158, 238, 0.1);
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 950;
  box-shadow: 0 0 18px rgba(0, 158, 238, 0.16);
}

.step-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.15;
}

.step-card p {
  margin: 0;
  color: #b9c7d6;
  font-size: 0.86rem;
  line-height: 1.38;
}

.step-card-wide {
  border-color: rgba(255, 20, 147, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 20, 147, 0.12), rgba(0, 158, 238, 0.08)),
    rgba(8, 10, 13, 0.96);
}

@media (max-width: 1080px) {
  .calculator-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  }

  .calculator.is-product-page .calculator-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .calculator.is-product-page .controls-column {
    display: contents;
  }

  .calculator.is-product-page .pricing-main,
  .calculator.is-product-page .summary-column,
  .calculator.is-product-page .controls-column,
  .calculator.is-product-page .compact-options,
  .calculator.is-product-page .configuration-panel {
    grid-column: auto;
    width: 100%;
    max-width: 100%;
  }

  .calculator.is-product-page .compact-options {
    order: 1;
  }

  .calculator.is-product-page .configuration-panel {
    order: 3;
    align-self: stretch;
  }

  .calculator.is-product-page .pricing-main {
    order: 2;
    grid-row: auto;
  }

  .calculator.is-product-page .summary-column {
    order: 4;
  }

  .pricing-main {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .summary-column {
    grid-column: 1;
  }

  .controls-column {
    grid-column: 2;
  }

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

  .step-card-wide {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .calculator-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

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

  .controls-column {
    display: contents;
  }

  .pricing-main,
  .summary-column,
  .controls-column,
  .compact-options,
  .configuration-panel {
    grid-column: auto;
    width: 100%;
    max-width: 100%;
  }

  .compact-options {
    order: 1;
  }

  .pricing-main {
    order: 2;
    grid-row: auto;
  }

  .configuration-panel {
    order: 3;
    width: 100%;
    align-self: stretch;
  }

  .summary-column {
    order: 4;
    width: 100%;
  }

  .pricing-heading {
    display: grid;
  }

  .order-steps {
    padding: 14px;
  }

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

  .step-card,
  .step-card-wide {
    grid-column: auto;
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .product-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .calculator {
    width: calc(100% - 20px);
    max-width: 1180px;
    margin: 0 auto 10px;
  }

  .product-picker {
    grid-template-columns: 1fr;
  }

  .summary-list div {
    grid-template-columns: 1fr;
  }

  .configuration-panel .link-action {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .calculator {
    width: calc(100% - 12px);
    max-width: 1180px;
    margin: 0 auto 6px;
  }

  .calculator.is-product-page {
    width: calc(100% - 12px);
    max-width: 1180px;
  }

  .calculator.is-product-page .calculator-layout {
    gap: 8px;
  }

  .calculator.is-product-page .dimensions-grid,
  .calculator.is-product-page .field-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 10px;
  }

  .pricing-main {
    overflow: hidden;
  }

  .table-wrap {
    overflow-x: visible;
  }

  table {
    table-layout: fixed;
    font-size: 0.86rem;
  }

  th,
  td {
    padding: 7px 5px;
  }

  th:first-child,
  td:first-child {
    width: 45%;
  }

  th:nth-child(2),
  td:nth-child(2) {
    width: 27%;
  }

  th:nth-child(3),
  td:nth-child(3) {
    width: 28%;
  }

  .table-select {
    font-size: 0.86rem;
    line-height: 1.15;
    white-space: normal;
  }

  .tag {
    display: inline-block;
    width: auto;
    margin: 0 0 0 4px;
    font-size: 0.95rem;
    line-height: 1.15;
  }

  .custom-quantity {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 370px) {
  table {
    font-size: 0.8rem;
  }

  th,
  td {
    padding-inline: 4px;
  }

  .table-select {
    font-size: 0.8rem;
  }
}

.calculator.is-product-page[data-product="foil"] .field-grid:not(.dimensions-grid) {
  grid-template-columns: minmax(0, 1fr);
}

.calculator.is-product-page .summary-column {
  width: 100%;
}

.calculator.is-product-page .upload-panel {
  width: 100%;
}

.calculator.is-product-page.is-force-mobile {
  width: calc(100% - 12px);
  max-width: 1180px;
  margin: 0 auto 6px;
}

.calculator.is-product-page.is-force-mobile .calculator-layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.calculator.is-product-page.is-force-mobile .controls-column {
  display: contents;
}

.calculator.is-product-page.is-force-mobile .pricing-main,
.calculator.is-product-page.is-force-mobile .summary-column,
.calculator.is-product-page.is-force-mobile .controls-column,
.calculator.is-product-page.is-force-mobile .compact-options,
.calculator.is-product-page.is-force-mobile .configuration-panel {
  grid-column: auto;
  width: 100%;
  max-width: 100%;
}

.calculator.is-product-page.is-force-mobile .compact-options {
  order: 1;
}

.calculator.is-product-page.is-force-mobile .pricing-main {
  order: 2;
  grid-row: auto;
}

.calculator.is-product-page.is-force-mobile .configuration-panel {
  order: 3;
  align-self: stretch;
}

.calculator.is-product-page.is-force-mobile .summary-column {
  order: 4;
}

.calculator.is-product-page.is-force-mobile .field-grid {
  grid-template-columns: 1fr;
}
