/* shared.css - Shared styles for all pages */
:root {
  --gold: #B8860B;
  --gold-light: #D4A017;
  --gold-pale: #F5E6C0;
  --dark: #0F0F0F;
  --dark2: #1A1A1A;
  --dark3: #2A2A2A;
  --text: #E8E0D0;
  --text-muted: #A09880;
  --accent: #C8A84B;
  --green: #2ECC71;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--dark);
  color: var(--text);
  font-family: 'Noto Sans TC', sans-serif;
  min-height: 100vh;
}

/* TOP BAR */
.topbar {
  background: var(--dark2);
  border-bottom: 1px solid rgba(184,134,11,0.3);
  padding: 10px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

.back-btn {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.back-btn:hover { color: var(--gold-light); }

.site-name {
  color: var(--gold-light);
  font-size: 13px;
  font-family: 'Noto Serif TC', serif;
  text-decoration: none;
}

.topbar-right { display: flex; align-items: center; gap: 14px; }

.topbar-link {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.topbar-link:hover { color: var(--accent); }

.wa-btn {
  background: #25D366;
  color: white !important;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.wa-btn:hover { background: #1ebe5d; }

.uniform-link {
  border: 1px solid var(--gold);
  color: var(--gold-light) !important;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
}
.uniform-link:hover { background: rgba(184,134,11,0.15); }

/* PAGE HEADER */
.page-header {
  padding: 50px 40px 40px;
  border-bottom: 1px solid rgba(184,134,11,0.15);
  background: linear-gradient(135deg, var(--dark2) 0%, var(--dark) 100%);
}

.page-header-inner { max-width: 1200px; margin: 0 auto; }

.page-badge {
  display: inline-block;
  background: rgba(184,134,11,0.15);
  border: 1px solid rgba(184,134,11,0.4);
  color: var(--gold-light);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.page-title {
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.page-title-en {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.page-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.count-badge {
  background: rgba(184,134,11,0.1);
  border: 1px solid rgba(184,134,11,0.25);
  color: var(--gold-light);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
}

/* SEARCH */
.search-bar {
  max-width: 1200px;
  margin: 28px auto 0;
  padding: 0 40px;
}

.search-input {
  width: 100%;
  background: var(--dark2);
  border: 1px solid rgba(184,134,11,0.25);
  border-radius: 4px;
  padding: 14px 20px;
  color: var(--text);
  font-size: 14px;
  font-family: 'Noto Sans TC', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--gold-light); }
.search-input::placeholder { color: var(--text-muted); }

/* TABLE */
.table-container {
  max-width: 1200px;
  margin: 28px auto 60px;
  padding: 0 40px;
}

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

thead th {
  background: var(--dark2);
  color: var(--gold-light);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(184,134,11,0.3);
  font-weight: 500;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}
tbody tr:hover { background: rgba(184,134,11,0.04); }

tbody td {
  padding: 16px 16px;
  vertical-align: top;
  line-height: 1.5;
}

.company-name-zh {
  font-family: 'Noto Serif TC', serif;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
}
.company-name-en {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.address-zh { font-size: 12px; color: var(--text); margin-bottom: 3px; }
.address-en { font-size: 11px; color: var(--text-muted); }

.phone-link {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}
.phone-link:hover { text-decoration: underline; }

.fax { color: var(--text-muted); font-size: 11px; margin-top: 3px; }

.expiry-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  background: rgba(46,204,113,0.1);
  color: var(--green);
  border: 1px solid rgba(46,204,113,0.2);
  white-space: nowrap;
}

.reg-badge {
  font-family: 'Playfair Display', serif;
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 700;
}

/* MAP BUTTON */
.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(184,134,11,0.1);
  border: 1px solid rgba(184,134,11,0.3);
  color: var(--gold-light);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
  font-family: 'Noto Sans TC', sans-serif;
  margin-top: 6px;
}
.map-btn:hover {
  background: rgba(184,134,11,0.2);
  border-color: rgba(184,134,11,0.6);
}

/* MAP MODAL OVERLAY */
.map-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.map-modal.active { display: flex; }

.map-modal-box {
  background: var(--dark2);
  border: 1px solid rgba(184,134,11,0.4);
  border-radius: 6px;
  width: 100%;
  max-width: 760px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
}

.map-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(184,134,11,0.2);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.map-modal-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}
.map-modal-addr {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.map-close {
  background: rgba(255,255,255,0.06);
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.map-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

.map-iframe-wrap {
  position: relative;
  width: 100%;
  height: 420px;
  background: var(--dark3);
}
.map-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.map-modal-footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.map-open-link {
  color: var(--gold-light);
  font-size: 12px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
.map-open-link:hover { text-decoration: underline; }

/* NO RESULTS */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* FOOTER */
footer {
  background: var(--dark2);
  border-top: 1px solid rgba(184,134,11,0.2);
  padding: 30px 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.8;
}
footer a { color: var(--gold-light); text-decoration: none; }

@media (max-width: 768px) {
  .topbar { padding: 8px 16px; flex-wrap: wrap; gap: 8px; }
  .page-header { padding: 30px 16px; }
  .search-bar { padding: 0 16px; }
  .table-container { padding: 0 16px; overflow-x: auto; }
  table { min-width: 600px; }
}
