html {
  scroll-behavior: smooth;
}

.buy-page {
  background: #ffffff;
  color: var(--ink);
}

.buy-shell {
  width: min(1180px, calc(100% - var(--gutter) * 2));
  margin: 0 auto;
}

.buy-breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 28px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.buy-breadcrumb a {
  color: var(--muted);
}

.buy-breadcrumb a:hover {
  color: var(--brand);
}

.buy-heading {
  max-width: 760px;
  margin-top: 22px;
}

.buy-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(44px, 5.8vw, 72px);
  font-weight: 650;
  letter-spacing: -0.06em;
  line-height: 1.05;
}

.buy-heading p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.buy-models-section {
  margin-top: clamp(34px, 5vw, 54px);
}

.buy-models-section h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.buy-models {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.buy-model {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 13px;
  border: 2px solid transparent;
  border-radius: 20px;
  background: #f5f7fb;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease);
}

.buy-model:hover {
  transform: translateY(-2px);
  background: #ffffff;
}

.buy-model.is-active {
  border-color: var(--brand);
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(14, 82, 240, 0.1);
}

.buy-model__visual {
  display: grid;
  place-items: center;
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-radius: 13px;
  background: #ffffff;
}

.buy-model__visual img {
  display: block;
  width: auto;
  height: auto;
  max-width: 78%;
  max-height: 120px;
  object-fit: contain;
}

.buy-model__name {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.buy-model__spec {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.buy-model__price {
  display: block;
  margin-top: 9px;
  color: var(--faint);
  font-size: 11.5px;
}

.buy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: start;
  gap: clamp(34px, 5vw, 64px);
  margin-top: clamp(36px, 5vw, 56px);
  padding-bottom: clamp(70px, 9vw, 110px);
}

.buy-product {
  min-width: 0;
}

.buy-product__stage {
  display: grid;
  place-items: center;
  min-height: clamp(350px, 42vw, 500px);
  padding: 26px;
  border-radius: 28px;
  background: #f5f7fb;
}

.buy-product__stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: 88%;
  max-height: 430px;
  object-fit: contain;
}

.buy-product__copy {
  margin-top: 24px;
}

.buy-product__copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.buy-product__copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.buy-spec-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin: 22px 0 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
  list-style: none;
}

.buy-spec-list li {
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.buy-config {
  min-width: 0;
}

.buy-group {
  padding: 0 0 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
}

.buy-group h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

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

.buy-options button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.buy-options button:hover {
  border-color: rgba(14, 82, 240, 0.3);
  color: var(--ink);
}

.buy-options button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.buy-qty {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
}

.buy-qty button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 34px;
  border: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 18px;
  cursor: pointer;
}

.buy-qty span {
  min-width: 36px;
  color: var(--ink);
  font-size: 13.5px;
  text-align: center;
}

.buy-summary {
  padding: 22px;
  border: 1px solid rgba(14, 82, 240, 0.1);
  border-radius: 22px;
  background: linear-gradient(145deg, #f8fbff 0%, #ffffff 76%);
}

.buy-summary__label {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.buy-summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.buy-summary__row span {
  color: var(--muted);
  font-size: 12.5px;
}

.buy-summary__row strong {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  text-align: right;
}

.buy-summary__price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0 0;
  color: var(--ink);
  font-size: 13px;
}

.buy-summary__price strong {
  font-size: 17px;
  font-weight: 600;
}

.buy-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin-top: 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.buy-submit:hover {
  background: #000000;
}

.buy-summary__note {
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.55;
  text-align: center;
}

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

  .buy-product__stage {
    min-height: 340px;
  }

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

  .buy-model {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    grid-template-areas: "visual name" "visual spec" "visual price";
    align-items: center;
    column-gap: 14px;
  }

  .buy-model__visual {
    grid-area: visual;
    height: 100px;
  }

  .buy-model__visual img {
    max-height: 80px;
  }

  .buy-model__name { grid-area: name; margin-top: 0; }
  .buy-model__spec { grid-area: spec; }
  .buy-model__price { grid-area: price; margin-top: 4px; }
}

@media (max-width: 480px) {
  .buy-shell {
    width: calc(100% - 36px);
  }

  .buy-spec-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .buy-product__stage {
    min-height: 280px;
    padding: 18px;
  }

  .buy-product__stage img {
    max-height: 300px;
  }
}

.buy-models {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .buy-models {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .buy-models {
    grid-template-columns: minmax(0, 1fr);
  }
}
