/* 商城：详情 / 购物车 */

.shop-page {
  min-height: 100vh;
  background: var(--c-bg);
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.shop-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e8ecef;
}

.shop-topbar a {
  font-size: 14px;
  color: var(--c-primary);
  text-decoration: none;
}

.shop-topbar h1 {
  font-size: 16px;
  font-weight: 600;
  color: var(--c-dark);
}

.shop-topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop-topbar__share {
  border: 1px solid #e8ecef;
  background: #fff;
  color: var(--c-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.cart-badge {
  position: relative;
  font-size: 14px;
  color: var(--c-dark);
  text-decoration: none;
}

.cart-badge__num {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--c-primary);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

.shop-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

/* 运动好物独立落地页 shop/index.html */

.shop-landing {
  padding-bottom: env(safe-area-inset-bottom);
}

.shop-landing__header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e8ecef;
}

.shop-landing__header--scrolled {
  box-shadow: 0 4px 20px rgba(45, 52, 54, 0.06);
}

.shop-landing__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.shop-landing__logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.shop-landing__logo strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
  color: var(--c-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-landing__logo small {
  display: block;
  font-size: 11px;
  color: var(--c-primary);
  font-weight: 600;
}

.shop-landing__member {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--c-dark);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e8ecef;
  background: #fff;
  max-width: 96px;
}

.shop-landing__member span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-landing__main {
  padding: 20px 0 32px;
}

.shop-landing__head {
  margin-bottom: 8px;
}

.shop-landing__loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: #636e72;
}

.shop-landing__footer {
  padding: 20px 16px 28px;
  text-align: center;
  font-size: 12px;
  color: #95a5a6;
  border-top: 1px solid #e8ecef;
  background: #fff;
}

.shop-landing__footer a {
  color: var(--c-primary);
  text-decoration: none;
}

.shop-landing__icp {
  margin-top: 6px;
}

.shop-landing__icp a {
  color: #95a5a6;
}

@media (min-width: 768px) {
  .shop-landing__main .shop__grid {
    max-width: 100%;
  }
}

.product-detail__hero {
  border-radius: 16px;
  overflow: hidden;
  min-height: 240px;
  height: min(72vw, 320px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 20px;
}

.product-detail__hero img,
.product-detail__hero .img-carousel__single {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail__hero .product-detail__carousel,
.product-detail__hero .img-carousel {
  width: 100%;
  height: 100%;
  min-height: 240px;
}

.product-detail__emoji { font-size: 80px; }

.product-detail__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--c-primary);
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 10px;
}

.product-detail__name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--c-dark);
}

.product-detail__price {
  font-size: 28px;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 8px;
}

.product-detail__stock {
  font-size: 14px;
  color: #636e72;
  margin: 0 0 16px;
}

.product-detail__stock--low {
  color: #e17055;
}

.product-detail__stock--out {
  color: #d63031;
  font-weight: 600;
}

.product-detail__desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--c-text-light);
  margin-bottom: 24px;
}

.product-detail__summary {
  font-size: 13px;
  color: var(--c-dark);
  margin: -8px 0 16px;
}

.product-detail__summary--empty {
  color: var(--c-text-light);
}

.product-detail__variants {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.product-detail__option-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-dark);
  margin-bottom: 10px;
}

.product-detail__option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-detail__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: #fff;
  color: var(--c-dark);
  font-size: 13px;
  cursor: pointer;
}

.product-detail__chip--size {
  min-width: 44px;
  justify-content: center;
  border-radius: 10px;
  padding: 0 10px;
}

.product-detail__chip.is-active {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: rgba(255, 107, 53, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 53, 0.15);
}

.product-detail__swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.cart-item__variant {
  font-size: 12px;
  color: var(--c-text-light);
  margin-top: 2px;
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 14px 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.qty-row span { font-size: 14px; font-weight: 600; }

.qty-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-control button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
}

.qty-control strong {
  min-width: 24px;
  text-align: center;
  font-size: 16px;
}

.shop-actions {
  display: flex;
  gap: 10px;
}

.shop-actions .btn { flex: 1; min-height: 48px; }

.shop-bar__actions {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

.shop-bar .btn--sm {
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  font-size: 13px;
  white-space: nowrap;
}

.shop-bar .btn--outline.btn--sm {
  flex: 1;
  max-width: 108px;
}

.shop-bar .btn--primary.btn--sm {
  flex: 1;
  max-width: 96px;
}

.cart-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.cart-item__thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  overflow: hidden;
}

.cart-item__thumb img { width: 100%; height: 100%; object-fit: cover; }

.cart-item__name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.cart-item__price { font-size: 14px; color: var(--c-primary); font-weight: 600; }

.cart-item__ops {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.cart-item__ops button {
  border: none;
  background: none;
  color: #c0392b;
  font-size: 12px;
  cursor: pointer;
}

.cart-summary {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  margin-bottom: 8px;
}

.cart-summary__total {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-primary);
}

.checkout-form {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.checkout-form h2 {
  font-size: 16px;
  margin-bottom: 14px;
  color: var(--c-dark);
}

.checkout-form label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--c-text-light);
}

.checkout-form input,
.checkout-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
}

.checkout-form textarea { min-height: 72px; resize: vertical; }

.checkout-form .btn { width: 100%; margin-top: 8px; min-height: 48px; }

.empty-cart {
  text-align: center;
  padding: 60px 20px;
  color: var(--c-text-light);
}

.empty-cart p { margin-bottom: 16px; }

.order-success {
  text-align: center;
  padding: 48px 20px;
}

.order-success__icon { font-size: 48px; margin-bottom: 12px; }
.order-success h2 { font-size: 20px; margin-bottom: 8px; color: #2d6a4f; }
.order-success p { font-size: 14px; color: var(--c-text-light); line-height: 1.7; margin-bottom: 20px; }

.shop-pay-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}

.shop-pay-modal__panel {
  position: relative;
  width: min(100%, 360px);
  padding: 28px 24px 24px;
  border-radius: 16px;
  background: #fff;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.shop-pay-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #636e72;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.shop-pay-modal h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #2d3436;
}

.shop-pay-modal__amount {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--c-text-light);
}

.shop-pay-modal__amount strong {
  font-size: 22px;
  color: var(--c-primary);
}

.shop-pay-modal__qr {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  margin-bottom: 12px;
}

.shop-pay-modal__qr canvas {
  border-radius: 8px;
}

.shop-pay-modal__hint,
.shop-pay-modal__status,
.shop-pay-modal__order {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--c-text-light);
}

.shop-pay-modal__status {
  margin-top: 8px;
  color: #2d6a4f;
}

.shop-pay-modal__order {
  margin-top: 8px;
  font-size: 12px;
  word-break: break-all;
}

.shop-pay-modal__check {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: #07c160;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.shop-pay-modal__check:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.shop-pay-modal__error {
  margin: 0;
  font-size: 13px;
  color: #d63031;
}

.shop-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #e8ecef;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}

.shop-bar__inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.shop-bar__total {
  flex: 0 0 auto;
  font-size: 13px;
  min-width: 68px;
}

.shop-bar__total strong {
  display: block;
  font-size: 20px;
  color: var(--c-primary);
}

.shop-bar .btn { min-width: 0; min-height: 44px; }

.checkout-form .address-region {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.checkout-form .address-region select {
  flex: 1;
  min-width: 0;
  padding: 10px 4px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
}

.checkout-form .address-region select:disabled {
  background: #f5f5f5;
  color: #999;
}

.checkout-form .address-detail {
  margin-top: 8px;
}

.checkout-login-hint {
  font-size: 13px;
  color: var(--c-text-light);
  margin: -6px 0 14px;
  line-height: 1.6;
}

.checkout-login-hint a {
  color: var(--c-primary);
  text-decoration: none;
}
