/*
 * Design System — Nếp Nhà
 * Chuyển đổi 1:1 từ bảng màu / typography / spacing / component trong
 * react-analysis.md mục 10 (không thêm màu ngoài danh sách đã liệt kê).
 * Toàn bộ theme dùng CSS thuần (không build step) + CSS custom properties
 * để dễ maintain, thay cho Tailwind utility của bản React gốc.
 */

/* -------------------------------------------------------------------- */
/* 1. CSS variables — design tokens                                     */
/* -------------------------------------------------------------------- */
:root {
	/* Primary / secondary */
	--color-primary: #3e6b3a;
	--color-primary-hover: #31562e;
	--color-secondary: #c8873a;

	/* Text */
	--color-text: #333333;
	--color-muted: #817c70;
	--color-muted-alt: #726e64;
	--color-muted-alt2: #777266;
	--color-muted-dark: #625f55;
	--color-muted-light: #8a8478;
	--color-placeholder-text: #a39d91;
	--color-heading-dark: #30382e;
	--color-label-amber: #a77a44;

	/* Backgrounds / surfaces */
	--color-bg: #f5f2e8;
	--color-surface-green: #eef2e9;
	--color-surface-green-alt: #e9eee5;
	--color-surface-card: #faf9f4;
	--color-surface-card-alt: #fbfaf5;
	--color-surface-card-alt2: #fbf9f1;
	--color-modal-surface: #fffdf8;
	--color-surface-footer-input: #f1efe7;

	/* Borders / grid lines */
	--color-border: #d8d4c5;
	--color-border-light: #ddd8c8;
	--color-border-grid: #e1ddd1;
	--color-border-card: #e3dfc8;
	--color-border-input: #d6d8cc;
	--color-border-soft: #d3ddce;
	--color-border-combo: #d7d3c5;
	--color-border-divide: #ded9cc;
	--color-border-outline-btn: #aeb9a7;
	--color-border-step: #b8c8b2;
	--color-border-badge: #c8d3c4;
	--color-border-totals: #cbd8c5;
	--color-nav-divider: #c9c4b4;

	/* Overlay / modal */
	--color-overlay: #182318;

	/* Status */
	--color-danger: #c8562a;
	--color-danger-hover: #a04422;
	--color-old-price: #a69f91;
	--color-disabled: #a8bba5;

	/* Dark section (About / Footer) accents */
	--color-dark-text: #d2d8cc;
	--color-dark-accent: #d9a365;
	--color-dark-accent-alt: #c6d4be;
	--color-dark-muted: #bec8b8;
	--color-dark-muted2: #acbaa6;
	--color-dark-muted3: #acb8a8;
	--color-dark-border-text: #d2dfce;
	--color-dark-quote-text: #f4f0e6;
	--color-dark-badge-alt: #e4ecdf;
	--color-footer-icon-muted: #81907d;
	--color-footer-copy: #84917f;
	--color-cta-eyebrow: #fff0d9;
	--color-badge-secondary: #b9cbb5;

	/* Selection */
	--color-selection-bg: #dce8d8;
	--color-selection-text: #2c4d2a;

	/* Typography */
	--font-family-base: 'Be Vietnam Pro', sans-serif;

	/* Radius */
	--radius-pill: 9999px;
	--radius-lg: 16px;   /* rounded-2xl */
	--radius-xl: 24px;   /* rounded-3xl */
	--radius-card: 24px;
	--radius-28: 28px;
	--radius-30: 30px;
	--radius-32: 32px;

	/* Shadows */
	--shadow-btn-primary: 0 8px 24px rgba(62, 107, 58, 0.2);
	--shadow-btn-primary-sm: 0 6px 18px rgba(62, 107, 58, 0.18);
	--shadow-card: 0 8px 30px rgba(55, 63, 42, 0.07);
	--shadow-card-hover: 0 15px 35px rgba(55, 63, 42, 0.13);
	--shadow-hero: 0 20px 60px rgba(55, 63, 42, 0.16);
	--shadow-floating-bar: 0 8px 30px rgba(55, 63, 42, 0.3);

	/* Layout */
	--container-max: 1320px;
	--container-max-narrow: 980px;
	--gutter: 20px;
	--gutter-lg: 32px;
}

/* -------------------------------------------------------------------- */
/* 2. Reset / base                                                      */
/* -------------------------------------------------------------------- */
* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-width: 320px;
	font-family: var(--font-family-base);
	color: var(--color-text);
	background: var(--color-bg);
	font-synthesis: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	font: inherit;
	cursor: pointer;
	background: none;
	border: none;
}

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

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

h1, h2, h3, h4, p {
	margin: 0;
}

::selection {
	background: var(--color-selection-bg);
	color: var(--color-selection-text);
}

/* -------------------------------------------------------------------- */
/* 3. Layout helpers                                                    */
/* -------------------------------------------------------------------- */
.container {
	width: 100%;
	max-width: var(--container-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
}

.container--narrow {
	max-width: var(--container-max-narrow);
}

@media (min-width: 1024px) {
	.container {
		padding-left: var(--gutter-lg);
		padding-right: var(--gutter-lg);
	}
}

.section {
	padding-top: 80px;
	padding-bottom: 80px;
}

@media (min-width: 1024px) {
	.section {
		padding-top: 112px;
		padding-bottom: 112px;
	}
}

.section--tight {
	padding-top: 64px;
	padding-bottom: 64px;
}

@media (min-width: 1024px) {
	.section--tight {
		padding-top: 80px;
		padding-bottom: 80px;
	}
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* -------------------------------------------------------------------- */
/* 4. Typography                                                        */
/* -------------------------------------------------------------------- */
.eyebrow {
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.22em;
	color: var(--color-secondary);
}

.eyebrow--on-dark {
	color: var(--color-dark-accent);
}

.heading-1 {
	font-size: 42px;
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.045em;
	color: var(--color-heading-dark);
	margin: 0 0 0;
}

@media (min-width: 640px) {
	.heading-1 { font-size: 60px; }
}

@media (min-width: 1024px) {
	.heading-1 { font-size: 70px; }
}

.heading-2 {
	font-size: 30px;
	font-weight: 700;
	letter-spacing: -0.03em;
	color: var(--color-heading-dark);
}

@media (min-width: 640px) {
	.heading-2 { font-size: 36px; }
}

.heading-2--lg {
	font-size: 30px;
}

@media (min-width: 640px) {
	.heading-2--lg { font-size: 48px; }
}

.heading-3 {
	font-size: 18px;
	font-weight: 700;
}

.heading-accent {
	font-style: italic;
	font-weight: 400;
	color: var(--color-primary);
}

.heading-accent--on-dark {
	color: var(--color-dark-accent-alt);
}

.text-body {
	font-size: 16px;
	line-height: 1.75;
	color: var(--color-muted);
}

.text-sm {
	font-size: 14px;
	line-height: 1.6;
	color: var(--color-muted);
}

/* -------------------------------------------------------------------- */
/* 5. Buttons                                                            */
/* -------------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border-radius: var(--radius-pill);
	font-weight: 700;
	font-size: 14px;
	padding: 16px 24px;
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
	white-space: nowrap;
}

.btn:hover {
	transform: translateY(-2px);
}

.btn--sm {
	padding: 12px 20px;
	font-size: 12px;
}

.btn--primary {
	background: var(--color-primary);
	color: #fff;
	box-shadow: var(--shadow-btn-primary);
}

.btn--primary:hover {
	background: var(--color-primary-hover);
}

.btn--outline {
	background: transparent;
	color: var(--color-primary);
	border: 1px solid var(--color-border-outline-btn);
}

.btn--outline:hover {
	background: #fff;
}

.btn--white {
	background: #fff;
	color: var(--color-primary);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.btn--white:hover {
	transform: translateY(-2px);
}

.btn--block {
	width: 100%;
}

.btn:disabled,
.btn--disabled {
	background: var(--color-disabled);
	color: #fff;
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
}

.btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-pill);
	color: var(--color-muted-dark);
	transition: background-color 0.2s ease;
}

.btn-icon:hover {
	background: #fff;
}

/* -------------------------------------------------------------------- */
/* 6. Forms                                                              */
/* -------------------------------------------------------------------- */
.field {
	display: block;
}

.field + .field {
	margin-top: 16px;
}

.field__label {
	display: block;
	margin-bottom: 8px;
	font-size: 12px;
	font-weight: 700;
	color: var(--color-muted-dark);
}

.field__required {
	color: var(--color-danger);
}

.input,
.textarea,
.select,
textarea.input {
	width: 100%;
	border-radius: var(--radius-lg);
	border: 1px solid var(--color-border);
	background: var(--color-surface-card);
	padding: 12px 16px;
	font-size: 14px;
	outline: none;
	transition: border-color 0.2s ease;
	color: var(--color-text);
}

.input::placeholder,
.textarea::placeholder {
	color: var(--color-placeholder-text);
}

.input:focus,
.textarea:focus,
.select:focus {
	border-color: var(--color-primary);
}

.textarea {
	resize: vertical;
	min-height: 90px;
}

.field-error {
	margin-top: 12px;
	font-size: 12px;
	color: var(--color-danger);
	text-align: center;
}

/* -------------------------------------------------------------------- */
/* 7. Cards / badges                                                    */
/* -------------------------------------------------------------------- */
.card {
	background: #fff;
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-card-hover);
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	border-radius: var(--radius-pill);
	font-size: 10px;
	font-weight: 700;
	padding: 6px 12px;
}

.badge--tag {
	background: rgba(255, 253, 248, 0.9);
	color: var(--color-primary);
	backdrop-filter: blur(4px);
}

.badge--in-cart {
	background: var(--color-primary);
	color: #fff;
}

.badge--pill-muted {
	background: var(--color-surface-green-alt);
	color: var(--color-primary);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* -------------------------------------------------------------------- */
/* 8. Image placeholder (graceful fallback khi chưa seed Media Library) */
/* -------------------------------------------------------------------- */
.nepnha-placeholder {
	width: 100%;
	height: 100%;
	min-height: 160px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--color-surface-green) 0%, var(--color-surface-card) 100%);
	border: 1px dashed var(--color-border-step);
	color: var(--color-muted-light);
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	padding: 16px;
}

/* -------------------------------------------------------------------- */
/* 9. Animations                                                        */
/* -------------------------------------------------------------------- */
@keyframes nepnhaFloatIn {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: translateY(0); }
}

.animate-float-in {
	animation: nepnhaFloatIn 0.7s ease-out both;
}

@keyframes nepnhaDrift {
	0%, 100% { transform: translateY(0) rotate(-2deg); }
	50% { transform: translateY(-8px) rotate(1deg); }
}

.animate-drift {
	animation: nepnhaDrift 6s ease-in-out infinite;
}

/* -------------------------------------------------------------------- */
/* 10. Utility grid                                                     */
/* -------------------------------------------------------------------- */
.grid {
	display: grid;
	gap: 20px;
}

.grid--2 {
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
	.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.grid--3 {
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
	.grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
	.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.grid--4 {
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
	.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

a.added_to_cart.wc-forward {
    display: none;
}