/* Header / Footer shell */

.announce-bar {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  letter-spacing: 0.04em;
  min-height: var(--announce-h);
}

.announce-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 0;
  text-align: center;
  flex-wrap: wrap;
}

.announce-bar__sep {
  opacity: 0.45;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header.is-solid {
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.header-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand__logo {
  height: 56px;
  width: auto;
  max-width: min(280px, 42vw);
  object-fit: contain;
  object-position: left center;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.nav-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-main > li {
  position: relative;
}

.nav-main > li > a,
.nav-main > li > a.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  background: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.nav-main > li > a:hover,
.nav-main > li > a.nav-trigger:hover,
.nav-main > li.is-active > a {
  color: var(--accent);
}

.nav-main .chev {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.55;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 240px;
  padding: 12px;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(14, 18, 24, 0.1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}

/* Bridge the gap so hover stays open while moving into the menu */
.nav-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.nav-main > li.has-dropdown:hover .nav-dropdown,
.nav-main > li.has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--ink-2);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-dropdown a:hover {
  background: var(--surface-2);
  color: var(--accent);
}

.nav-dropdown .count {
  font-size: 12px;
  color: var(--muted);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.tool-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.tool-btn:hover {
  color: var(--accent);
}

.tool-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.header-tools .btn--quote {
  min-height: 40px;
  padding: 0 18px;
  margin-left: 4px;
}

.search-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 16px 0 20px;
}

.search-panel.is-open {
  display: block;
}

.search-panel form {
  display: flex;
  gap: 0;
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
}

.search-panel input[type="search"] {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 14px 18px;
  outline: none;
  font-size: 15px;
}

.search-panel button[type="submit"] {
  border: 0;
  background: var(--ink);
  color: #fff;
  padding: 0 28px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  margin: 5px auto;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.25s;
}

.mobile-drawer {
  display: none;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  padding: 72px 0 0;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

.footer-brand p {
  margin: 0;
  max-width: 320px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.62);
}

.footer-col h3 {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 18px;
}

.footer-col a,
.footer-col p {
  display: block;
  margin: 0 0 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.footer-beian {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  white-space: nowrap;
}

.footer-beian:hover {
  color: #fff;
}

/* Mobile */
@media (max-width: 1024px) {
  .nav-main {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

  .header-tools .btn--quote {
    display: none;
  }

  .header-bar {
    grid-template-columns: auto 1fr;
    min-height: 72px;
    gap: 12px;
  }

  .brand__logo {
    height: 48px;
    max-width: min(220px, 58vw);
  }

  .header-tools {
    margin-left: auto;
  }

  .mobile-drawer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
    overflow: hidden;
  }

  .mobile-drawer[hidden] {
    display: none !important;
  }

  .mobile-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 18, 24, 0.45);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
  }

  .mobile-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(88vw, 360px);
    height: 100%;
    background: #fff;
    padding: 24px 20px 40px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
  }

  .mobile-drawer.is-open {
    pointer-events: auto;
  }

  .mobile-drawer.is-open .mobile-drawer__backdrop {
    opacity: 1;
  }

  .mobile-drawer.is-open .mobile-drawer__panel {
    transform: translateX(0);
  }

  .mobile-drawer__close {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
  }

  .mobile-nav a,
  .mobile-nav button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 14px 4px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: none;
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
  }

  .mobile-nav__cart {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-nav__cart .cart-badge--nav {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    margin: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    transform: none;
    flex-shrink: 0;
  }

  .mobile-nav__cart .cart-badge--nav[hidden] {
    display: none !important;
  }

  .mobile-nav__sub {
    display: none;
    padding: 0 0 8px 12px;
  }

  .mobile-nav__sub.is-open {
    display: block;
  }

  .mobile-nav__sub a {
    font-size: 14px;
    font-weight: 400;
    color: var(--muted);
    border: 0;
    padding: 10px 4px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .brand__logo {
    height: 44px;
    max-width: min(200px, 62vw);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .announce-bar__sep,
  .announce-bar__inner span:last-child {
    display: none;
  }
}

/* Cart drawer (Shopify-style) */
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}

.cart-drawer[hidden] {
  display: none !important;
}

.cart-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 18, 24, 0.48);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.cart-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100%, 420px);
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
  box-shadow: -12px 0 40px rgba(14, 18, 24, 0.12);
}

.cart-drawer.is-open {
  pointer-events: auto;
}

.cart-drawer.is-open .cart-drawer__backdrop {
  opacity: 1;
}

.cart-drawer.is-open .cart-drawer__panel {
  transform: translateX(0);
}

.cart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.cart-drawer__heading {
  font-size: 18px;
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}

.cart-drawer__heading span {
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
}

.cart-drawer__list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px 24px;
}

.cart-drawer__empty {
  padding: 48px 20px;
  text-align: center;
}

.cart-drawer__empty p {
  margin: 0 0 16px;
  color: var(--muted);
}

.cart-drawer__item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.cart-drawer__img {
  width: 72px;
  height: 72px;
  background: var(--surface-2);
  overflow: hidden;
  display: block;
}

.cart-drawer__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-drawer__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.cart-drawer__price {
  margin: 6px 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.cart-drawer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cart-drawer__qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-2);
}

.cart-drawer__qty button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.cart-drawer__qty span {
  min-width: 28px;
  text-align: center;
  font-size: 13px;
}

.cart-drawer__remove {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.cart-drawer__footer {
  padding: 16px 20px 24px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.cart-drawer__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 15px;
}

.cart-drawer__total strong {
  font-size: 20px;
}

.cart-drawer__note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.cart-badge--inline {
  position: static;
  display: inline-flex;
  margin-left: 6px;
  transform: none;
}

/* ---- Floating dock (contact + cart) ---- */
.site-dock {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.site-dock__card,
.site-dock__actions {
  pointer-events: auto;
}

.site-dock__card {
  width: min(280px, calc(100% - 24px));
  padding: 16px 16px 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(14, 18, 24, 0.16);
  transform-origin: bottom right;
  animation: dockCardIn 0.28s var(--ease) both;
}

.site-dock__card[hidden] {
  display: none !important;
}

@keyframes dockCardIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.site-dock__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.site-dock__card-head strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.site-dock__card-close {
  width: 28px;
  height: 28px;
  border: 0;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.site-dock__card-close:hover {
  background: var(--ink);
  color: #fff;
}

.site-dock__person {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted, #6b7785);
}

.site-dock__phone {
  display: block;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: background 0.2s var(--ease);
}

.site-dock__phone:hover {
  background: var(--ink-2);
  color: #fff;
}

.site-dock__phone span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  opacity: 0.7;
  margin-bottom: 2px;
}

.site-dock__phone strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-dock__mail {
  display: block;
  font-size: 12px;
  color: var(--ink-2);
  word-break: break-all;
  margin-bottom: 10px;
}

.site-dock__mail:hover {
  color: var(--accent);
}

.site-dock__link {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.site-dock__link:hover {
  color: var(--accent-hover);
}

.site-dock__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-dock__btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 56px;
  min-height: 56px;
  padding: 8px 4px 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(14, 18, 24, 0.12);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.site-dock__btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-dock__btn em {
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.site-dock__btn:hover,
.site-dock__btn[aria-expanded="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  transform: translateY(-1px);
}

.site-dock__btn--cart {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.site-dock__btn--cart:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.site-dock__badge {
  top: 4px;
  right: 4px;
}

@media (max-width: 640px) {
  .site-dock {
    right: 12px;
    bottom: 16px;
  }

  .site-dock__btn {
    width: 50px;
    min-height: 50px;
  }

  .site-dock__btn svg {
    width: 20px;
    height: 20px;
  }
}
