:root {
  --mall-ink: #111827;
  --mall-sub: #6b7280;
  --mall-line: #e5e7eb;
  --mall-bg: #f5f6f8;
  --mall-card: #ffffff;
  --mall-accent: #e11d48;
  --mall-accent-2: #fb7185;
  --mall-ok: #059669;
}

.mall-body {
  background: var(--mall-bg);
  color: var(--mall-ink);
  padding-bottom: 24px;
}

.mall-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--mall-ink);
  color: #fff;
}

.mall-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}

.mall-brand-mark {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--mall-accent), var(--mall-accent-2));
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
}

.mall-brand-text {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mall-topnav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}

.mall-topnav a {
  color: #e5e7eb;
  text-decoration: none;
}

.mall-cart-link {
  position: relative;
  padding-right: 4px;
}

.mall-cart-link em {
  position: absolute;
  top: -20px;
  right: -18px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--mall-accent);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  line-height: 17px;
  text-align: center;
}

.mall-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 12px 0;
}

.mall-search {
  display: flex;
  gap: 8px;
  margin: 4px 0 14px;
}

.mall-search input {
  flex: 1;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--mall-line);
  border-radius: 20px;
  background: #fff;
  font-size: 14px;
}

.mall-search button {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 20px;
  background: var(--mall-ink);
  color: #fff;
  font-size: 14px;
}

.mall-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 18px 2px 10px;
}

.mall-section-title h2 {
  margin: 0;
  font-size: 17px;
}

.mall-section-title a {
  color: var(--mall-sub);
  font-size: 13px;
  text-decoration: none;
}

.mall-shops {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
}

.mall-shops::-webkit-scrollbar {
  display: none;
}

.mall-shop-chip {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 9px;
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: var(--mall-ink);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .06);
}

.mall-shop-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #eef2ff;
  color: #4338ca;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
}

.mall-shop-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

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

.mall-card {
  background: var(--mall-card);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .06);
}

.mall-card-cover {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #eef2ff, #fdf2f8);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.mall-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mall-card-cover span {
  font-size: 34px;
  opacity: .35;
}

.mall-card-body {
  padding: 9px 10px 11px;
}

.mall-card-title {
  font-size: 14px;
  line-height: 1.4;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mall-card-sub {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--mall-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mall-card-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.mall-price {
  color: var(--mall-accent);
  font-weight: 700;
  font-size: 16px;
}

.mall-price small {
  font-size: 12px;
  font-weight: 500;
}

.mall-card-shop {
  font-size: 11px;
  color: var(--mall-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mall-empty {
  padding: 48px 16px;
  text-align: center;
  color: var(--mall-sub);
  font-size: 14px;
}

.mall-detail-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #eef2ff, #fdf2f8);
  display: grid;
  place-items: center;
}

.mall-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mall-detail-cover span {
  font-size: 64px;
  opacity: .3;
}

.mall-detail-head {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  margin-top: 10px;
}

.mall-detail-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.mall-detail-price .mall-price {
  font-size: 24px;
}

.mall-detail-market {
  color: #9ca3af;
  font-size: 13px;
  text-decoration: line-through;
}

.mall-detail-title {
  margin: 8px 0 4px;
  font-size: 17px;
  line-height: 1.45;
}

.mall-detail-sub {
  margin: 0;
  color: var(--mall-sub);
  font-size: 13px;
}

.mall-shop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.mall-shop-row-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.mall-shop-row-name {
  font-weight: 600;
  font-size: 14px;
}

.mall-shop-row-meta {
  display: block;
  font-size: 12px;
  color: var(--mall-sub);
  margin-top: 2px;
}

.mall-shop-row-go {
  font-size: 13px;
  color: var(--mall-sub);
  white-space: nowrap;
}

.mall-block {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  margin-top: 10px;
}

.mall-block h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.mall-sku-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mall-sku {
  position: relative;
}

.mall-sku input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mall-sku span {
  display: inline-block;
  padding: 8px 13px;
  border: 1px solid var(--mall-line);
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
}

.mall-sku input:checked + span {
  border-color: var(--mall-ink);
  background: var(--mall-ink);
  color: #fff;
}

.mall-sku input:disabled + span {
  color: #c0c4cc;
  text-decoration: line-through;
  cursor: not-allowed;
}

.mall-buybar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  margin: 14px -12px 0;
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--mall-line);
  backdrop-filter: blur(6px);
}

.mall-buybar .btn {
  flex: 1;
  justify-content: center;
}

.mall-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--mall-ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--mall-line);
}

.mall-btn.primary {
  background: linear-gradient(135deg, var(--mall-accent), var(--mall-accent-2));
  border-color: transparent;
  color: #fff;
}

.mall-btn.dark {
  background: var(--mall-ink);
  border-color: var(--mall-ink);
  color: #fff;
}

.mall-btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
}

.mall-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #f0f1f3;
}

.mall-line:last-child {
  border-bottom: 0;
}

.mall-line-img {
  flex: none;
  width: 68px;
  height: 68px;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f6;
  display: grid;
  place-items: center;
  color: #9ca3af;
}

.mall-line-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mall-line-main {
  flex: 1;
  min-width: 0;
}

.mall-line-title {
  font-size: 14px;
  margin: 0 0 3px;
  line-height: 1.4;
}

.mall-line-meta {
  font-size: 12px;
  color: var(--mall-sub);
  margin: 0;
}

.mall-line-price {
  text-align: right;
  font-size: 14px;
  white-space: nowrap;
}

.mall-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--mall-line);
  border-radius: 9px;
  overflow: hidden;
}

.mall-qty button {
  width: 28px;
  height: 28px;
  border: 0;
  background: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.mall-qty input {
  width: 38px;
  height: 28px;
  border: 0;
  border-left: 1px solid var(--mall-line);
  border-right: 1px solid var(--mall-line);
  text-align: center;
  font-size: 13px;
}

.mall-sum {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: 6px;
  border-top: 1px solid #f0f1f3;
  font-size: 14px;
}

.mall-sum strong {
  color: var(--mall-accent);
  font-size: 19px;
}

.mall-addr {
  display: block;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  margin-bottom: 10px;
}

.mall-addr-main {
  font-size: 15px;
  font-weight: 600;
}

.mall-addr-detail {
  margin-top: 5px;
  font-size: 13px;
  color: var(--mall-sub);
  line-height: 1.5;
}

.mall-addr-none {
  padding: 18px 14px;
  border-radius: 14px;
  background: #fff;
  color: var(--mall-sub);
  font-size: 14px;
  text-align: center;
}

.mall-form label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--mall-sub);
}

.mall-form input[type="text"],
.mall-form input[type="tel"],
.mall-form textarea,
.mall-form select {
  width: 100%;
  margin-top: 5px;
  padding: 11px 12px;
  border: 1px solid var(--mall-line);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  box-sizing: border-box;
}

.mall-form .row3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mall-order-card {
  display: block;
  background: #fff;
  border-radius: 14px;
  padding: 13px;
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
}

.mall-order-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--mall-sub);
  margin-bottom: 8px;
}

.mall-status {
  font-weight: 600;
}

.mall-status.pending { color: #d97706; }
.mall-status.paid { color: #2563eb; }
.mall-status.shipped { color: #7c3aed; }
.mall-status.done { color: var(--mall-ok); }
.mall-status.refunded,
.mall-status.closed { color: #9ca3af; }

.mall-order-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f0f1f3;
  font-size: 13px;
}

.mall-note {
  margin: 10px 0 0;
  padding: 11px 12px;
  border-radius: 12px;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
  line-height: 1.6;
}

.mall-info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 13px;
  border-bottom: 1px solid #f5f5f6;
}

.mall-info-row:last-child {
  border-bottom: 0;
}

.mall-info-row span:first-child {
  color: var(--mall-sub);
  flex: none;
}

.mall-info-row span:last-child {
  text-align: right;
  word-break: break-all;
}

.mall-detail-html {
  font-size: 14px;
  line-height: 1.75;
  color: #374151;
  word-break: break-word;
}

.mall-detail-html img {
  max-width: 100%;
  border-radius: 10px;
}

.mall-foot {
  max-width: 720px;
  margin: 22px auto 0;
  padding: 18px 16px 30px;
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.mall-foot p {
  margin: 0 0 5px;
}

.mall-foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 8px 0 10px;
}

.mall-foot-links a {
  color: var(--mall-sub);
  text-decoration: none;
}

.mall-foot-legal a {
  color: var(--mall-sub);
}

.mall-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 20px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 500;
  vertical-align: 1px;
}

.mall-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 10px;
  -webkit-overflow-scrolling: touch;
}

.mall-tabs::-webkit-scrollbar {
  display: none;
}

.mall-tabs a {
  flex: none;
  padding: 6px 13px;
  border-radius: 20px;
  background: #fff;
  color: var(--mall-sub);
  font-size: 13px;
  text-decoration: none;
}

.mall-tabs a.on {
  background: var(--mall-ink);
  color: #fff;
}

.mall-timeline {
  font-size: 13px;
  color: #374151;
}

.mall-timeline p {
  position: relative;
  margin: 0;
  padding: 0 0 14px 16px;
  border-left: 1px solid var(--mall-line);
}

.mall-timeline p:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.mall-timeline p::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mall-line);
}

.mall-timeline p.on::before {
  background: var(--mall-ink);
}

.mall-timeline span {
  display: block;
  color: var(--mall-sub);
  font-size: 12px;
  margin-top: 2px;
}

@media (min-width: 560px) {
  .mall-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
