/* ==========================================================================
   YourPacking 设计系统
   所有数值提取自参考站（mylarpackaging.com）的实际 CSS 变量与声明。
   全站只有这一个地方定义字体/字号/间距/颜色 —— 改这里，全站跟着变。
   ========================================================================== */

/* ==========================================================================
   ★★ 字体：本地自托管（不再请求 Google Fonts）
   ── Inter 用的是可变字体（一个字重范围 400–700 全包），Prompt 没有可变字体所以 700/800/900 各一个文件。
   ── 只保留 latin / latin-ext 两个子集：英文站够用，欧洲重音（é ü ñ ç）也覆盖；
      中文没有对应字体，仍然走系统字体（微软雅黑 / 苹方）。
   ── 文件在 assets/fonts/，重新下载的命令见 tools/_fontbuild.mjs。
   ========================================================================== */
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('../fonts/inter-var-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('../fonts/inter-var-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Prompt';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/prompt-700-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Prompt';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/prompt-700-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Prompt';
	font-style: normal;
	font-weight: 800;
	font-display: swap;
	src: url('../fonts/prompt-800-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Prompt';
	font-style: normal;
	font-weight: 800;
	font-display: swap;
	src: url('../fonts/prompt-800-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Prompt';
	font-style: normal;
	font-weight: 900;
	font-display: swap;
	src: url('../fonts/prompt-900-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Prompt';
	font-style: normal;
	font-weight: 900;
	font-display: swap;
	src: url('../fonts/prompt-900-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	/* ---------- 字体 ---------- */
	--yp-font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--yp-font-head: Prompt, Inter, sans-serif;
	--yp-weight-body: 500;          /* 参考站正文是 500，不是 400 */
	--yp-weight-head: 900;
	--yp-lh-head: 0.9;              /* 标题行高极紧 */
	--yp-lh-body: 1.55;
	--yp-ls-head: 0;                /* 标题字距是 0，不是紧排 */
	--yp-ls-body: 0.01em;

	/* ---------- 字号阶梯（参考站的 --font-size-ratio-* ）----------
	   xs .749 / sm .891 / base 1 / lg 1.335 / xl 1.498 / 2xl 1.682
	   3xl 2 / 4xl 2.67 / 5xl 3 / 6xl 3.564 / 7xl 4            */
	--yp-fs-xs:   0.749rem;   /* ~12px */
	--yp-fs-sm:   0.891rem;   /* ~14px */
	--yp-fs-base: 1rem;       /*  16px */
	--yp-fs-lg:   1.335rem;   /* ~21px */
	--yp-fs-xl:   1.498rem;   /* ~24px */
	--yp-fs-2xl:  1.682rem;   /* ~27px */
	--yp-fs-3xl:  2rem;       /*  32px */
	--yp-fs-4xl:  2.67rem;    /* ~43px */
	--yp-fs-5xl:  3rem;       /*  48px */
	--yp-fs-6xl:  3.564rem;   /* ~57px */
	--yp-fs-7xl:  4rem;       /*  64px */

	/* ---------- 颜色（全站黑白）---------- */
	--yp-black: #111111;
	--yp-ink: #000000;
	--yp-white: #ffffff;
	--yp-grey-900: #1f1f1f;
	--yp-grey-700: #555555;
	--yp-grey-500: #8a8f96;
	--yp-grey-300: #d5d5d5;
	--yp-grey-200: #e5e5e5;
	--yp-grey-100: #f4f4f4;
	--yp-grey-50:  #fafafa;

	/* ---------- 布局 ---------- */
	--yp-max-width: 1820px;         /* 参考站的 --max-site-width */
	--yp-content-width: 1200px;     /* 正文内容用的窄栏 */
	--yp-gutter: 40px;
	--yp-gutter-mobile: 20px;

	/* ---------- 间距阶梯 ---------- */
	--yp-sp-1: 4px;
	--yp-sp-2: 8px;
	--yp-sp-3: 12px;
	--yp-sp-4: 16px;
	--yp-sp-5: 24px;
	--yp-sp-6: 32px;
	--yp-sp-7: 48px;
	--yp-sp-8: 64px;
	--yp-sp-9: 96px;

	/* ---------- 圆角 ---------- */
	--yp-radius-pill: 999px;
	--yp-radius-lg: 18px;
	--yp-radius-md: 12px;
	--yp-radius-sm: 8px;

	/* ---------- 页头 ---------- */
	--yp-header-h: 96px;
	--yp-announce-h: 42px;

	/* ---------- 断点（仅供参考，媒体查询里写死）----------
	   参考站用 767 / 768 / 991 / 1024                          */
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--yp-white);
	color: var(--yp-black);
	font-family: var(--yp-font-body);
	font-weight: var(--yp-weight-body);
	font-size: var(--yp-fs-base);
	line-height: var(--yp-lh-body);
	letter-spacing: var(--yp-ls-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }

a { color: var(--yp-black); text-decoration: none; }
a:hover { color: var(--yp-grey-700); }

button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--yp-black); color: var(--yp-white); }

/* ==========================================================================
   排版
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--yp-font-head);
	font-weight: var(--yp-weight-head);
	line-height: var(--yp-lh-head);
	letter-spacing: var(--yp-ls-head);
	margin: 0 0 0.5em;
	text-transform: uppercase;
}

h1 { font-size: clamp(var(--yp-fs-4xl), 6vw, var(--yp-fs-7xl)); }
h2 { font-size: clamp(var(--yp-fs-2xl), 4vw, var(--yp-fs-5xl)); }
h3 { font-size: var(--yp-fs-xl); }
h4 { font-size: var(--yp-fs-lg); }
h5 { font-size: var(--yp-fs-base); }
h6 { font-size: var(--yp-fs-sm); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

small { font-size: var(--yp-fs-sm); }
strong { font-weight: 700; }

/* ==========================================================================
   布局容器
   ========================================================================== */
.yp-container {
	width: 100%;
	max-width: var(--yp-max-width);
	margin-inline: auto;
	padding-inline: var(--yp-gutter);
}
.yp-container--narrow { max-width: var(--yp-content-width); }

.yp-section { padding-block: var(--yp-sp-8); }
.yp-section--tight { padding-block: var(--yp-sp-7); }

.yp-screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ==========================================================================
   按钮
   ========================================================================== */
.yp-btn,
button.yp-btn,
input[type="submit"].yp-btn,
a.yp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--yp-sp-2);
	padding: 18px 42px;
	border: 2px solid var(--yp-black);
	border-radius: var(--yp-radius-pill);
	background: var(--yp-white);
	color: var(--yp-black);
	font-family: var(--yp-font-head);
	font-weight: var(--yp-weight-head);
	font-size: var(--yp-fs-sm);
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
	text-align: center;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.yp-btn:hover,
.yp-btn:focus-visible { background: var(--yp-black); color: var(--yp-white); }

.yp-btn--solid { background: var(--yp-black); color: var(--yp-white); }
.yp-btn--solid:hover { background: var(--yp-white); color: var(--yp-black); }

.yp-btn--on-dark { border-color: var(--yp-white); background: transparent; color: var(--yp-white); }
.yp-btn--on-dark:hover { background: var(--yp-white); color: var(--yp-black); }

.yp-btn--pill-sm { padding: 11px 24px; font-size: var(--yp-fs-xs); }
.yp-btn--block { width: 100%; }

/* 胶囊标签（FILTER / SORT 那种） */
.yp-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 24px;
	border: 2px solid var(--yp-black);
	border-radius: var(--yp-radius-pill);
	background: var(--yp-white);
	color: var(--yp-black);
	font-family: var(--yp-font-head);
	font-weight: var(--yp-weight-head);
	font-size: var(--yp-fs-xs);
	line-height: 1;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.yp-pill:hover { background: var(--yp-black); color: var(--yp-white); }

/* ==========================================================================
   表单
   ========================================================================== */
.yp-field { margin-bottom: var(--yp-sp-4); }
.yp-field label {
	display: block;
	margin-bottom: var(--yp-sp-2);
	font-size: var(--yp-fs-sm);
	font-weight: 500;
}
.yp-field input[type="text"],
.yp-field input[type="email"],
.yp-field input[type="tel"],
.yp-field input[type="password"],
.yp-field input[type="search"],
.yp-field input[type="number"],
.yp-field select,
.yp-field textarea {
	width: 100%;
	padding: 15px 22px;
	border: 2px solid var(--yp-black);
	border-radius: var(--yp-radius-pill);
	background: var(--yp-white);
	color: var(--yp-black);
	font-family: var(--yp-font-body);
	font-size: var(--yp-fs-base);
	line-height: 1.4;
	outline: none;
	transition: box-shadow .15s ease;
}
.yp-field textarea { border-radius: var(--yp-radius-md); min-height: 160px; resize: vertical; }
.yp-field input:focus,
.yp-field select:focus,
.yp-field textarea:focus { box-shadow: 0 0 0 3px rgba(17, 17, 17, .18); }

/* ==========================================================================
   波浪边缘（横幅用）
   ========================================================================== */
.yp-wave-top,
.yp-wave-bottom { position: relative; }

.yp-wave-top::before,
.yp-wave-bottom::after {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: 42px;
	background-repeat: repeat-x;
	background-size: 1200px 42px;
	pointer-events: none;
	z-index: 5;
}
.yp-wave-top::before { top: -1px; background-position: top left; }
.yp-wave-bottom::after { bottom: -1px; background-position: bottom left; }

@media (max-width: 767px) {
	.yp-wave-top::before,
	.yp-wave-bottom::after { height: 26px; background-size: 700px 26px; }
}

/* ==========================================================================
   公告条
   ========================================================================== */
.yp-announce {
	background: var(--yp-black);
	color: var(--yp-white);
	text-align: center;
	padding: 11px 16px;
	font-size: var(--yp-fs-sm);
	line-height: 1.4;
}

/* ==========================================================================
   WooCommerce 提示条（黑白化）
   ========================================================================== */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews {
	border: 0;
	border-top: 2px solid var(--yp-black);
	background: var(--yp-grey-50);
	color: var(--yp-black);
	padding: var(--yp-sp-4) var(--yp-sp-5);
	margin-bottom: var(--yp-sp-5);
	list-style: none;
}
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before { color: var(--yp-black); }

/* ★ 提示条前面那个「图标」压在第一个字上（用户反馈：有提示语时第一个字母被盖住）
   ── 根因：WooCommerce 自带 CSS 里这个图标是**绝对定位**的
        .woocommerce-info::before { position:absolute; top:1em; left:1.5em; font-family:WooCommerce }
      它靠提示条自己的 padding-left: 3.5em 给图标留出位置；而主题把 padding 改成了
      var(--yp-sp-4) var(--yp-sp-5)，左边距远小于 3.5em → 图标正好落在第一个字上。
   ── 修法：直接把伪元素去掉，文字从内边距正常排；顺便把内边距固定成我们的值，
      免得以后 WooCommerce 升级又把 3.5em 加回来。 */
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	content: none !important;
	display: none !important;
}
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews {
	padding: var(--yp-sp-4) var(--yp-sp-5) !important;
}
.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a { color: var(--yp-black); text-decoration: underline; }

/* ==========================================================================
   工具类
   ========================================================================== */
.yp-text-center { text-align: center; }
.yp-uppercase { text-transform: uppercase; }
.yp-mt-0 { margin-top: 0; }
.yp-mb-0 { margin-bottom: 0; }
.yp-hidden { display: none !important; }

@media (max-width: 767px) {
	:root { --yp-gutter: var(--yp-gutter-mobile); }
}
