/* ship2sea home.css — cats + home */
/* 分类面板 / 全部分类下拉 — 首页与非首页共用 */
/* 国际站：左栏一级；右侧固定展示全部一级楼层 + 二级圆形宫格 */
.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 {
  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 {
  position: relative;
  z-index: 70;
}

.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;
}

.cat-panel__list {
  list-style: none;
}

.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;
}

/* 首页 — 大站货架尺度 */

.home-stage {
  margin-top: 16px;
  position: relative;
  z-index: 30;
}

.home-stage__row {
  display: grid;
  grid-template-columns: var(--cat-rail-width) 1fr;
  gap: 14px;
  min-height: var(--hero-height);
  position: relative;
}

/* 国际站：左栏一级；右侧固定展示全部一级楼层 + 二级圆形宫格 */
.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 {
  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;
}

.home-hero {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  height: var(--hero-height);
}

.home-hero__slides {
  position: relative;
  height: 100%;
}

.home-hero__slide {
  position: absolute;
  inset: 0;
  padding: 0;
  background: #1a1a1a;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
  z-index: 0;
  pointer-events: none;
}

.home-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  pointer-events: auto;
}

.home-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.02);
  transition: transform 5.5s ease-out;
}

.home-hero__slide.is-active .home-hero__img {
  transform: scale(1);
}

.home-hero__cta {
  position: absolute;
  left: 40px;
  bottom: 44px;
  z-index: 2;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s;
}

.home-hero__slide.is-active .home-hero__cta {
  opacity: 1;
  transform: translateY(0);
}

.home-hero__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 3;
}

.home-hero__dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
  transition: width 0.25s ease, background 0.25s ease, border-radius 0.25s ease;
}

.home-hero__dots button.is-active {
  background: #fff;
  width: 28px;
  border-radius: 8px;
}

.home-trust {
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 22px 12px;
}

.home-trust__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 22px;
  border-right: 1px solid var(--color-border);
}

.home-trust__item:last-child {
  border-right: 0;
}

.home-trust__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-brand-soft);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--fs-sm);
  flex: 0 0 auto;
}

.home-trust__text strong {
  display: block;
  font-size: var(--fs-md);
  margin-bottom: 2px;
}

.home-trust__text span {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.home-categories {
  margin-top: 20px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px 22px 18px;
}

.home-categories__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.home-categories__item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  text-align: center;
  border-radius: var(--radius-md);
}

.home-categories__item:hover {
  background: var(--color-brand-muted);
  color: var(--color-brand);
}

.home-categories__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  overflow: hidden;
}

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

.home-categories__item:hover .home-categories__icon {
  border-color: var(--color-brand);
}

.home-categories__item span {
  font-size: var(--fs-sm);
  line-height: 1.3;
  max-width: 100%;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-products {
  margin-top: 20px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px;
}

.home-quad {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.home-quad__item {
  height: 148px;
  border-radius: var(--radius-md);
  padding: 24px 22px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.7) 100%),
    var(--quad-img, none) center / cover no-repeat,
    #555;
  transition: transform 0.15s, box-shadow 0.15s;
}

.home-quad__item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  color: #fff;
}

.home-quad__item:nth-child(1) {
  background:
    linear-gradient(135deg, rgba(255, 64, 0, 0.75), rgba(255, 122, 61, 0.55)),
    var(--quad-img, none) center / cover no-repeat,
    #ff4000;
}

.home-quad__item:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(34, 34, 34, 0.72), rgba(85, 85, 85, 0.55)),
    var(--quad-img, none) center / cover no-repeat,
    #333;
}

.home-quad__item:nth-child(3) {
  background:
    linear-gradient(135deg, rgba(196, 60, 0, 0.72), rgba(255, 91, 0, 0.55)),
    var(--quad-img, none) center / cover no-repeat,
    #c43c00;
}

.home-quad__item:nth-child(4) {
  background:
    linear-gradient(135deg, rgba(31, 78, 61, 0.75), rgba(58, 122, 92, 0.55)),
    var(--quad-img, none) center / cover no-repeat,
    #1f4e3d;
}

.home-quad__item strong {
  font-size: var(--fs-2xl);
  font-weight: 800;
}

.home-quad__item span {
  font-size: var(--fs-md);
  opacity: 0.92;
  margin-top: 8px;
}


.home-hero__fallback {
  width: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  padding: 40px;
  background: linear-gradient(135deg, #1f1f1f 0%, #3a3a3a 100%);
  color: #fff;
  border-radius: var(--radius-md, 8px);
}
.home-hero__fallback strong { font-size: 28px; font-weight: 700; }
.home-hero__fallback span { font-size: 15px; opacity: 0.85; }

/* 轮播层必须 absolute，否则图高塌成 0 */
.home-hero .home-hero__slide {
  position: absolute;
  inset: 0;
}
