/*
Theme Name: Thái Sơn Popcorn
Theme URI: https://www.facebook.com/share/19yfRpCLP1/
Author: Thái Sơn
Description: Theme WordPress chuẩn SEO cho Thái Sơn Popcorn – bắp rang bơ & snack nông sản Việt. Có sẵn kiểu nội dung Sản phẩm, schema JSON-LD, form đăng ký nhà phân phối.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: thaison
License: GPL-2.0-or-later
*/

:root {
	--red: #b3121b;
	--red-dark: #7d0c12;
	--gold: #f5b700;
	--gold-soft: #ffe7a3;
	--cream: #fff7e6;
	--paper: #fffdf8;
	--ink: #2a1a12;
	--muted: #6f5e52;
	--line: #eedfc2;
	--white: #fff;
	--radius: 18px;
	--shadow: 0 10px 30px rgba(42, 26, 18, .08);
	--font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--serif: "Lora", Georgia, serif;
	--wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.65; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.screen-reader-text, .hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { left: 16px; top: 8px; width: auto; height: auto; z-index: 999; background: var(--white); padding: 8px 12px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Eyebrow — nhãn chữ in hoa giãn chữ */
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--red); margin-bottom: .75rem; }
.eyebrow--light { color: var(--gold); }
.script { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--gold); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .9em 1.6em; border-radius: 999px; font-weight: 700; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s, color .15s; text-decoration: none !important; }
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: #ffc61a; }
.btn--red { background: var(--red); color: var(--white); }
.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Topbar khuyến mãi */
.topbar { background: var(--ink); color: var(--gold-soft); font-size: .85rem; text-align: center; padding: 8px 16px; }
.topbar a { color: var(--gold); font-weight: 700; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 253, 248, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; }
.brand img { max-height: 56px; width: auto; }
.brand__mark { width: 64px; height: 40px; white-space: nowrap; letter-spacing: -.01em; border-radius: 50%; background: var(--red); border: 3px solid var(--gold); display: grid; place-items: center; color: var(--white); font-family: var(--serif); font-style: italic; font-size: .8rem; font-weight: 600; }
.brand__name { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 1.05rem; line-height: 1.1; }
.brand__name small { display: block; font-weight: 500; letter-spacing: .02em; text-transform: none; font-size: .72rem; color: var(--muted); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a { display: block; padding: 10px 12px; color: var(--ink); font-weight: 600; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; border-radius: 8px; }
.nav a:hover, .nav .current-menu-item > a { color: var(--red); text-decoration: none; background: var(--cream); }
.header-cta { display: flex; align-items: center; gap: 10px; }
.header-cta .btn { padding: .7em 1.2em; font-size: .8rem; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 1080px) {
	.nav-toggle { display: block; }
	.nav { position: fixed; inset: 74px 0 auto 0; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; max-height: calc(100vh - 74px); overflow: auto; }
	.nav.is-open { display: block; }
	.nav ul { flex-direction: column; padding: 8px 16px 16px; }
	.nav a { font-size: .95rem; padding: 14px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
	.header-cta .btn--ghost { display: none; }
}
@media (max-width: 520px) { .header-cta .btn { display: none; } .brand__name small { display: none; } }

/* Breadcrumb */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 16px 0; margin: 0; font-size: .85rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; }
.breadcrumb a { color: var(--muted); }

/* Hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 85% 20%, #d8222c 0%, var(--red) 45%, var(--red-dark) 100%); color: var(--white); }
.hero__in { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 72px 16px 96px; }
.hero h1 { color: var(--white); }
.hero h1 .script { display: block; font-size: .6em; margin-top: .3em; }
.hero__lead { font-size: 1.1rem; color: #ffe9e0; max-width: 34em; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.4rem 0 2rem; padding: 0; list-style: none; }
.hero__chips li { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.hero__art { position: relative; height: 460px; }
.hero__art figure { position: absolute; margin: 0; border-radius: 50%; overflow: hidden; background: var(--white); border: 6px solid var(--gold); box-shadow: 0 20px 40px rgba(0, 0, 0, .25); }
.hero__art figure img { width: 100%; height: 100%; object-fit: cover; }
.hero__art .f1 { width: 300px; height: 300px; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; }
.hero__art .f2 { width: 180px; height: 180px; left: 2%; top: 4%; }
.hero__art .f3 { width: 170px; height: 170px; right: 0; bottom: 2%; }
.hero__art .kernel { position: absolute; width: 26px; height: 26px; background: var(--gold-soft); border-radius: 46% 54% 40% 60%; box-shadow: 8px 6px 0 -2px #fff2c9, -6px 8px 0 -4px #fff; opacity: .9; }
.hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 48px; color: var(--paper); }
@media (max-width: 860px) {
	.hero__in { grid-template-columns: 1fr; padding: 48px 16px 80px; }
	.hero__art { height: 300px; }
	.hero__art .f1 { width: 200px; height: 200px; }
	.hero__art .f2 { width: 120px; height: 120px; }
	.hero__art .f3 { width: 115px; height: 115px; }
}

/* Sections */
.section { padding: 80px 0; }
.section--cream { background: var(--cream); }
.section--ink { background: var(--ink); color: #f6eadb; }
.section--ink h2, .section--ink h3 { color: var(--white); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section__head p { color: var(--muted); }
.section--ink .section__head p { color: #d9c7b5; }
@media (max-width: 640px) { .section { padding: 56px 0; } }

/* Danh mục tiles */
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--white); border: 1px solid var(--line); text-align: center; padding: 20px 12px 18px; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.cat:hover { transform: translateY(-4px); box-shadow: var(--shadow); text-decoration: none; }
.cat img { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; margin: 0 auto 12px; border: 4px solid var(--gold-soft); }
.cat strong { display: block; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; }
.cat span { font-size: .8rem; color: var(--muted); }
@media (max-width: 960px) { .cats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .cats { grid-template-columns: repeat(2, 1fr); } .cat img { width: 96px; height: 96px; } }

/* Thẻ sản phẩm */
.p-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1000px) { .p-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .p-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.p-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.p-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.p-card__img { position: relative; display: block; aspect-ratio: 1; background: var(--cream); }
.p-card__img img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--red); color: var(--white); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.p-card__body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.p-card__title { font-size: 1rem; font-weight: 700; margin: 0; }
.p-card__title a { color: var(--ink); }
.p-card__meta { font-size: .82rem; color: var(--muted); margin: 0; }
.p-card__price { margin: auto 0 0; padding-top: 6px; font-size: .9rem; }
.p-card__price strong { color: var(--red); font-size: 1.1rem; }
.center { text-align: center; margin-top: 36px; }

/* Giá trị cốt lõi */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.value { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); padding: 28px 22px; }
.value__word { font-size: 1.5rem; font-weight: 800; letter-spacing: .1em; color: var(--gold); margin-bottom: .4rem; }
.value p { margin: 0; color: #e7d8c8; font-size: .95rem; }
@media (max-width: 900px) { .values { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .values { grid-template-columns: 1fr; } }

/* Nguyên liệu */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: .9rem; }
.chips li::before { content: "●"; color: var(--gold); margin-right: 8px; font-size: .7em; vertical-align: middle; }
.flavors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 0; list-style: none; }
.flavors li { background: var(--gold-soft); color: var(--ink); padding: 6px 12px; border-radius: 8px; font-size: .85rem; font-weight: 600; }

/* Hợp tác cards */
.biz { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .biz { grid-template-columns: 1fr; } }
.biz__card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; display: flex; flex-direction: column; }
.biz__card .num { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 2.2rem; line-height: 1; margin-bottom: 10px; }
.biz__card p { color: var(--muted); flex: 1; }
.biz__card a.more { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; }

/* Chính sách list */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 34px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a1a12' stroke-width='3'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/14px no-repeat; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.trust div { background: var(--white); border-radius: 14px; padding: 18px; border: 1px solid var(--line); font-weight: 700; text-align: center; }
.trust small { display: block; font-weight: 500; color: var(--muted); }
@media (max-width: 600px) { .trust { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band { background: var(--gold); color: var(--ink); border-radius: 28px; padding: 44px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; }
.cta-band h2 { margin: 0 0 .3em; }
.cta-band .btn--ghost { color: var(--ink); }
@media (max-width: 800px) { .cta-band { grid-template-columns: 1fr; padding: 32px 22px; } }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 1.4rem; color: var(--red); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); }

/* Trang con: page hero */
.page-hero { background: var(--red); color: var(--white); padding: 56px 0 48px; }
.page-hero h1 { color: var(--white); font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.page-hero p { color: #ffe1d8; max-width: 46em; margin: 0; font-size: 1.05rem; }

/* Bảng giá */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table.price { width: 100%; border-collapse: collapse; min-width: 760px; font-size: .92rem; }
table.price th { background: var(--ink); color: var(--gold-soft); text-align: left; padding: 12px 14px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
table.price td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
table.price tr:nth-child(even) td { background: #fffaf0; }
table.price td.num { white-space: nowrap; font-weight: 700; }
table.price img { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; }
.note { font-size: .85rem; color: var(--muted); margin-top: 10px; }

/* Single sản phẩm */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 32px 0 64px; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; gap: 24px; } }
.product__img { border-radius: 24px; overflow: hidden; background: var(--cream); border: 1px solid var(--line); aspect-ratio: 1; }
.product__img img { width: 100%; height: 100%; object-fit: contain; }
.product__price { font-size: 1.1rem; margin: .4rem 0 1.2rem; }
.product__price strong { font-size: 1.8rem; color: var(--red); }
.specs { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; }
.specs th, .specs td { text-align: left; padding: 10px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.specs th { width: 42%; color: var(--muted); font-weight: 600; }
.promo { background: var(--gold-soft); border-left: 4px solid var(--gold); border-radius: 10px; padding: 12px 16px; margin-bottom: 1.5rem; font-size: .95rem; }

/* Form */
.ts-form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.ts-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .ts-form__grid { grid-template-columns: 1fr; } .ts-form { padding: 20px; } }
.ts-form label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 14px; }
.ts-form input, .ts-form select, .ts-form textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1px solid #dccbb0; border-radius: 10px; font: inherit; background: var(--paper); color: var(--ink); }
.notice { padding: 12px 16px; border-radius: 10px; font-weight: 600; }
.notice--ok { background: #e6f6e9; color: #1d6b2c; }
.notice--err { background: #fde8e8; color: #9b1c1c; }

/* Nội dung bài viết */
.entry { max-width: 780px; margin: 0 auto; padding: 32px 16px 64px; }
.entry h2 { margin-top: 1.6em; }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .posts { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--ink); color: #d9c7b5; padding: 64px 0 24px; font-size: .92rem; }
.site-footer a { color: #f6eadb; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 32px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-title { color: var(--gold); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-slogan { font-family: var(--serif); font-style: italic; color: var(--gold-soft); font-size: 1.1rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .82rem; }

/* Nút gọi nổi */
.float-cta { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 10px; }
.float-cta a { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); color: var(--white); font-weight: 800; font-size: .72rem; text-decoration: none; }
.float-cta .call { background: var(--red); animation: pulse 2s infinite; }
.float-cta .zalo { background: #0068ff; }
.float-cta svg { width: 24px; height: 24px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(179, 18, 27, .5); } 70% { box-shadow: 0 0 0 14px rgba(179, 18, 27, 0); } 100% { box-shadow: 0 0 0 0 rgba(179, 18, 27, 0); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
