/* =============================================
   订货商城 - Style Sheet (Orange Theme #FF6600)
   ============================================= */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #FF6600;
  --primary-dark: #E55D00;
  --primary-light: #FF8C42;
  --blue: #2F5496;
  --text: #333;
  --text-light: #666;
  --bg: #f5f5f5;
  --white: #fff;
  --border: #e8e8e8;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 8px;
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input { font-family: inherit; outline: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.header-nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; gap: 20px;
}

.header-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: bold; color: var(--primary);
  flex-shrink: 0;
}
.logo-icon { font-size: 24px; }
.logo-text { white-space: nowrap; }

.nav-box { display: flex; gap: 4px; }
.nav-link {
  padding: 8px 16px; border-radius: 6px;
  font-size: 15px; color: var(--text);
  transition: var(--transition); white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary); background: #FFF3E8;
}

.header-right { display: flex; align-items: center; gap: 12px; }

.search-form {
  display: flex; align-items: center;
  border: 2px solid var(--border); border-radius: 20px;
  overflow: hidden; transition: var(--transition);
}
.search-form:focus-within { border-color: var(--primary); }
.search-input {
  width: 180px; padding: 6px 14px; border: none;
  font-size: 13px; background: transparent;
}
.search-btn {
  padding: 6px 14px; background: none;
  font-size: 16px; color: var(--text-light);
}

.cart-btn {
  position: relative; padding: 8px 10px;
  background: #FFF3E8; border-radius: 8px;
  font-size: 22px; transition: var(--transition);
}
.cart-btn:hover { background: #FFE4CC; }

/* Floating cart button */
.cart-float {
  position: fixed; right: 16px; top: 50%; transform: translateY(-50%);
  z-index: 150; width: 50px; height: 50px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(255,102,0,0.4); cursor: pointer;
  transition: var(--transition);
}
.cart-float:hover { transform: translateY(-50%) scale(1.1); }
.cart-float .cart-badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 20px; height: 20px; line-height: 20px;
  border-radius: 10px; background: #e74c3c;
  color: #fff; font-size: 11px; text-align: center; font-weight: bold;
}

/* Floating contact panel */
.contact-float {
  position: fixed; right: 0; top: 35%; z-index: 149;
  display: flex; align-items: flex-start;
}
.contact-float-btn {
  width: 48px; height: 48px; border-radius: 8px 0 0 8px;
  background: var(--primary); color: #fff; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: -2px 2px 12px rgba(0,0,0,0.15);
  transition: var(--transition);
}
.contact-float-btn:hover { background: var(--primary-dark); }
.contact-float-panel {
  display: none; width: 220px; background: #fff;
  border-radius: 8px 0 0 8px; box-shadow: -2px 2px 16px rgba(0,0,0,0.12);
  overflow: hidden; padding: 0;
}
.contact-float.open .contact-float-panel { display: block; }
.contact-float-header {
  background: var(--primary); color: #fff; padding: 12px 16px;
  font-size: 14px; font-weight: bold; text-align: center;
}
.contact-float-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid #f5f5f5;
}
.contact-float-item:last-child { border-bottom: none; }
.cf-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.contact-float-item small { display: block; font-size: 11px; color: #999; }
.contact-float-item strong { font-size: 13px; color: #333; word-break: break-all; }
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; line-height: 20px;
  border-radius: 10px; background: var(--primary);
  color: #fff; font-size: 11px; text-align: center; font-weight: bold;
}

/* User Buttons */
.user-btn {
  padding: 7px 16px; border-radius: 18px; font-size: 13px;
  color: var(--primary); border: 1px solid var(--primary);
  transition: var(--transition); white-space: nowrap;
}
.user-btn:hover { background: var(--primary); color: #fff; }
.user-btn-reg { background: var(--primary); color: #fff; }
.user-btn-reg:hover { background: var(--primary-dark); }
.user-btn-out { color: #999; border-color: #ddd; }
.user-btn-out:hover { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.user-menu { display: flex; align-items: center; gap: 8px; }
.user-greeting { font-size: 13px; color: var(--text); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mobile-menu-btn {
  display: none; font-size: 24px; background: none;
  padding: 8px; color: var(--text);
}
.mobile-row2 { display:none; align-items:center; gap:8px; }
.cart-btn2 { display:none; position:relative; cursor:pointer; border:none; }

/* Mobile menu */
.mobile-menu {
  display: none; position: fixed; top: 60px; left: 0; right: 0; z-index: 99;
  background: var(--white); border-top: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); padding: 8px 16px;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; padding: 12px 0; border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.mobile-menu a:last-child { border-bottom: none; }

/* ---------- Announcement Bar ---------- */
.announcement-bar {
  overflow: hidden;
  position: relative;
  font-size: 14px;
  line-height: 1.6;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.announcement-bar:hover { opacity: 0.92; }

.announcement-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  height: 44px;
}

.announcement-icon {
  flex-shrink: 0;
  font-size: 16px;
  opacity: 0.8;
}

.announcement-scroll-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.announcement-track {
  display: flex;
  width: fit-content;
  will-change: transform;
}

.announcement-content {
  flex-shrink: 0;
  padding-right: 80px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.announcement-content > * {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

.announcement-content p,
.announcement-content span,
.announcement-content a,
.announcement-content strong,
.announcement-content em {
  display: inline;
  white-space: nowrap;
}

.announcement-content a {
  text-decoration: underline;
  font-weight: bold;
}

.announcement-bar:hover .announcement-track {
  animation-play-state: paused;
}

/* ---------- Announcement Modal ---------- */
.anno-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
}
.anno-modal-overlay.open {
  display: flex;
}

.anno-modal-box {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  animation: annoModalIn 0.3s ease;
}

@keyframes annoModalIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.anno-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.anno-modal-header h3 {
  font-size: 17px;
  color: #333;
}

.anno-modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #f5f5f5;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.anno-modal-close:hover {
  background: #e74c3c;
  color: #fff;
}

.anno-modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.9;
  color: #444;
}
.anno-modal-body p { margin-bottom: 14px; }
.anno-modal-body ul, .anno-modal-body ol { margin: 8px 0 16px 20px; }
.anno-modal-body li { margin-bottom: 6px; }
.anno-modal-body strong { color: #333; }
.anno-modal-body a { color: #FF6600; text-decoration: underline; }
.anno-modal-body img { max-width: 100%; border-radius: 6px; margin: 8px 0; }
.anno-modal-body table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.anno-modal-body td, .anno-modal-body th { border: 1px solid #e0e0e0; padding: 8px 12px; }

/* ---------- Hero Slider ---------- */
.hero { margin-top: 2px; }

.slider {
  position: relative; height: 360px; border-radius: var(--radius);
  overflow: hidden; margin-bottom: 24px;
}

.slide {
  position: absolute; inset: 0; opacity: 0;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s ease;
}
.slide.active { opacity: 1; }

.slide-content {
  text-align: center; color: #fff; padding: 40px;
}
.slide-content h2 { font-size: 36px; margin-bottom: 12px; text-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.slide-content p { font-size: 18px; margin-bottom: 24px; opacity: 0.95; }

.slide-btn {
  display: inline-block; padding: 12px 36px;
  background: #fff; color: var(--primary); border-radius: 30px;
  font-size: 16px; font-weight: bold; transition: var(--transition);
}
.slide-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }

.slider-dots {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px;
}
.slider-dots .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,0.5); cursor: pointer; transition: var(--transition);
}
.slider-dots .dot.active { background: #fff; transform: scale(1.2); }

/* ---------- Section ---------- */
.section { margin-bottom: 32px; }

.section-title {
  padding-bottom: 12px; margin-bottom: 20px;
  border-bottom: 2px solid var(--primary);
  font-size: 18px; color: var(--text);
  display: flex; align-items: baseline; gap: 8px;
}
.section-title .en { font-size: 13px; color: #999; font-weight: normal; text-transform: uppercase; }

/* ---------- Category Tabs ---------- */
.category-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

.cat-tab {
  padding: 8px 20px; border-radius: 20px;
  background: var(--white); color: var(--text);
  border: 1px solid var(--border); font-size: 14px;
  transition: var(--transition);
}
.cat-tab:hover { border-color: var(--primary); color: var(--primary); }
.cat-tab.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ---------- Product Grid ---------- */
.product-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
}

.product-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: var(--transition);
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.product-card-link { display: block; color: inherit; text-decoration: none; }
.product-card-link:hover { color: inherit; }

.product-img {
  position: relative; overflow: hidden;
  aspect-ratio: 1; background: #fafafa;
}
.product-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-img img { transform: scale(1.08); }

.product-img .product-badge {
  position: absolute; top: 8px; left: 8px;
  padding: 2px 8px; border-radius: 4px;
  background: var(--primary); color: #fff; font-size: 11px;
}

.product-body { padding: 12px; }

.product-title {
  font-size: 14px; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  line-height: 1.4; height: 2.8em; margin-bottom: 8px;
  color: var(--text);
}
.product-title:hover { color: var(--primary); }

.product-price {
  color: var(--primary); font-size: 18px; font-weight: bold;
  margin-bottom: 8px;
}
.product-price .symbol { font-size: 13px; }

.product-desc {
  font-size: 12px; color: var(--text-light);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 10px;
}

.add-cart-btn {
  width: 100%; padding: 8px 0; border-radius: var(--radius);
  background: var(--primary); color: #fff; font-size: 13px;
  transition: var(--transition);
}
.add-cart-btn:hover { background: var(--primary-dark); }
.add-cart-btn:active { transform: scale(0.97); }

/* ---------- Articles ---------- */
.articles-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}

.article-card {
  background: var(--white); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); transition: var(--transition);
}
.article-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

.article-card .article-icon {
  font-size: 32px; margin-bottom: 12px;
}
.article-card h4 {
  font-size: 16px; margin-bottom: 8px; color: var(--text);
}
.article-card p {
  font-size: 13px; color: var(--text-light);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 12px;
}
.article-card .article-date { font-size: 12px; color: #aaa; }

/* ---------- About ---------- */
.about-content {
  background: var(--white); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow);
}
.about-content p { font-size: 15px; line-height: 1.8; margin-bottom: 20px; color: var(--text); }

.about-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.about-features li {
  padding: 12px 16px; background: #FFF3E8;
  border-radius: var(--radius); font-size: 14px;
}

/* ---------- Order Query ---------- */
.order-query {
  background: var(--white); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow); text-align: center;
}

.order-form { display: flex; gap: 12px; max-width: 500px; margin: 0 auto; }
.order-input {
  flex: 1; padding: 12px 16px; border: 2px solid var(--border);
  border-radius: var(--radius); font-size: 14px; transition: var(--transition);
}
.order-input:focus { border-color: var(--primary); }
.order-btn {
  padding: 12px 28px; background: var(--primary); color: #fff;
  border-radius: var(--radius); font-size: 14px; font-weight: bold;
  transition: var(--transition);
}
.order-btn:hover { background: var(--primary-dark); }

.order-result {
  margin-top: 20px; padding: 20px;
  background: #f9f9f9; border-radius: var(--radius); text-align: left;
}
.order-result h4 { color: var(--primary); margin-bottom: 8px; }
.order-result p { font-size: 13px; color: var(--text-light); margin-bottom: 4px; }

/* ---------- Cart Sidebar ---------- */
.cart-overlay {
  display: none; position: fixed; inset: 0; z-index: 199;
  background: rgba(0,0,0,0.4);
}
.cart-overlay.open { display: block; }

.cart-sidebar {
  position: fixed; top: 0; right: -420px; z-index: 200;
  width: 380px; height: 100vh; background: var(--white);
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  transition: right 0.35s ease; display: flex; flex-direction: column;
}
.cart-sidebar.open { right: 0; }

.cart-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.cart-header h3 { font-size: 17px; }
.cart-close { font-size: 28px; background: none; color: #999; padding: 0 4px; }
.cart-close:hover { color: var(--text); }

.cart-items {
  flex: 1; overflow-y: auto; padding: 16px;
  min-height: 0;
}
.cart-empty { text-align: center; color: #aaa; padding: 60px 0; font-size: 15px; }

.cart-item {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--border); align-items: center;
}
.cart-item-img {
  width: 70px; height: 70px; border-radius: 6px;
  overflow: hidden; flex-shrink: 0; background: #f5f5f5;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info .name {
  font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cart-item-info .price { color: var(--primary); font-weight: bold; margin: 4px 0; }

.qty-ctrl {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border); border-radius: 4px;
  overflow: hidden; width: fit-content;
}
.qty-ctrl button {
  width: 28px; height: 28px; background: #f5f5f5; font-size: 16px;
  color: var(--text); transition: var(--transition);
}
.qty-ctrl button:hover { background: var(--primary); color: #fff; }
.qty-ctrl .qty { width: 36px; text-align: center; font-size: 13px; line-height: 28px; }

.cart-item-del {
  background: none; color: #ccc; font-size: 18px; padding: 4px;
}
.cart-item-del:hover { color: #e74c3c; }

.cart-footer {
  padding: 16px 20px; border-top: 1px solid var(--border);
  background: #fafafa;
}
.cart-total { font-size: 15px; margin-bottom: 12px; }
.cart-total strong { color: var(--primary); font-size: 20px; float: right; }

.checkout-btn {
  width: 100%; padding: 12px 0; background: var(--primary);
  color: #fff; font-size: 16px; font-weight: bold; border-radius: var(--radius);
  transition: var(--transition);
}
.checkout-btn:hover { background: var(--primary-dark); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%) translateY(-20px);
  z-index: 999; padding: 12px 28px; border-radius: 30px;
  background: var(--text); color: #fff; font-size: 14px;
  opacity: 0; transition: all 0.35s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Footer ---------- */
.footer {
  background: #2C2C2C; color: #bbb; padding-top: 40px;
  margin-top: 40px; margin-bottom: 32px;
  border-radius: var(--radius);
}

.footer-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }

.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #999; font-size: 13px; transition: var(--transition); }
.footer-col ul li a:hover { color: var(--primary); }
.footer-contact p { font-size: 13px; margin-bottom: 8px; }

.copyright {
  margin-top: 32px; padding: 16px 0;
  text-align: center; border-top: 1px solid #444;
  font-size: 12px; color: #777;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .about-features { grid-template-columns: repeat(2, 1fr); }

  .nav-box { display: none; }
  .search-form { display: none; }
  .mobile-menu-btn { display: block; }
  .mobile-row2 { display:flex; gap:25px; position:fixed; right:25px; top:50px; z-index:999; }
  .cart-btn2 { display:flex; align-items:center; justify-content:center; width:38px; height:38px; font-size:20px; background:rgba(255,255,255,0.85); border-radius:50%; box-shadow:0 2px 6px rgba(0,0,0,0.15); }
  .header-right { flex-wrap:wrap; }
  .header-right .cart-btn { display:none; }

  .slider { height: 240px; }
  .slide-content h2 { font-size: 24px; }
  .slide-content p { font-size: 14px; }
  .announcement-bar { font-size: 12px; }
  .announcement-bar-inner { padding: 8px 0; height: 38px; }
  .announcement-content { padding-right: 40px; gap: 20px; }
  .anno-modal-box { width: 95%; max-height: 85vh; }
  .anno-modal-header { padding: 14px 18px; }
  .anno-modal-body { padding: 18px; font-size: 14px; }

  .cart-sidebar { width: 100%; right: -100%; max-width: 100vw; overflow-y: auto; }
  .cart-sidebar .cart-items { flex: none; overflow-y: visible; max-height: none; }
  .cart-sidebar .cart-footer { position: relative; background: #fff; padding: 0 16px 16px; border-top: 1px solid #eee; margin-top: 0; }
  .checkout-btn { font-size: 15px; padding: 14px 0; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .product-card .product-title { font-size: 12px; }
  .product-price { font-size: 15px; }
  .articles-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .about-features { grid-template-columns: 1fr; }

  .slider { height: 200px; }
  .slide-content h2 { font-size: 20px; }
  .slide-content p { font-size: 13px; }
}

/* =============================================
   SUB-PAGE STYLES (Order Query / About / Articles)
   ============================================= */

/* --- Page Hero Banner --- */
.page-hero {
  border-radius: var(--radius); padding: 48px 32px; margin: 20px 0 28px;
  color: #fff; text-align: center;
}
.page-hero h1 { font-size: 28px; margin-bottom: 8px; }
.page-hero p { font-size: 15px; opacity: 0.9; }

.page-content { max-width: 900px; margin: 0 auto; }

/* --- Order Query Full --- */
.order-query-full { background: var(--white); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }

.order-form-large { max-width: 560px; margin: 0 auto; }
.order-form-large .form-group { margin-bottom: 20px; }
.order-form-large .form-group label { display: block; font-size: 14px; font-weight: bold; margin-bottom: 8px; color: var(--text); }
.order-input-lg {
  width: 100%; padding: 14px 18px; border: 2px solid var(--border);
  border-radius: var(--radius); font-size: 15px; transition: var(--transition);
}
.order-input-lg:focus { border-color: var(--primary); }
.order-btn-lg {
  width: 100%; padding: 14px 0; background: var(--primary); color: #fff;
  border-radius: var(--radius); font-size: 16px; font-weight: bold; transition: var(--transition);
}
.order-btn-lg:hover { background: var(--primary-dark); }

.order-result-full { margin-top: 28px; }

.order-detail-card {
  background: #f9f9f9; border-radius: var(--radius); padding: 24px;
}
.order-detail-card h4 { color: var(--primary); margin-bottom: 16px; font-size: 16px; }
.order-info-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.order-info-grid div { }
.order-info-grid label { display: block; font-size: 12px; color: #999; margin-bottom: 2px; }
.order-info-grid span { font-size: 14px; color: var(--text); }

/* Tracking Bar */
.tracking-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; position: relative;
}
.track-step { display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 1; }
.track-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: #ddd; border: 3px solid #fff; box-shadow: 0 0 0 2px #ddd;
}
.track-step.current .track-dot { background: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.track-step.done .track-dot { background: #4CAF50; box-shadow: 0 0 0 2px #4CAF50; }
.track-step span { font-size: 12px; color: #999; }
.track-step.current span { color: var(--primary); font-weight: bold; }
.track-step.done span { color: #4CAF50; }
.track-line {
  flex: 1; height: 2px; background: #ddd; margin: 0 -8px; margin-bottom: 22px;
}

/* Order Help */
.order-help { margin-top: 40px; }
.order-help h3 { font-size: 16px; margin-bottom: 16px; color: var(--text); }
.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.help-card {
  background: #FAFAFA; border-radius: var(--radius); padding: 20px; border: 1px solid #eee;
}
.help-card h4 { font-size: 14px; margin-bottom: 8px; color: var(--text); }
.help-card p { font-size: 13px; color: var(--text-light); line-height: 1.6; }

/* --- About Page --- */
.about-section { margin-bottom: 36px; }
.about-section h2 {
  font-size: 20px; color: var(--text); padding-bottom: 10px;
  border-bottom: 2px solid var(--primary); margin-bottom: 20px;
}
.about-text-card {
  background: var(--white); border-radius: var(--radius);
  padding: 24px 28px; box-shadow: var(--shadow);
}
.about-text-card p { font-size: 14px; line-height: 1.8; color: var(--text); margin-bottom: 12px; }

.about-features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.feature-card {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  text-align: center; box-shadow: var(--shadow); transition: var(--transition);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.feature-icon { font-size: 36px; margin-bottom: 12px; }
.feature-card h4 { font-size: 15px; margin-bottom: 8px; color: var(--text); }
.feature-card p { font-size: 13px; color: var(--text-light); line-height: 1.5; }

/* Contact Grid */
.contact-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.contact-item {
  padding: 16px; background: #f9f9f9; border-radius: var(--radius);
}
.contact-item strong { display: block; font-size: 13px; color: #999; margin-bottom: 4px; }
.contact-item span { font-size: 15px; color: var(--text); }

/* Payment List */
.payment-list { margin-top: 12px; }
.payment-list li { padding: 10px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; color: var(--text); }
.payment-list li:last-child { border-bottom: none; }
.payment-list li strong { color: var(--primary); }

/* Timeline */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: ''; position: absolute; left: 8px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--primary), #ddd);
}
.timeline-item { display: flex; gap: 20px; margin-bottom: 24px; position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: -28px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--primary);
}
.timeline-year {
  flex-shrink: 0; width: 56px; padding-top: 2px;
  font-size: 16px; font-weight: bold; color: var(--primary);
}
.timeline-body { background: var(--white); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); flex: 1; }
.timeline-body h4 { font-size: 15px; margin-bottom: 4px; }
.timeline-body p { font-size: 13px; color: var(--text-light); }

/* --- Articles Page --- */
.articles-list { display: flex; flex-direction: column; gap: 12px; }

.article-list-card {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--white); border-radius: var(--radius); padding: 20px 24px;
  box-shadow: var(--shadow); cursor: pointer; transition: var(--transition);
}
.article-list-card:hover { transform: translateX(4px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.article-list-icon { font-size: 36px; flex-shrink: 0; width: 56px; text-align: center; }
.article-list-body { flex: 1; min-width: 0; }
.article-list-body h4 { font-size: 16px; margin-bottom: 6px; color: var(--text); }
.article-list-body p { font-size: 13px; color: var(--text-light); margin-bottom: 8px;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.article-list-meta { display: flex; align-items: center; gap: 10px; }

.article-cat-tag {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  background: #FFF3E8; color: var(--primary); font-size: 11px;
}

/* Article Detail */
.article-detail { }
.back-btn {
  display: inline-block; padding: 10px 20px; margin-bottom: 24px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; color: var(--text); cursor: pointer; transition: var(--transition);
}
.back-btn:hover { border-color: var(--primary); color: var(--primary); }

#articleDetailContent {
  background: var(--white); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow);
}
#articleDetailContent h2 { font-size: 22px; margin-bottom: 12px; color: var(--text); line-height: 1.4; }

.article-detail-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #f0f0f0; }
.article-body-text { font-size: 15px; line-height: 1.9; color: var(--text); }
.article-body-text p { margin-bottom: 16px; }
.article-body-text ul { margin: 8px 0 16px 20px; }
.article-body-text ul li { list-style: disc; margin-bottom: 6px; font-size: 14px; }
.article-body-text strong { color: var(--text); }

/* --- Sub-page Responsive --- */
@media (max-width: 768px) {
  .page-hero { padding: 32px 20px; }
  .page-hero h1 { font-size: 22px; }
  .order-info-grid { grid-template-columns: 1fr; }
  .help-grid { grid-template-columns: 1fr; }
  .about-features-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .article-list-card { flex-direction: column; gap: 12px; }
  .article-list-icon { width: auto; }
}

@media (max-width: 480px) {
  .about-features-grid { grid-template-columns: 1fr; }
  .tracking-bar { flex-wrap: wrap; justify-content: center; gap: 8px; }
  .track-line { display: none; }
}

/* =============================================
   CHECKOUT & PAYMENT PAGE STYLES
   ============================================= */

/* --- Checkout Step Hint --- */
.checkout-step-hint {
  font-size: 13px; color: var(--primary); font-weight: bold;
  padding: 6px 14px; background: #FFF3E8; border-radius: 16px;
}

/* --- Checkout Layout --- */
.checkout-layout { display: flex; gap: 24px; align-items: flex-start; }
.checkout-main { flex: 1; min-width: 0; }
.checkout-sidebar { width: 320px; flex-shrink: 0; position: sticky; top: 80px; }

/* --- Checkout Card --- */
.checkout-card {
  background: var(--white); border-radius: var(--radius);
  padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.card-title { font-size: 16px; color: var(--text); margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; }

/* --- Address Form --- */
.address-form { }
.form-row { display: flex; gap: 16px; margin-bottom: 14px; }
.form-row-3 { }
.form-g { flex: 1; min-width: 0; }
.form-g label { display: block; font-size: 13px; font-weight: bold; color: var(--text); margin-bottom: 6px; }
.form-g input, .form-g select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 14px; transition: var(--transition);
  background: var(--white);
}
.form-g input:focus, .form-g select:focus { border-color: var(--primary); outline: none; }

/* --- Checkout Item Row --- */
.co-items-list { }
.co-item {
  display: flex; gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid #f5f5f5;
}
.co-item:last-child { border-bottom: none; }
.co-item-img {
  width: 60px; height: 60px; border-radius: 6px;
  overflow: hidden; flex-shrink: 0; background: #f5f5f5;
}
.co-item-img img { width: 100%; height: 100%; object-fit: cover; }
.co-item-info { flex: 1; min-width: 0; }
.co-item-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-item-price { font-size: 13px; color: var(--text-light); margin-top: 4px; }
.co-item-subtotal { font-size: 15px; font-weight: bold; color: var(--primary); flex-shrink: 0; }

/* --- Payment Methods --- */
.pay-methods { display: flex; flex-direction: column; gap: 10px; }
.pay-method {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border: 2px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: var(--transition); position: relative;
}
.pay-method:hover { border-color: #FFB380; }
.pay-method.selected { border-color: var(--primary); background: #FFF8F2; }
.pay-method input[type="radio"] { display: none; }
.pay-icon { font-size: 28px; flex-shrink: 0; }
.pay-info { flex: 1; }
.pay-info strong { display: block; font-size: 14px; margin-bottom: 2px; }
.pay-info small { font-size: 12px; color: #999; }
.pay-check {
  display: none; font-size: 18px; color: var(--primary); font-weight: bold;
}
.pay-method.selected .pay-check { display: block; }

/* --- Summary Card --- */
.summary-card { }
.summary-rows { margin-bottom: 20px; }
.sum-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: 14px; color: var(--text-light);
}
.sum-row.sum-total {
  border-top: 1px solid #f0f0f0; margin-top: 8px; padding-top: 14px;
  font-size: 16px; font-weight: bold; color: var(--text);
}
.sum-row.sum-total span:last-child { color: var(--primary); font-size: 22px; }

.submit-order-btn {
  width: 100%; padding: 14px 0; background: var(--primary); color: #fff;
  font-size: 17px; font-weight: bold; border-radius: var(--radius);
  transition: var(--transition);
}
.submit-order-btn:hover { background: var(--primary-dark); }
.submit-note { text-align: center; font-size: 11px; color: #bbb; margin-top: 8px; }

/* --- Empty State --- */
.checkout-empty { }
.empty-state { text-align: center; padding: 60px 0; }
.empty-icon { font-size: 72px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; }
.empty-state p { color: #999; margin-bottom: 24px; }
.empty-back-btn {
  display: inline-block; padding: 12px 32px;
  background: var(--primary); color: #fff; border-radius: 30px;
  font-size: 15px; transition: var(--transition);
}
.empty-back-btn:hover { background: var(--primary-dark); }

/* =============================================
   PAYMENT PAGE STYLES
   ============================================= */

.payment-card {
  background: var(--white); border-radius: var(--radius);
  padding: 36px 40px; box-shadow: var(--shadow);
  max-width: 700px; margin: 0 auto;
}

.payment-status { display: flex; gap: 36px; align-items: center; margin-bottom: 28px; }

/* QR Code */
.payment-qr { text-align: center; flex-shrink: 0; }
.qr-box {
  width: 200px; height: 200px; margin: 0 auto;
  border: 3px solid #eee; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: #fafafa;
}
.qr-inner { text-align: center; }
.qr-icon { font-size: 48px; }
.qr-code-pattern {
  width: 120px; height: 120px; margin: 12px auto 0;
  background: repeating-conic-gradient(#333 0% 25%, #fff 0% 50%) 50% / 12px 12px;
  border-radius: 8px; opacity: 0.15;
}
.qr-text { font-size: 12px; color: #999; margin-top: 8px; }

/* Order Info in Payment */
.payment-order-info { flex: 1; }
.poi-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid #f5f5f5; font-size: 14px;
}
.poi-row:last-child { border-bottom: none; }
.poi-row span:first-child { color: #999; }

/* Success Check */
.success-check {
  width: 72px; height: 72px; border-radius: 50%;
  background: #4CAF50; color: #fff; font-size: 36px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}

/* Payment Actions */
.payment-actions { margin-top: 24px; text-align: center; }
.pay-sim-btn {
  width: 100%; padding: 14px 0; border-radius: var(--radius);
  color: #fff; font-size: 16px; font-weight: bold;
  margin-bottom: 10px; transition: var(--transition); display: inline-block; text-decoration: none;
}
.pay-sim-btn:hover { opacity: 0.9; }
.pay-cancel-btn {
  width: 100%; padding: 12px 0; border-radius: var(--radius);
  background: var(--white); color: var(--text-light); font-size: 14px;
  border: 1px solid var(--border); display: inline-block; text-decoration: none;
  transition: var(--transition);
}
.pay-cancel-btn:hover { border-color: #999; color: var(--text); }
.pay-note { font-size: 12px; color: #ccc; margin-top: 12px; }

/* --- Modal --- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: var(--white); border-radius: 12px;
  padding: 32px; max-width: 480px; width: 90%; position: relative;
}
.modal-close {
  position: absolute; top: 12px; right: 16px;
  font-size: 24px; background: none; color: #999;
}
.modal-close:hover { color: var(--text); }

/* =============================================
   PRODUCT DETAIL PAGE
   ============================================= */

.prod-breadcrumb { padding: 12px 0; font-size: 13px; color: #999; }
.prod-breadcrumb a { color: #666; }
.prod-breadcrumb a:hover { color: var(--primary); }
.prod-breadcrumb span { color: #333; }

.prod-main { display: flex; gap: 32px; margin-bottom: 32px; }
.prod-gallery { width: 420px; flex-shrink: 0; }
.prod-main-img { border-radius: var(--radius); overflow: hidden; background: #fafafa; }
.prod-main-img img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.prod-info { flex: 1; }
.prod-name { font-size: 20px; line-height: 1.4; margin-bottom: 12px; color: #333; }
.prod-badge { display: inline-block; padding: 2px 12px; border-radius: 3px; background: var(--primary); color: #fff; font-size: 12px; margin-bottom: 16px; }

.prod-price-box { background: #FFF8F2; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; }
.prod-price { font-size: 28px; font-weight: bold; color: var(--primary); }
.prod-original-price { font-size: 14px; color: #bbb; text-decoration: line-through; margin-left: 10px; }
.prod-desc { display: block; font-size: 13px; color: #999; margin-top: 6px; }

.prod-meta { margin-bottom: 20px; }
.prod-meta-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f5f5f5; font-size: 13px; max-width: 360px; }
.prod-meta-row span:first-child { color: #999; }

.prod-actions { }
.prod-qty-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; font-size: 13px; color: #999; }
.prod-buy-btn { padding: 12px 36px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius); font-size: 15px; font-weight: bold; cursor: pointer; transition: var(--transition); margin-right: 12px; }
.prod-buy-btn:hover { background: var(--primary-dark); }
.prod-buy-now { padding: 12px 36px; background: #e74c3c; color: #fff; border: none; border-radius: var(--radius); font-size: 15px; font-weight: bold; cursor: pointer; transition: var(--transition); }
.prod-buy-now:hover { background: #c0392b; }

/* Product Tabs */
.prod-tabs { display: flex; gap: 0; border-bottom: 2px solid #eee; margin-bottom: 24px; }
.prod-tab { padding: 12px 24px; background: none; border: none; font-size: 14px; color: #666; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition); }
.prod-tab:hover { color: var(--primary); }
.prod-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: bold; }

.prod-tab-content { }
.prod-detail-content { font-size: 14px; line-height: 1.9; color: #444; }
.prod-detail-content p { margin-bottom: 14px; }
.prod-detail-content ul { margin: 8px 0 16px 20px; }
.prod-detail-content ul li { list-style: disc; margin-bottom: 6px; }
.prod-detail-content strong { color: #333; }

/* Reviews */
.review-summary { display: flex; gap: 40px; padding: 24px; background: #fafafa; border-radius: var(--radius); margin-bottom: 24px; }
.review-avg { text-align: center; flex-shrink: 0; }
.review-score { font-size: 42px; font-weight: bold; color: #f60; }
.review-stars { color: #f60; font-size: 16px; margin: 4px 0; }
.review-count { font-size: 12px; color: #999; }
.review-dist { flex: 1; }
.dist-row { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 4px; color: #666; }
.dist-bar { flex: 1; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.dist-fill { height: 100%; background: #f60; border-radius: 4px; }

.review-list { }
.review-item { padding: 16px 0; border-bottom: 1px solid #f5f5f5; }
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review-user { font-weight: bold; font-size: 13px; }
.review-stars-sm { color: #f60; font-size: 12px; }
.review-date { font-size: 12px; color: #bbb; margin-left: auto; }
.review-text { font-size: 13px; color: #444; line-height: 1.6; }
.review-spec { margin-top: 8px; font-size: 12px; color: #999; display: flex; gap: 16px; }

/* --- Review inline form (member center) --- */
.review-toggle { font-size: 12px; color: #f60; cursor: pointer; text-decoration: none; display: inline-block; margin-top: 4px; }
.review-toggle:hover { color: #e55d00; text-decoration: underline; }
.review-done { font-size: 12px; color: #4CAF50; display: inline-block; margin-top: 4px; }
.review-inline-form { margin-top: 8px; padding: 10px 12px; background: #fafafa; border-radius: 6px; border: 1px solid #eee; }
.review-inline-form textarea { width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; resize: vertical; min-height: 50px; font-family: inherit; }
.review-inline-form textarea:focus { border-color: #f60; outline: none; }
.star-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.star-label { font-size: 13px; color: #666; }
.star-group { display: flex; gap: 2px; cursor: pointer; }
.star-item { font-size: 22px; color: #ddd; font-style: normal; transition: color 0.15s; user-select: none; }
.star-item.on { color: #f60; }

/* Product detail responsive */
@media (max-width: 768px) {
  .prod-main { flex-direction: column; }
  .prod-gallery { width: 100%; }
  .review-summary { flex-direction: column; gap: 16px; }
}

/* --- Order Cards (Member Center) --- */
.order-card { background:#fff; border:1px solid #e8e8e8; border-radius:10px; margin-bottom:16px; box-shadow:0 1px 4px rgba(0,0,0,0.04); }
.oc-head { display:flex; justify-content:space-between; align-items:flex-start; padding:14px 16px; border-bottom:1px solid #f0f0f0; }
.oc-no { font-weight:bold; font-size:15px; color:#333; text-decoration:none; }
.oc-no:hover { color:#f60; }
.oc-time { font-size:12px; color:#999; margin-top:2px; }
.oc-tags { display:flex; gap:6px; flex-shrink:0; }
.oc-tag { display:inline-block; padding:2px 10px; border-radius:10px; font-size:11px; font-weight:bold; }
.oc-tag.pending { background:#fff3cd; color:#856404; }
.oc-tag.paid { background:#d1ecf1; color:#0c5460; }
.oc-tag.shipped { background:#d6d8f8; color:#383d94; }
.oc-tag.delivered { background:#d4edda; color:#155724; }
.oc-tag.completed { background:#d4edda; color:#155724; }
.oc-tag.cancelled { background:#f8d7da; color:#721c24; }
.oc-tag.rf-requested { background:#fff3cd; color:#856404; }
.oc-tag.rf-approved { background:#d1ecf1; color:#0c5460; }
.oc-tag.rf-rejected { background:#f8d7da; color:#721c24; }
.oc-tag.rf-completed { background:#d4edda; color:#155724; }
.oc-item { display:flex; align-items:center; gap:10px; padding:12px 16px; border-bottom:1px solid #f8f8f8; }
.oc-item:last-of-type { border-bottom:none; }
.oc-img { width:52px; height:52px; border-radius:8px; object-fit:cover; flex-shrink:0; border:1px solid #eee; }
.oc-info { flex:1; min-width:0; }
.oc-name { font-size:14px; color:#333; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-bottom:4px; }
.oc-price { font-size:13px; color:#888; }
.oc-price span { color:#666; }
.oc-price b { color:#f60; margin-left:6px; font-size:14px; }
.oc-extra { padding:10px 16px; font-size:13px; border-top:1px solid #f0f0f0; background:#fefefe; display:flex; align-items:center; gap:8px; }
.oc-form { display:flex; gap:6px; align-items:center; }
.oc-form input { padding:4px 10px; border:1px solid #ddd; border-radius:4px; font-size:12px; width:150px; }
.oc-foot { display:flex; gap:8px; align-items:center; padding:10px 16px; border-top:1px solid #f0f0f0; flex-wrap:wrap; }

@media (max-width: 768px) {
  .oc-head { flex-direction:column; gap:8px; }
  .oc-img { width:42px; height:42px; }
  .oc-item { padding:10px 12px; }
  .oc-foot { flex-direction:column; align-items:stretch; }
  .oc-foot .btn { text-align:center; }
  .oc-form input { width:120px; }
}

/* --- Checkout & Payment Responsive --- */
@media (max-width: 768px) {
  .checkout-layout { flex-direction: column; }
  .checkout-sidebar { width: 100%; position: static; }
  .form-row { flex-direction: column; gap: 10px; }
  .payment-status { flex-direction: column; }
  .payment-card { padding: 24px 20px; }
  .qr-box { width: 160px; height: 160px; }
  .qr-code-pattern { width: 100px; height: 100px; }
  /* Member center */
  .checkout-sidebar[style*="width:200px"] { width:100% !important; }
  .checkout-sidebar .btn { display:inline-block; }
  .checkout-sidebar .checkout-card > div:last-child { flex-direction:row !important; flex-wrap:wrap; }
  .admin-table { font-size:12px; }
  .admin-table th, .admin-table td { padding:6px 8px; }
  .order-input-lg { width:100% !important; max-width:100%; }
  .form-g { flex-direction:column; }
  .form-g label { margin-bottom:4px; }
}
