/*
Theme Name: UTOP Unified
Theme URI: https://www.utop123.com/
Author: UTOP
Description: A calm, editorial storefront for UTOP's travel and Yunnan collections.
Version: 1.2.0
Text Domain: utop-unified
*/

:root {
  --ink: #172925;
  --muted: #63716c;
  --paper: #f7f3eb;
  --white: #fffdf8;
  --pine: #174b3c;
  --pine-dark: #0d3329;
  --clay: #b56545;
  --gold: #d0a54a;
  --line: rgba(23, 41, 37, 0.14);
  --shadow: 0 22px 60px rgba(16, 43, 35, 0.11);
  --radius: 24px;
  --wrap: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.site-wrap { width: var(--wrap); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid rgba(255,255,255,.13);
  background: rgba(13, 51, 41, .94);
  color: white;
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; font-family: Georgia, serif; font-size: 20px; }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { letter-spacing: .2em; font-size: 17px; }
.brand-copy small { margin-top: 6px; opacity: .7; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.menu-toggle { display: none; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: transparent; color: white; padding: 8px 14px; }
.primary-nav ul { display: flex; align-items: center; gap: 25px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { position: relative; font-size: 14px; opacity: .86; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { opacity: 1; }
.primary-nav a::after { content: ""; position: absolute; right: 0; bottom: -9px; left: 0; height: 1px; transform: scaleX(0); background: var(--gold); transition: transform .2s ease; }
.primary-nav a:hover::after, .primary-nav .current-menu-item > a::after { transform: scaleX(1); }

.hero { position: relative; overflow: hidden; min-height: 680px; display: grid; align-items: center; color: white; background: var(--pine-dark); }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 74% 35%, rgba(208,165,74,.3), transparent 26%), linear-gradient(115deg, rgba(6,31,25,.98) 6%, rgba(23,75,60,.91) 58%, rgba(47,102,80,.78)); }
.hero::after { content: "山"; position: absolute; right: -3vw; bottom: -22vw; color: rgba(255,255,255,.035); font-family: Georgia, "Songti SC", serif; font-size: min(62vw, 760px); line-height: 1; }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(300px,.7fr); gap: 70px; align-items: center; padding-block: 104px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; }
.hero h1 { max-width: 760px; margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(50px, 7vw, 96px); font-weight: 500; letter-spacing: -.045em; line-height: 1.06; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero-copy { max-width: 620px; margin: 28px 0 34px; color: rgba(255,255,255,.76); font-size: 17px; }
.button, .wp-element-button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px; color: white !important; background: var(--clay) !important; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease;
}
.button:hover, .wp-element-button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(181,101,69,.3); }
.button.ghost { border: 1px solid rgba(255,255,255,.4); background: transparent !important; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { padding: 30px; border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius); background: rgba(255,255,255,.08); backdrop-filter: blur(12px); }
.hero-note strong { display: block; margin-bottom: 12px; color: var(--gold); font-family: Georgia, "Songti SC", serif; font-size: 38px; font-weight: 500; }
.hero-note p { margin: 0; color: rgba(255,255,255,.76); }
.hero-stats { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; margin-top: 28px; overflow: hidden; border-radius: 14px; background: rgba(255,255,255,.14); }
.hero-stats span { display: grid; min-height: 84px; place-content: center; background: rgba(13,51,41,.62); text-align: center; }
.hero-stats b { font-family: Georgia, serif; font-size: 28px; line-height: 1; }
.hero-stats small { margin-top: 7px; opacity: .64; }

.section { padding-block: 100px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.section-head h2 { max-width: 680px; margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(36px,5vw,58px); font-weight: 500; line-height: 1.16; }
.section-head p { max-width: 470px; margin: 0; color: var(--muted); }
.collections { display: grid; grid-template-columns: repeat(2,1fr); gap: 22px; }
.collection-card { position: relative; min-height: 330px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset; }
.collection-card a { display: grid; height: 100%; padding: 34px; align-content: space-between; }
.collection-card::before { content: attr(data-number); position: absolute; right: -10px; bottom: -64px; color: rgba(23,75,60,.07); font-family: Georgia, serif; font-size: 210px; line-height: 1; }
.collection-card:first-child { grid-column: 1 / -1; min-height: 290px; background: #dfe8e2; }
.collection-card:nth-child(2) { background: #e8eee9; }
.collection-card:nth-child(3) { color: white; background: var(--clay); }
.collection-card:nth-child(3) p { color: rgba(255,255,255,.74); }
.collection-card:nth-child(4) { background: #e9dfca; }
.collection-icon { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-family: Georgia, serif; font-size: 22px; opacity: .72; }
.collection-card h3 { position: relative; margin: 70px 0 10px; font-family: Georgia, "Songti SC", serif; font-size: 34px; font-weight: 500; }
.collection-card p { position: relative; max-width: 460px; margin: 0; color: var(--muted); }
.collection-link { position: relative; display: flex; align-items: center; gap: 9px; margin-top: 26px; font-weight: 700; }
.collection-link::after { content: "\2192"; transition: transform .2s ease; }
.collection-card:hover .collection-link::after { transform: translateX(6px); }

.section-dark { color: white; background: var(--pine-dark); }
.section-dark .section-head p { color: rgba(255,255,255,.65); }
.section-head-copy { display: grid; max-width: 470px; justify-items: start; gap: 16px; }
.section-link { display: inline-flex; align-items: center; gap: 9px; color: var(--clay); font-size: 14px; font-weight: 700; }
.section-link span { transition: transform .2s ease; }
.section-link:hover span { transform: translateX(5px); }
.home-product-section .product-card { border: 1px solid rgba(23,41,37,.1); box-shadow: 0 14px 40px rgba(16,43,35,.08); }
.home-product-section .product-card > a { display: flex; height: 100%; flex-direction: column; }
.home-product-section .product-card-copy { display: flex; flex: 1; flex-direction: column; }
.home-product-section .product-card-copy h3 { display: -webkit-box; min-height: 49px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.home-product-section .product-card-copy .price { margin-top: auto; padding-top: 10px; }
.home-products-travel .section-link, .home-products-truffle .section-link { color: var(--gold); }
.home-products-tea { background: #e8eee9; }
.home-products-truffle { color: white; background: #2e2924; }
.home-products-truffle .section-head p { color: rgba(255,255,255,.68); }
.home-products-truffle .product-grid { grid-template-columns: repeat(3,1fr); }
.product-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 22px; }
.product-card { overflow: hidden; border-radius: 18px; color: var(--ink); background: var(--white); }
.product-card-media { aspect-ratio: 4/3; overflow: hidden; background: #e7e3db; }
.product-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover img { transform: scale(1.045); }
.product-card-copy { padding: 20px; }
.product-card-copy h3 { margin: 0; font-size: 17px; line-height: 1.45; }
.product-card-copy .price { display: block; margin-top: 10px; color: var(--clay); font-weight: 700; }
.product-card-copy .price del { opacity: .5; }
.product-card-copy .price ins { text-decoration: none; }
.card-placeholder { display: grid; width: 100%; height: 100%; place-items: center; color: rgba(23,41,37,.35); font-family: Georgia, serif; font-size: 58px; }

.story-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.story-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.story-card .story-image { aspect-ratio: 16/10; overflow: hidden; background: #e4e0d7; }
.story-card .story-image img { width: 100%; height: 100%; object-fit: cover; }
.story-card-copy { padding: 24px; }
.story-card time { color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.story-card h3 { margin: 8px 0 0; font-family: Georgia, "Songti SC", serif; font-size: 22px; line-height: 1.4; }

.page-hero { padding-block: 86px 72px; color: white; background: linear-gradient(125deg,var(--pine-dark),var(--pine)); }
.page-hero h1 { max-width: 850px; margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(44px,7vw,78px); font-weight: 500; line-height: 1.12; }
.page-hero p { max-width: 650px; margin: 20px 0 0; color: rgba(255,255,255,.72); }
.breadcrumb { margin-bottom: 18px; color: var(--gold); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.content-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 70px; align-items: start; }
.entry-content { font-size: 17px; }
.entry-content > * { max-width: 820px; }
.entry-content > .alignwide { max-width: 1080px; }
.entry-content h2, .entry-content h3 { margin-top: 1.8em; font-family: Georgia, "Songti SC", serif; line-height: 1.3; }
.entry-content a { color: var(--clay); text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { border-radius: 14px; }
.side-panel { position: sticky; top: 105px; padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.side-panel h3 { margin-top: 0; font-family: Georgia, "Songti SC", serif; }
.side-panel ul { margin: 0; padding: 0; list-style: none; }
.side-panel li + li { border-top: 1px solid var(--line); }
.side-panel a { display: block; padding-block: 11px; }
.content-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.content-card { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.content-card h3 { margin: 0 0 10px; font-family: Georgia, "Songti SC", serif; }
.content-card p { margin: 0; color: var(--muted); }

.site-main > .woocommerce, .woocommerce-page .site-main { width: var(--wrap); margin-inline: auto; padding-block: 70px; }
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { overflow: hidden; padding-bottom: 20px; border-radius: 16px; background: var(--white); box-shadow: 0 8px 30px rgba(16,43,35,.07); }
.woocommerce ul.products li.product a img { margin: 0 0 18px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce ul.products li.product .price, .woocommerce ul.products li.product .button { margin-left: 18px; margin-right: 18px; }
.woocommerce div.product { padding-block: 30px; }

.site-footer { padding-block: 68px 24px; color: rgba(255,255,255,.72); background: #09251e; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 60px; padding-bottom: 50px; }
.footer-brand { max-width: 440px; }
.footer-brand h2 { margin: 0 0 16px; color: white; font-family: Georgia, serif; font-size: 34px; letter-spacing: .14em; }
.footer-brand p { margin: 0; }
.footer-col h3 { margin: 0 0 16px; color: white; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin: 8px 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 30px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-note { max-width: 560px; }
  .product-grid { grid-template-columns: repeat(2,1fr); }
  .home-products-truffle .product-grid { grid-template-columns: repeat(2,1fr); }
  .story-grid, .content-cards { grid-template-columns: repeat(2,1fr); }
  .content-layout { grid-template-columns: 1fr; }
  .side-panel { position: static; }
}

@media (max-width: 760px) {
  :root { --wrap: min(100% - 28px, 1180px); }
  .header-inner { min-height: 66px; flex-wrap: wrap; }
  .menu-toggle { display: inline-flex; }
  .primary-nav { display: none; flex: 0 0 100%; padding-bottom: 16px; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; gap: 0; }
  .primary-nav a { display: block; padding: 9px 0; }
  .hero { min-height: 0; }
  .hero-grid { gap: 45px; padding-block: 74px; }
  .hero h1 { font-size: clamp(44px,14vw,66px); }
  .section { padding-block: 72px; }
  .section-head { align-items: start; flex-direction: column; }
  .collections, .story-grid, .content-cards { grid-template-columns: 1fr; }
  .collection-card:first-child { grid-column: auto; }
  .collection-card { min-height: 300px; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .product-card-copy { padding: 14px; }
  .footer-grid { grid-template-columns: 1fr; gap: 35px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 420px) {
  .product-grid { grid-template-columns: 1fr; }
  .home-products-truffle .product-grid { grid-template-columns: 1fr; }
  .hero-actions { align-items: stretch; flex-direction: column; }
}
