/*
Theme Name: Trailnorth
Theme URI: https://example.com/trailnorth
Author: OpenAI
Description: 中文户外服装商城主题，兼容 WooCommerce。
Version: 1.0.0
Text Domain: trailnorth
*/

:root {
  --ink: #16201b;
  --muted: #6e756f;
  --paper: #f5f5f0;
  --paper-deep: #e8e9e1;
  --forest: #243c2e;
  --forest-2: #38523f;
  --orange: #d96135;
  --line: rgba(22, 32, 27, .14);
  --serif: "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }

.tn-shell { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; }
.tn-utility {
  min-height: 34px;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--forest);
  color: #eef2e9;
  text-align: center;
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.tn-header {
  position: relative;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.tn-nav {
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
}
.tn-nav__links, .tn-nav__actions {
  display: flex;
  align-items: center;
  gap: 23px;
}
.tn-nav__actions { justify-content: flex-end; }
.tn-nav__links a, .tn-nav__actions button {
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.tn-nav__links a { position: relative; }
.tn-nav__links a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: var(--orange);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .22s ease;
}
.tn-nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.tn-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .16em;
}
.tn-logo__mark {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  color: var(--paper);
  background: var(--orange);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  font-size: 10px;
}
.tn-nav__actions button {
  padding: 7px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tn-nav__actions svg { width: 17px; height: 17px; stroke-width: 1.7; }
.tn-bag-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  color: var(--paper);
  background: var(--orange);
  border-radius: 50%;
  font-size: 10px;
  letter-spacing: 0;
}
.tn-menu-toggle { display: none !important; }

.tn-hero {
  min-height: min(670px, calc(100vh - 112px));
  position: relative;
  overflow: hidden;
  color: #f4f5ee;
  background: #27382e url("https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=2200&q=88") center 46% / cover no-repeat;
}
.tn-hero::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14, 25, 19, .87) 0%, rgba(14, 25, 19, .52) 39%, rgba(14, 25, 19, .06) 82%), linear-gradient(0deg, rgba(10, 17, 13, .42), transparent 40%);
  content: "";
}
.tn-hero__content {
  min-height: inherit;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 76px 0 66px;
}
.tn-kicker {
  margin: 0 0 20px;
  color: #d8dfd2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.tn-hero h1 {
  max-width: 590px;
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(50px, 7vw, 96px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: .92;
}
.tn-hero p {
  max-width: 380px;
  margin: 0 0 31px;
  color: #e0e7db;
  font-size: 16px;
}
.tn-button {
  min-height: 48px;
  padding: 0 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  background: var(--orange);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: background .2s ease, transform .2s ease;
}
.tn-button:hover { background: #bd4d27; transform: translateY(-2px); }
.tn-button--light { background: var(--paper); color: var(--ink); }
.tn-button--light:hover { background: #fff; }
.tn-button svg { width: 16px; height: 16px; }
.tn-hero__meta {
  position: absolute;
  right: 0;
  bottom: 32px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: #dae2d8;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tn-hero__meta::before { width: 42px; height: 1px; background: var(--orange); content: ""; }

.tn-intro {
  padding: 74px 0 78px;
  border-bottom: 1px solid var(--line);
}
.tn-intro__grid { display: grid; grid-template-columns: 1fr 1.7fr; gap: 70px; }
.tn-intro h2 {
  max-width: 280px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 53px);
  font-weight: 400;
  line-height: 1.03;
}
.tn-intro__copy { max-width: 570px; padding-top: 7px; }
.tn-intro__copy p { margin: 0 0 25px; color: #515c54; font-size: 17px; }
.tn-text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.tn-text-link svg { width: 16px; transition: transform .2s ease; }
.tn-text-link:hover svg { transform: translateX(4px); }

.tn-section { padding: 72px 0; }
.tn-section--line { border-bottom: 1px solid var(--line); }
.tn-section__head {
  margin-bottom: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.tn-section__head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 400;
  line-height: .98;
}
.tn-section__head p { max-width: 280px; margin: 0; color: var(--muted); font-size: 13px; }
.tn-tabs { display: flex; flex-wrap: wrap; gap: 9px; }
.tn-tab {
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tn-tab.is-active, .tn-tab:hover { border-color: var(--ink); background: var(--ink); color: #fff; }

.tn-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.tn-product { min-width: 0; position: relative; }
.tn-product[hidden] { display: none; }
.tn-product__visual {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-deep);
}
.tn-product__visual img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.tn-product:hover .tn-product__visual img { transform: scale(1.045); }
.tn-product__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 8px;
  background: var(--orange);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.tn-product__save {
  width: 36px;
  height: 36px;
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(245, 245, 240, .88);
  cursor: pointer;
}
.tn-product__save svg { width: 17px; height: 17px; stroke-width: 1.8; }
.tn-product__save.is-saved { color: var(--orange); }
.tn-product__info { padding: 16px 0 5px; }
.tn-product__line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tn-product h3 { margin: 0; font-size: 14px; font-weight: 800; }
.tn-product__price { font-size: 13px; font-weight: 700; white-space: nowrap; }
.tn-product__meta { margin: 6px 0 13px; color: var(--muted); font-size: 12px; }
.tn-product__colors { display: flex; gap: 6px; }
.tn-swatch { width: 12px; height: 12px; display: block; border: 1px solid rgba(0,0,0,.18); border-radius: 50%; }
.tn-swatch--pine { background: #314d3a; }
.tn-swatch--clay { background: #b85c3b; }
.tn-swatch--stone { background: #c4c3b6; }
.tn-swatch--night { background: #1f2c31; }
.tn-swatch--oat { background: #ded6c6; }
.tn-product__quick {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  min-height: 42px;
  border: 0;
  background: var(--paper);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
.tn-product:hover .tn-product__quick, .tn-product__quick:focus { opacity: 1; transform: translateY(0); }

.tn-feature {
  display: grid;
  grid-template-columns: 1.14fr .86fr;
  min-height: 485px;
  background: var(--forest);
  color: #f5f6ef;
}
.tn-feature__image {
  min-height: 485px;
  background: url("https://images.unsplash.com/photo-1517825738774-7de9363ef735?auto=format&fit=crop&w=1400&q=88") center / cover no-repeat;
}
.tn-feature__copy { padding: 65px clamp(30px, 6vw, 85px); display: flex; flex-direction: column; justify-content: center; }
.tn-feature__copy .tn-kicker { color: #c5d2c3; }
.tn-feature__copy h2 {
  max-width: 420px;
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 67px);
  font-weight: 400;
  line-height: .96;
}
.tn-feature__copy p { max-width: 380px; margin: 0 0 27px; color: #c8d3c7; font-size: 15px; }
.tn-feature__copy .tn-button { align-self: flex-start; }

.tn-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tn-category {
  position: relative;
  min-height: 370px;
  overflow: hidden;
  color: #fff;
  background: var(--forest);
}
.tn-category::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 15, 11, .76), rgba(8, 15, 11, 0) 65%);
  content: "";
}
.tn-category img { width: 100%; height: 100%; position: absolute; object-fit: cover; transition: transform .5s ease; }
.tn-category:hover img { transform: scale(1.05); }
.tn-category__copy { position: absolute; right: 25px; bottom: 23px; left: 25px; z-index: 1; }
.tn-category__copy h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 32px; font-weight: 400; }
.tn-category__copy span { color: #dfe8df; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.tn-values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tn-value { display: flex; gap: 13px; align-items: flex-start; }
.tn-value svg { flex: 0 0 auto; width: 23px; height: 23px; color: var(--orange); stroke-width: 1.5; }
.tn-value strong { display: block; margin-bottom: 3px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.tn-value span { display: block; color: var(--muted); font-size: 12px; }

.tn-newsletter {
  padding: 76px 0 83px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: end;
}
.tn-newsletter h2 { max-width: 420px; margin: 0; font-family: var(--serif); font-size: clamp(37px, 5vw, 60px); font-weight: 400; line-height: 1; }
.tn-newsletter__form { display: flex; border-bottom: 1px solid var(--ink); }
.tn-newsletter__form input { min-width: 0; flex: 1; padding: 14px 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.tn-newsletter__form input::placeholder { color: #8a8f89; }
.tn-newsletter__form button { padding: 14px 0 14px 16px; border: 0; background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.tn-form-note { display: none; margin: 8px 0 0; color: var(--forest); font-size: 12px; }
.tn-form-note.is-visible { display: block; }

.tn-footer { padding: 45px 0 23px; background: #1c2a21; color: #e8ece4; }
.tn-footer__top { display: grid; grid-template-columns: 1.25fr .75fr .75fr .85fr; gap: 35px; padding-bottom: 45px; }
.tn-footer__brand p { max-width: 250px; margin: 16px 0 0; color: #b4c0b3; font-size: 13px; }
.tn-footer__title { margin: 2px 0 14px; color: #aebdaf; font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.tn-footer__links { display: grid; gap: 8px; color: #d9e0d6; font-size: 13px; }
.tn-footer__links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.tn-footer__bottom { padding-top: 20px; border-top: 1px solid rgba(232, 236, 228, .16); display: flex; justify-content: space-between; color: #8fa08e; font-size: 11px; }

.tn-drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(15, 20, 17, .45); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.tn-drawer {
  width: min(430px, 100%);
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  display: flex;
  flex-direction: column;
  padding: 25px;
  background: var(--paper);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.tn-drawer.is-open { transform: translateX(0); }
.tn-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.tn-drawer__head { padding-bottom: 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.tn-drawer__head h2 { margin: 0; font-family: var(--serif); font-size: 32px; font-weight: 400; }
.tn-icon-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.tn-icon-button svg { width: 18px; height: 18px; }
.tn-drawer__items { flex: 1; overflow: auto; padding: 22px 0; }
.tn-empty { color: var(--muted); font-size: 14px; }
.tn-cart-item { display: grid; grid-template-columns: 66px 1fr auto; gap: 13px; align-items: center; margin-bottom: 18px; }
.tn-cart-item img { width: 66px; height: 82px; object-fit: cover; }
.tn-cart-item__name { margin: 0 0 4px; font-size: 13px; font-weight: 800; }
.tn-cart-item__price { margin: 0; color: var(--muted); font-size: 12px; }
.tn-cart-item__remove { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 18px; }
.tn-drawer__foot { padding-top: 17px; border-top: 1px solid var(--line); }
.tn-drawer__total { margin: 0 0 16px; display: flex; justify-content: space-between; font-size: 14px; font-weight: 800; }
.tn-drawer__foot .tn-button { width: 100%; }
.tn-search {
  position: fixed;
  top: 112px;
  right: 0;
  left: 0;
  z-index: 19;
  padding: 20px 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transform: translateY(-140%);
  transition: transform .3s ease;
}
.tn-search.is-open { transform: translateY(0); }
.tn-search__form { display: flex; align-items: center; gap: 15px; }
.tn-search__form svg { width: 20px; }
.tn-search__form input { flex: 1; min-width: 0; padding: 10px 0; border: 0; outline: 0; background: none; font-family: var(--serif); font-size: 28px; }
.tn-search__form button { padding: 10px 0; border: 0; background: none; cursor: pointer; font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.tn-toast { position: fixed; right: 22px; bottom: 22px; z-index: 60; padding: 13px 16px; background: var(--ink); color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease; }
.tn-toast.is-visible { opacity: 1; transform: translateY(0); }
.tn-menu-panel { display: none; }

@media (max-width: 900px) {
  .tn-nav { grid-template-columns: auto 1fr auto; }
  .tn-nav__links { display: none; }
  .tn-nav__actions { gap: 14px; }
  .tn-nav__actions .tn-search-label { display: none; }
  .tn-menu-toggle { display: inline-flex !important; }
  .tn-logo { justify-self: center; }
  .tn-hero { min-height: 580px; background-position: 60% center; }
  .tn-intro__grid { grid-template-columns: .8fr 1.2fr; gap: 35px; }
  .tn-products { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .tn-feature { grid-template-columns: 1fr; }
  .tn-feature__image { min-height: 360px; }
  .tn-feature__copy { min-height: 350px; }
  .tn-categories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tn-category { min-height: 290px; }
  .tn-values { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .tn-footer__top { grid-template-columns: 1.2fr 1fr 1fr; }
  .tn-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .tn-shell { width: min(calc(100% - 32px), var(--max)); }
  .tn-utility { padding-right: 15px; padding-left: 15px; font-size: 9px; }
  .tn-nav { min-height: 68px; gap: 10px; }
  .tn-nav__actions button { font-size: 0; }
  .tn-nav__actions button svg { width: 18px; height: 18px; }
  .tn-logo { font-size: 13px; letter-spacing: .13em; }
  .tn-logo__mark { width: 18px; height: 18px; }
  .tn-hero { min-height: 590px; background-position: 64% center; }
  .tn-hero__content { align-items: flex-end; padding-bottom: 73px; }
  .tn-hero h1 { font-size: 58px; }
  .tn-hero p { max-width: 285px; font-size: 14px; }
  .tn-hero__meta { right: 0; bottom: 23px; font-size: 9px; }
  .tn-intro, .tn-section { padding: 53px 0; }
  .tn-intro__grid, .tn-newsletter { grid-template-columns: 1fr; gap: 24px; }
  .tn-intro__copy { padding: 0; }
  .tn-intro__copy p { font-size: 15px; }
  .tn-section__head { align-items: flex-start; flex-direction: column; gap: 14px; }
  .tn-section__head p { max-width: 320px; }
  .tn-products { gap: 23px 10px; }
  .tn-product__info { padding-top: 12px; }
  .tn-product__line { display: block; }
  .tn-product__price { display: block; margin-top: 4px; }
  .tn-product__quick { position: static; width: 100%; margin-top: 12px; opacity: 1; transform: none; }
  .tn-categories { grid-template-columns: 1fr; gap: 10px; }
  .tn-category { min-height: 210px; }
  .tn-values { grid-template-columns: 1fr; gap: 18px; }
  .tn-newsletter { padding: 56px 0 65px; }
  .tn-newsletter__form { margin-top: 10px; }
  .tn-footer__top { grid-template-columns: 1fr 1fr; gap: 30px 18px; }
  .tn-footer__brand { grid-column: 1 / -1; }
  .tn-footer__bottom { gap: 14px; flex-direction: column; }
  .tn-search { top: 102px; }
  .tn-search__form input { font-size: 22px; }
}
