/* ==========================================================================
   JCREPLICA storefront — layout measured from jcreplica.com
   ========================================================================== */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format("woff2");
}
@font-face {
  font-family: iconfont;
  src: url(../fonts/iconfont.woff2) format("woff2");
}

:root {
  --primary-0: #141414;
  --primary-1: #1f1f1f;
  --primary-2: #242424;
  --primary-3: #2e2e2e;
  --primary-4: #3b3b3b;
  --primary-6: #696969;
  --background: #f7f7f7;
  --text: #333;
  --dim: #adb5bd;
  --divider: #eee;
  --spacing-sm: 12px;
  --spacing-md: 18px;
  --spacing-lg: 30px;
  --spacing-xl: 50px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 16px;
  --fs-lg: 20px;
  --fs-xl: 26px;
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --max: 1200px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #fff;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
ul { list-style: none; }

.iconfont {
  font-family: iconfont !important;
  font-style: normal;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
.icon-watch::before { content: "\e66a"; }
.icon-shoes::before { content: "\e781"; }
.icon-clothing::before { content: "\e891"; }
.icon-bag::before { content: "\e621"; }
.icon-accessories::before { content: "\ea0a"; }
.icon-home::before { content: "\e65f"; }
.icon-category::before { content: "\e616"; }
.icon-down::before { content: "\e62b"; }
.icon-language::before { content: "\e661"; }
.icon-menu::before { content: "\eb3a"; }
.icon-right::before { content: "\e7f9"; }
.icon-xinpin::before { content: "\e6aa"; }

/* ------------------------------------------------------------------ top -- */
.topbar {
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--background);
  font-size: var(--fs-xs);
}
.topbar-inner {
  width: 100%;
  max-width: var(--max);
  padding: 0 var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.locale {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}
.locale .iconfont { font-size: 16px; }

/* --------------------------------------------------------------- header -- */
.site-header {
  height: 60px;
  display: flex;
  justify-content: center;
  background: #fff;
  border-bottom: 1px solid var(--divider);
  position: sticky;
  top: 0;
  z-index: 9;
}
.header-inner {
  width: 100%;
  max-width: var(--max);
  padding: 0 var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.logo { display: flex; align-items: center; color: var(--primary-0); font-size: 26px; }
.logo img { width: 73px; }

.main-nav { display: flex; align-items: center; gap: 38px; height: 100%; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: var(--primary-0);
  cursor: pointer;
  transition: color .3s;
  white-space: nowrap;
}
.nav-item:hover { color: var(--primary-6); }
.nav-item.active { font-weight: 700; }
.nav-item .iconfont { font-size: 12px; }

.nav-menu { position: relative; height: 100%; display: flex; align-items: center; }
.nav-panel {
  position: absolute;
  top: 100%;
  left: -120px;
  min-width: 640px;
  max-width: 860px;
  background: #fff;
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  padding: 22px 26px;
  display: none;
  gap: 34px;
  flex-wrap: wrap;
}
.nav-menu.open .nav-panel { display: flex; }
.nav-col { min-width: 130px; }
.nav-col h4 { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.nav-col a { display: block; font-size: 12px; color: #666; padding: 4px 0; }
.nav-col a:hover { color: var(--primary-0); font-weight: 600; }

.header-search {
  height: 35px;
  width: 170px;
  padding-right: 8px;
  border-radius: 35px;
  background: var(--background);
  border: 1px solid var(--divider);
  display: flex;
  align-items: center;
}
.header-search .search-btn {
  width: 16px;
  height: 16px;
  margin-left: 12px;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.header-search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  min-width: 0;
  font-size: var(--fs-sm);
  color: var(--text);
}
.header-search input::placeholder { color: var(--dim); }

.mobile-tools { display: none; align-items: center; gap: 8px; }
.mob-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 1px solid var(--divider);
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

/* ---------------------------------------------------------------- main -- */
.app-main {
  flex: 1 0 auto;
  width: 100%;
  padding: var(--spacing-md);
  background: #fff;
}
.page {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--spacing-lg) 60px;
}

/* --------------------------------------------------------------- slogan -- */
.slogan {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 30px 90px;
}
.slogan-label {
  font-size: 2.25rem;
  line-height: 1.6;
  font-weight: 600;
  text-align: center;
}
.slogan-sub {
  margin-top: 20px;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--dim);
  text-align: center;
}

/* ----------------------------------------------------------- home blocks -- */
.home-section { padding: 0 10px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 20px;
}
.section-title { font-size: var(--fs-lg); font-weight: 600; color: var(--text); }

.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 15px;
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  border: 1px solid var(--divider);
  border-radius: 16px;
  transition: all .3s ease;
  background: #fff;
}
.cat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, .1);
  border-color: var(--primary-4);
}
.cat-icon { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; font-size: 33px; color: var(--primary-1); }
.cat-name { font-size: var(--fs-sm); font-weight: 600; margin-top: 10px; }
.cat-sub { font-size: 12px; margin-top: 5px; color: #666; }

.items-section { margin-top: 80px; }

.tabs { display: inline-flex; padding: 3px; border-radius: 8px; background: #f5f5f5; position: relative; margin-bottom: 15px; }
.tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  background: var(--primary-3);
  color: #fff;
  font-size: 13px;
}

/* ------------------------------------------------------------ item card -- */
.items-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.item-card {
  border: 1px solid var(--divider);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: all .3s ease;
}
.item-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0, 0, 0, .1); }
.item-thumb {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  overflow: hidden;
  background: #f5f5f5;
}
.item-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.item-card:hover .item-thumb img { transform: scale(1.05); }
.item-info { padding: 20px 15px; }
.item-title {
  font-size: var(--fs-sm);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.load-sentinel { height: 1px; }
.loading-more { padding: 30px 0; text-align: center; color: var(--dim); font-size: 13px; }

/* --------------------------------------------------------- category page -- */
.list-page { display: flex; align-items: flex-start; margin-top: 10px; }
.cat-side {
  flex: 0 0 200px;
  width: 200px;
  padding-right: 10px;
  margin-right: 5px;
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}
.side-group { margin-bottom: 22px; }
.side-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-0);
  padding-bottom: 15px;
}
.side-item {
  display: block;
  font-size: 14px;
  padding-bottom: 15px;
  border-radius: 5px;
  transition: all .3s;
  line-height: 1.35;
}
.side-item:hover { font-weight: 700; }
.side-item.active { font-weight: 700; color: var(--primary-0); }
.side-sub { padding-left: 12px; }
.side-sub .side-item { font-size: 12px; color: #666; padding-bottom: 10px; }
.side-sub .side-item.active { color: var(--primary-0); }

.list-main { flex: 1 1; min-width: 0; }
.list-head {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-lg);
  font-weight: 600;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 15px;
}
.list-head .side-toggle { display: none; font-size: 22px; }
.list-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.list-count { font-size: 13px; color: var(--dim); font-weight: 400; }

/* ----------------------------------------------------------- breadcrumbs -- */
.breadcrumbs {
  margin-top: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--divider);
  font-size: 13px;
  color: var(--dim);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.breadcrumbs a { color: #666; }
.breadcrumbs a:hover { color: var(--primary-0); }
.breadcrumbs .sep { margin: 0 8px; }
.breadcrumbs .current { color: var(--text); }

/* ------------------------------------------------------------ detail page -- */
.detail { display: block; padding-top: 38px; }
.detail-main { max-width: 100%; padding-right: 0; min-width: 0; }
.detail-head h3 {
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1.62;
}
.code-tag {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  background: #f5f5f5;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #555;
}
.detail-divider { margin-top: 30px; height: 0; border-bottom: 1px solid var(--divider); }

.description { margin-top: 40px; }
.description .desc-title { font-size: var(--fs-md); font-weight: 500; }
.desc-body { margin-top: 20px; }
.desc-body img { width: 100%; vertical-align: middle; }
.desc-text { margin-top: 30px; font-size: 14px; line-height: 1.65; white-space: pre-wrap; }

/* ---------------------------------------------------------------- search -- */
.search-page { max-width: 900px; margin: 0 auto; }
.search-head { padding: 40px 0 20px; }
.search-head h1 { font-size: var(--fs-xl); font-weight: 600; }
.search-head p { margin-top: 8px; font-size: 13px; color: var(--dim); }
.search-grid { margin-top: 10px; }

/* ------------------------------------------------------------------ empty -- */
.empty-state { padding: 90px 20px; text-align: center; color: var(--dim); }
.empty-state .iconfont { font-size: 46px; color: #d8d8d8; }
.empty-state p { margin-top: 16px; font-size: 14px; }

/* ---------------------------------------------------------------- footer -- */
.site-footer {
  width: 100%;
  margin-top: 20px;
  height: 38px;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 60px;
}
.site-footer span { font-size: 13px; color: var(--dim); }

/* --------------------------------------------------------------- drawer -- */
.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .35); }
.drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(84vw, 360px);
  background: #fff;
  display: flex;
  flex-direction: column;
  animation: slide-in .25s ease;
}
@keyframes slide-in { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.drawer-head {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--divider);
}
.drawer-head h3 { font-size: var(--fs-md); font-weight: 600; }
.drawer-close { font-size: 26px; line-height: 1; color: #666; }
.drawer-body { padding: 18px; overflow-y: auto; }
.drawer-body .side-group { margin-bottom: 20px; }
.drawer-body .side-title { padding-bottom: 12px; }

/* ------------------------------------------------------- search overlay -- */
.search-overlay { position: fixed; inset: 0; z-index: 90; background: #fff; }
.search-overlay-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--divider); }
.overlay-search {
  flex: 1 1;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: var(--background);
  border: 1px solid var(--divider);
  border-radius: 40px;
  color: var(--dim);
}
.overlay-search input { flex: 1 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--text); }
.overlay-go { font-size: 13px; color: var(--primary-0); font-weight: 600; padding-left: 6px; }
.overlay-close { font-size: 14px; color: #666; padding: 10px 4px; }

/* -------------------------------------------------------------- lightbox -- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 92vw; max-height: 90vh; object-fit: contain; }
.lb-close { position: absolute; top: 18px; right: 22px; font-size: 34px; color: #fff; line-height: 1; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 36px; padding: 20px; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }

/* ----------------------------------------------------------- whatsapp cta -- */
.whatsapp-cta {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #25D366;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(37, 211, 102, .35);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.whatsapp-cta:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 26px rgba(37, 211, 102, .45);
  color: #fff;
}
.whatsapp-cta .wa-icon { flex: 0 0 auto; color: #fff; }
.wa-text { white-space: nowrap; }
.wa-text-mobile { display: none; }

@media (max-width: 768px) {
  .whatsapp-cta {
    right: 16px;
    bottom: 16px;
    padding: 11px 16px;
    max-width: 220px;
  }
  .wa-text-desktop { display: none; }
  .wa-text-mobile { display: inline; font-size: 13px; }
}

/* ------------------------------------------------------------- responsive -- */
@media (max-width: 991px) {
  .items-grid { gap: 12px; }
}

@media (max-width: 768px) {
  .topbar-inner { padding: 0 var(--spacing-sm); }
  .header-inner { padding: 0 var(--spacing-sm); }
  .logo img { width: 66px; }
  .main-nav { display: none; }
  .mobile-tools { display: flex; }

  .app-main { padding: 0; }
  .page { padding: 0 var(--spacing-sm) 40px; }

  .slogan { padding: 50px 18px 55px; }
  .slogan-label { font-size: var(--fs-xl); line-height: 1.45; }
  .slogan-sub { margin-top: 14px; font-size: 14px; }

  .home-section { padding: 0; }
  .section-head { justify-content: flex-start; margin-bottom: 14px; }
  .section-title { font-size: 18px; }

  .cats-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .cats-grid::-webkit-scrollbar { display: none; }
  .cat-card { flex: 0 0 128px; padding: 12px 8px; scroll-snap-align: start; }
  .cat-icon { width: 44px; height: 44px; font-size: 26px; }
  .cat-name { margin-top: 8px; } 
  .cat-sub { margin-top: 3px; }

  .items-section { margin-top: 40px; }
  .items-grid, .list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .item-info { padding: 12px 10px; }
  .item-title { font-size: 12px; }

  .list-page { display: block; margin-top: 0; }
  .cat-side { display: none; }
  .list-head { height: 46px; font-size: var(--fs-md); margin-bottom: 10px; }
  .list-head .side-toggle { display: flex; }

  .breadcrumbs { margin-top: 12px; padding-bottom: 10px; font-size: 12px; }

  .detail { display: block; padding-top: 10px; }
  .detail-main { width: 100%; max-width: 100%; padding-right: 0; }
  .detail-head { padding: 8px 0 4px; }
  .description { margin-top: 16px; padding: 0; }
  .description .desc-title { display: none; }
  .desc-body { margin-top: 6px; }
  .desc-body img { margin-bottom: 0; }

  .search-head { padding: 22px 0 14px; }
  .search-head h1 { font-size: var(--fs-lg); }
  .site-footer { padding: 0 16px; }
}

@media (max-width: 380px) {
  .cat-card { flex-basis: 116px; }
}
