.hero {
  background: linear-gradient(135deg, #eaf3ff, #fff);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 34px;
  margin: 22px 0;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 30px;
  align-items: center;
}

.hero h1 {
  font-size: 38px;
  line-height: 1.25;
  margin: 0 0 12px
}

.hero p {
  margin: 0 0 20px;
  color: var(--muted)
}

.hero .cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 6px 20px;
  cursor: pointer;
  background: var(--main);
  color: #fff;
  font-weight: 700;
}
.btn-outline {
  background: #fff;
  color: var(--main);
  border: 1px solid #cfe0ff;
}

.section {
  margin: 26px 0
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 24px
}

.section-head a:not(.btn) {
  color: var(--main)
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-img {
  background: #f0f4fb;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-body {
  padding: 16px
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  min-height: 48px
}

.card-sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.price {
  font-size: 24px;
  color: var(--main-dark);
  font-weight: 700
}

.tag {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf4ff;
  color: var(--main);
  font-size: 12px;
  margin-right: 8px;
  margin-bottom: 8px;
}

.breadcrumb {
  font-size: 13px;
  color: #6b7892;
  margin: 18px 0
}

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  margin-bottom:40px;
}

.sidebar {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.sidebar h3 {
  margin: 0 0 12px
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  color: 33344;
}

.sidebar a:hover,
.sidebar a.active {
  background: #edf4ff;
  color: var(--main);
  font-weight: 700
}

.content-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 22px;
  margin-top:40px;
  margin-bottom:40px;
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.gallery-main {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.gallery-main img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  border-radius: 12px;
  background: #f2f5fb;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.thumbs img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid transparent;
  background: #f2f5fb;
  cursor: pointer;
}

.thumbs img.active {
  border-color: var(--main)
}

.product-info {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.product-title {
  font-size: 30px;
  line-height: 1.35;
  margin: 0 0 8px
}

.meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: #6b7892;
  font-size: 14px;
  margin-bottom: 14px
}

.price-box {
  background: linear-gradient(90deg, #edf4ff, #f8fbff);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.price-box .price {
  font-size: 34px
}

.spec-group {
  margin-bottom: 16px
}

.spec-label {
  font-weight: 700;
  margin-bottom: 10px
}

.spec-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.spec-btn {
  border: 1px solid #dbe4f4;
  background: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
}

.spec-btn.active {
  border-color: var(--main);
  color: var(--main);
  background: #eef5ff
}

.qty-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0
}

.qty-control{
  display:inline-flex;
  align-items:center;
  border:1px solid #dbe4f4;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
}

.qty-control button {
  width: 42px;
  height: 42px;
  border: 0;
  background: #f5f7fb;
  cursor: pointer;
  font-size: 20px;
}

.qty-control input {
  width: 64px;
  height: 42px;
  border: 0;
  text-align: center;
  outline: none;
  background: #fff;
}

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  margin-bottom:10px;
}

.notice {
  font-size: 13px;
  color: #6b7892;
  margin-top: 12px
}

.tabs {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.tabs button {
  border: 0;
  background: none;
  padding: 12px 6px;
  cursor: pointer;
  color: #556;
}

.tabs button.active {
  color: var(--main);
  font-weight: 700;
  border-bottom: 2px solid var(--main)
}

.tab-panel {
  display: none
}

.tab-panel.active {
  display: block
}

.detail-block {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 22px;
  margin-top: 20px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 12px;
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}

.table th {
  background: #f8fbff;
  color: #556
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dbe4f4;
  border-radius: 12px;
  outline: none;
  background: #fff;
}

.textarea {
  min-height: 110px;
  resize: vertical
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px
}

.stat {
  background: linear-gradient(180deg, #f8fbff, #fff);
  border: 1px solid #e6eefc;
  border-radius: 16px;
  padding: 18px;
}

.stat .num {
  font-size: 28px;
  color: var(--main-dark);
  font-weight: 700
}

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff3e6;
  color: #d36b00;
  font-size: 12px;
}

.empty {
  text-align: center;
  color: #8090af;
  padding: 40px 0;
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: -3px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.icon-home {
  background-image: url('../icons/home.svg')
}

.icon-grid {
  background-image: url('../icons/grid.svg')
}

.icon-cart {
  background-image: url('../icons/cart.svg')
}

.icon-user {
  background-image: url('../icons/user.svg')
}

.icon-order {
  background-image: url('../icons/order.svg')
}

.icon-location {
  background-image: url('../icons/location.svg')
}

.icon-heart {
  background-image: url('../icons/heart.svg')
}

.icon-coupon {
  background-image: url('../icons/coupon.svg')
}

.icon-point {
  background-image: url('../icons/point.svg')
}

.icon-msg {
  background-image: url('../icons/msg.svg')
}

.icon-safe {
  background-image: url('../icons/safe.svg')
}

.icon-arrow {
  background-image: url('../icons/arrow-right.svg')
}

.header-actions .icon {
  filter: brightness(0) invert(1)
}

.sidebar .icon {
  opacity: .85
}

.nav-actions {
  display: flex;
  gap: 10px
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px
}

.feature {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
  text-align: center;
}

.feature .circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #edf4ff;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.address-card {
  border: 1px solid #dbe4f4;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
  transition: .2s;
}

.address-card.active {
  border-color: var(--main);
  box-shadow: 0 0 0 3px rgba(0, 80, 191, .08);
  background: #f8fbff;
}

.inline-note {
  font-size: 13px;
  color: #7a879f
}

.total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  background: #f8fbff;
  border-radius: 14px;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.sku-table-wrap {
  margin-top: 10px;
  border: 1px solid #dfe4ea;
  overflow: hidden;
  background: #fff;
}

.sku-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

.sku-table th,
.sku-table td {
  border: 1px solid #dfe4ea;
  padding: 0;
  text-align: center;
  vertical-align: middle;
  color: #555;
  font-size: 16px;
}

.sku-table th {
  height: 44px;
  background: #f5f5f5;
  color: #333;
  font-weight: 700;
}

.sku-table td {
  height: 44px;
  background: #fff;
}

.sku-table td:nth-child(1),
.sku-table td:nth-child(2) {
  color: #666;
}

.sku-table td:nth-child(3) {
  color: #7a5a2b;
  font-weight: 500;
}

.sku-qty-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  overflow: hidden;
  background: #fafafa;
  height: 32px;
}

.sku-qty-control button {
  width: 32px;
  height: 32px;
  border: 0;
  background: #f7f7f7;
  color: #666;
  font-size: 20px;
  line-height: 32px;
  cursor: pointer;
}

.sku-qty-control button:hover {
  background: #efefef;
}

.sku-qty-input {
  width: 40px;
  height: 32px;
  border: 0;
  border-left: 1px solid #e3e3e3;
  border-right: 1px solid #e3e3e3;
  background: #fff;
  text-align: center;
  outline: none;
  color: #333;
}

/* 省市区一行显示 */
.region-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: center;
}

.region-line .region-select {
  width: 100%;
  min-width: 0;
}

@media (max-width: 992px) {
  .hero {
    grid-template-columns: 1fr
  }

  .grid {
    grid-template-columns: repeat(2, 1fr)
  }
  .product-layout,
  .layout,
  .two-col,
  .stat-grid,
  .feature-list {
    grid-template-columns: 1fr
  }

  .form-grid {
    grid-template-columns: 1fr
  }
}

@media (max-width: 768px) {
  .sku-table {
    table-layout: auto;
  }

  .sku-table th,
  .sku-table td {
    font-size: 14px;
    padding: 8px 6px;
    height: auto;
  }

  .sku-qty-control {
    transform: scale(.95);
    transform-origin: center;
  }

  .region-line {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr
  }

  .hero h1 {
    font-size: 28px
  }

  .thumbs {
    grid-template-columns: repeat(4, 1fr)
  }

  .header-actions {
    width: 100%;
    justify-content: space-between
  }
}