/* ============================================
   DayDayShip / RiRiDa Global Logistics Platform
   Production Stylesheet
   ============================================ */

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #e8f0fe;
  --accent: #ff6a00;
  --accent-dark: #e55a00;
  --accent-light: #fff3e8;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --bg: #ffffff;
  --bg-gray: #f8fafc;
  --bg-dark: #0f172a;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.1), 0 6px 10px rgba(0,0,0,.08);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1280px;
  --header-h: 64px;
}

.theme-dds {
  --brand: #1a73e8;
  --brand-dark: #1557b0;
  --brand-light: #e8f0fe;
  --hero-gradient: linear-gradient(135deg, #0d47a1 0%, #1565c0 40%, #1a73e8 100%);
}

.theme-ririda {
  --brand: #ff6a00;
  --brand-dark: #e55a00;
  --brand-light: #fff3e8;
  --hero-gradient: linear-gradient(135deg, #bf360c 0%, #e65100 40%, #ff6a00 100%);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
}
a { color: var(--brand); text-decoration:none; }
a:hover { color: var(--brand-dark); }
img { max-width:100%; }
button { cursor:pointer; font-family:inherit; }
input, select { font-family:inherit; font-size:14px; }

.container { max-width:var(--max-width); margin:0 auto; padding:0 24px; }

[dir="rtl"] { text-align:right; }

.site-header {
  position:sticky; top:0; z-index:100;
  background:#fff; border-bottom:1px solid var(--border);
  height:var(--header-h);
  box-shadow:var(--shadow);
}
.header-inner {
  max-width:var(--max-width); margin:0 auto; padding:0 24px;
  height:100%; display:flex; align-items:center; gap:32px;
}
.logo {
  font-size:22px; font-weight:800; color:var(--brand);
  display:flex; align-items:center; gap:8px; white-space:nowrap;
}
.logo svg { width:32px; height:32px; }
.logo-sub { font-size:11px; color:var(--text-secondary); font-weight:400; display:block; line-height:1.2; }
.nav-links { display:flex; gap:4px; list-style:none; flex:1; }
.nav-links a {
  display:block; padding:8px 14px; border-radius:6px;
  color:var(--text); font-size:14px; font-weight:500;
  transition:all .15s;
}
.nav-links a:hover, .nav-links a.active {
  background:var(--brand-light); color:var(--brand);
}
.header-actions { display:flex; align-items:center; gap:12px; }
.btn {
  display:inline-flex; align-items:center; gap:6px;
  padding:9px 20px; border-radius:6px; font-size:14px; font-weight:600;
  border:1px solid transparent; transition:all .15s; white-space:nowrap;
}
.btn-primary { background:var(--brand); color:#fff; }
.btn-primary:hover { background:var(--brand-dark); color:#fff; }
.btn-outline { border-color:var(--border); color:var(--text); background:#fff; }
.btn-outline:hover { border-color:var(--brand); color:var(--brand); }
.btn-lg { padding:13px 32px; font-size:16px; border-radius:8px; }
.btn-block { width:100%; justify-content:center; }

.lang-switcher { position:relative; }
.lang-btn {
  display:flex; align-items:center; gap:6px;
  padding:7px 12px; border:1px solid var(--border); border-radius:6px;
  background:#fff; font-size:13px; color:var(--text); cursor:pointer;
}
.lang-btn:hover { border-color:var(--brand); }
.lang-dropdown {
  position:absolute; top:calc(100% + 6px); right:0;
  background:#fff; border:1px solid var(--border); border-radius:8px;
  box-shadow:var(--shadow-lg); width:240px; max-height:360px; overflow-y:auto;
  display:none; z-index:200;
}
.lang-dropdown.show { display:block; }
.lang-search { width:100%; padding:10px 12px; border:none; border-bottom:1px solid var(--border); font-size:13px; outline:none; }
.lang-option {
  display:flex; justify-content:space-between; align-items:center;
  padding:10px 14px; cursor:pointer; font-size:13px; color:var(--text);
}
.lang-option:hover { background:var(--bg-gray); }
.lang-option.active { color:var(--brand); font-weight:600; }
.lang-option .native { font-weight:500; }
.lang-option .english { color:var(--text-light); font-size:12px; }

.mobile-menu-btn { display:none; background:none; border:none; font-size:24px; color:var(--text); }

.hero {
  background:var(--hero-gradient);
  color:#fff; padding:80px 0 100px; position:relative; overflow:hidden;
}
.hero::before {
  content:''; position:absolute; top:-50%; right:-20%;
  width:600px; height:600px; border-radius:50%;
  background:rgba(255,255,255,.05);
}
.hero::after {
  content:''; position:absolute; bottom:-30%; left:-10%;
  width:400px; height:400px; border-radius:50%;
  background:rgba(255,255,255,.03);
}
.hero-content { position:relative; z-index:1; max-width:760px; }
.hero h1 { font-size:44px; font-weight:800; line-height:1.2; margin-bottom:16px; }
.hero p { font-size:18px; opacity:.9; margin-bottom:32px; max-width:600px; }
.hero-buttons { display:flex; gap:16px; flex-wrap:wrap; }
.hero .btn-white { background:#fff; color:var(--brand-dark); }
.hero .btn-white:hover { background:rgba(255,255,255,.9); }
.hero .btn-ghost { background:transparent; color:#fff; border:2px solid rgba(255,255,255,.5); }
.hero .btn-ghost:hover { border-color:#fff; background:rgba(255,255,255,.1); }
.hero-stats { display:flex; gap:48px; margin-top:48px; }
.hero-stat .num { font-size:32px; font-weight:800; }
.hero-stat .label { font-size:13px; opacity:.8; }

.section { padding:72px 0; }
.section-gray { background:var(--bg-gray); }
.section-title { text-align:center; margin-bottom:48px; }
.section-title h2 { font-size:32px; font-weight:700; margin-bottom:12px; }
.section-title p { color:var(--text-secondary); font-size:16px; max-width:600px; margin:0 auto; }

.feature-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.feature-card {
  background:#fff; border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:32px 28px; transition:all .2s;
}
.feature-card:hover { box-shadow:var(--shadow-lg); transform:translateY(-2px); border-color:var(--brand-light); }
.feature-icon {
  width:48px; height:48px; border-radius:10px;
  background:var(--brand-light); color:var(--brand);
  display:flex; align-items:center; justify-content:center;
  font-size:24px; margin-bottom:16px;
}
.feature-card h3 { font-size:18px; font-weight:700; margin-bottom:8px; }
.feature-card p { color:var(--text-secondary); font-size:14px; }

.two-sided { display:grid; grid-template-columns:1fr 1fr; gap:32px; }
.side-card {
  border-radius:var(--radius-lg); padding:40px 36px; color:#fff;
  position:relative; overflow:hidden;
}
.side-shipper { background:linear-gradient(135deg,#1e3a5f,#2563eb); }
.side-carrier { background:linear-gradient(135deg,#7c2d12,#ea580c); }
.side-card h3 { font-size:24px; margin-bottom:12px; }
.side-card ul { list-style:none; margin:20px 0; }
.side-card li { padding:6px 0; padding-left:24px; position:relative; opacity:.95; }
.side-card li::before { content:'\2713'; position:absolute; left:0; font-weight:700; }

.quote-search {
  background:#fff; border-radius:var(--radius-lg); box-shadow:var(--shadow-lg);
  padding:0; overflow:hidden; margin:40px 0;
}
.quote-tabs { display:flex; border-bottom:1px solid var(--border); overflow-x:auto; }
.quote-tab {
  padding:14px 22px; font-size:14px; font-weight:600; color:var(--text-secondary);
  background:none; border:none; border-bottom:2px solid transparent;
  white-space:nowrap; transition:all .15s;
}
.quote-tab:hover { color:var(--brand); }
.quote-tab.active { color:var(--brand); border-bottom-color:var(--brand); }
.quote-form { padding:28px; }
.quote-row { display:flex; gap:16px; flex-wrap:wrap; align-items:flex-end; }
.quote-field { flex:1; min-width:180px; }
.quote-field label { display:block; font-size:12px; color:var(--text-secondary); margin-bottom:6px; font-weight:500; }
.quote-field input, .quote-field select {
  width:100%; padding:11px 14px; border:1px solid var(--border); border-radius:6px;
  font-size:14px; outline:none; transition:border .15s; background:#fff;
}
.quote-field input:focus, .quote-field select:focus { border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-light); }
.quote-swap {
  width:40px; height:40px; border-radius:50%; border:1px solid var(--border);
  background:#fff; display:flex; align-items:center; justify-content:center;
  cursor:pointer; flex-shrink:0; margin-bottom:2px; color:var(--text-secondary);
}
.quote-swap:hover { border-color:var(--brand); color:var(--brand); }
.quote-submit {
  padding:11px 32px; background:var(--brand); color:#fff; border:none;
  border-radius:6px; font-size:15px; font-weight:600; white-space:nowrap;
}
.quote-submit:hover { background:var(--brand-dark); }

.filter-bar {
  background:#fff; border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:20px 24px; margin-bottom:28px; display:flex; gap:16px; flex-wrap:wrap; align-items:center;
}
.filter-bar input, .filter-bar select {
  padding:9px 14px; border:1px solid var(--border); border-radius:6px; font-size:14px; outline:none;
}
.filter-bar input:focus, .filter-bar select:focus { border-color:var(--brand); }
.filter-bar .search-input { flex:1; min-width:200px; }
.carrier-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:20px; }
.carrier-card {
  background:#fff; border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:24px; transition:all .2s;
}
.carrier-card:hover { box-shadow:var(--shadow-lg); border-color:var(--brand-light); }
.carrier-header { display:flex; gap:16px; align-items:flex-start; margin-bottom:14px; }
.carrier-logo {
  width:56px; height:56px; border-radius:10px; background:var(--brand-light);
  color:var(--brand); display:flex; align-items:center; justify-content:center;
  font-size:20px; font-weight:800; flex-shrink:0;
}
.carrier-info h3 { font-size:17px; font-weight:700; margin-bottom:4px; }
.carrier-meta { font-size:13px; color:var(--text-secondary); display:flex; gap:12px; flex-wrap:wrap; }
.carrier-tags { display:flex; gap:6px; flex-wrap:wrap; margin:12px 0; }
.tag { display:inline-block; padding:3px 10px; border-radius:20px; font-size:12px; font-weight:500; }
.tag-blue { background:#e8f0fe; color:#1a73e8; }
.tag-orange { background:#fff3e8; color:#ea580c; }
.tag-green { background:#e8f5e9; color:#2e7d32; }
.tag-purple { background:#f3e5f5; color:#7b1fa2; }
.carrier-desc { font-size:13px; color:var(--text-secondary); margin-bottom:14px; line-height:1.5; }
.carrier-footer { display:flex; justify-content:space-between; align-items:center; }
.carrier-stats { font-size:13px; color:var(--text-secondary); }
.carrier-stats strong { color:var(--text); }

.detail-header { background:var(--bg-gray); padding:32px 0; border-bottom:1px solid var(--border); }
.detail-header-inner { display:flex; gap:24px; align-items:center; }
.detail-logo {
  width:80px; height:80px; border-radius:14px; background:var(--brand-light);
  color:var(--brand); display:flex; align-items:center; justify-content:center;
  font-size:28px; font-weight:800;
}
.detail-tabs { display:flex; border-bottom:1px solid var(--border); background:#fff; }
.detail-tab {
  padding:16px 28px; font-size:15px; font-weight:600; color:var(--text-secondary);
  background:none; border:none; border-bottom:2px solid transparent;
}
.detail-tab.active { color:var(--brand); border-bottom-color:var(--brand); }
.detail-content { padding:32px 0; }
.info-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:16px 32px; }
.info-item label { display:block; font-size:13px; color:var(--text-secondary); margin-bottom:4px; }
.info-item .value { font-size:15px; font-weight:500; }

.track-box { max-width:680px; margin:0 auto; text-align:center; padding:48px 0; }
.track-input-group { display:flex; gap:12px; margin:24px 0; }
.track-input-group input {
  flex:1; padding:14px 18px; border:2px solid var(--border); border-radius:8px; font-size:16px; outline:none;
}
.track-input-group input:focus { border-color:var(--brand); }
.track-result { margin-top:40px; text-align:left; }
.timeline { position:relative; padding-left:32px; }
.timeline::before {
  content:''; position:absolute; left:11px; top:8px; bottom:8px; width:2px; background:var(--border);
}
.timeline-item { position:relative; padding-bottom:24px; }
.timeline-item::before {
  content:''; position:absolute; left:-27px; top:4px;
  width:12px; height:12px; border-radius:50%; background:var(--border); border:2px solid #fff;
}
.timeline-item.active::before { background:var(--brand); }
.timeline-item .time { font-size:13px; color:var(--text-secondary); }
.timeline-item .status { font-size:15px; font-weight:600; margin:2px 0; }
.timeline-item .location { font-size:13px; color:var(--text-secondary); }

.nav-page { background:#f5f7fa; min-height:60vh; }
.nav-topbar {
  background:#fff; border-bottom:1px solid var(--border);
  padding:16px 0; position:sticky; top:var(--header-h); z-index:50;
}
.nav-topbar-inner { display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.nav-topbar h1 { font-size:20px; color:var(--brand); white-space:nowrap; }
.nav-search { flex:1; max-width:480px; position:relative; min-width:200px; }
.nav-search input { width:100%; padding:10px 16px; border:1px solid var(--border); border-radius:6px; font-size:14px; outline:none; }
.nav-search input:focus { border-color:var(--brand); }
.nav-quick-links { display:flex; gap:8px; flex-wrap:wrap; }
.nav-quick-links a { font-size:12px; padding:4px 10px; background:var(--bg-gray); border-radius:4px; color:var(--text-secondary); }
.nav-quick-links a:hover { background:var(--brand-light); color:var(--brand); }
.nav-body { display:flex; gap:24px; padding:24px 0; }
.nav-sidebar {
  width:200px; flex-shrink:0; background:#fff; border-radius:var(--radius);
  border:1px solid var(--border); overflow:hidden; height:fit-content;
  position:sticky; top:140px;
}
.nav-cat-item {
  display:flex; align-items:center; gap:10px;
  padding:13px 18px; font-size:14px; color:var(--text); cursor:pointer;
  border-left:3px solid transparent; transition:all .15s;
}
.nav-cat-item:hover { background:var(--bg-gray); }
.nav-cat-item.active { background:var(--brand-light); color:var(--brand); border-left-color:var(--brand); font-weight:600; }
.nav-content { flex:1; min-width:0; }
.nav-section {
  background:#fff; border:1px solid var(--border); border-radius:var(--radius);
  padding:24px; margin-bottom:20px;
}
.nav-section-header {
  display:flex; align-items:center; justify-content:space-between; margin-bottom:18px;
  padding-bottom:12px; border-bottom:1px solid var(--border); flex-wrap:wrap; gap:8px;
}
.nav-section-header h3 { font-size:17px; color:var(--brand); }
.nav-subtabs { display:flex; gap:4px; }
.nav-subtab {
  padding:5px 14px; font-size:13px; border-radius:4px; cursor:pointer;
  color:var(--text-secondary); background:none; border:none;
}
.nav-subtab.active { background:var(--brand); color:#fff; }
.az-bar { display:flex; gap:2px; flex-wrap:wrap; margin-bottom:16px; }
.az-link {
  width:26px; height:26px; display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:600; color:var(--text-secondary); border-radius:4px; cursor:pointer;
}
.az-link:hover { background:var(--brand-light); color:var(--brand); }
.link-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px 20px; }
.link-item {
  display:flex; align-items:baseline; gap:8px; padding:6px 8px; border-radius:4px;
  cursor:pointer; font-size:13px;
}
.link-item:hover { background:var(--bg-gray); }
.link-abbr { font-weight:700; color:var(--brand); min-width:42px; }
.link-name { color:var(--text-secondary); font-size:12px; }
.nav-table { width:100%; border-collapse:collapse; font-size:13px; }
.nav-table th { text-align:left; padding:10px 12px; background:var(--bg-gray); font-weight:600; color:var(--text-secondary); border-bottom:1px solid var(--border); }
.nav-table td { padding:10px 12px; border-bottom:1px solid var(--border); }
.nav-table tr:hover td { background:var(--bg-gray); }
.tool-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.tool-card {
  padding:16px; border:1px solid var(--border); border-radius:8px; cursor:pointer; transition:all .15s;
}
.tool-card:hover { border-color:var(--brand); box-shadow:var(--shadow); }
.tool-card .tool-name { font-size:14px; font-weight:600; margin-bottom:4px; }
.tool-card .tool-desc { font-size:12px; color:var(--text-secondary); }

.pricing-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.pricing-card {
  background:#fff; border:2px solid var(--border); border-radius:var(--radius-lg);
  padding:36px 32px; text-align:center; transition:all .2s;
}
.pricing-card.featured { border-color:var(--brand); box-shadow:var(--shadow-lg); position:relative; }
.pricing-card.featured::before {
  content:'Popular'; position:absolute; top:-12px; left:50%; transform:translateX(-50%);
  background:var(--brand); color:#fff; padding:4px 16px; border-radius:20px; font-size:12px; font-weight:600;
}
.pricing-card h3 { font-size:20px; margin-bottom:8px; }
.pricing-price { font-size:36px; font-weight:800; color:var(--brand); margin:16px 0; }
.pricing-price span { font-size:14px; font-weight:400; color:var(--text-secondary); }
.pricing-features { list-style:none; text-align:left; margin:24px 0; }
.pricing-features li { padding:8px 0; border-bottom:1px solid var(--border); font-size:14px; }
.pricing-features li::before { content:'\2713 '; color:var(--brand); font-weight:700; }

.site-footer { background:var(--bg-dark); color:#cbd5e1; padding:56px 0 24px; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr 1fr; gap:32px; margin-bottom:40px; }
.footer-brand .logo { color:#fff; margin-bottom:12px; }
.footer-brand p { font-size:13px; color:#94a3b8; max-width:280px; }
.footer-col h4 { color:#fff; font-size:14px; margin-bottom:16px; }
.footer-col ul { list-style:none; }
.footer-col li { margin-bottom:8px; }
.footer-col a { color:#94a3b8; font-size:13px; }
.footer-col a:hover { color:#fff; }
.footer-bottom {
  border-top:1px solid #1e293b; padding-top:24px;
  display:flex; justify-content:space-between; align-items:center;
  font-size:13px; color:#64748b; flex-wrap:wrap; gap:12px;
}

.breadcrumb { padding:16px 0; font-size:13px; color:var(--text-secondary); }
.breadcrumb a { color:var(--text-secondary); }
.breadcrumb a:hover { color:var(--brand); }
.breadcrumb span { margin:0 8px; }

.pagination { display:flex; justify-content:center; gap:6px; margin-top:32px; }
.pagination button {
  min-width:36px; height:36px; border:1px solid var(--border); background:#fff;
  border-radius:6px; font-size:13px; color:var(--text);
}
.pagination button.active { background:var(--brand); color:#fff; border-color:var(--brand); }
.pagination button:hover:not(.active) { border-color:var(--brand); color:var(--brand); }

.modal-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:300;
  display:none; align-items:center; justify-content:center;
}
.modal-overlay.show { display:flex; }
.modal {
  background:#fff; border-radius:var(--radius-lg); width:90%; max-width:520px;
  max-height:90vh; overflow-y:auto;
}
.modal-header { padding:20px 24px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; }
.modal-header h3 { font-size:18px; }
.modal-close { background:none; border:none; font-size:22px; color:var(--text-secondary); }
.modal-body { padding:24px; }
.form-group { margin-bottom:16px; }
.form-group label { display:block; font-size:13px; font-weight:600; margin-bottom:6px; }
.form-group input, .form-group select, .form-group textarea {
  width:100%; padding:10px 14px; border:1px solid var(--border); border-radius:6px; font-size:14px; outline:none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color:var(--brand); }
.form-group textarea { min-height:80px; resize:vertical; }

.toast {
  position:fixed; top:80px; left:50%; transform:translateX(-50%);
  background:#1f2937; color:#fff; padding:12px 24px; border-radius:8px;
  font-size:14px; z-index:400; opacity:0; transition:opacity .3s; pointer-events:none;
}
.toast.show { opacity:1; }

.loading-spinner {
  display:inline-block; width:20px; height:20px; border:2px solid var(--border);
  border-top-color:var(--brand); border-radius:50%; animation:spin .8s linear infinite;
}
@keyframes spin { to { transform:rotate(360deg); } }

@media (max-width:1024px) {
  .feature-grid, .carrier-grid, .pricing-grid { grid-template-columns:repeat(2,1fr); }
  .footer-grid { grid-template-columns:repeat(3,1fr); }
  .link-grid, .tool-grid { grid-template-columns:repeat(3,1fr); }
}
@media (max-width:768px) {
  .hero h1 { font-size:30px; }
  .hero p { font-size:15px; }
  .hero-stats { gap:24px; }
  .nav-links { display:none; }
  .mobile-menu-btn { display:block; }
  .feature-grid, .carrier-grid, .pricing-grid, .two-sided, .info-grid { grid-template-columns:1fr; }
  .footer-grid { grid-template-columns:1fr 1fr; }
  .link-grid, .tool-grid { grid-template-columns:repeat(2,1fr); }
  .nav-sidebar { display:none; }
  .quote-row { flex-direction:column; }
  .quote-swap { transform:rotate(90deg); align-self:center; }
  .section { padding:48px 0; }
}
@media (max-width:480px) {
  .container { padding:0 16px; }
  .hero { padding:48px 0 60px; }
  .hero h1 { font-size:24px; }
  .link-grid, .tool-grid { grid-template-columns:1fr; }
  .footer-grid { grid-template-columns:1fr; }
}
