/* 品牌色：紫系（對齊同鄉會商城參考） */
:root {
  --brand-purple: #7b2cbf;
  --brand-purple-dark: #5a189a;
  --brand-purple-deep: #3c096c;
  --brand-ink: #1f1235;
  --text-muted-custom: #6c757d;
}

.site-body {
  color: var(--brand-ink);
  background: #fafbfc;
  overflow-x: clip;
}

/* 頂列 */
.top-bar {
  background: linear-gradient(90deg, var(--brand-purple-deep) 0%, #4c148c 50%, var(--brand-purple-deep) 100%);
}

.top-bar a.link-light:hover {
  opacity: 0.9;
  text-decoration: underline !important;
}

.top-bar-icon {
  opacity: 0.9;
  margin-right: 0.25rem;
}

.top-bar-social a {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.top-bar-links a {
  font-weight: 500;
}

.top-bar-links a:hover {
  text-decoration: underline !important;
}

.top-bar-right {
  max-width: 100%;
}

@media (max-width: 575.98px) {
  .top-bar .container > .d-flex {
    flex-direction: column;
    align-items: stretch !important;
  }
  .top-bar-right {
    justify-content: space-between !important;
  }
}

/* 主表頭：購物車右側為分類，靠右對齊 */
.header-main-row {
  width: 100%;
}

.header-actions {
  flex: 1 1 auto;
  min-width: 0;
}

.header-category-nav .nav {
  row-gap: 0.15rem;
}

.header-category-nav .category-nav-link {
  font-size: 0.92rem;
  white-space: nowrap;
}

/* Logo */
.brand-logo-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(90, 24, 154, 0.25);
}

.brand-sub {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.brand-title {
  color: #1a1a1a;
}

.cart-link {
  color: var(--brand-purple-dark);
}

.cart-link:hover {
  background: rgba(123, 44, 191, 0.08);
  color: var(--brand-purple);
}

/* 分類導覽底線 */
.category-nav-link {
  color: #333 !important;
  font-weight: 500;
  border-radius: 0;
  border-bottom: 3px solid transparent;
}

.category-nav-link:hover {
  color: var(--brand-purple) !important;
  border-bottom-color: rgba(123, 44, 191, 0.35);
}

.category-nav-link.active {
  color: var(--brand-purple) !important;
  border-bottom-color: var(--brand-purple);
}

/* Hero */
.hero-home {
  background: linear-gradient(125deg, #9d4edd 0%, #7b2cbf 42%, #5a189a 100%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.1);
}

.hero-title {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.2);
}

.hero-sub {
  opacity: 0.95;
  font-weight: 400;
}

/* 說明文字 */
.mission-statement {
  background: #fff;
}

.mission-text {
  max-width: 46rem;
  line-height: 1.85;
  font-size: 1.02rem;
}

/* 區塊標題 */
.section-title {
  position: relative;
  display: inline-block;
  width: 100%;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-ink);
}

.section-title::after {
  content: "";
  display: block;
  width: 3rem;
  height: 4px;
  margin: 0.6rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-purple), #c77dff);
}

/* 首頁篩選膠囊 */
.filter-pill {
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #444;
  text-decoration: none;
}

.filter-pill:hover {
  border-color: var(--brand-purple);
  color: var(--brand-purple);
}

.filter-pill-active {
  background: linear-gradient(135deg, var(--brand-purple) 0%, var(--brand-purple-dark) 100%);
  color: #fff !important;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(123, 44, 191, 0.35);
}

.filter-pill-muted {
  background: #f4f4f6;
}

/* 商品卡 */
.product-card {
  border-radius: 0.75rem;
}

.product-thumb {
  height: 168px;
  object-fit: cover;
}

.product-thumb-placeholder {
  background: linear-gradient(135deg, #c77dff 0%, var(--brand-purple) 55%, var(--brand-purple-dark) 100%);
}

.text-brand {
  color: var(--brand-purple-dark) !important;
}

.btn-brand {
  --bs-btn-bg: var(--brand-purple);
  --bs-btn-border-color: var(--brand-purple);
  --bs-btn-hover-bg: var(--brand-purple-dark);
  --bs-btn-hover-border-color: var(--brand-purple-dark);
  --bs-btn-active-bg: var(--brand-purple-dark);
  --bs-btn-active-border-color: var(--brand-purple-dark);
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
}

/* 內頁沿用 */
.category-card {
  transition: transform 0.15s ease;
  border-radius: 0.75rem;
}

.category-card:hover {
  transform: translateY(-2px);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

.gallery-grid img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 0.375rem;
}

/* 商城特色（對齊設計稿：淺底、深藍標題、紫底線、白卡陰影） */
.mall-features {
  background: #f4f5f7;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.mall-features-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a2744;
  letter-spacing: 0.06em;
}

.mall-features-title::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 4px;
  margin: 0.65rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, #7b2cbf, #c77dff);
}

.feature-card {
  box-shadow: 0 4px 18px rgba(30, 40, 60, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(61, 31, 91, 0.14);
}

.feature-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a2744;
}

.feature-card-text {
  font-size: 0.875rem;
  color: #5c6470;
  line-height: 1.65;
}

.feature-icon-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(123, 44, 191, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-emoji {
  font-size: 2.1rem;
  line-height: 1;
}

/* 頁尾深紫（設計稿：白圈 Logo、三欄、淺灰說明字） */
.site-footer-dark {
  background: #3d1f5b;
}

.brand-logo-img--footer {
  width: 58px;
  height: 58px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.footer-brand-line1 {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.04em;
}

.footer-brand-line2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.footer-brand-desc {
  color: rgba(255, 255, 255, 0.65) !important;
  line-height: 1.7;
  max-width: 16rem;
}

.footer-col-title {
  letter-spacing: 0.06em;
  color: #fff;
  border-bottom: 2px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 0.5rem;
  display: inline-block;
  margin-bottom: 1rem !important;
}

.footer-link-item {
  color: rgba(255, 255, 255, 0.92) !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-link-item:hover {
  color: #fff !important;
  text-decoration: underline !important;
}

.footer-cat-icon {
  width: 1.35rem;
  text-align: center;
  opacity: 0.95;
}

.footer-contact-icon {
  opacity: 0.9;
  font-size: 1rem;
}

.footer-social-btn {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.22) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 0.62rem;
  font-weight: 700;
}

.footer-social-btn:hover {
  background: rgba(255, 255, 255, 0.35) !important;
  color: #fff !important;
}

.site-footer-bar {
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* LINE 登入按鈕（官方綠） */
.btn-line-login {
  background-color: #06c755 !important;
  border: none !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(6, 199, 85, 0.35);
}

.btn-line-login:hover {
  background-color: #05b34c !important;
  color: #fff !important;
}

/* Bootstrap 主色覆寫（表單按鈕等仍偏紫） */
.btn-primary {
  --bs-btn-bg: var(--brand-purple);
  --bs-btn-border-color: var(--brand-purple);
  --bs-btn-hover-bg: var(--brand-purple-dark);
  --bs-btn-hover-border-color: var(--brand-purple-dark);
  --bs-btn-active-bg: var(--brand-purple-dark);
  --bs-btn-active-border-color: var(--brand-purple-dark);
}

/* —— RWD —— */
.min-w-0 {
  min-width: 0;
}

.touch-target {
  min-width: 2.75rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-mobile-menu {
  color: var(--brand-purple-dark) !important;
}

.header-mobile-menu:hover {
  color: var(--brand-purple) !important;
  background: rgba(123, 44, 191, 0.08) !important;
}

.header-offcanvas-link {
  color: var(--brand-ink) !important;
  font-weight: 500;
  border-radius: 0;
}

.header-offcanvas-link:hover {
  background: rgba(123, 44, 191, 0.06) !important;
  color: var(--brand-purple-dark) !important;
}

.header-offcanvas-link.active {
  color: var(--brand-purple-dark) !important;
  background: rgba(123, 44, 191, 0.1) !important;
  border-left: 3px solid var(--brand-purple);
}

.hero-title {
  font-size: clamp(1.35rem, 5.5vw, 2.5rem);
  line-height: 1.25;
}

.hero-sub-responsive {
  max-width: 36rem;
  font-size: clamp(0.95rem, 2.8vw, 1.15rem);
}

@media (max-width: 575.98px) {
  .lead.hero-sub-responsive {
    font-size: 1rem;
  }
}

.rwd-filter-row {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.rwd-filter-row .filter-pill,
.rwd-filter-row .btn {
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .rwd-filter-row {
    overflow-x: visible;
  }
}

.section-title {
  font-size: clamp(1.1rem, 3.5vw, 1.35rem);
}

.product-detail-title {
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  line-height: 1.35;
}

.product-detail-price {
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
}

.product-buy-card .product-detail-price {
  color: #5a189a;
}

.product-detail-main-img {
  max-height: min(70vh, 520px);
  object-fit: cover;
  background: #f8f9fa;
}

.product-detail-placeholder {
  min-height: 220px;
  aspect-ratio: 4 / 3;
}

@media (min-width: 768px) {
  .product-detail-placeholder {
    min-height: 320px;
  }
}

.cart-table {
  font-size: 0.9375rem;
}

.cart-page-card {
  background: #fff;
}

.cart-table thead th {
  color: #6b7280;
  font-weight: 600;
  border-bottom-width: 1px;
}

.cart-table tbody tr:last-child td {
  border-bottom: 0;
}

.cart-item-link {
  color: var(--brand-ink);
}

.cart-item-link:hover {
  color: var(--brand-purple-dark);
}

.cart-item-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.cart-qty-input {
  border-color: #d9dce2;
}

.cart-empty-card {
  background: #fff;
}

@media (max-width: 575.98px) {
  .cart-table thead th:nth-child(2),
  .cart-table thead th:nth-child(4),
  .cart-table tbody td:nth-child(2),
  .cart-table tbody td:nth-child(4) {
    white-space: nowrap;
  }
}

.mall-features-title {
  font-size: clamp(1.2rem, 4vw, 1.5rem);
}

.product-gallery-card,
.product-buy-card {
  background: #fff;
}

.price-box {
  background: #f3eef9;
}

.product-detail-thumb {
  height: 74px;
  object-fit: cover;
}

.product-detail-tabs .nav-link {
  color: #6b7280;
  font-weight: 600;
  border: 0;
  border-bottom: 2px solid transparent;
}

.product-detail-tabs .nav-link.active {
  color: var(--brand-purple-dark);
  border-bottom-color: var(--brand-purple);
}

.share-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
}

.share-btn:hover {
  color: #fff;
  opacity: 0.9;
}

.share-btn-fb {
  background: #1877f2;
}

.share-btn-line {
  background: #06c755;
}

.share-btn-x {
  background: #111827;
}

@media (max-width: 767.98px) {
  .brand-logo-img {
    width: 48px;
    height: 48px;
  }

  .feature-card {
    padding: 1.25rem !important;
  }

  .product-detail-main-img {
    max-height: 320px;
  }

  .product-detail-thumb {
    height: 60px;
  }
}
