/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  padding-top: 20px;
  padding-bottom: 12px;
}

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

.breadcrumb .sep {
  opacity: 0.5;
}

/* Category Hero */
.category-hero {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 26px 30px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 24px;
  align-items: center;
}

.category-hero h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}

.category-hero p {
  font-size: 14px;
  color: var(--text-secondary);
}

.category-hero-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.category-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .category-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }
}

/* Product Detail */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-xs);
}

@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
    padding: 18px;
  }
}

.detail-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  aspect-ratio: 4 / 3;
  background: var(--bg-subtle);
}

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

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-title {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.35;
}

.detail-summary {
  font-size: 14px;
  color: var(--text-secondary);
}

.detail-price-box {
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-primary);
}

.detail-price small {
  font-size: 14px;
  font-weight: 700;
}

.spec-group-label {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.spec-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.spec-btn {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-medium);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: all var(--transition);
}

.spec-btn.active {
  border-color: var(--brand-primary);
  background: var(--brand-soft);
  color: var(--brand-primary);
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.qty-stepper button {
  width: 36px;
  height: 36px;
  font-size: 16px;
  font-weight: 700;
  background: var(--bg-subtle);
}

.qty-stepper input {
  width: 48px;
  height: 36px;
  border: none;
  text-align: center;
  font-weight: 700;
  outline: none;
}

.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.detail-actions .btn {
  flex: 1;
  min-width: 150px;
}

.delivery-note {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Detail Tabs / Attributes */
.detail-panels {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .detail-panels {
    grid-template-columns: 1fr;
  }
}

.panel-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.panel-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

.attr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.attr-table tr {
  border-bottom: 1px solid var(--border-light);
}

.attr-table th {
  width: 36%;
  text-align: left;
  padding: 10px 8px;
  color: var(--text-muted);
  font-weight: 600;
}

.attr-table td {
  padding: 10px 8px;
  color: var(--text-primary);
  font-weight: 600;
}

/* Cart, Checkout, Orders */
.flow-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 26px;
  box-shadow: var(--shadow-xs);
}

.cart-page-head {
  margin-bottom: 22px;
}

.cart-page-head .section-title {
  margin-bottom: 6px;
}

.cart-page-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.cart-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
}

.cart-items-card {
  padding: 8px 22px 18px;
}

.cart-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border-light);
}

.cart-list-head-side {
  min-width: 148px;
  text-align: right;
}

.cart-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item:hover {
  background: linear-gradient(90deg, transparent, var(--bg-subtle) 8%, var(--bg-subtle) 92%, transparent);
}

.cart-item img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
}

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

.cart-item-name {
  display: block;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-primary);
}

.cart-item-name:hover {
  color: var(--brand-primary);
}

.cart-item-spec {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
}

.cart-item-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-top: 8px;
}

.cart-item-unit {
  font-size: 14px;
  color: var(--brand-primary);
  font-weight: 800;
}

.cart-item-line {
  font-size: 12px;
  color: var(--text-secondary);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-empty {
  text-align: center;
  padding: 48px 20px 36px;
}

.cart-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-primary);
}

.cart-empty-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.cart-empty-desc {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--text-muted);
}

.cart-summary-card {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  padding: 24px;
  background:
    linear-gradient(180deg, #fff 0%, #fff 72%, #fffafb 100%);
  border-color: var(--brand-border);
  box-shadow: var(--shadow-sm);
}

.cart-summary-head h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.cart-summary-head p {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.cart-summary-stats {
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.cart-summary-row + .cart-summary-row {
  margin-top: 10px;
}

.cart-summary-total {
  padding-top: 10px;
  border-top: 1px dashed var(--border-medium);
  color: var(--text-primary);
}

.cart-summary-total strong {
  font-size: 22px;
  color: var(--brand-primary);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cart-summary-total small {
  font-size: 12px;
  font-weight: 700;
}

.cart-network-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  color: var(--brand-primary);
  font-size: 13px;
  font-weight: 700;
}

.cart-network-chain {
  margin-left: -12px;
  border: 1.5px solid #fff;
  border-radius: 50%;
}

.cart-pay-btn {
  width: 100%;
  box-shadow: var(--shadow-brand);
}

.cart-clear-btn {
  width: 100%;
  margin-top: 10px;
}

@media (max-width: 640px) {
  .cart-list-head-side {
    display: none;
  }

  .cart-item {
    grid-template-columns: 72px 1fr;
    gap: 12px;
  }

  .cart-item img {
    width: 72px;
    height: 54px;
  }

  .cart-item-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .cart-summary-card {
    position: static;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-field label {
  font-size: 13px;
  font-weight: 700;
}

.form-input {
  height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-medium);
  background: #fff;
  outline: none;
  font-size: 14px;
}

.form-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* USDT Cashier */
.cashier-shell {
  max-width: 820px;
  margin: 24px auto 48px;
}

.cashier-header {
  background: linear-gradient(120deg, #ff2442 0%, #d81834 100%);
  color: #fff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.cashier-body {
  background: #fff;
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.cashier-items {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
}

.cashier-items[hidden] {
  display: none;
}

.cashier-items-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.cashier-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cashier-item-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--border-light);
}

.cashier-item-cover {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.cashier-item-cover-fallback {
  background: linear-gradient(135deg, var(--brand-soft), #fff);
}

.cashier-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.cashier-item-spec {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
}

.cashier-item-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-primary);
  white-space: nowrap;
}

@media (max-width: 520px) {
  .cashier-item-row {
    grid-template-columns: 48px 1fr;
  }

  .cashier-item-cover {
    width: 48px;
    height: 36px;
  }

  .cashier-item-price {
    grid-column: 2;
  }
}

.network-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

@media (max-width: 640px) {
  .network-tabs {
    grid-template-columns: 1fr;
  }
}

.network-tab {
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: left;
  transition: all var(--transition);
}

.network-tab.active {
  border-color: var(--brand-primary);
  background: var(--brand-soft);
}

.network-tab strong {
  display: block;
  font-size: 14px;
}

.network-tab span {
  font-size: 11px;
  color: var(--text-muted);
}

.cashier-grid {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 24px;
  align-items: center;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
}

@media (max-width: 680px) {
  .cashier-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

.qr-box {
  width: 210px;
  height: 210px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  display: grid;
  place-items: center;
}

.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-top: 6px;
}

.copy-code {
  font-family: var(--font-mono);
  font-size: 13px;
  word-break: break-all;
  font-weight: 600;
}

.status-banner {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.status-waiting {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-confirming {
  background: var(--brand-soft);
  color: var(--brand-primary);
}

.status-paid {
  background: var(--success-soft);
  color: var(--success);
}

.status-expired {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Guide & Sitemap */
.article-shell {
  max-width: 860px;
  margin: 10px auto 40px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px;
}

.article-shell h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 12px;
}

.article-section {
  margin-top: 24px;
}

.article-section h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.article-section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 10px;
}

/* Inline Quick Order Box on Product Detail */
.quick-order-box {
  background: #fafafa;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-net-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-net-pill {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-medium);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.quick-net-pill.active {
  border-color: var(--brand-primary);
  background: var(--brand-soft);
  color: var(--brand-primary);
}

/* QR Wrap & Caption */
.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.qr-caption {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  text-align: center;
}

/* Instant Pay Modal */
.pay-modal-card {
  width: 100%;
  max-width: 780px;
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  position: relative;
}

.pay-modal-card::-webkit-scrollbar {
  display: none;
}

.pay-modal-card .cashier-header {
  padding-right: 92px;
}
