/* Front theme: blue / white / black */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #0f172a;
  --accent: #38bdf8;
  --bg-base: #020617;
  --bg-surface: #0f172a;
  --surface: #ffffff;
  --surface-soft: #e2e8f0;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;
  --border-soft: rgba(148, 163, 184, 0.18);
  --shadow-lg: 0 30px 80px rgba(2, 6, 23, 0.45);
  --card-radius: 18px;
  --transition: all 0.25s ease;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.22), transparent 26%),
    linear-gradient(180deg, #071120 0%, #020617 100%);
  min-height: 100vh;
  color: var(--text-main);
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.container, nav, footer, .alert { position: relative; z-index: 1; }

.navbar {
  background: rgba(2, 6, 23, 0.86) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding: 12px 0;
}

.navbar-brand {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: .3px;
  color: #fff;
}

.navbar .nav-link {
  color: rgba(226, 232, 240, 0.78) !important;
  font-size: 14px;
  padding: 7px 14px !important;
  border-radius: 10px;
  transition: var(--transition);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  background: rgba(37, 99, 235, 0.14);
  color: #fff !important;
}

.navbar-search .form-control,
.mobile-search-input {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #fff;
}

.navbar-search .form-control {
  border-radius: 20px 0 0 20px;
  font-size: 13px;
  padding: 7px 14px;
  width: 190px;
}

.navbar-search .form-control::placeholder,
.mobile-search-input::placeholder,
.search-bar-wrap input::placeholder,
.glass-input::placeholder {
  color: rgba(226, 232, 240, 0.35);
}

.navbar-search .form-control:focus,
.mobile-search-input:focus,
.search-bar-wrap:focus-within,
.glass-input:focus {
  border-color: rgba(56, 189, 248, 0.7) !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14) !important;
  outline: none;
}

.navbar-search .btn,
.search-bar-wrap .btn-search,
.btn-buy,
.btn-submit-pay {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  color: #fff;
}

.navbar-search .btn {
  border-radius: 0 20px 20px 0;
  padding: 7px 14px;
}

.site-notice-bar {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.9), rgba(15, 23, 42, 0.92));
  border: none;
  color: #eff6ff;
  font-size: 13px;
  margin: 0;
  border-radius: 0;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow-lg);
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.22);
  margin-bottom: 18px;
}

.hero-copy h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.hero-copy p {
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 0;
  line-height: 1.8;
}

.hero-search {
  display: flex;
  align-items: center;
}

.search-bar-wrap {
  width: 100%;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  padding: 8px 8px 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(10px);
}

.search-bar-wrap input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  flex: 1;
  min-width: 0;
}

.search-bar-wrap input:focus { outline: none; }
.search-icon { color: rgba(226,232,240,.45); font-size: 15px; flex-shrink: 0; }
.search-bar-wrap .btn-search {
  border-radius: 18px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition);
}

.search-bar-wrap .btn-search:hover,
.btn-buy:hover,
.btn-submit-pay:hover:not(:disabled) {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.search-hint,
.query-card,
.glass-card,
.product-card {
  border-radius: var(--card-radius) !important;
}

.search-hint,
.query-card,
.glass-card {
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--border-soft);
  color: var(--text-dark);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.search-hint { padding: 12px 18px; font-size: 14px; }
.clear-link { color: var(--primary); text-decoration: none; }
.clear-link:hover { text-decoration: underline; }

#catTabs { gap: 8px; }
#catTabs .nav-link {
  white-space: nowrap;
  border-radius: 999px !important;
  font-size: 13px;
  padding: 8px 16px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.15);
}
#catTabs .nav-link:hover { color: #fff; background: rgba(30, 41, 59, 0.96); }
#catTabs .nav-link.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: transparent;
}

.product-card {
  background: #fff;
  border: 1px solid #e2e8f0 !important;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 18px 40px rgba(15,23,42,.08);
}
.product-card:hover { transform: translateY(-6px); box-shadow: 0 24px 46px rgba(15,23,42,.14); }
.product-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 220px;
  padding: 8px;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.98), rgba(219,234,254,0.95) 62%, rgba(191,219,254,0.92) 100%),
    linear-gradient(180deg, #eff6ff, #dbeafe);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 2px;
  transition: transform 0.35s ease;
  filter: drop-shadow(0 12px 20px rgba(37, 99, 235, 0.08));
}
.product-card:hover .product-img-wrap img { transform: scale(1.04); }
.product-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  color: rgba(37,99,235,.26);
}
.product-detail-image {
  width: 100%;
  max-height: 420px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
  margin-bottom: 12px;
  display: block;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.98), rgba(219,234,254,0.95) 60%, rgba(191,219,254,0.92) 100%),
    linear-gradient(180deg, #eff6ff, #dbeafe);
  padding: 2px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  filter: drop-shadow(0 16px 24px rgba(37, 99, 235, 0.08));
}
.sale-corner {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(251, 113, 133, 0.28);
  color: #ef4444;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.12);
}
.product-card .card-title {
  color: #0f172a;
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1.4;
}
.product-card .card-text { color: #64748b; }
.category-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.product-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}
.tag-hot { background: #fee2e2; color: #b91c1c; }
.tag-recommend { background: #dbeafe; color: #1d4ed8; }
.tag-new { background: #dcfce7; color: #15803d; }
.tag-sale {
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.95), rgba(254, 202, 202, 0.92));
  border: 1px solid rgba(251, 113, 133, 0.35);
  font-size: 12px;
  font-weight: 800;
}
.sale-text,
.sale-corner-text {
  background: linear-gradient(90deg, #ef4444 0%, #f97316 35%, #eab308 68%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stock-badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 10px;
  font-weight: 700;
}
.stock-badge.in-stock { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.stock-badge.out-stock { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.price-original { font-size: 12px; color: #94a3b8; text-decoration: line-through; }
.price-sale {
  font-size: 1.82rem;
  font-weight: 900;
  color: #ef4444;
  line-height: 1;
  letter-spacing: -0.02em;
}
.price-normal {
  font-size: 1.82rem;
  font-weight: 900;
  color: #ef4444;
  line-height: 1;
  letter-spacing: -0.02em;
}
.price-highlight {
  color: #ef4444;
  font-weight: 900;
  font-size: 1.08rem;
}
.countdown-wrap {
  background: linear-gradient(135deg, rgba(255, 241, 242, 0.98), rgba(255, 237, 213, 0.98));
  border: 1px solid rgba(251, 113, 133, 0.32);
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #e11d48;
  text-align: center;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.08);
}
.countdown-timer {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.06em;
  background: linear-gradient(90deg, #ef4444 0%, #f97316 40%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.btn-buy {
  border-radius: 12px;
  font-size: 13px;
  padding: 9px 16px;
  font-weight: 700;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-disabled {
  background: #cbd5e1 !important;
  color: #64748b !important;
  box-shadow: none !important;
  cursor: not-allowed;
}
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}
.empty-state i { font-size: 3.5rem; opacity: 0.5; }
.query-card h5, .content-title { color: #0f172a; }
.query-card p, .content-muted { color: #64748b; }
.query-icon, .query-icon-large { color: var(--primary); font-size: 2.2rem; }
.query-icon-large { font-size: 2.8rem; }
.glass-card-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 20px 24px;
}
.glass-card-header h5 { color: #fff; margin: 0; font-weight: 800; }
.header-success { background: linear-gradient(135deg, #16a34a, #0f172a); }
.header-primary { background: linear-gradient(135deg, #2563eb, #0f172a); }
.soft-header { background: linear-gradient(135deg, #2563eb, #1e293b); padding: 14px 20px; }
.order-card-shell { overflow: hidden; }
.glass-input {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px !important;
  color: #0f172a !important;
  transition: var(--transition);
}
.form-label { color: #0f172a; font-size: 14px; font-weight: 700; }
.form-text { color: #64748b !important; font-size: 12px; }
.qty-btn {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--primary);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: #dbeafe; }
.qty-input {
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  text-align: center;
  font-weight: 700;
  width: 60px;
  border-radius: 10px !important;
}
.pay-radio input { display: none; }
.pay-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
  border: 2px solid #dbeafe;
  border-radius: 14px;
  cursor: pointer;
  transition: var(--transition);
  min-width: 80px;
  font-size: 13px;
  color: #334155;
  background: #fff;
}
.pay-radio input:checked + .pay-option {
  border-color: var(--primary);
  background: #eff6ff;
  color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}
.pay-option:hover { border-color: #60a5fa; }
.amount-preview {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.amount-preview span:first-child { color: #334155; font-size: 14px; }
.amount-preview .total-price { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.product-info-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.product-info-block h5 {
  color: #0f172a;
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 800;
}
.product-info-block p { color: #64748b; font-size: 13px; margin: 0 0 8px; }
.btn-submit-pay {
  border-radius: 14px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 800;
  width: 100%;
  letter-spacing: 0.3px;
}
.muted-note, .subtle-text { color: #64748b; font-size: 12px; }
.success-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #15803d);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 0 0 12px rgba(34,197,94,.12), 0 0 0 24px rgba(34,197,94,.06);
}
.card-key-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.card-key-item .key-text { color: #0f172a; font-size: 13px; font-family: monospace; word-break: break-all; }
.btn-copy-single {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-copy-single:hover { background: #eff6ff; color: var(--primary); }
.btn-copy-single.copied { background: #dcfce7; border-color: #86efac; color: #15803d; }
.btn-copy-all {
  width: 100%;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--primary);
  border-radius: 12px;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}
.btn-copy-all:hover { background: #dbeafe; }
.order-info-row {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
}
.order-info-row:last-child { border-bottom: none; }
.order-info-row.simple { border: none; padding: 4px 0; }
.order-info-label { color: #64748b; width: 80px; flex-shrink: 0; }
.order-info-value { color: #0f172a; }
.divider-top { border-top: 1px solid #e2e8f0; }
.status-text { font-size: 12px; font-weight: 700; }
.status-text.success { color: #16a34a; }
.status-text.warning { color: #d97706; }
.status-text.danger { color: #dc2626; }
.breadcrumb { background: transparent; padding: 0; margin-bottom: 16px; }
.breadcrumb-item a { color: #bfdbfe; text-decoration: none; font-size: 13px; }
.breadcrumb-item.active { color: #94a3b8; font-size: 13px; }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(226,232,240,.25); }
.secondary-action {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.secondary-action:hover { color: var(--primary); border-color: #93c5fd; }
.empty-icon { font-size: 4rem; color: rgba(37,99,235,.35); }
.empty-icon.warning, .pending-icon { color: #f59e0b; }
footer {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
}
footer p, footer span { color: #94a3b8 !important; }
.footer-brand { color: #cbd5e1 !important; }
.footer-note { font-size: 11px; }
.toast-custom {
  border-radius: 12px !important;
  box-shadow: 0 14px 30px rgba(2,6,23,.22) !important;
}

@media (max-width: 991px) {
  .hero-panel { grid-template-columns: 1fr; padding: 22px; }
}

@media (max-width: 767px) {
  .pay-option { padding: 10px 12px; min-width: 70px; font-size: 12px; }
  .navbar-search { display: none; }
  .amount-preview .total-price { font-size: 1.3rem; }
  .product-img-wrap { min-height: 180px; padding: 6px; }
  .product-img-wrap img { max-height: none; padding: 0; }
  .product-detail-image { padding: 0; border-radius: 14px; }
  .countdown-wrap { padding: 5px 8px; font-size: 11px; }
  .countdown-timer { font-size: 13px; }
  .search-bar-wrap .btn-search { padding-inline: 16px; }
}
