:root {
  --brand-primary: #5e2d8a;
  --brand-primary-dark: #3f1c63;
  --brand-primary-light: #8c5dba;
  --brand-gold: #c9a14d;
  --brand-gold-dark: #a8842f;
  --brand-dark: #2a1a3e;
  --brand-bg: #f8f5fb;
  --brand-text: #333;
  --brand-muted: #6c757d;
}

* { box-sizing: border-box; }

html, body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--brand-text);
  background: #fff;
  scroll-behavior: smooth;
}

a { text-decoration: none; color: var(--brand-primary); }
a:hover { color: var(--brand-gold); }

img { max-width: 100%; height: auto; display: block; }

/* ===== Navbar ===== */
.navbar-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar-brand-logo .logo-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-gold));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.navbar-brand-logo .brand-text {
  line-height: 1.1;
}
.navbar-brand-logo .brand-name-zh {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-dark);
  display: block;
}
/* (Replaced by the version above with white-space) */

.site-navbar {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  padding: 0.6rem 0;
}
.site-navbar .nav-link {
  color: var(--brand-dark) !important;
  font-weight: 500;
  padding: 0.5rem 0.85rem !important;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
}
.navbar-brand-logo .brand-name-en {
  font-size: 0.65rem;
  color: var(--brand-muted);
  letter-spacing: 1px;
  display: block;
  white-space: nowrap;
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
  color: var(--brand-primary) !important;
}
.site-navbar .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: var(--brand-gold);
}

.btn-ticket {
  background: var(--brand-primary);
  color: #fff;
  border: none;
  padding: 0.5rem 1.2rem;
  font-weight: 600;
  border-radius: 4px;
  transition: background 0.2s;
  white-space: nowrap;
}
.navbar-actions .btn { white-space: nowrap; }
.btn-ticket:hover {
  background: var(--brand-primary-dark);
  color: #fff;
}

.lang-dropdown .btn {
  color: var(--brand-dark);
  background: transparent;
  border: 1px solid #dee2e6;
  font-size: 0.9rem;
}
.lang-dropdown .dropdown-menu { min-width: 9rem; }
.lang-dropdown .dropdown-item.active {
  background: var(--brand-primary);
  color: #fff;
}

/* ===== Side Quick Links ===== */
.side-quick-links {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  background: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px 0 0 8px;
  overflow: hidden;
}
.side-quick-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 70px;
  padding: 12px 6px;
  color: var(--brand-dark);
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.72rem;
  text-align: center;
  transition: background 0.2s, color 0.2s;
}
.side-quick-links a:last-child { border-bottom: 0; }
.side-quick-links a:hover {
  background: var(--brand-primary);
  color: #fff;
}
.side-quick-links a .icon {
  font-size: 1.3rem;
  margin-bottom: 4px;
}
@media (max-width: 767px) {
  .side-quick-links {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    transform: none;
    border-radius: 0;
    display: flex;
    flex-direction: row;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  }
  .side-quick-links a {
    flex: 1;
    width: auto;
    padding: 8px 4px;
    border-bottom: 0;
    border-right: 1px solid #f0f0f0;
    font-size: 0.68rem;
  }
  .side-quick-links a:last-child { border-right: 0; }
  body { padding-bottom: 70px; }
}

/* ===== Hero / Page Header ===== */
.hero-carousel .carousel-item {
  height: 60vh;
  min-height: 380px;
  max-height: 600px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-carousel .carousel-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(94, 45, 138, 0.55), rgba(0, 0, 0, 0.25));
}
.hero-carousel .carousel-caption {
  bottom: 25%;
  text-align: left;
  left: 8%;
  right: 8%;
}
.hero-carousel .carousel-caption h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.hero-carousel .carousel-caption p {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.page-header {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  color: #fff;
  padding: clamp(50px, 8vw, 80px) 16px clamp(40px, 6vw, 60px);
  text-align: center;
  position: relative;
}
.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("https://picsum.photos/seed/exhibition/1600/400") center/cover;
  opacity: 0.18;
}
.page-header > * { position: relative; }
.page-header .eyebrow {
  letter-spacing: 4px;
  color: var(--brand-gold);
  font-size: 0.8rem;
  font-weight: 600;
}
.page-header h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin: 0.6rem 0 1rem;
}
.page-header .divider {
  width: 60px;
  height: 3px;
  background: var(--brand-gold);
  margin: 0 auto 1.2rem;
}
.page-header .breadcrumb {
  justify-content: center;
  background: transparent;
  margin: 0;
  font-size: 0.9rem;
}
.page-header .breadcrumb a,
.page-header .breadcrumb-item.active { color: rgba(255, 255, 255, 0.85); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, 0.6); }

/* ===== Section ===== */
.section { padding: clamp(40px, 6vw, 70px) 0; }
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title .eyebrow {
  letter-spacing: 4px;
  color: var(--brand-gold);
  font-size: 0.8rem;
  font-weight: 600;
}
.section-title h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-top: 0.5rem;
  color: var(--brand-dark);
}
.section-title .divider {
  width: 60px;
  height: 3px;
  background: var(--brand-gold);
  margin: 1rem auto 0.8rem;
}
.section-title p { color: var(--brand-muted); }

.section-light { background: var(--brand-bg); }

/* ===== Event Card ===== */
.event-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(94, 45, 138, 0.15);
}
.event-card .cover {
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  background-color: #ece3f5;
}
.event-card .body { padding: 1.2rem 1.4rem 1.4rem; flex: 1; display: flex; flex-direction: column; }
.event-card .tag {
  display: inline-block;
  background: var(--brand-primary);
  color: #fff;
  font-size: 0.72rem;
  padding: 2px 10px;
  border-radius: 30px;
  margin-bottom: 0.6rem;
  align-self: flex-start;
}
.event-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.event-card .meta {
  color: var(--brand-muted);
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}
.event-card .meta .material-symbols-outlined { font-size: 16px; vertical-align: -3px; }
.event-card .more {
  margin-top: auto;
  color: var(--brand-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ===== Buttons ===== */
.btn-primary-brand {
  background: var(--brand-primary);
  color: #fff;
  border: none;
  padding: 0.7rem 1.8rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.2s;
}
.btn-primary-brand:hover {
  background: var(--brand-primary-dark);
  color: #fff;
}
.btn-outline-brand {
  background: transparent;
  color: var(--brand-primary);
  border: 2px solid var(--brand-primary);
  padding: 0.6rem 1.6rem;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-outline-brand:hover {
  background: var(--brand-primary);
  color: #fff;
}
.btn-gold {
  background: var(--brand-gold);
  color: #fff;
  border: none;
  padding: 0.7rem 1.8rem;
  border-radius: 4px;
  font-weight: 600;
}
.btn-gold:hover { background: var(--brand-gold-dark); color: #fff; }

/* ===== News List ===== */
.news-list .news-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid #eee;
  align-items: center;
}
.news-list .news-item .thumb {
  width: 200px;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  flex-shrink: 0;
}
.news-list .news-item .body { flex: 1; min-width: 0; }
.news-list .news-item .date { color: var(--brand-muted); font-size: 0.85rem; }
.news-list .news-item h3 { font-size: 1.1rem; font-weight: 700; margin: 0.4rem 0; color: var(--brand-dark); }
.news-list .news-item p { color: var(--brand-muted); margin: 0 0 0.6rem; }
@media (max-width: 575px) {
  .news-list .news-item { flex-direction: column; align-items: stretch; }
  .news-list .news-item .thumb { width: 100%; }
}

/* ===== Filter chips ===== */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2rem;
}
.filter-chips .chip {
  background: #fff;
  border: 1px solid #ddd;
  color: var(--brand-text);
  padding: 6px 18px;
  border-radius: 30px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-chips .chip:hover,
.filter-chips .chip.active {
  background: var(--brand-dark);
  color: #fff;
  border-color: var(--brand-dark);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--brand-dark);
  color: #cdb9e3;
  padding: 50px 0 0;
}
.site-footer h5 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}
.site-footer a { color: #cdb9e3; font-size: 0.9rem; transition: color 0.2s; }
.site-footer a:hover { color: var(--brand-gold); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 0.6rem; }
.site-footer .social-icons { display: flex; gap: 12px; margin-top: 0.5rem; }
.site-footer .social-icons a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}
.site-footer .social-icons a:hover { background: var(--brand-primary); color: #fff; }
.site-footer .copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ===== Form ===== */
.form-card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}
.form-label { font-weight: 600; color: var(--brand-dark); }
.form-control, .form-select {
  border: 1px solid #dde0e3;
  padding: 0.6rem 0.9rem;
  border-radius: 6px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 0.2rem rgba(94, 45, 138, 0.15);
}
.required-mark { color: #d6336c; margin-left: 4px; }

/* ===== Steps ===== */
.steps {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}
.steps .step {
  flex: 1 1 140px;
  text-align: center;
  position: relative;
}
.steps .step .num {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #ece3f5;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  transition: all 0.2s;
}
.steps .step.active .num {
  background: var(--brand-primary);
  color: #fff;
}
.steps .step p { margin: 0; color: var(--brand-text); font-weight: 500; }

/* ===== About hero stats ===== */
.stat-card {
  text-align: center;
  padding: 1.6rem 1rem;
}
.stat-card .num {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--brand-primary);
  line-height: 1;
}
.stat-card .label {
  color: var(--brand-muted);
  margin-top: 0.5rem;
}

/* ===== Vendor list ===== */
.vendor-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  text-align: center;
  padding: 1.6rem 1.2rem;
  height: 100%;
  transition: transform 0.3s;
}
.vendor-card:hover { transform: translateY(-5px); }
.vendor-card .vendor-logo {
  width: 100%;
  aspect-ratio: 16/10;
  background-color: #f5f0fb;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.vendor-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 0.3rem;
}
.vendor-card .booth {
  color: var(--brand-gold);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.vendor-card p {
  color: var(--brand-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Product Card ===== */
.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s;
}
.product-card:hover { transform: translateY(-5px); }
.product-card .product-img {
  aspect-ratio: 1/1;
  background-size: cover;
  background-position: center;
}
.product-card .body { padding: 1.2rem; }
.product-card .brand {
  color: var(--brand-primary);
  font-size: 0.8rem;
  font-weight: 600;
}
.product-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0.3rem 0 0.6rem;
  color: var(--brand-dark);
}
.product-card .price {
  color: var(--brand-gold);
  font-weight: 700;
}

/* ===== Auth page ===== */
.auth-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(94, 45, 138, 0.06), rgba(201, 161, 77, 0.05));
  padding: 60px 16px;
}
.auth-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-card .auth-visual {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark)) url("https://picsum.photos/seed/loginbg/600/700") center/cover blend;
  color: #fff;
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.auth-card .auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(94, 45, 138, 0.88), rgba(63, 28, 99, 0.85));
}
.auth-card .auth-visual > * { position: relative; }
.auth-card .auth-visual h3 { font-size: 1.8rem; font-weight: 700; }
.auth-card .auth-form { padding: 50px 40px; }
.social-login {
  display: flex;
  gap: 10px;
  margin-top: 1rem;
}
.social-login .btn {
  flex: 1;
  border: 1px solid #dde0e3;
  background: #fff;
  padding: 0.55rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--brand-dark);
}
.social-login .btn:hover { background: #f5f5f5; }
@media (max-width: 767px) {
  .auth-card { grid-template-columns: 1fr; }
  .auth-card .auth-visual { padding: 30px 24px; }
  .auth-card .auth-form { padding: 30px 24px; }
}

/* ===== Contact info ===== */
.contact-info-card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  text-align: center;
  height: 100%;
}
.contact-info-card .icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(94, 45, 138, 0.08);
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}
.contact-info-card h4 { font-size: 1.05rem; font-weight: 700; color: var(--brand-dark); }
.contact-info-card p {
  color: var(--brand-muted);
  margin: 0;
  font-size: 0.9rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ===== Tabs ===== */
.brand-tabs .nav-link {
  color: var(--brand-text);
  background: transparent;
  border: 1px solid #dde0e3;
  border-radius: 30px;
  padding: 0.5rem 1.4rem;
  margin: 0 6px 8px 0;
  font-weight: 500;
}
.brand-tabs .nav-link.active {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

/* ===== Mobile nav adjustments ===== */
@media (max-width: 991px) {
  .site-navbar .navbar-collapse {
    background: #fff;
    padding: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  .site-navbar .nav-link.active::after { display: none; }
  .navbar-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .navbar-actions .btn-ticket,
  .navbar-actions .btn-outline-secondary { flex: 1 1 calc(50% - 8px); }
  .navbar-brand-logo .brand-name-zh { font-size: 0.95rem; }
  .navbar-brand-logo .brand-name-en { font-size: 0.62rem; }
}

/* 手機隱藏英文品牌字以節省空間 */
@media (max-width: 480px) {
  .navbar-brand-logo .brand-name-en { display: none; }
  .navbar-brand-logo .brand-name-zh { font-size: 0.85rem; line-height: 1.4; }
  .navbar-brand-logo .logo-circle { width: 34px; height: 34px; font-size: 14px; }
}

/* ===== Tablet portrait fix for hero ===== */
@media (max-width: 575px) {
  .hero-carousel .carousel-item { min-height: 320px; height: 50vh; }
  .hero-carousel .carousel-caption { bottom: 15%; }
  .steps { gap: 6px; }
  .steps .step { flex: 1 1 calc(50% - 6px); }
  .steps .step .num { width: 40px; height: 40px; font-size: 1rem; }
  .steps .step p { font-size: 0.85rem; }
  .filter-chips .chip { padding: 5px 14px; font-size: 0.85rem; }
  .brand-tabs .nav-link { padding: 0.4rem 1rem; font-size: 0.9rem; margin-right: 4px; }
  .news-list .news-item { padding: 1rem 0; }
  .news-list .news-item h3 { font-size: 1rem; }
  .vendor-card { padding: 1.2rem 0.8rem; }
  .vendor-card h4 { font-size: 0.95rem; }
}

/* ===== Avoid horizontal overflow on small screens ===== */
@media (max-width: 575px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .form-card { padding: 1.4rem 1.1rem; }
  .hero-carousel .carousel-caption { left: 5%; right: 5%; }
}

/* ===== iframe responsive ===== */
iframe { max-width: 100%; }

/* 確保長文字不會跑出去 */
.event-card h3,
.vendor-card h4,
.product-card h4 { word-break: break-word; overflow-wrap: anywhere; }

/* ===== Utility ===== */
.text-brand { color: var(--brand-primary) !important; }
.bg-brand { background: var(--brand-primary) !important; color: #fff; }
.text-gold { color: var(--brand-gold) !important; }
.fw-700 { font-weight: 700; }
