/* ============================================================
   永昌當鋪 - 共用樣式表 (導航 + 頁尾)
   檔案：shared.css
   前綴：yc-  (YongChang)  ← 獨立命名空間，不與其他 CSS 衝突
   使用方式：每個頁面只需引入這一支 CSS 即可
   <link rel="stylesheet" href="shared.css" />
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400;600;700;900&family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

/* ============================================================
   全域 CSS 變數
   ============================================================ */
:root {
  --yc-primary:      #8B0000;
  --yc-primary-dark: #5c0000;
  --yc-gold:         #C9A84C;
  --yc-gold-light:   #e8c97a;
  --yc-dark:         #1a1a1a;
  --yc-text:         #333;
  --yc-white:        #fff;
  --yc-nav-h:        68px;
  --yc-nav-bg:       #1a0000;
  --yc-transition:   0.28s ease;
}

/* ============================================================
   Reset（限縮在 yc- 元件內）
   ============================================================ */
.yc-nav *, .yc-nav *::before, .yc-nav *::after,
.yc-footer *, .yc-footer *::before, .yc-footer *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


/* ============================================================
   一、頂部資訊欄 TOP BAR
   ============================================================ */
.yc-topbar {
  background: var(--yc-primary-dark);
  color: var(--yc-gold-light);
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 6px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  align-items: center;
}
.yc-topbar a {
  color: var(--yc-gold-light);
  text-decoration: none;
  transition: color var(--yc-transition);
}
.yc-topbar a:hover { color: #fff; }
.yc-topbar-phone::before { content: '☎ '; }
.yc-topbar-hours::before { content: '🕐 '; }


/* ============================================================
   二、導覽列 NAVBAR
   ============================================================ */
.yc-nav {
  position: sticky;
  top: 0;
  z-index: 9000;
  background: var(--yc-nav-bg);
  box-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

.yc-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: var(--yc-nav-h);
  padding: 0 20px;
  gap: 0;
}

/* ---- Logo ---- */
.yc-logo {
  flex-shrink: 0;
  margin-right: 32px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.yc-logo-main {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--yc-gold);
  letter-spacing: 0.1em;
}
.yc-logo-sub {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.65rem;
  color: rgba(201,168,76,0.65);
  letter-spacing: 0.18em;
}

/* ---- 桌機選單 ---- */
.yc-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0;
  flex: 1;
  flex-wrap: nowrap;
}
.yc-menu > li {
  position: relative;
}
.yc-menu > li > a,
.yc-menu > li > .yc-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 13px;
  height: var(--yc-nav-h);
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--yc-transition), background var(--yc-transition);
  cursor: pointer;
  border: none;
  background: transparent;
  letter-spacing: 0.05em;
  position: relative;
}
.yc-menu > li > a::after,
.yc-menu > li > .yc-dropdown-toggle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--yc-gold);
  transition: width var(--yc-transition);
}
.yc-menu > li > a:hover,
.yc-menu > li > .yc-dropdown-toggle:hover,
.yc-menu > li.yc-active > a {
  color: var(--yc-gold);
  background: rgba(201,168,76,0.07);
}
.yc-menu > li > a:hover::after,
.yc-menu > li > .yc-dropdown-toggle:hover::after,
.yc-menu > li.yc-active > a::after {
  width: 70%;
}
.yc-caret {
  font-size: 0.58rem;
  opacity: 0.7;
  transition: transform var(--yc-transition);
}
.yc-menu > li:hover .yc-caret {
  transform: rotate(180deg);
}

/* ---- 下拉選單 Dropdown ---- */
.yc-dropdown {
  display: none;
  position: absolute;
  top: calc(var(--yc-nav-h) - 2px);
  left: 0;
  min-width: 170px;
  background: #2a0000;
  border-top: 2px solid var(--yc-gold);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  list-style: none;
  z-index: 9100;
  overflow: hidden;
}
.yc-menu > li:hover .yc-dropdown {
  display: block;
  animation: yc-fadedown 0.2s ease;
}
@keyframes yc-fadedown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.yc-dropdown li a {
  display: block;
  padding: 10px 18px;
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.81rem;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--yc-transition);
  letter-spacing: 0.04em;
}
.yc-dropdown li a:hover {
  color: var(--yc-gold);
  background: rgba(201,168,76,0.1);
  border-left-color: var(--yc-gold);
  padding-left: 22px;
}

/* ---- 漢堡按鈕 Hamburger ---- */
.yc-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  background: transparent;
  border: none;
}
.yc-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--yc-gold);
  transition: all var(--yc-transition);
  border-radius: 2px;
}
.yc-hamburger.yc-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.yc-hamburger.yc-open span:nth-child(2) { opacity: 0; }
.yc-hamburger.yc-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- 行動版選單 Mobile Menu ---- */
.yc-mobile-menu {
  display: none;
  flex-direction: column;
  background: #1e0000;
  position: fixed;
  top: var(--yc-nav-h);
  left: 0; right: 0;
  max-height: calc(100vh - var(--yc-nav-h));
  overflow-y: auto;
  z-index: 8900;
  border-top: 1px solid var(--yc-gold);
}
.yc-mobile-menu.yc-open { display: flex; }

.yc-mobile-item { list-style: none; }
.yc-mobile-item > a,
.yc-mobile-item > .yc-mob-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  border-bottom: 1px solid rgba(201,168,76,0.12);
  cursor: pointer;
  background: transparent;
  border-left: none; border-right: none; border-top: none;
  width: 100%;
  letter-spacing: 0.05em;
}
.yc-mobile-item > a:hover,
.yc-mobile-item > .yc-mob-toggle:hover {
  color: var(--yc-gold);
  background: rgba(201,168,76,0.06);
}
.yc-mob-sub {
  display: none;
  list-style: none;
  background: rgba(0,0,0,0.3);
}
.yc-mob-sub.yc-open { display: block; }
.yc-mob-sub li a {
  display: block;
  padding: 11px 36px;
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.83rem;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color var(--yc-transition);
  letter-spacing: 0.04em;
}
.yc-mob-sub li a:hover { color: var(--yc-gold); }

/* ---- 導航 RWD ---- */
@media (max-width: 960px) {
  .yc-menu      { display: none; }
  .yc-hamburger { display: flex; }
  .yc-logo      { margin-right: auto; }
}
@media (max-width: 480px) {
  .yc-topbar    { display: none; }
  .yc-logo-main { font-size: 1.2rem; }
}


/* ============================================================
   三、頁尾 FOOTER
   ============================================================ */
.yc-footer {
  background: linear-gradient(175deg, #140000 0%, #0e0000 100%);
  color: rgba(255,255,255,0.78);
  font-family: 'Noto Sans TC', sans-serif;
  padding: 52px 20px 0;
  margin-top: 70px;
  border-top: 3px solid var(--yc-gold);
}
.yc-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

/* ---- 四欄 Grid ---- */
.yc-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(201,168,76,0.2);
}

/* ---- 品牌欄 ---- */
.yc-footer-logo {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--yc-gold);
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}
.yc-footer-tagline {
  font-size: 0.72rem;
  color: rgba(201,168,76,0.55);
  letter-spacing: 0.18em;
  margin-bottom: 18px;
}
.yc-footer-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.yc-footer-info-list li {
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.75);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.yc-footer-info-list .yc-fi-icon {
  color: var(--yc-gold);
  flex-shrink: 0;
  margin-top: 1px;
  font-style: normal;
  min-width: 16px;
}
.yc-footer-info-list a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  transition: color 0.2s;
}
.yc-footer-info-list a:hover { color: var(--yc-gold); }

/* ---- 欄位標題 ---- */
.yc-footer-col-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--yc-gold);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201,168,76,0.25);
}

/* ---- 連結清單 ---- */
.yc-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.yc-footer-links li a {
  font-size: 0.81rem;
  color: rgba(255,255,255,0.68);
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
  display: inline-block;
  letter-spacing: 0.04em;
}
.yc-footer-links li a::before {
  content: '›  ';
  color: var(--yc-gold);
  opacity: 0.6;
}
.yc-footer-links li a:hover {
  color: var(--yc-gold);
  padding-left: 4px;
}

/* ---- 服務標籤 ---- */
.yc-footer-service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 0 22px;
  border-bottom: 1px solid rgba(201,168,76,0.12);
}
.yc-footer-service-tags span {
  font-size: 0.74rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.04em;
}
.yc-footer-service-tags span + span::before {
  content: '  |  ';
  color: rgba(201,168,76,0.3);
}

/* ---- 免責聲明 ---- */
.yc-footer-disclaimer {
  padding: 22px 0 18px;
  border-bottom: 1px solid rgba(201,168,76,0.12);
  font-size: 0.74rem;
  color: rgba(255,255,255,0.42);
  line-height: 1.7;
  letter-spacing: 0.03em;
}
.yc-footer-disclaimer strong {
  color: rgba(201,168,76,0.6);
}

/* ---- 底部版權列 ---- */
.yc-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 18px;
  font-size: 0.73rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.05em;
  flex-wrap: wrap;
  gap: 8px;
}
.yc-footer-bottom a {
  color: rgba(201,168,76,0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.yc-footer-bottom a:hover { color: var(--yc-gold); }

/* ---- 頁尾 RWD ---- */
@media (max-width: 960px) {
  .yc-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px 24px;
  }
}
@media (max-width: 600px) {
  .yc-footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .yc-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .yc-footer { padding: 36px 16px 0; }
}
