/* =========================================================
   WINDSTYLE APPAREL · 仿首页
   顶部条 / 导航栏 / Banner 轮播 / WOMEN-MEN 分类
   主体最大宽 1600px，banner 与分类图全屏宽
   默认字号 18px，间距宽松
   ========================================================= */

:root {
  --ink: #1c1c1c;
  --muted: #666;
  --line: #ececec;
  --container: 1600px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 48px; }

/* ============ 顶部黑色条 ============ */
.topbar { background: #1c1c1c; color: #e6e6e6; }
.topbar-inner {
  height: 50px;
  display: flex; align-items: center; justify-content: space-between;
}
.lang { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: #e6e6e6;
  font-size: 15px; cursor: pointer; padding: 8px 0;
}
.lang-btn .flag { font-size: 17px; }
.lang-btn .caret { transition: transform .25s; }
.lang.open .caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: 135%; left: 0; z-index: 60;
  min-width: 160px;
  background: #fff; color: #333;
  border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.15);
  padding: 8px 0;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .2s ease;
}
.lang.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li { padding: 11px 20px; font-size: 15px; cursor: pointer; }
.lang-menu li:hover { background: #f4f4f4; }
.socials { display: flex; align-items: center; gap: 24px; }
.social { color: #e6e6e6; display: flex; align-items: center; transition: color .2s, opacity .2s; }
.social svg { width: 25px; height: 25px; } 
.social:hover { color: #fff; opacity: .85; }

/* ============ 导航栏 ============ */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.navbar.scrolled { box-shadow: 0 4px 22px rgba(0,0,0,.08); }
.nav-inner { height: 90px; display: flex; align-items: center; justify-content: space-between; }
.logo img { height: 74px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: 52px; }
.nav-link {
  position: relative;
  font-size: 18px; color: #333; padding: 8px 0;
  transition: color .2s;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--ink);
  transition: width .25s ease;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link:hover, .nav-link.active { color: #000; }

/* 下拉菜单 */
.nav-item.has-dropdown { position: relative; }
.drop-caret { font-size: 18px; margin-left: 2px; display: inline-block; transition: transform .25s; }
.has-dropdown:hover .drop-caret { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  display: flex; gap: 52px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,.14);
  padding: 30px 40px;
  min-width: 540px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  z-index: 80;
}
.dropdown::before {
  content: ""; position: absolute; top: -6px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px; background: #fff;
  border-left: 1px solid var(--line); border-top: 1px solid var(--line);
}
.has-dropdown:hover .dropdown,
.has-dropdown.open .dropdown {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}

.drop-col { display: flex; flex-direction: column; min-width: 190px; }
.drop-title {
  font-size: 16px; font-weight: 700; letter-spacing: 1.5px;
  color: #111; padding: 8px 0 12px;
  border-bottom: 1px solid var(--line); margin-bottom: 10px;
}
.drop-link {
  font-size: 16px; color: #555; padding: 9px 0;
  transition: color .2s, padding-left .2s;
}
.drop-link:hover { color: #000; padding-left: 6px; }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.hamburger span { width: 26px; height: 2px; background: #333; border-radius: 2px; transition: .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Banner 轮播 ============ */
.hero { position: relative; width: 100%; overflow: hidden; }
.slides { display: flex; transition: transform .65s cubic-bezier(.4,0,.2,1); }
.slide { min-width: 100%; }
.slide img { width: 100%; height: auto; }

.arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px;
  border: none; border-radius: 50%;
  background: rgba(0,0,0,.28); color: #fff; font-size: 22px;
  cursor: pointer; display: grid; place-items: center;
  opacity: 0; transition: opacity .3s, background .2s;
}
.hero:hover .arrow { opacity: 1; }
.arrow:hover { background: rgba(0,0,0,.55); }
.arrow.prev { left: 28px; }
.arrow.next { right: 28px; }

.dots {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 12px;
}
.dot {
  width: 11px; height: 11px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.5); cursor: pointer;
  transition: background .2s, transform .2s;
}
.dot.active { background: #fff; transform: scale(1.25); }

/* ============ WOMEN / MEN 分类 ============ */
.category { padding: 0; }
.cat-grid {
  display: grid; grid-template-columns: 1fr 1fr;
    gap: 1%;
    padding: 2% 4%;
}
.cat-card {
  position: relative; overflow: hidden; display: block;
}
.cat-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.cat-shade {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.12);
  transition: background .3s;
}
.cat-info {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
}
.cat-info h3 {
  color: #fff; font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 800; letter-spacing: 5px;    margin-bottom: 30px;
  text-shadow: 0 2px 14px rgba(0,0,0,.35);
}
.cat-btn {
  background: #fff; color: #333;
  font-size: 16px; padding: 12px 36px; border-radius: 4px;
  box-shadow: 0 3px 12px rgba(0,0,0,.18);
  transition: background .2s, color .2s, transform .2s;
}
.cat-card:hover img { transform: scale(1.07); }
.cat-card:hover .cat-shade { background: rgba(0,0,0,.28); }
.cat-card:hover .cat-btn { background: var(--ink); color: #fff; transform: translateY(-2px); }

.customers img{ margin:0 auto;}
/* ============ 滚动渐显 ============ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
  .nav-menu { gap: 32px; }
  .container { padding: 0 32px; }
}

@media (max-width: 768px) {
  body { font-size: 17px; }
  .container { padding: 0 18px; }
  .nav-inner { height: 64px; }
  .logo img { height: 45px; }

  /* 顶部社交条压缩：桌面 50px/图标25/间距24 → 移动 42px/图标20/间距18 */
  .topbar-inner { height: 42px; }
  .socials { gap: 18px; }
  .social svg { width: 20px; height: 20px; }
  .social .iconfont { font-size: 17px !important; }

  /* 分类卡片：贴边 2%/4% 与 1% 缝隙 → 统一 10px 呼吸感 */
  .cat-grid { padding: 10px; gap: 10px; }

  .hamburger { display: flex; }
  .nav-menu {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px rgba(0,0,0,.1);
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  /* 展开后限制在视口内并允许内部滚动：子分类很长时也能滚到底部栏目
     预留 106px（顶部条42+导航64）与 54px（底部快捷栏），避免被遮住 */
  .nav-menu.open {
    max-height: calc(100vh - 168px);
    max-height: calc(100dvh - 168px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  /* 所有一级栏目（含带下拉的 Products）统一 50px 行高 */
  .nav-link {
    height: 50px; line-height: 50px;
    padding: 0 26px;
    display: flex; align-items: center;
    border-top: 1px solid #f3f3f3;
  }
  .nav-link .drop-caret { margin-left: 6px; line-height: 1; }
  .nav-link::after { display: none; }

  /* 移动端下拉：静态展开 */
  .dropdown {
    position: static; transform: none; left: auto;
    display: none; opacity: 1; visibility: visible;
    border: none; border-radius: 0; box-shadow: none;
    padding: 0; min-width: 0; gap: 0; flex-direction: column;
  }
  .dropdown::before { display: none; }
  /* 移动端：展开菜单时正常弹出 Products 子分类（箭头保留）
     必须显式清掉桌面版的 translateX(-50%)，否则整块左移出屏幕 */
  .has-dropdown.open .dropdown {
    display: flex;
    transform: none;
    opacity: 1;
    visibility: visible;
    left: auto; top: auto;
  }
  .drop-col { padding: 8px 26px 16px; }
  .drop-title { border-bottom: none; margin-bottom: 2px; }
  .drop-link { padding: 9px 0; padding-left: 16px; border-top: 1px solid #f6f6f6; }

  .arrow { width: 42px; height: 42px; font-size: 18px; opacity: 1; }
  .arrow.prev { left: 14px; }
  .arrow.next { right: 14px; }

  .cat-grid { grid-template-columns: 1fr; gap: 10px; }
  /* 分类卡高度：参考截图比例 535×230 ≈ 2.33:1 */
  .cat-card { aspect-ratio: 580 / 210; }
  .cat-info { justify-content: flex-end; gap: 6px; padding-bottom: 14px; }
  .cat-info h3 { font-size: 26px; letter-spacing: 3px; margin-bottom: 0; }
  .cat-btn { font-size: 13px; padding: 7px 22px; }

  /* 首页轮播：移动端改用专用的 750×450 移动版 banner（与 windstyle 同一做法）
     375 宽 → 高 225px，424 宽 → 254px；桌面端仍用原 1920×650 图 */
  .hero { height: auto; aspect-ratio: 750 / 450; }
  .hero .slides, .hero .slide { height: 100%; }
  .hero .slide {
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
  }
  .hero .slide img { width: 100%; height: 100%; object-fit: cover; opacity: 0; }
  .hero .slide:nth-child(1) { background-image: url(../img/hero-m1.jpg); }
  .hero .slide:nth-child(2) { background-image: url(../img/hero-m2.jpg); }
  .hero .slide:nth-child(3) { background-image: url(../img/hero-m3.jpg); }
  .ws-video video{ width:100%;}
}

/* 首页视频：第一帧封面 + 中央播放按钮（桌面/移动通用） */
.ws-video {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
.ws-video video { display: block; width: 100%; height: auto; }
.ws-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 2;
}
.ws-play-btn:hover { background: rgba(0, 0, 0, 0.82); }
.ws-play-btn:active { transform: translate(-50%, -50%) scale(0.94); }
.ws-play-btn svg { margin-left: 4px; }
.ws-video.is-playing .ws-play-btn { display: none; }

/* 移动端播放按钮收小（置于通用规则之后以保证覆盖） */
@media (max-width: 768px) {
  .ws-play-btn { width: 56px; height: 56px; border-width: 2px; }
  .ws-play-btn svg { width: 28px; height: 28px; margin-left: 3px; }
}
