/* ship2sea shell — generated from static-frontend; do not use default theme app.css */

/* ==== tokens.css ==== */

/**
 * SupplyGo PC 静态稿色令牌
 * 进货橙 + 大站尺度（宽版心、大首屏）
 */

/* BeikeShop shop 默认字体 Jost */
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost/Jost-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Jost";
  src: url("../fonts/jost/Jost-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Jost";
  src: url("../fonts/jost/Jost-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Jost";
  src: url("../fonts/jost/Jost-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --color-brand: #ff4000;
  --color-brand-hover: #e63900;
  --color-brand-active: #cc3300;
  --color-brand-secondary: #ff5b00;
  --color-brand-soft: #ffeae3;
  --color-brand-muted: #fff5f0;

  --color-price: #ff4000;
  --color-promo: #ff0036;

  --color-text: #222222;
  --color-text-secondary: #666666;
  --color-text-muted: #999999;
  --color-text-inverse: #ffffff;

  --color-bg: #ffffff;
  --color-bg-elevated: #ffffff;
  --color-bg-sunken: #ebebeb;
  /* 白底主图叠底，避免白图融进白页 */
  --color-img-plate: #f5f5f5;
  --color-border: #e8e8e8;
  --color-border-strong: #d9d9d9;

  --color-header-bg: #ffffff;
  --color-header-border: #ebebeb;
  --color-nav-bg: #ffffff;
  --color-nav-hover-bg: #fff5f0;
  --color-nav-active: var(--color-brand);

  --color-success: #21643a;
  --color-success-bg: #e8f5ec;
  --color-warning: #ff8a00;
  --color-danger: #ff0036;
  --color-link: #ff4000;

  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-dropdown: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-header: 0 2px 8px rgba(0, 0, 0, 0.04);

  /* 大站版心：接近 1688 / Dhgate PC */
  --page-max-width: 1480px;
  --page-min-width: 1480px;
  --page-gutter: 20px;
  --cat-rail-width: 268px;
  --side-rail-width: 248px;
  --hero-height: 480px;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* 与 BeikeShop 前台默认主题一致 */
  --font-sans: "Jost", "Helvetica", "Arial", sans-serif;
  /* Jost 视觉偏小，整体比系统字体抬约一档 */
  --fs-xs: 13px;
  --fs-sm: 14px;
  --fs-md: 15px;
  --fs-lg: 17px;
  --fs-xl: 22px;
  --fs-2xl: 26px;
  --fs-3xl: 30px;
  --fs-hero: 44px;
  --fs-price: 24px;
  --lh-tight: 1.25;
  --lh-normal: 1.5;
}


/* ==== base.css ==== */

/* PC 静态稿基础 — 大站尺度，不做移动适配 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  /* body min-width 撑开文档宽度；允许窗口变窄时出现横向滚动条 */
  overflow-x: auto;
}

body {
  margin: 0;
  min-width: var(--page-min-width, 1520px);
  overflow-x: visible;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--color-brand);
}

/* layer 主按钮默认白字；全局 a{color:inherit} 会把它盖成深色 */
.layui-layer-btn .layui-layer-btn0 {
  color: #fff !important;
}

img {
  max-width: 100%;
  vertical-align: middle;
}

button,
input {
  font: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.container {
  box-sizing: border-box;
  width: var(--page-max-width);
  /* 50vw 视觉居中，抵消滚动条造成的左右不等 — 对齐 static-frontend */
  margin-left: max(20px, calc(50vw - var(--page-max-width) / 2));
  margin-right: auto;
  /* 不再左右 padding，避免「有的块 1480、有的块 1440」宽窄不一 */
  padding-left: 0;
  padding-right: 0;
}


/* ==== layout.css ==== */

/* header / footer — 大站尺度 */

.site-topbar {
  background: #1f1f1f;
  border-bottom: 0;
  font-size: var(--fs-sm);
  color: #cfcfcf;
}

.site-topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36px;
}

.site-topbar a {
  color: #cfcfcf;
}

.site-topbar a:hover {
  color: #fff;
}

.site-topbar__links {
  display: flex;
  gap: 20px;
}

.site-header {
  position: relative;
  z-index: 100; /* Account 下拉需盖住下方 site-nav */
  background: var(--color-header-bg);
  border-bottom: 1px solid var(--color-header-border);
  box-shadow: var(--shadow-header);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 36px;
  height: 136px;
}

.site-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.site-logo__mark {
  height: 52px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
}

.site-search {
  flex: 1;
  display: flex;
  max-width: 760px;
  height: 48px;
  border: 3px solid var(--color-brand);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.site-search input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0 18px;
  min-width: 0;
  font-size: var(--fs-lg);
}

.site-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 120px;
  border: 0;
  background: var(--color-brand);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: var(--fs-lg);
}

.site-search__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.site-search button:hover {
  background: var(--color-brand-hover);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: var(--fs-sm);
}

.site-header__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--color-text);
  min-width: 72px;
  height: 64px;
  padding: 0 10px;
  border-radius: var(--radius-md);
}

.site-header__action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--color-brand);
}

.site-header__action-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.site-header__action:hover {
  color: var(--color-brand);
  background: var(--color-brand-muted);
}

.site-header__action:hover .site-header__action-icon {
  color: var(--color-brand);
}

button.site-header__action {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.site-header__cart.is-pulse .site-header__action-icon {
  animation: cart-pulse 0.45s ease;
}

@keyframes cart-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

.cart-fly {
  position: fixed;
  z-index: 9999;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 2px solid var(--color-brand);
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  will-change: transform, opacity;
}

.cart-fly img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .cart-fly { display: none !important; }
  .site-header__cart.is-pulse .site-header__action-icon {
    animation: none;
  }
  .cart-float-fab.is-pulse {
    animation: none;
  }
}

/* ---------- 右侧浮动购物车 ---------- */
.cart-float-fab {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1100;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: var(--color-brand);
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 64, 0, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.cart-float-fab:hover {
  background: var(--color-brand-hover, #e63900);
  transform: translateY(-50%) scale(1.04);
}

.cart-float-fab svg {
  width: 26px;
  height: 26px;
  display: block;
}

.cart-float-fab__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #222;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.cart-float-fab__badge:empty,
.cart-float-fab__badge[data-empty="1"] {
  display: none;
}

.cart-float-fab.is-pulse {
  animation: cart-float-pulse 0.45s ease;
}

@keyframes cart-float-pulse {
  0% { transform: translateY(-50%) scale(1); }
  40% { transform: translateY(-50%) scale(1.14); }
  100% { transform: translateY(-50%) scale(1); }
}

.cart-float-mask {
  position: fixed;
  inset: 0;
  z-index: 1105;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cart-float-mask.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cart-float-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1110;
  width: min(420px, 100vw);
  height: 100vh;
  background: #fff;
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.cart-float-panel.is-open {
  transform: translateX(0);
}

.cart-float-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--color-border);
}

.cart-float-panel__title {
  margin: 0;
  font-size: var(--fs-lg, 18px);
  font-weight: 700;
}

.cart-float-panel__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--radius-sm, 6px);
  background: var(--color-img-plate, #f5f5f5);
  color: var(--color-text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.cart-float-panel__toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-sm, 13px);
}

.cart-float-panel__toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.cart-float-panel__body {
  flex: 1;
  overflow: auto;
  padding: 8px 0 16px;
}

.cart-float-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--color-text-secondary, #888);
  font-size: var(--fs-sm, 13px);
}

.cart-float-group {
  padding: 12px 18px 8px;
  border-bottom: 1px solid var(--color-border);
}

.cart-float-group__head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.cart-float-group__title {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-sm, 13px);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.35;
  text-decoration: none;
}

a.cart-float-group__title:hover {
  color: var(--color-brand);
}

.cart-float-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-secondary, #888);
  cursor: pointer;
  padding: 0;
}

.cart-float-remove svg {
  width: 16px;
  height: 16px;
}

.cart-float-remove:hover {
  color: var(--color-brand);
  background: rgba(255, 64, 0, 0.08);
}

.cart-float-sku {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 8px 0 8px 26px;
}

.cart-float-sku__media {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-float-sku__img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: var(--color-img-plate, #f5f5f5);
  border-radius: 4px;
  filter: brightness(96%) contrast(100%);
  cursor: zoom-in;
}

.cart-float-zoom {
  position: fixed;
  z-index: 1120;
  width: 240px;
  height: 240px;
  padding: 10px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
}

.cart-float-zoom.is-show {
  opacity: 1;
  visibility: visible;
}

.cart-float-zoom img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: brightness(96%) contrast(100%);
}

.cart-float-sku__meta {
  min-width: 0;
}

.cart-float-sku__name {
  font-size: var(--fs-sm, 13px);
  color: var(--color-text);
  line-height: 1.35;
  margin-bottom: 6px;
}

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

.cart-float-sku__price {
  color: var(--color-price, #ff4000);
  font-weight: 700;
  font-size: var(--fs-sm, 13px);
}

.cart-float-qty {
  display: inline-flex;
  align-items: center;
  height: 28px;
  border: 1px solid var(--color-border-strong, #ddd);
  border-radius: var(--radius-sm, 6px);
  overflow: hidden;
}

.cart-float-qty button {
  width: 26px;
  height: 28px;
  border: 0;
  background: var(--color-img-plate, #f5f5f5);
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.cart-float-qty button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cart-float-qty input {
  width: 40px;
  height: 28px;
  border: 0;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  text-align: center;
  font: inherit;
  font-size: var(--fs-sm, 13px);
}

.cart-float-panel__foot {
  border-top: 1px solid var(--color-border);
  padding: 14px 18px 18px;
  background: #fff;
}

.cart-float-panel__summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: var(--fs-sm, 13px);
}

.cart-float-panel__total {
  color: var(--color-price, #ff4000);
  font-weight: 700;
  font-size: var(--fs-lg, 18px);
}

.cart-float-panel__checkout {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: var(--radius-sm, 6px);
  background: var(--color-brand);
  color: #fff;
  font: inherit;
  font-size: var(--fs-md, 15px);
  font-weight: 700;
  cursor: pointer;
}

.cart-float-panel__checkout:hover {
  background: var(--color-brand-hover, #e63900);
}

.cart-float-panel__checkout:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.cart-float-open {
  overflow: hidden;
}

.site-account {
  position: relative;
}

.site-account__label-user {
  display: none;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-account[data-auth="user"] .site-account__label-guest {
  display: none;
}

.site-account[data-auth="user"] .site-account__label-user {
  display: block;
}

.site-account__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 120;
}

.site-account:hover .site-account__menu,
.site-account.is-open .site-account__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-account__menu a {
  display: block;
  padding: 10px 16px;
  font-size: var(--fs-md);
  color: var(--color-text);
}

.site-account__menu a:hover {
  background: var(--color-brand-muted);
  color: var(--color-brand);
}

.site-account__hello {
  padding: 8px 16px 10px;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}

.site-account__guest {
  display: block;
}

.site-account__user {
  display: none;
}

.site-account[data-auth="user"] .site-account__guest {
  display: none;
}

.site-account[data-auth="user"] .site-account__user {
  display: block;
}

.site-account__demo {
  display: block;
  width: calc(100% - 16px);
  margin: 8px 8px 4px;
  padding: 8px 10px;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: #fafafa;
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  cursor: pointer;
  text-align: center;
}

.site-account__demo:hover {
  color: var(--color-brand);
  border-color: var(--color-brand);
  background: var(--color-brand-muted);
}

/* 分类导航条 */
.site-nav {
  position: relative;
  z-index: 70;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}

.site-nav .container {
  display: flex;
  align-items: stretch;
  height: 48px;
}

.site-nav__all {
  position: relative;
  width: var(--cat-rail-width);
  flex: 0 0 var(--cat-rail-width);
  /* 与左侧类目轨同宽 */
  background: var(--color-brand);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-weight: 700;
  font-size: var(--fs-md);
  cursor: pointer;
  letter-spacing: 0.02em;
}

.site-nav__all:hover {
  color: #fff;
  background: var(--color-brand-hover);
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-left: 12px;
  overflow: hidden;
  flex: 1;
}

.site-nav__list a {
  padding: 0 14px;
  white-space: nowrap;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--color-text);
  line-height: 48px;
}

.site-nav__list a:hover {
  color: var(--color-brand);
}

/* 分类面板（首页内嵌 + 非首页 All Categories 下拉共用） */
.cat-panel {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  position: relative;
  z-index: 40;
  height: var(--hero-height);
  overflow: visible;
}

.cat-panel__list {
  list-style: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 4px 0;
  margin: 0;
  position: relative;
  z-index: 2;
}

.cat-panel__list > li {
  flex: 1;
}

.cat-panel__item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 0 12px 0 10px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text);
  border-left: 3px solid transparent;
  cursor: pointer;
}

.cat-panel__item.is-active,
.cat-panel.is-open .cat-panel__item:hover {
  background: #f5f5f5;
  color: var(--color-brand);
  border-left-color: var(--color-brand);
}

.cat-panel__icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #222;
}

.cat-panel__icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.cat-panel__item.is-active .cat-panel__icon,
.cat-panel.is-open .cat-panel__item:hover .cat-panel__icon {
  color: var(--color-brand);
}

.cat-panel__label {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-panel__mega {
  display: none;
  position: absolute;
  left: calc(100% - 1px);
  top: -1px;
  width: min(1198px, calc(100vw - var(--cat-rail-width) - 60px));
  max-width: 1198px;
  height: var(--hero-height);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-dropdown);
  padding: 20px 28px 28px;
  z-index: 50;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.cat-panel.is-open .cat-panel__mega {
  display: block;
}

.cat-mega__section {
  padding: 12px 0 28px;
  border-bottom: 1px solid var(--color-border);
  scroll-margin-top: 12px;
}

.cat-mega__section:last-child {
  border-bottom: 0;
  padding-bottom: 8px;
}

.cat-mega__head {
  margin-bottom: 18px;
}

.cat-mega__head h4 {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--color-text);
}

.cat-mega__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 28px;
  align-content: flex-start;
  justify-content: flex-start;
}

.cat-mega__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 104px;
  text-align: center;
  color: var(--color-text);
}

.cat-mega__tile:hover {
  color: var(--color-brand);
}

.cat-mega__circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #f3f3f3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.15s, transform 0.15s;
}

.cat-mega__tile:hover .cat-mega__circle {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.cat-mega__circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cat-mega__name {
  font-size: var(--fs-xs);
  line-height: 1.35;
  max-width: 104px;
  color: inherit;
}

/* 非首页：All Categories 悬停下拉 */
.site-nav__cats {
  position: relative;
  flex: 0 0 var(--cat-rail-width);
  width: var(--cat-rail-width);
}

.site-nav__cats .site-nav__all {
  width: 100%;
  height: 100%;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.site-nav__dropdown {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 90;
  padding-top: 0;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.12));
}

.site-nav__cats.is-open .site-nav__dropdown {
  display: block;
}

.site-nav__dropdown .cat-panel {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.site-nav__dropdown .cat-panel.is-open .cat-panel__mega {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.site-main {
  padding-bottom: 56px;
}

.site-footer {
  background: #1a1a1a;
  color: #bbb;
  margin-top: 40px;
}

.site-footer__bar {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 56px 0 36px;
}

.site-footer h3 {
  color: #fff;
  font-size: var(--fs-lg);
  margin-bottom: 18px;
}

.site-footer a {
  display: block;
  font-size: var(--fs-md);
  color: #bbb;
  margin-bottom: 10px;
}

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

.site-footer__copy {
  border-top: 1px solid #333;
  padding: 18px 0 28px;
  font-size: var(--fs-sm);
  color: #777;
  text-align: center;
  line-height: 1.6;
}

/* Powered By 链接勿继承页尾列的 block，保持同一行 */
.site-footer__copy a {
  display: inline;
  margin: 0;
  font-size: inherit;
  color: inherit;
}

.site-footer__copy a:hover {
  color: #bbb;
}

.site-footer__copy span {
  display: inline;
}


/* ==== components.css ==== */

/* 可复用组件 — 大站货架感 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: var(--fs-md);
}

.btn--primary {
  background: var(--color-brand);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-brand-hover);
  color: #fff;
}

.btn--ghost {
  background: #fff;
  border-color: transparent;
  color: var(--color-text);
}

.btn--ghost:hover {
  color: var(--color-brand);
}

.btn--on-dark {
  background: #fff;
  color: var(--color-brand);
}

.btn--on-dark:hover {
  background: var(--color-brand-muted);
  color: var(--color-brand);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-bg);
}

.section-head h2 {
  font-size: var(--fs-2xl);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.01em;
}

.section-head h2::before {
  content: "";
  width: 5px;
  height: 22px;
  background: var(--color-brand);
  border-radius: 2px;
}

.section-head a {
  font-size: var(--fs-md);
  color: var(--color-text-secondary);
  font-weight: 500;
}

.section-head a:hover {
  color: var(--color-brand);
}

.panel {
  background: var(--color-bg-elevated);
  border-radius: var(--radius-md);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.product-grid--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.breadcrumbs-wrap {
  margin: 16px auto 12px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.breadcrumbs a {
  color: var(--color-text-secondary);
}

.breadcrumbs a:hover {
  color: var(--color-brand);
}

.breadcrumbs__sep {
  color: var(--color-border-strong);
}

.breadcrumbs [aria-current="page"] {
  color: var(--color-text);
  font-weight: 600;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 10px;
  transition: box-shadow 0.15s;
  z-index: 1;
}

.product-card:hover {
  box-shadow: var(--shadow-card);
  z-index: 5;
}

.product-card.is-sku-open {
  box-shadow: var(--shadow-card);
  z-index: 30;
}

.product-card__media {
  display: block;
  color: inherit;
}

.product-card__media:hover {
  color: inherit;
}

.product-card__img {
  aspect-ratio: 1;
  background: var(--color-img-plate);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  overflow: hidden;
}

.product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: brightness(96%) contrast(100%);
}

.product-card__img span {
  opacity: 0.5;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.product-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.product-card__foot .product-card__price {
  margin: 0;
  min-width: 0;
}

.product-card__skus {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
}

.product-card__cart-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--color-border-strong, #ddd);
  border-radius: var(--radius-sm, 4px);
  background: #fff;
  color: var(--color-text, #222);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.product-card__cart-trigger svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.product-card__cart-trigger:hover,
.product-card.is-sku-open .product-card__cart-trigger {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.product-card__sku-panel {
  display: none;
  position: absolute;
  right: 0;
  left: auto;
  top: calc(100% + 6px);
  bottom: auto;
  z-index: 20;
  width: min(320px, 80vw);
  padding: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
}

.product-card__sku-panel.is-up {
  top: auto;
  bottom: calc(100% + 6px);
}

.product-card.is-sku-open .product-card__sku-panel {
  display: block;
}

.product-grid {
  overflow: visible;
}

.product-card__sku-panel[hidden] {
  display: none !important;
}

.product-card__sku-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-border, #eee);
  font-size: var(--fs-sm, 13px);
}

.product-card__sku-close {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: #888;
  cursor: pointer;
}

.product-card__sku-panel-body {
  max-height: 280px;
  overflow: auto;
  padding: 4px 10px 10px;
}

.product-card__sku-thumbs {
  display: none;
}

.product-card__sku-panel .product-card__var {
  margin-bottom: 8px;
}

.product-card[data-sku-mode="multi"] .product-card__sku-panel {
  width: min(340px, 86vw);
}

.product-card__sku-level2-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.product-card__sku-level2-wrap > .product-card__var-label {
  margin-bottom: 2px;
}

.product-card__sku-level2[hidden] {
  display: none;
}

/* 规格名加重；已选值次之 */
.product-card__var-label {
  margin-bottom: 8px;
  font-size: var(--fs-sm);
  line-height: 1.3;
  color: var(--color-text);
  font-weight: 700;
}

.product-card__var-label span {
  color: var(--color-text);
  font-weight: 400;
}

.product-card__var-values {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-card__var-btn {
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
  font: inherit;
  font-size: var(--fs-xs);
  cursor: pointer;
}

.product-card__var-btn.is-image {
  width: 32px;
  height: 32px;
  padding: 0;
  overflow: hidden;
  background: var(--color-img-plate);
}

.product-card__var-btn.is-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: brightness(96%) contrast(100%);
}

.product-card__var-btn:hover,
.product-card__var-btn.is-selected {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.product-card__var-btn.is-selected {
  box-shadow: inset 0 0 0 1px var(--color-brand);
}

/* 规格面板改为点击购物车图标打开，不再 hover 展开 */

/* 名称 + 价格/数量/加购 同一行；有缩略图时左图 */
.product-card__sku-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
}

.product-card__sku-row:has(> .product-card__sku-row-img) {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 4px 8px;
}

.product-card__sku-row-img {
  grid-row: 1;
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: var(--color-img-plate);
  border-radius: 3px;
  filter: brightness(96%) contrast(100%);
  cursor: pointer;
}

.product-card__sku-row-name {
  min-width: 0;
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card__sku-row:has(> .product-card__sku-row-img) .product-card__sku-row-name {
  grid-column: 2;
}

.product-card__sku-row:has(> .product-card__sku-row-img) .product-card__sku-row-actions {
  grid-column: 3;
}

.product-card__sku-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.product-card__sku-row-price {
  font-size: var(--fs-sm);
  color: var(--color-price);
  font-weight: 700;
  white-space: nowrap;
}

.product-card__sku-qty {
  display: inline-flex;
  align-items: center;
  height: 28px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.product-card__sku-qty button {
  width: 24px;
  height: 28px;
  border: 0;
  background: var(--color-img-plate);
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.product-card__sku-qty input {
  width: 36px;
  height: 28px;
  border: 0;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  text-align: center;
  font: inherit;
  font-size: var(--fs-sm);
}

.product-card__sku-add {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--color-brand);
  color: #fff;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.product-card__sku-add:hover {
  background: var(--color-brand-hover);
}

.product-card__title {
  display: block;
  font-size: var(--fs-md);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
  color: var(--color-text);
}

.product-card__title:hover {
  color: var(--color-brand);
}

.product-card__price {
  color: var(--color-price);
  font-size: var(--fs-price);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.product-card__meta {
  margin-top: 4px;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

/* —— 收藏 —— */
.fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6b7a8d;
  font: inherit;
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
  text-align: left;
}

.fav-btn__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: block;
}

.fav-btn__label {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fav-btn:hover {
  color: var(--color-brand);
}

.fav-btn.is-on {
  color: var(--color-brand);
}

.fav-btn.is-on .fav-btn__icon {
  fill: var(--color-brand);
  stroke: var(--color-brand);
}

/* 详情：Buy now 后的文字收藏 */
.pd-buy__actions .fav-btn--text {
  align-self: center;
  margin-left: 4px;
  height: 48px;
  padding: 0 4px;
}

/* 列表：图片右上角仅图标 */
.product-card__img {
  position: relative;
}

.product-card .fav-btn--icon {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  color: #6b7a8d;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.product-card:hover .fav-btn--icon,
.product-card:focus-within .fav-btn--icon,
.product-card .fav-btn--icon.is-on {
  opacity: 1;
  pointer-events: auto;
}

.product-card .fav-btn--icon .fav-btn__icon {
  width: 16px;
  height: 16px;
}

.product-card .fav-btn--icon:hover {
  color: var(--color-brand);
  background: #fff;
}

.product-card .fav-btn--icon.is-on {
  color: var(--color-brand);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  background: var(--color-brand);
  color: #fff;
  font-weight: 700;
}


/* ==== legacy page soft landing ==== */
.page-legacy .container-fluid,
body:not(.page-home):not(.page-category):not(.page-product) .container-fluid,
.theme-ship2sea .container-fluid {
  box-sizing: border-box;
  width: var(--page-max-width);
  max-width: none;
  margin-left: max(20px, calc(50vw - var(--page-max-width) / 2));
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}
.btn, button.btn {
  font-family: inherit;
}

/* ==== theme shell extras (dropdown / legacy soft) ==== */
.s2s-dropdown { position: relative; display: inline-block; }
.s2s-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.s2s-dropdown__trigger:hover { color: #fff; }
.s2s-dropdown__caret {
  flex: 0 0 auto;
  opacity: 0.75;
  transition: transform .15s ease;
}
.s2s-dropdown.is-open .s2s-dropdown__caret {
  transform: rotate(180deg);
  opacity: 1;
}
.s2s-dropdown__menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 140px;
  background: #fff;
  color: #222;
  border: 1px solid #e8e8e8;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  border-radius: 6px;
  padding: 6px 0;
  z-index: 200;
}
.s2s-dropdown.is-open .s2s-dropdown__menu { display: block; }
.s2s-dropdown__menu a {
  display: block;
  padding: 8px 14px;
  color: #222 !important;
  white-space: nowrap;
}
.s2s-dropdown__menu a:hover {
  background: #fff5f0;
  color: #ff4000 !important;
}
