:root {
  --ink: #101828;
  --ink-soft: #344054;
  --blue: #2f5bff;
  --blue-deep: #1838bd;
  --mist: #eaf0ff;
  --cold-white: #f7f9fc;
  --paper: #ffffff;
  --line: #d9e2f0;
  --line-strong: #bcc9dd;
  --muted: #667085;
  --danger: #b42318;
  --success: #067647;
  --shadow: 0 24px 64px rgba(16, 24, 40, 0.12);
  --content: 1560px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--cold-white);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 11px 16px;
  background: var(--paper);
  border: 2px solid var(--blue);
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(47, 91, 255, 0.42);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 249, 252, 0.9);
  border-bottom: 1px solid rgba(188, 201, 221, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 48px), var(--content));
  min-height: 82px;
  margin: 0 auto;
  gap: 24px;
}

.brand,
.primary-nav,
.header-cart-button {
  display: flex;
  align-items: center;
}

.brand {
  min-height: 52px;
  gap: 12px;
}

.brand img {
  width: 58px;
  height: 48px;
}

.brand-copy {
  display: grid;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.primary-nav {
  gap: 8px;
}

.primary-nav > a,
.header-cart-button {
  min-height: 44px;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
}

.primary-nav > a:hover,
.header-cart-button:hover {
  background: var(--mist);
  color: var(--blue-deep);
}

.header-cart-button {
  gap: 9px;
  background: var(--ink);
  color: var(--paper);
}

.header-cart-button:hover {
  background: var(--blue-deep);
  color: var(--paper);
}

.cart-count {
  display: grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--blue);
  font-size: 12px;
}

main {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(400px, 0.92fr);
  min-height: 590px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--paper);
}

.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: clamp(48px, 6vw, 94px);
  background: var(--ink);
  color: var(--paper);
}

.hero-copy::after {
  position: absolute;
  right: -88px;
  bottom: -110px;
  width: 330px;
  height: 210px;
  border: 42px solid rgba(47, 91, 255, 0.76);
  content: "";
  transform: rotate(-19deg);
}

.hero-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  color: #b9c9ff;
  font-size: 15px;
  font-weight: 650;
}

.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0;
  font-size: clamp(48px, 5.1vw, 80px);
  font-weight: 680;
  letter-spacing: -0.062em;
  line-height: 1.05;
}

.hero-summary {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 28px 0 0;
  color: #cbd5e1;
  font-size: 17px;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 34px;
}

.primary-action,
.text-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  font-size: 15px;
  font-weight: 650;
}

.primary-action {
  padding: 0 22px;
  border-radius: 10px;
  background: var(--blue);
  color: var(--paper);
}

.primary-action:hover {
  background: #416bff;
}

.text-action {
  border-bottom: 1px solid #7489b8;
}

.hero-facts {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 570px;
  margin: 54px 0 0;
  padding-top: 22px;
  border-top: 1px solid #34435d;
}

.hero-facts div {
  padding-right: 20px;
}

.hero-facts dt {
  color: var(--paper);
  font-size: 20px;
  font-weight: 700;
}

.hero-facts dd {
  margin: 3px 0 0;
  color: #9aabc5;
  font-size: 12px;
}

.hero-product {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  overflow: hidden;
  padding: 34px;
  background: linear-gradient(145deg, #f8faff 0%, #eaf0ff 58%, #dce6ff 100%);
}

.hero-product > p {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--blue-deep);
  font-size: 14px;
  font-weight: 650;
}

.hero-product > img {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(100%, 520px);
  aspect-ratio: 1;
  margin: 0 auto;
  object-fit: cover;
  border-radius: 24px;
  background: #dfe7f6;
}

.hero-ribbon {
  position: absolute;
  top: 19%;
  right: -12%;
  width: 78%;
  height: 22%;
  border: 28px solid rgba(47, 91, 255, 0.12);
  transform: rotate(-32deg);
}

.hero-product-meta {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(47, 91, 255, 0.22);
}

.hero-product-meta span {
  font-weight: 650;
}

.hero-product-meta strong {
  font-size: 27px;
  letter-spacing: -0.04em;
}

.category-rail,
.recent-section,
.store-layout {
  margin-top: 76px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 670;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.section-heading p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.section-heading > a {
  min-height: 44px;
  padding: 11px 0;
  color: var(--blue-deep);
  font-size: 14px;
  font-weight: 650;
}

.compact-heading {
  margin-bottom: 18px;
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper);
}

.category-tabs button {
  min-height: 56px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  font-size: 15px;
  font-weight: 600;
}

.category-tabs button:last-child {
  border-right: 0;
}

.category-tabs button:hover {
  background: var(--mist);
}

.category-tabs button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

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

.store-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 24px;
  margin-bottom: 100px;
}

.catalog-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 22px;
}

.catalog-heading {
  flex: 0 0 auto;
  margin: 0;
}

.catalog-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px;
  width: min(100%, 540px);
  gap: 10px;
}

.search-field,
.sort-field,
.form-field {
  display: grid;
  gap: 7px;
}

.search-field > span,
.sort-field > span,
.form-field > span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.search-field input,
.sort-field select,
.form-field input,
.form-field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--paper);
}

.search-field input,
.form-field input,
.form-field textarea {
  padding: 10px 13px;
}

.sort-field select {
  padding: 0 36px 0 13px;
}

.search-field input:focus,
.sort-field select:focus,
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 91, 255, 0.1);
  outline: 0;
}

.product-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  transition: border-color 180ms ease, transform 180ms ease;
}

.product-card:hover {
  border-color: #9eb2d3;
  transform: translateY(-2px);
}

.product-visual {
  position: relative;
  display: grid;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  place-items: center;
  background: var(--mist);
}


.product-visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 180ms ease;
}

.product-visual img.is-loaded {
  opacity: 1;
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(16, 24, 40, 0.88);
  color: var(--paper);
  font-size: 11px;
  font-weight: 650;
  backdrop-filter: blur(8px);
}

.product-body {
  display: grid;
  min-height: 212px;
  padding: 16px;
}

.product-category {
  margin: 0 0 7px;
  color: var(--blue-deep);
  font-size: 11px;
  font-weight: 650;
}

.product-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 660;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.product-subtitle {
  display: -webkit-box;
  margin: 8px 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-purchase {
  display: flex;
  align-items: end;
  justify-content: space-between;
  align-self: end;
  gap: 8px;
}

.product-price {
  display: grid;
  line-height: 1.15;
}

.product-price strong {
  font-size: 19px;
  letter-spacing: -0.035em;
}

.product-price del {
  margin-top: 4px;
  color: #98a2b3;
  font-size: 11px;
}

.add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 650;
}

.add-button:hover {
  background: var(--blue);
}

.empty-results {
  padding: 74px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: var(--paper);
  text-align: center;
}

.empty-results h3 {
  margin: 0;
  font-size: 20px;
}

.empty-results p {
  margin: 8px 0 20px;
  color: var(--muted);
}

.empty-results button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--paper);
}

.cart-panel {
  position: sticky;
  top: 106px;
  display: flex;
  min-height: 590px;
  max-height: calc(100vh - 130px);
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow);
}

.cart-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: 24px 22px 20px;
  border-bottom: 1px solid #34435d;
}

.cart-header p,
.checkout-header p {
  margin: 0 0 3px;
  color: #9fb1ce;
  font-size: 12px;
}

.cart-header h2,
.checkout-header h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.035em;
}

.cart-close {
  display: none;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid #475875;
  border-radius: 8px;
  background: transparent;
  color: var(--paper);
}

.cart-empty {
  display: grid;
  flex: 1;
  align-content: center;
  padding: 42px 24px;
  text-align: center;
}

.cart-empty strong {
  font-size: 17px;
}

.cart-empty p {
  margin: 7px auto 0;
  color: #9fb1ce;
  font-size: 13px;
}

.cart-items {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px 18px;
}

.cart-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #34435d;
}

.cart-item img {
  width: 62px;
  height: 62px;
  border-radius: 9px;
  background: #d9e3f4;
  object-fit: cover;
}

.cart-item-main {
  min-width: 0;
}

.cart-item-name {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.cart-item-name strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-item {
  min-width: 44px;
  min-height: 44px;
  margin: -12px -10px 0 0;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #aab8cf;
  font-size: 12px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.quantity-control {
  display: grid;
  grid-template-columns: 44px 34px 44px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #465775;
  border-radius: 8px;
}

.quantity-control button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--paper);
  font-size: 17px;
}

.quantity-control button:hover {
  background: #293952;
}

.quantity-control span {
  text-align: center;
  font-size: 12px;
}

.cart-item-price {
  font-size: 13px;
  font-weight: 650;
}

.cart-footer {
  padding: 18px 22px 22px;
  border-top: 1px solid #34435d;
  background: #121d30;
}

.clear-cart {
  min-height: 44px;
  margin: -10px 0 2px -10px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #aab8cf;
  font-size: 12px;
}

.clear-cart:disabled {
  opacity: 0.42;
}

.cart-total-row,
.checkout-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.cart-total-row span {
  color: #c4cfdf;
}

.cart-total-row strong {
  font-size: 30px;
  letter-spacing: -0.05em;
}

.cart-note {
  margin: 8px 0 15px;
  color: #94a6c0;
  font-size: 11px;
}

.checkout-button,
.submit-order,
.order-success button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: var(--paper);
  font-weight: 670;
}

.checkout-button:hover,
.submit-order:hover,
.order-success button:hover {
  background: #416bff;
}

.checkout-button:disabled {
  background: #32415b;
  color: #8494ad;
}

.mobile-cart-button,
.cart-overlay {
  display: none;
}

.checkout-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 32px 100px rgba(3, 12, 30, 0.28);
}

.checkout-dialog::backdrop {
  background: rgba(6, 14, 29, 0.64);
  backdrop-filter: blur(8px);
}

.checkout-shell {
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.checkout-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.checkout-header p {
  color: var(--blue-deep);
}

.checkout-header button {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--cold-white);
}

.checkout-content {
  padding: 26px;
}

.checkout-intro h3 {
  margin: 0;
  font-size: 18px;
}

.checkout-intro p {
  margin: 6px 0 22px;
  color: var(--muted);
  font-size: 13px;
}

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

.full-field {
  grid-column: 1 / -1;
}

.form-field textarea {
  min-height: 94px;
  resize: vertical;
}

.form-field small {
  min-height: 17px;
  color: var(--danger);
  font-size: 11px;
}

.form-field [aria-invalid="true"] {
  border-color: var(--danger);
}

.checkout-summary {
  margin-top: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.checkout-summary span {
  color: var(--muted);
}

.checkout-summary strong {
  font-size: 28px;
  letter-spacing: -0.04em;
}

.form-status {
  min-height: 22px;
  margin: 0 0 10px;
  color: var(--danger);
  font-size: 13px;
}

.order-success {
  display: grid;
  min-height: 520px;
  align-content: center;
  justify-items: center;
  padding: 48px 28px;
  text-align: center;
}

.success-mark {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 18px;
  background: var(--ink);
  color: #82a5ff;
  font-size: 20px;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.order-success h3 {
  margin: 24px 0 8px;
  font-size: 27px;
  letter-spacing: -0.035em;
}

.order-success p {
  max-width: 460px;
  margin: 6px 0;
  color: var(--muted);
  font-size: 14px;
}

.order-success button {
  width: auto;
  min-width: 180px;
  margin-top: 24px;
  padding: 0 24px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  max-width: min(380px, calc(100% - 32px));
  padding: 13px 17px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow);
  font-size: 14px;
}

.site-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  width: min(calc(100% - 48px), var(--content));
  min-height: 190px;
  margin: 0 auto;
  padding: 48px 0;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 13px;
}

.footer-brand {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.site-footer p {
  margin: 7px 0 0;
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  }

  .hero-copy {
    padding: 52px;
  }

  .store-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
  }

  .catalog-toolbar {
    align-items: start;
    flex-direction: column;
  }

  .catalog-controls {
    width: 100%;
  }
}

@media (max-width: 960px) {
  body {
    padding-bottom: 82px;
  }

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

  .hero-copy {
    min-height: 540px;
  }

  .hero-product {
    min-height: 580px;
  }

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

  .store-layout {
    display: block;
  }

  .cart-panel {
    position: fixed;
    inset: auto 0 0;
    z-index: 90;
    min-height: 0;
    max-height: min(82vh, 760px);
    border-radius: 24px 24px 0 0;
    transform: translateY(105%);
    transition: transform 240ms cubic-bezier(0.22, 0.78, 0.26, 1);
  }

  .cart-panel[data-open="true"] {
    transform: translateY(0);
  }

  .cart-close {
    display: inline-flex;
    align-items: center;
  }

  .cart-items {
    min-height: 80px;
  }

  .cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: block;
    background: rgba(6, 14, 29, 0.5);
    backdrop-filter: blur(4px);
  }

  .mobile-cart-button {
    position: fixed;
    right: 16px;
    bottom: 14px;
    left: 16px;
    z-index: 70;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    min-height: 58px;
    padding: 0 18px;
    gap: 18px;
    border: 1px solid #263753;
    border-radius: 13px;
    background: var(--ink);
    color: var(--paper);
    box-shadow: 0 18px 42px rgba(16, 24, 40, 0.24);
    text-align: left;
  }

  .mobile-cart-button > span:nth-child(2) {
    color: #b9c6da;
    font-size: 12px;
  }

  .mobile-cart-button > span:last-child {
    font-weight: 700;
  }

  body.cart-open {
    overflow: hidden;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 82px;
  }

  .header-inner,
  main,
  .site-footer {
    width: min(calc(100% - 28px), var(--content));
  }

  .header-inner {
    min-height: 70px;
  }

  .brand img {
    width: 48px;
    height: 40px;
  }

  .brand-copy span,
  .primary-nav > a,
  .header-cart-button {
    display: none;
  }

  .hero {
    min-height: 0;
    margin-top: 16px;
    border-radius: 20px;
  }

  .hero-copy {
    min-height: 480px;
    padding: 38px 24px;
  }

  .hero h1 {
    font-size: clamp(42px, 13vw, 64px);
  }

  .hero-summary {
    font-size: 15px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .primary-action,
  .text-action {
    width: 100%;
  }

  .text-action {
    border: 0;
  }

  .hero-facts {
    margin-top: 38px;
  }

  .hero-facts div {
    padding-right: 8px;
  }

  .hero-facts dt {
    font-size: 17px;
  }

  .hero-facts dd {
    font-size: 10px;
  }

  .hero-product {
    min-height: 430px;
    padding: 24px;
  }

  .hero-product > img {
    width: min(90%, 360px);
    border-radius: 18px;
  }

  .category-rail,
  .recent-section,
  .store-layout {
    margin-top: 56px;
  }

  .section-heading h2 {
    font-size: 29px;
  }

  .category-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    border: 0;
    background: var(--line);
  }

  .category-tabs button {
    border: 0;
    background: var(--paper);
  }

  .category-tabs button:first-child {
    grid-column: 1 / -1;
  }

  .recent-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .catalog-toolbar {
    gap: 20px;
  }

  .catalog-controls {
    grid-template-columns: 1fr;
  }

  .product-card {
    border-radius: 12px;
  }

  .product-body {
    min-height: 190px;
    padding: 12px;
  }

  .product-card h3 {
    font-size: 14px;
  }

  .product-subtitle {
    min-height: 37px;
    font-size: 11px;
  }

  .product-purchase {
    align-items: stretch;
    flex-direction: column;
  }

  .add-button {
    width: 100%;
  }

  .product-badge {
    top: 8px;
    left: 8px;
  }

  .checkout-dialog {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    border-radius: 0;
  }

  .checkout-shell {
    max-height: 100vh;
  }

  .checkout-header {
    padding: 17px 16px;
  }

  .checkout-content {
    padding: 20px 16px 36px;
  }

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

  .full-field {
    grid-column: auto;
  }

  .order-success {
    min-height: calc(100vh - 88px);
  }

  .site-footer {
    align-items: start;
    flex-direction: column;
    min-height: 170px;
    gap: 18px;
    padding-bottom: 36px;
  }

  .toast {
    right: 16px;
    bottom: 88px;
    left: 16px;
  }
}

@media (max-width: 390px) {
  .brand-copy strong {
    font-size: 15px;
  }

  .hero-copy {
    min-height: 450px;
  }

  .hero h1 {
    font-size: 39px;
  }

  .hero-product {
    min-height: 380px;
  }

  .product-price strong {
    font-size: 17px;
  }
}


.payment-section {
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

.payment-section legend {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 680;
}

.payment-option {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid var(--blue);
  border-radius: 12px;
  background: rgba(47, 91, 255, 0.05);
  font-weight: 680;
}

.payment-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
}

.product-visual,
.product-card h3 a {
  color: inherit;
  text-decoration: none;
}

.detail-main {
  width: min(calc(100% - 48px), 1180px);
  min-height: calc(100vh - 310px);
  margin: 0 auto;
  padding: 42px 0 72px;
}

.detail-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.detail-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.detail-nav a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.detail-nav a:last-child {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
}

.detail-nav span {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  background: var(--blue);
  font-size: 12px;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: clamp(36px, 7vw, 92px);
  align-items: center;
}

.product-detail-layout[hidden] {
  display: none;
}

.detail-media {
  overflow: hidden;
  border-radius: 28px;
  background: var(--mist);
}

.detail-media img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.detail-info {
  min-width: 0;
}

.detail-category {
  margin: 0 0 12px;
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 700;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 56px);
  letter-spacing: -0.045em;
  line-height: 1.06;
}

.detail-subtitle {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.detail-tags li {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--mist);
  color: var(--ink-soft);
  font-size: 12px;
}

.detail-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 34px;
}

.detail-price strong {
  font-size: 34px;
  letter-spacing: -0.04em;
}

.detail-price del {
  color: var(--muted);
  font-size: 14px;
}

.detail-quantity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 650;
}

.detail-quantity-control {
  display: grid;
  grid-template-columns: 44px 54px 44px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}

.detail-quantity-control button,
.detail-quantity-control input {
  width: 100%;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: var(--paper);
  text-align: center;
}

.detail-quantity-control input {
  appearance: textfield;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.detail-add {
  width: 100%;
  min-height: 54px;
  margin-top: 24px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: var(--paper);
  font-size: 16px;
  font-weight: 700;
}

.detail-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--blue-deep);
  font-size: 13px;
  text-align: center;
}

.detail-not-found {
  min-height: 420px;
  padding-top: 100px;
  text-align: center;
}

.detail-not-found a {
  color: var(--blue-deep);
}

.detail-footer {
  width: min(calc(100% - 48px), 1180px);
}

@media (max-width: 760px) {
  .detail-main,
  .detail-footer {
    width: min(calc(100% - 28px), 1180px);
  }

  .detail-main {
    padding: 22px 0 110px;
  }

  .detail-nav {
    gap: 8px;
  }

  .detail-nav > a:first-child {
    display: none;
  }

  .detail-nav a:last-child {
    padding: 0 12px;
  }

  .product-detail-layout {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .detail-media {
    border-radius: 20px;
  }

  .detail-info h1 {
    font-size: 36px;
  }

  .detail-add {
    position: sticky;
    bottom: 14px;
    z-index: 4;
    box-shadow: 0 14px 36px rgba(28, 64, 172, 0.28);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
