/* CSS is how you can add style to your website, such as colors, fonts, and positioning of your
   HTML content. To learn how to do something, just try searching Google for questions like
   "how to change link color." */

/*
body {
  background-color: white;
  color: black;
  font-family: Verdana;
}
*/


/* ========== 全站色彩變數與基礎設定 ========== */
:root {
  --main-bg: #fff;
  --main-text: #14022c;
  --deep-purple: #14022c;
  --brand-purple: #3C0071;
  --accent-gold: #efd9a5;
  --footer-purple: #120023;
  --footer-text: #efd9a5;
  --nav-link: #b4aee5;
  --gray: #F5F5F5;
}

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
  background: var(--main-bg);
  color: var(--main-text);
  margin: 0;
  font-family: 'Noto Sans TC','微軟正黑體',Arial,sans-serif;
}





/* ========== 頁首（含選單、小鈴鐺、漸層遮罩） ========== */



.fixed-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--deep-purple);
  box-shadow: 0 1px 12px #0002;
  width: 100%;
  min-height: 52px;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 10px;
}
.logo-block { margin-right: 24px; }
.logo-block img {
  height: 38px;
  max-width: 175px;
  display: block;
  margin: 6px 0 2px 0;
}

.nav-scroll-wrap {
  position: relative;
  width: 100%;
  margin-left: 0;
}
.main-nav.nav-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.main-nav.nav-row::-webkit-scrollbar { display: none; }
.main-nav a, #noticeIcon {
  color: var(--nav-link);
  text-decoration: none;
  font-size: 1.06rem;
  font-weight: 600;
  padding: 5px 7px;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  margin: 2px 0;
  letter-spacing: 1px;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--accent-gold);
}
#noticeIcon img {
  filter: drop-shadow(0 0 1px #fff);
  transition: filter .2s;
  vertical-align: middle;
  height: 22px;
  width: 22px;
  margin-left: 2px;
  margin-bottom: 2px;
}
#noticeIcon:hover img {
  filter: drop-shadow(0 0 6px #ffde76);
}
.nav-fade {
  position: absolute;
  top: 0; bottom: 0;
  width: 48px;
  pointer-events: none;
  z-index: 2;
  display: none;
}
.fade-left {
  left: 0;
  background: linear-gradient(to right, var(--deep-purple) 10%, rgba(20,2,44,0.01) 100%);
}
.fade-right {
  right: 0;
  background: linear-gradient(to left, var(--deep-purple) 10%, rgba(20,2,44,0.01) 100%);
}



/* ===== 頁首桌機搜尋欄位 ===== */
.desktop-search-form {
  display: flex;
  align-items: center;
  margin-left: 10px;
  height: 52px;           /* ✅ 固定成與 header 高度一樣 */
  padding-top: 2px;       /* ✅ 微調對齊（選填） */
  box-sizing: border-box; /* ✅ 確保不超出空間 */
}
.desktop-search-input {
  padding: 5px 10px;
  border-radius: 8px; /* ⬅️ 原本是 20px，現在改成略帶方角 */
  border: 1.5px solid var(--accent-gold);
  background: #f5f5fa;
  color: var(--deep-purple);
  font-weight: 600;
  font-size: 1.01rem;
  outline: none;
  transition: background 0.2s, border 0.2s;
  width: 130px;
  line-height: 1.3; /* 或用 input 高度一致，例如 1.4 */
}

.desktop-search-input:focus {
  background: #fff9ec;
  border-color: var(--brand-purple);
}




/* ========== 公告 Modal ========== */


#noticeModalBg {
  display: none;
  position: fixed;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999;
  background: rgba(30,18,44,0.36);
  backdrop-filter: blur(1px);
  justify-content: center;
  align-items: center;
}
#noticeModal {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 60px #3C007170;
  padding: 24px 18px 20px 18px;
  max-width: 355px;
  width: 98vw;
  text-align: center;
  position: relative;
  animation: noticepop .23s;
  font-size: 1.13rem;
  color: #2e174d;
  line-height: 1.72;
  letter-spacing: 0.5px;
  border: 2px solid #efd9a5;
}
@keyframes noticepop {
  from { opacity: 0; transform: scale(.95); }
  to { opacity: 1; transform: none; }
}
#noticeModal .close-btn {
  position: absolute;
  right: 13px; top: 9px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #bbb;
  cursor: pointer;
  font-weight: 700;
  transition: .18s;
  line-height: 1;
}
#noticeModal .close-btn:hover { color: #d72323; }
#noticeModal b, #noticeModal strong {
  color: #2d1b8d;
  font-weight: 900;
  font-size: 1.19em;
  margin: 0 1px;
}
#noticeModal .notice-link {
  color: #208c34;
  font-weight: 700;
  text-decoration: underline;
  padding: 0 3px;
}






/* ========== 頁尾 footer ========== */



footer {
  background: var(--footer-purple);
  color: var(--footer-text);
  text-align: center;
  padding: 34px 8px 20px 8px;
  font-size: 1.08rem;
  margin-top: 54px;
  border-top: 4px solid var(--accent-gold);
}
.footer-icons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 12px;
}
.footer-icon-link img {
  height: 28px;
  width: auto;
  border-radius: 6px;
  background: transparent;
  vertical-align: middle;
  transition: box-shadow .18s;
  display: inline-block;
}
.footer-icon-link:hover img {
  box-shadow: 0 0 8px #efd9a577;
}
.footer-contact {
  margin: 8px auto 0 auto;
  font-size: .99rem;
  color: var(--footer-text);
  text-align: center;
  max-width: 660px;
  line-height: 1.7;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-contact .contact-icon {
  height: 22px;
  width: 22px;
  vertical-align: middle;
  margin-right: 4px;
  margin-left: 3px;
  display: inline-block;
  position: relative;
  top: 2px;
}
.footer-contact a {
  color: var(--footer-text);
  text-decoration: underline;
}
.copyright {
  margin-top: 10px;
  font-size: .98rem;
  color: #c9ae84;
}



/* ========== 首頁 main 中央內容樣式補全 ========== */

main {
  max-width: 1160px;
  margin: 36px auto 0 auto;
  padding: 70px 12px 0 12px;
}

.section-title {
  color: var(--brand-purple);
  font-size: 1.32rem;
  font-weight: 700;
  border-left: 7px solid var(--accent-gold);
  padding-left: 12px;
  margin: 32px 0 18px 0;
}

/* banner 單張圖片樣式 */
.banner-img {
  width: 100%;
  border-radius: 18px;
  margin-bottom: 18px;
  box-shadow: 0 4px 28px #14022c22;
}

/* 商品區塊 */
.product-list {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 16px;
  margin-bottom: 16px;
}
.product-card {
  background: var(--gray);
  border-radius: 13px;
  box-shadow: 0 2px 10px #14022c13;
  padding: 14px 10px 10px 10px;
  width: calc(25% - 12px);
  min-width: 180px;
  max-width: 235px;
  text-align: center;
  border: 2px solid #fff;
  transition: box-shadow 0.2s;
}
.product-card:hover {
  box-shadow: 0 4px 18px #3C007155;
}
.product-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}
.product-title {
  font-weight: 700;
  color: var(--brand-purple);
  margin-bottom: 3px;
  font-size: 1.07rem;
}
.product-desc {
  font-size: .98rem;
  color: #636381;
  margin-bottom: 7px;
}
.product-link {
  display: inline-block;
  background: var(--accent-gold);
  color: var(--deep-purple);
  font-weight: 600;
  border-radius: 7px;
  padding: 4px 12px;
  text-decoration: none;
  margin-top: 3px;
  font-size: .96rem;
}
.product-link:hover {
  background: #ca9b52;
  color: #fff;
}

/* blog 區塊 */
.blog-list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 12px;
}
.blog-card {
  background: var(--gray);
  border-radius: 12px;
  padding: 11px 11px 8px 11px;
  min-width: 160px;
  max-width: 200px;
  box-shadow: 0 1px 8px #63638110;
  text-align: center;
  margin-bottom: 10px;
}
.blog-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 6px;
}
.blog-title {
  font-size: 1.02rem;
  color: var(--brand-purple);
  font-weight: 700;
  margin-bottom: 5px;
}
.blog-desc {
  color: #464646;
  font-size: .94rem;
}

/* 分類快速導覽 */
.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin: 24px 0;
}
.cat-nav a {
  display: inline-block;
  background: var(--deep-purple);
  color: var(--accent-gold);
  border-radius: 7px;
  padding: 7px 22px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 1px;
  transition: background 0.15s;
}
.cat-nav a:hover {
  background: var(--brand-purple);
}

/* ========== 響應式 RWD（手機與平板） ========== */
@media (max-width: 980px) {
  .product-list { gap: 18px 10px; }
  .product-card { width: calc(33.333% - 9px); }
}
@media (max-width: 900px) {
  .header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 2px;
  }
  .logo-block img { height: 26px; max-width: 90px; }
  .logo-block {
    margin: 0 auto 0 auto !important;
    display: block;
  }
  .nav-scroll-wrap { margin-left: 0; }
  .main-nav.nav-row {
    gap: 0 2px;
    font-size: .95rem;
  }
  .main-nav.nav-row a,
  #noticeIcon {
    font-size: 1rem;
    padding: 0 10px 4px 10px;
    min-width: max-content;
    flex: 0 0 auto;
    white-space: nowrap;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-align: center;
  }
  main {
    padding: 62px 1px 0 1px !important;
  }
  .banner-img { border-radius: 9px; }
  .product-list, .blog-list {
    flex-direction: column;
    gap: 11px;
  }
  .product-card, .blog-card {
    width: 100%;
    min-width: unset;
    max-width: unset;
  }
  .cat-nav { gap: 7px; }
  .cat-nav a {
    padding: 6px 12px;
    font-size: .93rem;
  }
  footer {
    padding: 13px 2px 9px 2px;
  }
  .footer-contact { gap: 10px; }
  .footer-info, .footer-contact {
    font-size: .93rem;
  }
}



/* 手機底部懸浮搜尋＋訂購欄 */
.mobile-bottom-bar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: #fff;
  border-top: 2px solid #efd9a5;
  box-shadow: 0 -2px 16px #0002;
  padding: 6px 6px 7px 6px;
  gap: 10px;
  align-items: stretch; justify-content: stretch;
  height: 58px;
}

.mobile-bottom-bar .search-bar-mobile,
.mobile-bottom-bar .buy-btn {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  height: 46px;
  box-sizing: border-box;
}

.mobile-bottom-bar .search-bar-mobile {
  border-radius: 16px;
  border: 1.5px solid #efd9a5;
  padding: 0 14px;
  color: #3C0071;
  font-weight: 600;
  background: #f5f5fa;
  font-size: 1.09em;
  width: 100%;
  height: 46px;
  outline: none;
  transition: background .19s, border .18s;
}
.mobile-bottom-bar .search-bar-mobile:focus {
  background: #fff9ec;
  border-color: #3C0071;
}

/* 訂購按鈕 */
.mobile-bottom-bar .buy-btn {
  border-radius: 16px;
  background: linear-gradient(92deg, #3C0071 90%, #6A379E 100%);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 2px 8px #3C007133, 0 0 0 2px #efd9a5 inset;
  letter-spacing: 1.2px;
  transition: background .18s, color .18s, box-shadow .18s;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.13em;
  width: 100%;
  height: 46px;
  border: none;
  outline: none;
  min-width: 0;
}

.mobile-bottom-bar .buy-btn:active {
  background: linear-gradient(92deg, #6A379E 90%, #3C0071 100%);
  color: #ffd;
}
.mobile-bottom-bar .buy-btn:hover {
  background: linear-gradient(92deg, #efd9a5 95%, #b48aec 100%);
  color: #3C0071;
  box-shadow: 0 4px 18px #efd9a533, 0 0 0 2.5px #3C0071 inset;
}

/* 只在手機寬度出現 */
@media (max-width: 900px) {
  .mobile-bottom-bar { display: flex; }
  body { padding-bottom: 64px !important; }
  /* ⬇️ 放在這裡才正確 */
  .desktop-search-form {
    display: none !important;
  }
}






