/* ===========================
   Gosmooth - Main Stylesheet
   =========================== */

/* --- CSS RESET & ROOT VARIABLES --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-gold:        #EEB21B;
  --color-gold-dark:   #D49A10;
  --color-gold-light:  #FFE8AB;
  --color-dark:        #2A2A2A;
  --color-dark-80:     rgba(42,42,42,0.80);
  --color-dark-92:     rgba(16,16,16,0.92);
  --color-white:       #FFFFFF;
  --color-text:        #1A1A1A;
  --color-text-muted:  #555555;
  --color-bg-light:    #F5F5F5;

  --font-sans:   "Noto Sans TC", sans-serif;
  --font-serif:  "Noto Serif TC", serif;

  --site-header-height: 86px;

  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ===========================
   SITE HEADER
   =========================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--color-dark-80);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--color-gold);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 30px;
  min-height: 86px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Logo */
.header-logo {
  flex-shrink: 0;
}
.header-logo img {
  width: 185px;
  height: auto;
}

/* Primary Navigation */
.site-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
  align-items: center;
}
.nav-list > li > a {
  display: block;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-white);
  padding: 14px 10px;
  transition: color var(--transition);
  white-space: nowrap;
}
.nav-list > li > a:hover {
  color: var(--color-gold);
}
.nav-list > li > a.is-active {
  color: var(--color-gold);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* Shared golden button style */
.btn-quote,
.directory-toggle,
.header-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 3px;
  border: none;
  background: linear-gradient(190deg, #FFE8AB 0%, #FFB000 100%);
  color: var(--color-dark);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  box-shadow: 2.5px 3.5px 0 2px rgba(0,0,0,0.5);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn-quote:hover,
.directory-toggle:hover,
.header-search-toggle:hover {
  background: linear-gradient(180deg, #50D262 0%, #428D4C 100%);
  color: var(--color-white);
  transform: translateY(-1px);
}

/* Magnifier icon for search */
.search-icon {
  display: block;
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hamburger Toggle (mobile) */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  background: none;
  border: none;
}
.mobile-menu-toggle span {
  display: block;
  width: 28px;
  height: 4px;
  background: var(--color-white);
  border-radius: 2px;
  transition: background var(--transition);
}
.mobile-menu-toggle:hover span {
  background: var(--color-gold);
}

/* --- Directory Panel (Shared base) --- */
.site-directory-panel {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 950;
  background: rgba(17,17,17,0.98);
  color: var(--color-white);
  border-top: 1px solid rgba(238,178,27,0.35);
  border-bottom: 3px solid var(--color-gold);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

body.is-directory-open .site-directory-panel,
body.is-directory-hover .site-directory-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* --- Search Panel --- */
.header-search-panel {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 940;
  background: linear-gradient(180deg, #F9D66FE3 0%, #F5A623 100%);
  padding: 12px 30px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
  border-bottom: 3px solid #d49a10;
}

body.is-search-open .header-search-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.header-search-form {
  width: min(1088px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  height: 64px;
}

.header-search-form input[type="search"] {
  flex: 1 1 auto;
  width: 100%;
  height: 64px;
  min-height: 64px;
  border: none;
  outline: none;
  background: #ffffff;
  color: #333333;
  font-size: 16px;
  line-height: 64px;
  padding: 0 24px;
  border-radius: 3px 0 0 3px;
  box-shadow: none;
  font-family: var(--font-sans);
}

.header-search-form input[type="search"]::placeholder {
  color: #777777;
}

.header-search-form > button[type="submit"] {
  flex: 0 0 72px;
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  padding: 0;
  border: none;
  outline: none;
  background: linear-gradient(180deg, #FDD24A 0%, #FCA428 100%);
  color: #ffffff;
  border-radius: 0 3px 3px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: background var(--transition);
}

.header-search-form > button[type="submit"]:hover {
  background: linear-gradient(180deg, #FFE27A 0%, #F5A800 100%);
  color: #ffffff;
}

.header-search-form > button[type="submit"] .search-icon {
  width: 26px;
  height: 26px;
  display: block;
  margin: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mega-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 0.8fr;
  gap: 28px;
  padding: 22px 30px;
  max-width: 1200px;
  margin: 0 auto;
}
.mega-block h3 {
  font-size: 16px;
  color: var(--color-gold);
  margin: 0 0 10px;
  font-weight: 700;
}
.link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.link-cloud a {
  font-size: 14px;
  color: #eee;
  padding: 4px 0;
  transition: color var(--transition);
}
.link-cloud a:hover {
  color: var(--color-gold);
}

/* ===========================
   DESKTOP HEADER LAYOUT (≥769px)
   =========================== */

@media (min-width: 769px) {
  .header-inner {
    display: grid;
    grid-template-columns: clamp(180px, 11.5vw, 210px) minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(14px, 2vw, 36px);
    padding: 13px clamp(18px, 3vw, 40px);
    min-height: 86px;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
  }

  .header-logo {
    justify-self: start;
    flex: 0 0 auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    width: clamp(180px, 11.5vw, 210px);
    min-width: 180px;
    max-width: 210px;
  }

  .header-logo img {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    display: block;
    flex-shrink: 0;
  }

  .site-nav {
    justify-self: center;
    min-width: 0;
    flex: none;
    display: flex;
    justify-content: center;
  }

  .header-actions {
    justify-self: end;
    flex-shrink: 0;
    gap: clamp(10px, 1vw, 18px);
  }

  .site-nav .nav-list > li > a {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.4;
    padding: 14px clamp(4px, 0.6vw, 10px);
    white-space: nowrap;
  }

  .site-nav .nav-list {
    gap: 20px;
  }

  .btn-quote,
  .directory-toggle,
  .header-search-toggle {
    min-height: clamp(40px, 5vh, 44px);
    padding: 8px clamp(10px, 1vw, 18px);
    font-size: clamp(13px, 0.85vw, 15px);
  }

  /* Nav active/hover underline */
  .site-nav .nav-list > li > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding-bottom: 6px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .site-nav .nav-list > li > a.is-active {
    color: #EEB21B;
  }

  .site-nav .nav-list > li > a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(
      90deg,
      transparent 0%,
      rgba(232, 169, 0, 0.25) 10%,
      #E8A900 50%,
      rgba(232, 169, 0, 0.25) 90%,
      transparent 100%
    );
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
    transition: transform 0.28s ease, opacity 0.28s ease;
    opacity: 0;
  }

  .site-nav .nav-list > li > a:hover {
    color: #EEB21B;
  }

  .site-nav .nav-list > li > a:hover::after {
    transform: scaleX(1);
    opacity: 1;
  }

  .site-nav .nav-list > li > a.is-active::after {
    transform: scaleX(1);
    opacity: 1;
  }

  .site-nav .nav-list > li > a.is-active:hover::after {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* ===========================
   RESPONSIVE — Tablet & Mobile
   =========================== */

@media (max-width: 1024px) {

  /* Show hamburger, hide desktop nav */
  .mobile-menu-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
  }

  /* Mobile directory panel — fixed overlay via opacity */
  .site-directory-panel {
    display: block !important;
    position: fixed;
    top: var(--site-header-height);
    left: 0;
    right: 0;
    z-index: 998;
    background: #111111;
    max-height: calc(100vh - var(--site-header-height));
    overflow-y: auto;
    padding: 20px 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  /* Mobile nav as fixed overlay */
  body.is-mobile-menu-open .site-nav {
    display: flex;
    position: fixed;
    top: var(--site-header-height);
    left: 0;
    right: 0;
    background: #111111;
    z-index: 999;
    flex-direction: column;
    align-items: center;
    padding: 20px 24px;
    max-height: calc(100vh - var(--site-header-height));
    overflow-y: auto;
  }

  body.is-mobile-menu-open {
    overflow: hidden;
  }

  body.is-mobile-menu-open .site-nav .nav-list {
    flex-direction: column;
    width: 100%;
  }

  body.is-mobile-menu-open .site-nav .nav-list > li {
    width: 100%;
  }

  body.is-mobile-menu-open .site-nav .nav-list > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 14px 30px;
    font-size: 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.10);
  }

  /* Show directory panel */
  body.is-directory-open .site-directory-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  body.is-directory-open {
    overflow: hidden;
  }

  /* Compact mobile directory layout (override desktop mega-grid) */
  body.is-directory-open .site-directory-panel .mega-grid {
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  body.is-directory-open .site-directory-panel .mega-block {
    margin: 0;
  }

  body.is-directory-open .site-directory-panel .mega-block h3 {
    font-size: 18px;
    color: #EEB21B;
    margin: 0 0 12px;
  }

  body.is-directory-open .site-directory-panel .link-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 26px;
  }

  body.is-directory-open .site-directory-panel .link-cloud a {
    min-height: auto;
    padding: 2px 0;
    font-size: 16px;
    line-height: 1.8;
    color: #eeeeee;
    display: inline;
    transition: color var(--transition);
  }

  body.is-directory-open .site-directory-panel .link-cloud a:hover,
  body.is-directory-open .site-directory-panel .link-cloud a:active {
    color: var(--color-gold);
  }

  .mega-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 16px 30px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 13px 16px;
    min-height: 72px;
  }
  .header-logo img {
    width: 150px;
  }
  .btn-quote,
  .directory-toggle,
  .header-search-toggle {
    font-size: 13px;
    padding: 8px 12px;
    min-height: 40px;
  }

  body.is-mobile-menu-open .site-nav {
    top: var(--site-header-height);
    max-height: calc(100vh - var(--site-header-height));
  }

  body.is-directory-open .site-directory-panel {
    top: var(--site-header-height);
    max-height: calc(100vh - var(--site-header-height));
  }

  .mega-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  body {
    overflow-x: hidden;
  }

}

/* ===========================
   RESPONSIVE — Mobile Header Grid (≤768px)
   =========================== */

@media (max-width: 768px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "logo . menu"
      "quote search directory";
    align-items: center;
    gap: 10px 12px;
    padding: 12px 16px;
    width: 100%;
  }

  .header-logo {
    grid-area: logo;
    justify-self: start;
  }

  .header-actions {
    display: contents;
  }

  .mobile-menu-toggle {
    grid-area: menu;
    justify-self: end;
  }

  .btn-quote {
    grid-area: quote;
    justify-self: start;
  }

  .header-search-toggle {
    grid-area: search;
    justify-self: end;
    margin-right: 0;
  }

  .directory-toggle {
    grid-area: directory;
    justify-self: end;
  }

  /* Mobile button sizing */
  .btn-quote,
  .directory-toggle {
    min-height: 42px;
    padding: 8px 16px;
    font-size: 14px;
  }

  .header-search-toggle,
  .mobile-menu-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .header-logo img {
    max-width: 170px;
  }

  /* Directory panel — tighter padding on mobile */
  .site-directory-panel {
    padding: 18px 22px 22px;
  }
}

/* ===========================
   FLOATING SIDEBAR
   =========================== */

.floating-sidebar {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 700;
  display: flex;
  flex-direction: column;
  background: #2b2b2b;
  border: 1px solid rgba(238,178,27,0.35);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  overflow: hidden;
}

.floating-sidebar__item {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-bottom: none;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.floating-sidebar__item:hover {
  background: var(--color-gold);
  color: #111111;
}

.floating-sidebar__item:last-child {
  border-bottom: 0;
}

@media (max-width: 768px) {
  .floating-sidebar {
    display: none;
  }
}

/* ===========================
   SITE FOOTER
   =========================== */

.site-footer {
  background: #242424;
  color: #cfcfcf;
  border-top: 3px solid var(--color-gold);
  padding: 56px 0 0;
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}

.site-footer__inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 48px 48px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(520px, 2fr);
  gap: 40px;
  align-items: start;
  box-sizing: border-box;
}

/* Desktop Footer (≥1025px) — 强制撑满宽度，左右留白 48px */
@media (min-width: 1025px) {
  .site-footer {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

  .site-footer__inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 48px 48px;
    grid-template-columns: minmax(360px, 1.35fr) minmax(760px, 2.65fr);
    gap: 48px;
    box-sizing: border-box;
  }

  .site-footer__link-groups {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 40px;
  }

  .site-footer__bottom {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 22px 48px;
    box-sizing: border-box;
  }
}

/* Tablet Footer (769px–1024px) — 四栏仍同行 */
@media (min-width: 769px) and (max-width: 1024px) {
  .site-footer__inner {
    grid-template-columns: minmax(260px, 1fr) minmax(480px, 2fr);
    gap: 28px;
    padding: 0 36px 40px;
  }

  .site-footer__link-groups {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }

  .site-footer h3 {
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    white-space: nowrap;
  }

  .site-footer a {
    font-size: 14px;
    line-height: 1.6;
  }

  .site-footer ul {
    gap: 8px;
  }

  .site-footer__bottom {
    padding: 20px 36px;
  }
}

.footer-logo img {
  width: 220px;
  height: auto;
  margin-bottom: 26px;
}

.site-footer h3 {
  color: #ffffff;
  font-size: 18px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}

.site-footer__about p {
  font-size: 15px;
  line-height: 1.9;
  margin-bottom: 10px;
}

.site-footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer a {
  color: #cfcfcf;
  font-size: 15px;
  line-height: 1.9;
  transition: color var(--transition);
}

.site-footer a:hover {
  color: var(--color-gold);
}

/* Footer Subscribe */
.footer-subscribe {
  margin-top: 28px;
}

.footer-subscribe label {
  display: block;
  margin-bottom: 10px;
  color: #ffffff;
  font-weight: 600;
}

.footer-subscribe__row {
  display: flex;
}

.footer-subscribe__row input {
  flex: 1;
  min-height: 44px;
  background: #3a3a3a;
  border: 1px solid rgba(255,255,255,0.16);
  color: #ffffff;
  padding: 0 14px;
  font-family: var(--font-sans);
  font-size: 14px;
}

.footer-subscribe__row input::placeholder {
  color: rgba(255,255,255,0.4);
}

.footer-subscribe__row button {
  min-height: 44px;
  padding: 0 24px;
  background: linear-gradient(180deg, #fdd24a 0%, #fca428 100%);
  color: #ffffff;
  border: 0;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.16);
  box-shadow: 0 2px 5px rgba(252, 164, 40, 0.22);
  transition: background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.footer-subscribe__row button:hover,
.footer-subscribe__row button:focus,
.footer-subscribe__row button:active {
  background: linear-gradient(180deg, #ffe066 0%, #fdbc3f 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(252, 164, 40, 0.34);
}

/* Footer Bottom */
.site-footer__bottom {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 22px 48px;
  border-top: none;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 14px;
  color: #999;
  box-sizing: border-box;
}

/* 底部分割线 — 桌面端左右各 48px */
@media (min-width: 1025px) {
  .site-footer__bottom::before {
    content: "";
    display: block;
    width: calc(100% - 96px);
    height: 1px;
    margin: 0 48px;
    background: rgba(255, 255, 255, 0.14);
    position: absolute;
    top: 0;
    left: 0;
  }

  .site-footer__bottom {
    position: relative;
  }
}

/* 底部分割线 — 平板端左右各 36px */
@media (min-width: 769px) and (max-width: 1024px) {
  .site-footer__bottom::before {
    content: "";
    display: block;
    width: calc(100% - 72px);
    height: 1px;
    margin: 0 36px;
    background: rgba(255, 255, 255, 0.14);
    position: absolute;
    top: 0;
    left: 0;
  }

  .site-footer__bottom {
    position: relative;
  }
}

/* 底部分割线 — 手机端左右各 20px */
@media (max-width: 768px) {
  .site-footer__bottom::before {
    content: "";
    display: block;
    width: calc(100% - 40px);
    height: 1px;
    margin: 0 20px;
    background: rgba(255, 255, 255, 0.14);
    position: absolute;
    top: 0;
    left: 0;
  }

  .site-footer__bottom {
    position: relative;
  }
}

/* Footer Link Groups (相關連結 / 熱門品牌 / 聯絡我們) */
.site-footer__link-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

/* Footer Contact List */
.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-contact-link {
  display: inline-block;
  color: #cfcfcf;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.5;
  transition: color 180ms ease;
}

.footer-contact-link:hover {
  color: var(--color-gold);
}

.site-footer__bottom p {
  color: #999;
  font-size: 14px;
}

.site-footer__bottom-nav {
  display: flex;
  gap: 24px;
}

.site-footer__bottom-nav a {
  font-size: 14px;
  color: #999;
}

.site-footer__bottom-nav a:hover {
  color: var(--color-gold);
}

@media (max-width: 768px) {
  /* Search form mobile */
  .header-search-panel {
    padding: 10px 14px;
  }

  .header-search-form {
    height: 54px;
    width: 100%;
  }

  .header-search-form input[type="search"] {
    height: 54px;
    min-height: 54px;
    line-height: 54px;
    padding: 0 14px;
    font-size: 14px;
  }

  .header-search-form > button[type="submit"] {
    flex: 0 0 58px;
    width: 58px;
    min-width: 58px;
    max-width: 58px;
    height: 54px;
    min-height: 54px;
    max-height: 54px;
  }

  .header-search-form > button[type="submit"] .search-icon {
    width: 23px;
    height: 23px;
  }

  /* Footer mobile */
  .site-footer {
    padding-top: 36px;
  }

  .site-footer__inner {
    display: block;
    padding: 0 20px 36px;
  }

  .site-footer__about {
    margin-bottom: 34px;
  }

  .site-footer__link-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
    align-items: start;
  }

  .site-footer__link-groups .site-footer__links,
  .site-footer__link-groups .site-footer__categories,
  .site-footer__link-groups .site-footer__brands,
  .site-footer__link-groups .site-footer__contact {
    min-width: 0;
  }

  .site-footer__link-groups h3 {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .site-footer__link-groups ul {
    gap: 10px;
  }

  .footer-subscribe__row {
    flex-direction: column;
    gap: 10px;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .site-footer__bottom-nav {
    flex-wrap: wrap;
    gap: 14px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   GoSmooth Success Modal
   純 CSS 成功提示動畫：報告提交 / Footer 訂閱
   ═══════════════════════════════════════════════════════════════ */

.gs-success-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 12, 12, 0.58);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.gs-success-modal.is-active {
  display: flex;
}

.gs-success-modal__panel {
  width: min(420px, 100%);
  background: #ffffff;
  border-radius: 18px;
  padding: 34px 28px 28px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  transform: translateY(10px) scale(0.96);
  opacity: 0;
  animation: gsSuccessPanelIn .28s ease forwards;
}

.gs-success-modal__icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gs-success-modal__icon::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  opacity: 0;
  animation: gsSuccessRing .75s ease .18s forwards;
}

.gs-success-modal__icon svg {
  width: 42px;
  height: 42px;
  display: block;
  position: relative;
  z-index: 1;
}

.gs-success-modal__check {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: gsSuccessCheck .5s ease .22s forwards;
}

.gs-success-modal__title {
  margin: 0 0 10px;
  font-family: var(--font-serif, "Noto Serif TC", serif);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  color: #222222;
}

.gs-success-modal__message {
  margin: 0;
  font-family: var(--font-sans, "Noto Sans TC", sans-serif);
  font-size: 15px;
  line-height: 1.75;
  color: #555555;
}

.gs-success-modal__button {
  margin-top: 24px;
  min-width: 150px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  font-family: var(--font-sans, "Noto Sans TC", sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.gs-success-modal__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.gs-success-modal--report .gs-success-modal__icon,
.gs-success-modal--report .gs-success-modal__button {
  background: linear-gradient(180deg, #63C17A 0%, #288443 100%);
}

.gs-success-modal--report .gs-success-modal__icon::before {
  background: rgba(99, 193, 122, 0.22);
}

.gs-success-modal--subscribe .gs-success-modal__icon,
.gs-success-modal--subscribe .gs-success-modal__button {
  background: linear-gradient(180deg, #6AB5EE 0%, #2185D0 100%);
}

.gs-success-modal--subscribe .gs-success-modal__icon::before {
  background: rgba(33, 133, 208, 0.22);
}

@keyframes gsSuccessPanelIn {
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes gsSuccessRing {
  0% {
    transform: scale(0.72);
    opacity: 0.65;
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}

@keyframes gsSuccessCheck {
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 768px) {
  .gs-success-modal {
    padding: 18px;
  }

  .gs-success-modal__panel {
    border-radius: 16px;
    padding: 30px 22px 24px;
  }

  .gs-success-modal__icon {
    width: 68px;
    height: 68px;
    margin-bottom: 16px;
  }

  .gs-success-modal__icon svg {
    width: 38px;
    height: 38px;
  }

  .gs-success-modal__title {
    font-size: 22px;
  }

  .gs-success-modal__message {
    font-size: 14px;
  }

  .gs-success-modal__button {
    width: 100%;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gs-success-modal__panel,
  .gs-success-modal__icon::before,
  .gs-success-modal__check {
    animation: none;
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Floating Sidebar — Inline SVG Icons
   ═══════════════════════════════════════════════════════════════ */
.gs-side-icon {
  width: 22px;
  height: 22px;
  display: block;
  color: #ffffff;
  margin: auto;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   Floating Sidebar — 回頂部按鈕顯示控制 + 金色邊框修復
   ═══════════════════════════════════════════════════════════════ */

/* ==================================================
   Fix Right Floating Sidebar Shape + Tooltip Visibility
   ================================================== */
#my_web_sidebar {
  background: #202020 !important;
  border: 1px solid rgba(238, 178, 27, 0.72) !important;
  border-right: 0 !important;
  border-radius: 10px 0 0 10px !important;
  overflow: visible !important;
  box-sizing: border-box !important;
  z-index: 9999 !important;
}

#my_web_sidebar a,
#my_web_sidebar button {
  border-radius: 0 !important;
  background: transparent;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: visible !important;
  color: #ffffff;
}

#my_web_sidebar a:first-child,
#my_web_sidebar button:first-child {
  border-radius: 9px 0 0 0 !important;
}

#my_web_sidebar a:last-child,
#my_web_sidebar button:last-child {
  border-radius: 0 0 0 9px !important;
}

#my_web_sidebar a:hover,
#my_web_sidebar button:hover,
#my_web_sidebar a:focus-visible,
#my_web_sidebar button:focus-visible {
  background: linear-gradient(180deg, #fdd24a 0%, #fca428 100%) !important;
  color: #ffffff !important;
}

#scroll-to-top-btn {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

/* ═══════════════════════════════════════════════════════════════
   Sidebar Inquiry Popup - Premium UI
   只控制右側側邊欄表單彈窗
   ═══════════════════════════════════════════════════════════════ */

#custom-form-popup.gs-inquiry-popup,
#custom-form-popup {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-sizing: border-box;
  overflow: hidden;
}

#custom-form-popup.is-active,
#custom-form-popup[style*="flex"] {
  display: flex;
}

#custom-form-popup .gs-inquiry-popup__panel {
  position: relative;
  width: min(92vw, 680px);
  max-width: 680px;
  max-height: min(86vh, 820px);
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
  border-radius: 18px;
  padding: 28px 32px 36px;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 178, 27, 0.55) rgba(0, 0, 0, 0.08);
}

#custom-form-popup .gs-inquiry-popup__panel::-webkit-scrollbar {
  width: 7px;
}

#custom-form-popup .gs-inquiry-popup__panel::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
}

#custom-form-popup .gs-inquiry-popup__panel::-webkit-scrollbar-thumb {
  background: rgba(232, 178, 27, 0.65);
  border-radius: 999px;
}

#custom-form-popup .gs-inquiry-popup__close,
#custom-form-popup #close-form-btn {
  position: sticky;
  top: 0;
  left: auto;
  margin-left: auto;
  margin-bottom: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #fdd24a 0%, #fca428 100%);
  color: #222222;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none !important;
  filter: none !important;
  z-index: 3;
  transition: transform .2s ease;
}

#custom-form-popup .gs-inquiry-popup__close:hover,
#custom-form-popup #close-form-btn:hover {
  transform: rotate(90deg) scale(1.04);
  box-shadow: none !important;
  filter: none !important;
}

.gs-inquiry-modal-title {
  margin: 0 0 18px 0;
  text-align: center;
  font-family: "Noto Serif TC", serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  color: #1F2D3D;
}

#custom-form-popup .gs-inquiry-form__inner {
  border: 1.5px solid #E8B21B;
  border-radius: 14px;
  padding: 30px;
  background: linear-gradient(180deg, #ffffff 0%, #fffdf7 100%);
  box-sizing: border-box;
}

#custom-form-popup .gs-inquiry-field {
  margin-bottom: 20px;
}

#custom-form-popup .gs-inquiry-field label {
  display: block;
  margin-bottom: 9px;
  font-family: var(--font-sans, "Noto Sans TC", sans-serif);
  font-size: 16px;
  font-weight: 800;
  color: #222222;
}

#custom-form-popup .gs-inquiry-field label span {
  color: #e85a5a;
  margin-left: 3px;
}

#custom-form-popup .gs-inquiry-field input,
#custom-form-popup .gs-inquiry-field select,
#custom-form-popup .gs-inquiry-field textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid #dcdcdc;
  border-radius: 9px;
  padding: 0 16px;
  font-family: var(--font-sans, "Noto Sans TC", sans-serif);
  font-size: 15px;
  color: #333333;
  background: #ffffff;
  outline: none;
  box-sizing: border-box;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

#custom-form-popup .gs-inquiry-field textarea {
  min-height: 128px;
  padding-top: 14px;
  resize: vertical;
}

#custom-form-popup .gs-inquiry-field input:focus,
#custom-form-popup .gs-inquiry-field select:focus,
#custom-form-popup .gs-inquiry-field textarea:focus {
  border-color: #E8B21B;
  box-shadow: 0 0 0 3px rgba(232, 178, 27, 0.15);
}

#custom-form-popup .gs-inquiry-submit {
  display: block;
  width: min(320px, 100%);
  height: 54px;
  margin: 26px auto 0;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(180deg, #fdd24a 0%, #fca428 100%);
  color: #ffffff;
  font-family: var(--font-sans, "Noto Sans TC", sans-serif);
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.16);
  box-shadow: 0 12px 26px rgba(252, 164, 40, 0.32);
  transition: transform .2s ease, box-shadow .2s ease;
}

#custom-form-popup .gs-inquiry-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(252, 164, 40, 0.42);
}

@media (max-width: 991px) {
  #custom-form-popup .gs-inquiry-popup__panel {
    width: min(94vw, 640px);
    max-width: 640px;
    padding: 24px 28px 32px;
  }

  .gs-inquiry-modal-title {
    font-size: 26px;
    margin-bottom: 16px;
  }
}

@media (max-width: 768px) {
  #custom-form-popup.gs-inquiry-popup,
  #custom-form-popup {
    padding: 14px;
    align-items: center;
  }

  #custom-form-popup .gs-inquiry-popup__panel {
    width: 94vw;
    max-width: 94vw;
    padding: 22px 18px 28px;
    border-radius: 15px;
  }

  .gs-inquiry-modal-title {
    font-size: 22px;
    margin-bottom: 14px;
  }

  #custom-form-popup .gs-inquiry-form__inner {
    padding: 22px 16px 24px;
    border-radius: 12px;
  }

  #custom-form-popup .gs-inquiry-field {
    margin-bottom: 18px;
  }

  #custom-form-popup .gs-inquiry-field label {
    font-size: 15px;
  }

  #custom-form-popup .gs-inquiry-field input,
  #custom-form-popup .gs-inquiry-field select,
  #custom-form-popup .gs-inquiry-field textarea {
    min-height: 50px;
    font-size: 15px;
  }

  #custom-form-popup .gs-inquiry-field textarea {
    min-height: 116px;
  }

  #custom-form-popup .gs-inquiry-submit {
    width: 100%;
    height: 52px;
    font-size: 16px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Right Sidebar Tooltip Hover
   ═══════════════════════════════════════════════════════════════ */

#my_web_sidebar a,
#my_web_sidebar button {
  position: relative;
}

#my_web_sidebar a[data-tooltip]::before,
#my_web_sidebar button[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translate3d(8px, -50%, 0);
  min-width: max-content;
  max-width: 260px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #ffffff;
  color: #333333;
  font-family: var(--font-sans, "Noto Sans TC"), sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

#my_web_sidebar a[data-tooltip]::after,
#my_web_sidebar button[data-tooltip]::after {
  content: none !important;
  display: none !important;
}

#my_web_sidebar a[data-tooltip]:hover::before,
#my_web_sidebar button[data-tooltip]:hover::before,
#my_web_sidebar a[data-tooltip]:focus-visible::before,
#my_web_sidebar button[data-tooltip]:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, -50%, 0);
}

#my_web_sidebar a:hover,
#my_web_sidebar button:hover,
#my_web_sidebar a:focus-visible,
#my_web_sidebar button:focus-visible {
  background: linear-gradient(180deg, #fdd24a 0%, #fca428 100%);
  color: #ffffff;
}

@media (max-width: 768px) {
  #my_web_sidebar a[data-tooltip]::before,
  #my_web_sidebar button[data-tooltip]::before,
  #my_web_sidebar a[data-tooltip]::after,
  #my_web_sidebar button[data-tooltip]::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #my_web_sidebar a[data-tooltip]::before,
  #my_web_sidebar button[data-tooltip]::before,
  #my_web_sidebar a[data-tooltip]::after,
  #my_web_sidebar button[data-tooltip]::after {
    transition: none;
  }
}

/* ==================================================
   Mobile Sidebar Toggle Fix
   只修手機端側邊欄開合
================================================== */

.gs-mobile-sidebar-toggle,
.gs-mobile-sidebar-close {
  display: none !important;
}

/* ===== Inquiry modal close button position fix ===== */
#custom-form-popup .gs-inquiry-popup__close,
#custom-form-popup #close-form-btn {
  position: absolute !important;
  top: 20px !important;
  right: 22px !important;
  margin: 0 !important;
  z-index: 5 !important;
}

@media (max-width: 768px) {
  #custom-form-popup .gs-inquiry-popup__close,
  #custom-form-popup #close-form-btn {
    top: 20px !important;
    right: 18px !important;
  }
}

/* ===== Mobile sidebar slide in/out final fix ===== */
@media (max-width: 768px) {
  #my_web_sidebar {
    display: flex !important;
    position: fixed !important;
    right: 0 !important;
    top: 50% !important;
    z-index: 10040 !important;
    transform: translate3d(100%, -50%, 0) !important;
    transition: transform .34s cubic-bezier(.22, 1, .36, 1) !important;
    will-change: transform !important;
  }

  #my_web_sidebar.is-mobile-open,
  body.gs-mobile-sidebar-opened #my_web_sidebar {
    transform: translate3d(0, -50%, 0) !important;
  }

  #gs-mobile-sidebar-open {
    display: flex !important;
    position: fixed !important;
    right: 0 !important;
    top: 50% !important;
    z-index: 10050 !important;
    transform: translateY(-50%) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body.gs-mobile-sidebar-opened #gs-mobile-sidebar-open {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-50%) translateX(14px) !important;
  }
}

/* ===== Mobile sidebar close arrow visibility fix ===== */
#gs-mobile-sidebar-close,
#my_web_sidebar .gs-mobile-sidebar-close {
  display: none !important;
}

@media (max-width: 768px) {
  #my_web_sidebar.is-mobile-open .gs-mobile-sidebar-close {
    display: flex !important;
    width: 100% !important;
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: #202020 !important;
    color: #ffffff !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
  }

  #my_web_sidebar .gs-mobile-sidebar-close svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
  }

  #my_web_sidebar .gs-mobile-sidebar-close:hover,
  #my_web_sidebar .gs-mobile-sidebar-close:active {
    background: linear-gradient(180deg, #fdd24a 0%, #fca428 100%) !important;
    color: #ffffff !important;
  }
}

@media (min-width: 769px) {
  #my_web_sidebar {
    transform: translateY(-50%) !important;
  }

  #gs-mobile-sidebar-open,
  #gs-mobile-sidebar-close,
  #my_web_sidebar .gs-mobile-sidebar-close {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #gs-mobile-sidebar-open,
  #my_web_sidebar {
    transition: none !important;
  }
}

/* ===== Desktop sidebar scroll-top hover radius fix ===== */
@media (min-width: 769px) {
  #my_web_sidebar #scroll-to-top-btn {
    border-radius: 0 0 0 9px !important;
    background-clip: padding-box !important;
  }

  #my_web_sidebar #scroll-to-top-btn:hover,
  #my_web_sidebar #scroll-to-top-btn:focus-visible {
    border-radius: 0 0 0 9px !important;
    background-clip: padding-box !important;
  }

  #my_web_sidebar #gs-mobile-sidebar-close,
  #my_web_sidebar .gs-mobile-sidebar-close {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }
}

/* ===== Mobile sidebar open arrow visual fix ===== */
@media (max-width: 768px) {
  #gs-mobile-sidebar-open.gs-mobile-sidebar-toggle--open {
    display: flex !important;
    position: fixed !important;
    right: 0 !important;
    top: 50% !important;
    z-index: 10050 !important;

    width: 42px !important;
    height: 58px !important;
    min-width: 42px !important;
    min-height: 58px !important;

    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid rgba(238, 178, 27, 0.72) !important;
    border-right: 0 !important;
    border-radius: 12px 0 0 12px !important;

    background: #202020 !important;
    color: #ffffff !important;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18) !important;

    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;

    transform: translateY(-50%) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    appearance: none !important;
    -webkit-appearance: none !important;
  }

  #gs-mobile-sidebar-open.gs-mobile-sidebar-toggle--open svg {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    color: #ffffff !important;
    stroke: currentColor !important;
    fill: none !important;
    pointer-events: none !important;
  }

  #gs-mobile-sidebar-open.gs-mobile-sidebar-toggle--open svg path {
    stroke: currentColor !important;
  }

  body.gs-mobile-sidebar-opened #gs-mobile-sidebar-open.gs-mobile-sidebar-toggle--open {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-50%) translateX(16px) !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   共用：產品列表分頁（building-materials / 首頁人氣建材 / 產品詳情頁相關產品）
   ═══════════════════════════════════════════════════════════════ */
.gs-product-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 46px auto 0;
  flex-wrap: wrap;
}

.gs-product-pagination a,
.gs-product-pagination span {
  min-width: 46px;
  height: 46px;
  padding: 0 15px;
  border-radius: 6px;
  background: #ffffff;
  color: #1F2D3D;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.gs-product-pagination a:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #FDD24A 0%, #FCA428 100%);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(232, 169, 0, 0.22);
}

.gs-product-pagination .is-active {
  background: linear-gradient(180deg, #FDD24A 0%, #FCA428 100%);
  color: #ffffff;
  pointer-events: none;
}

.gs-product-pagination .is-disabled {
  color: #9A9A9A;
  background: #F2F2F2;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}

.gs-product-pagination .gs-pagination-ellipsis {
  box-shadow: none;
  background: transparent;
  color: #9A9A9A;
  pointer-events: none;
}

@media (max-width: 768px) {
  .gs-product-pagination {
    gap: 8px;
    margin-top: 34px;
  }

  .gs-product-pagination a,
  .gs-product-pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 15px;
  }
}

/* ═══════════════════════════════════════════════════════════
   共用：分類下拉選單（product-detail / building-materials）
   原在 product-detail.css，現抽至 main.css 共用
   ═══════════════════════════════════════════════════════════ */
.product-category-dropdown {
  background: linear-gradient(180deg, #F9D66FE3 0%, #F5A623 100%);
  padding: 0 36px;
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  position: relative;
  z-index: 80;
}
.product-category-dropdown__toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: none;
  color: #fff; font-size: 14px; font-weight: 600;
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif; cursor: pointer;
  padding: 14px 0; line-height: 1;
}
.product-category-dropdown__toggle:hover { opacity: 0.9; }
.product-category-dropdown__label { color: rgba(255,255,255,0.8); }
.product-category-dropdown__current { font-weight: 600; }
.product-category-dropdown__arrow { font-size: 10px; transition: transform 0.25s ease; margin-left: 2px; opacity: 0.7; }
.product-category-dropdown--open .product-category-dropdown__arrow { transform: rotate(180deg); }

.product-category-dropdown__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(1180px, calc(100vw - 80px));
  min-width: 760px;
  max-width: calc(100vw - 80px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 20px 22px;
  background: linear-gradient(135deg, rgba(18,18,18,0.98), rgba(34,34,34,0.96));
  border: 1px solid rgba(230, 179, 20, 0.38);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.32);
  backdrop-filter: blur(8px);
  z-index: 85;
}
.product-category-dropdown__menu[hidden] { display: none; }

.product-category-dropdown__item {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 24px;
  color: rgba(255,255,255,0.9); text-decoration: none;
  font-size: 14px; font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.045);
  white-space: nowrap; flex: 0 0 auto;
  font-weight: 600;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.product-category-dropdown__item:hover {
  color: #111; background: #f4bd22; border-color: #f4bd22;
  transform: translateY(-1px);
}
.product-category-dropdown__item.is-active,
.product-category-dropdown__item[aria-current="page"] {
  color: #111; background: #f4bd22; border-color: #f4bd22;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   共用：統一搜尋框（首頁 + 搜尋建材頁共用，圖三樣式）
   白色 input + 右側金黃色 icon 按鈕
   ═══════════════════════════════════════════════════════════ */
.gs-unified-search {
  display: flex;
  width: min(100%, 760px);
  height: 58px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.gs-unified-search input[type="search"] {
  flex: 1;
  height: 100%;
  border: 0;
  outline: none;
  padding: 0 24px;
  font-family: var(--font-sans);
  font-size: 17px;
  color: #333333;
  background: #ffffff;
}
.gs-unified-search input[type="search"]::placeholder {
  color: #8A8A8A;
}
.gs-unified-search button[type="submit"] {
  width: 92px;
  height: 100%;
  border: 0;
  background: linear-gradient(180deg, #FDD24A 0%, #FCA428 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: filter .22s ease, transform .22s ease;
  flex-shrink: 0;
}
.gs-unified-search button[type="submit"]:hover {
  filter: brightness(1.03);
}
.gs-unified-search button[type="submit"] .search-icon {
  width: 25px;
  height: 25px;
  display: block;
  stroke: #ffffff;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 767px) {
  .product-category-dropdown { padding: 0; position: relative; z-index: 90; }
  .product-category-dropdown__toggle { font-size: 13px; padding: 12px 12px; width: 100%; }
  .product-category-dropdown__menu {
    position: absolute;
    top: calc(100% + 0px);
    left: 0; right: 0;
    width: 100%;
    min-width: 0; max-width: none;
    display: flex; flex-direction: column; flex-wrap: nowrap;
    gap: 0; padding: 0;
    background: rgba(15,15,15,0.98);
    border: none; border-radius: 0;
    box-shadow: 0 18px 38px rgba(0,0,0,0.32);
    overflow: hidden;
  }
  .product-category-dropdown__item {
    width: 100%; min-height: 56px; padding: 0 24px;
    justify-content: flex-start;
    border: none; border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: rgba(255,255,255,0.92);
    font-size: 16px; font-weight: 600;
  }
  .product-category-dropdown__item:hover,
  .product-category-dropdown__item.is-active,
  .product-category-dropdown__item[aria-current="page"] {
    color: #f4bd22; background: rgba(244,189,34,0.12); border:none;
  }
}

@media (max-width: 1024px) {
  .gs-unified-search {
    width: min(100%, 680px);
    height: 56px;
  }
  .gs-unified-search button[type="submit"] {
    width: 84px;
  }
}

@media (max-width: 768px) {
  .gs-unified-search {
    width: 100%;
    height: 52px;
  }
  .gs-unified-search input[type="search"] {
    padding: 0 16px;
    font-size: 15px;
  }
  .gs-unified-search button[type="submit"] {
    width: 60px;
  }
  .gs-unified-search button[type="submit"] .search-icon {
    width: 22px;
    height: 22px;
  }
}

/* 搜尋建材頁搜尋區域排版（已移至 building-materials.css） */

/* ═══════════════════════════════════════════════════════════
   GLOBAL DYNAMIC SEARCH — 全局動態搜索結果浮層
   所有樣式限定在 .gs-global-search 容器內，不影響其它元件
   ═══════════════════════════════════════════════════════════ */

.gs-global-search { position: relative; }

.gs-global-search .gs-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0,0,0,.12);
  border: 1px solid rgba(0,0,0,.06);
  z-index: 9999;
  overflow: hidden;
  display: none;
}

.gs-global-search .gs-search-results:not(.is-hidden) {
  display: block;
}

/* ── Loading 狀態 ── */
.gs-global-search .gs-search-loading {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #8a8a8a;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 14px;
}

/* 黃色 spinner — 純 CSS 動畫 */
.gs-global-search .gs-search-spinner {
  width: 26px;
  height: 26px;
  border: 4px solid rgba(232,169,0,.18);
  border-top-color: #E8A900;
  border-radius: 50%;
  animation: gsSearchSpin .75s linear infinite;
  display: inline-block;
}

@keyframes gsSearchSpin { to { transform: rotate(360deg); } }

/* ── 搜尋內容區 ── */
.gs-global-search .gs-search-content {
  padding: 22px 26px;
  max-height: 58vh;
  overflow-y: auto;
}

/* ── 結果計數 ── */
.gs-global-search .gs-search-count {
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  color: #8a8a8a;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 14px;
}

.gs-global-search .gs-search-count strong,
.gs-global-search .gs-search-count span {
  color: #E8A900;
  font-weight: 700;
}

/* ── 分組佈局 ── */
.gs-global-search .gs-search-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.gs-global-search .gs-search-group h4 {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  color: #b6b6b6;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.gs-global-search .gs-search-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ── 搜尋結果項目 ── */
.gs-global-search .gs-search-item {
  display: block;
  padding: 8px 10px;
  border-radius: 5px;
  color: #1F2D3D;
  text-decoration: none;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.gs-global-search .gs-search-item:hover,
.gs-global-search .gs-search-item.is-active {
  background: rgba(232,169,0,.10);
  color: #E8A900;
}

/* ═══════════════════════════════════════
   手機端 — 單欄顯示
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .gs-global-search .gs-search-results {
    top: calc(100% + 6px);
    border-radius: 8px;
  }
  .gs-global-search .gs-search-content {
    padding: 18px 16px;
    max-height: 70vh;
  }
  .gs-global-search .gs-search-groups {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .gs-global-search .gs-search-item {
    font-size: 15px;
    padding: 9px 8px;
  }
}

/* ===== Mobile close arrow size confirm ===== */
@media (max-width: 768px) {
  #my_web_sidebar.is-mobile-open .gs-mobile-sidebar-close {
    display: flex !important;
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #my_web_sidebar.is-mobile-open .gs-mobile-sidebar-close svg {
    width: 20px !important;
    height: 20px !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   Global search result width fix
   強制結果浮層寬度等於 .gs-global-search 容器寬度
   ═══════════════════════════════════════════════════════════ */
.gs-global-search {
  position: relative;
  overflow: visible;
}

.gs-global-search .gs-search-results {
  position: absolute !important;
  top: calc(100% + 12px) !important;
  left: 0 !important;
  right: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  z-index: 9999 !important;
}

.gs-global-search .gs-search-results.is-hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .gs-global-search .gs-search-results {
    top: calc(100% + 10px) !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   Hero stacking context fix
   讓 .home-hero__content 的 stacking context 高於品牌輪播
   否則搜索結果框永遠被品牌 Logo 壓住
   ═══════════════════════════════════════════════════════════ */
.home-hero__content {
  z-index: 10 !important;
}

/* ==============================================
   電話國家區號選擇器 — 全域樣式（側邊欄查詢表單使用）
   作用域：.gs-phone-field 組件
   ============================================== */
.gs-phone-field {
  display: flex;
  position: relative;
  width: 100%;
}

.gs-phone-country-toggle {
  width: 108px;
  height: 48px;
  border: 1px solid #d8d8d8;
  border-right: none;
  border-radius: 4px 0 0 4px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0 6px;
  font-size: 14px;
  color: #333;
  transition: background 0.15s;
}

.gs-phone-country-toggle:hover {
  background: #f5f5f5;
}

.gs-phone-country-toggle .gs-phone-flag,
.gs-phone-flag-img,
.gs-phone-country-toggle .phone-country-flag,
.gs-phone-country-list button .phone-country-flag {
  width: 22px;
  min-width: 22px;
  max-width: 22px;
  height: 16px;
  min-height: 16px;
  max-height: 16px;
  display: block;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
  flex: 0 0 22px;
}

.gs-phone-country-toggle .gs-phone-code {
  font-weight: 600;
  font-size: 13px;
}

.gs-phone-country-toggle .gs-phone-dial {
  font-weight: 700;
  font-size: 13px;
  color: #555;
}

.gs-phone-country-toggle .gs-phone-arrow {
  font-size: 10px;
  color: #888;
  transition: transform 0.2s;
  margin-left: 1px;
}

.gs-phone-field.is-open .gs-phone-arrow {
  transform: rotate(180deg);
}

.gs-phone-input {
  flex: 1;
  height: 48px;
  border: 1px solid #d8d8d8;
  border-radius: 0 4px 4px 0;
  padding: 0 14px;
  font-family: inherit;
  font-size: 15px;
  color: #333;
  line-height: 1.5;
  transition: border-color 0.2s;
  background: #fff;
  min-width: 0;
}

.gs-phone-input:focus {
  outline: none;
  border-color: #EEB21B;
}

.gs-phone-field .gs-phone-country-list {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  width: 360px;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  z-index: 9999;
  display: none;
}

.gs-phone-field.is-open .gs-phone-country-list {
  display: block;
}

.gs-phone-field .gs-phone-country-list button {
  width: 100%;
  padding: 10px 14px;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gs-phone-field .gs-phone-country-list button:last-child {
  border-bottom: none;
}

.gs-phone-field .gs-phone-country-list button:hover {
  background: #f3f3f3;
}

.gs-phone-field .gs-phone-country-list button.is-active {
  background: #FFF8E7;
  font-weight: 600;
}

/* 側邊欄查詢表單內的電話欄位適配 */
#custom-form-popup .gs-inquiry-field .gs-phone-input {
  border-radius: 0 9px 0 0;
  border: 1px solid #d8d8d8;
  padding: 0 14px;
  min-height: 48px;
}

#custom-form-popup .gs-inquiry-field .gs-phone-country-toggle {
  border-radius: 9px 0 0 0;
  border: 1px solid #d8d8d8;
  border-right: none;
}

@media (max-width: 767px) {
  .gs-phone-country-toggle {
    width: 88px;
    height: 48px;
  }

  .gs-phone-input {
    height: 48px;
  }

  .gs-phone-field .gs-phone-country-list {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
  }
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER RESPONSIVE FIX — 高優先級覆蓋
   確保電腦/平板四個欄位一行、手機兩個一行
   此區塊放在 main.css 最底部以確保最高優先級
   ═══════════════════════════════════════════════════════════════ */

/* ── 桌面端 (≥1025px)：品牌區 + 四欄連結區並排 ── */
@media (min-width: 1025px) {
  .site-footer .site-footer__inner {
    display: grid !important;
    grid-template-columns: minmax(380px, 1.25fr) minmax(780px, 2.75fr) !important;
    gap: 48px !important;
    align-items: start !important;
    width: 100% !important;
    max-width: none !important;
  }

  .site-footer .site-footer__link-groups {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 32px !important;
    align-items: start !important;
    width: 100% !important;
  }

  .site-footer .site-footer__link-groups > div {
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    grid-column: auto !important;
  }

  .site-footer .site-footer__link-groups h3 {
    white-space: nowrap;
  }
}

/* ── 平板端 (769px–1024px)：品牌區 + 四欄連結區並排 ── */
@media (min-width: 769px) and (max-width: 1024px) {
  .site-footer .site-footer__inner {
    display: grid !important;
    grid-template-columns: minmax(280px, 0.9fr) minmax(560px, 2.1fr) !important;
    gap: 28px !important;
    align-items: start !important;
    width: 100% !important;
    max-width: none !important;
  }

  .site-footer .site-footer__link-groups {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px !important;
    align-items: start !important;
    width: 100% !important;
  }

  .site-footer .site-footer__link-groups > div {
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    grid-column: auto !important;
  }

  .site-footer .site-footer__link-groups h3 {
    white-space: nowrap;
  }

  .site-footer .site-footer__link-groups a {
    font-size: 15px;
    line-height: 1.6;
  }
}

/* ── 手機端 (≤768px)：兩個一行 ── */
@media (max-width: 768px) {
  .site-footer .site-footer__link-groups {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 32px 24px !important;
    align-items: start !important;
    width: 100% !important;
  }

  .site-footer .site-footer__link-groups > div {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    grid-column: auto !important;
  }

  .site-footer .site-footer__link-groups h3 {
    white-space: nowrap;
  }
}
