/*
Theme Name: Nếp Quýt Đạ Tẻh
Theme URI: https://www.nepquytdateh.id.vn/
Description: Theme riêng cho Nếp Quýt Đạ Tẻh: nền thiên nhiên, hành trình, sản phẩm WooCommerce, báo chí. Sửa nội dung trong Giao diện → Trình chỉnh sửa.
Version: 1.0.1
Requires at least: 6.5
Requires PHP: 7.4
Tested up to: 6.8
License: GNU General Public License v2 or later
Text Domain: nep-quyt-dateh
*/

:root{--nq-radius:16px;--nq-line:#ece4cf;--nq-shadow:0 12px 30px rgba(12,81,42,.10)}
img{max-width:100%;height:auto}
.nq-eyebrow{color:var(--wp--preset--color--amber-dark);font-weight:700;letter-spacing:.09em;text-transform:uppercase;font-size:.8rem;margin-bottom:.25rem!important}
.nq-lead{color:var(--wp--preset--color--muted)}
.nq-section{padding-top:76px;padding-bottom:76px}
.wp-block-button__link{transition:transform .15s,box-shadow .15s}
.wp-block-button__link:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(0,0,0,.14)}
.nq-btn-green .wp-block-button__link{background:var(--wp--preset--color--green-dark);color:#fff}
.nq-btn-outline .wp-block-button__link{background:rgba(255,255,255,.6);color:var(--wp--preset--color--green-dark);border:2px solid var(--wp--preset--color--green-dark)}

/* ---------- Header ---------- */
.nq-header{position:sticky;top:0;z-index:50;background:rgba(255,250,240,.96);backdrop-filter:blur(6px);border-bottom:1px solid var(--nq-line);padding-top:10px;padding-bottom:10px}
.admin-bar .nq-header{top:32px}
.nq-header .wp-block-site-title{font-family:var(--wp--preset--font-family--heading);font-weight:700;font-size:1.12rem;margin:0}
.nq-header .wp-block-site-title a{color:var(--wp--preset--color--green-dark);text-decoration:none}
.nq-header .wp-block-navigation a{text-decoration:none;font-weight:500}
.nq-header .wp-block-navigation a:hover{color:var(--wp--preset--color--amber-dark)}
.nq-header .wp-block-button__link{padding:9px 18px;font-size:.9rem}

/* ---------- Hero: nền thiên nhiên vẽ bằng CSS ---------- */
.nq-hero{position:relative;overflow:hidden;padding-top:48px!important;padding-bottom:160px!important;
  background:
    radial-gradient(ellipse 40% 45% at 72% 38%,rgba(255,255,225,.95),rgba(255,255,225,0) 70%),
    linear-gradient(180deg,#f6fbec 0%,#e3f3cc 38%,#c4e6a0 62%,#a7d57e 100%)}
.nq-hero::before{content:"";position:absolute;left:0;right:0;bottom:90px;height:300px;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 300' preserveAspectRatio='none'%3E%3Cpath d='M0 170 C180 90 320 120 470 150 S760 80 940 120 1250 70 1440 110 V300 H0Z' fill='%239fd06f' opacity='.55'/%3E%3Cpath d='M0 210 C200 150 380 190 560 200 S900 140 1100 180 1340 160 1440 170 V300 H0Z' fill='%237dbb4f' opacity='.7'/%3E%3Cpath d='M0 250 C240 210 460 240 700 245 S1100 215 1440 235 V300 H0Z' fill='%235fa23a' opacity='.85'/%3E%3C/svg%3E") center bottom/100% 100% no-repeat}
.nq-hero::after{content:"";position:absolute;left:-10%;right:-10%;bottom:0;height:150px;pointer-events:none;transform:perspective(500px) rotateX(48deg);transform-origin:bottom;
  background:linear-gradient(180deg,rgba(255,250,240,0) 0%,rgba(255,250,240,.35) 40%,var(--wp--preset--color--cream) 100%),repeating-linear-gradient(90deg,#c9a272 0 150px,#8a6642 150px 154px)}
.nq-hero>*{position:relative;z-index:1}
.nq-hero-brand{gap:14px!important}
.nq-hero-brand .wp-block-image img{width:96px;height:96px;object-fit:contain;filter:drop-shadow(0 6px 12px rgba(0,0,0,.18))}
.nq-hero-brand p{margin:0}
.nq-hero-name{font-size:clamp(1.4rem,3vw,2rem);font-weight:700;color:var(--wp--preset--color--green-dark);line-height:1.2}
.nq-hero-slogan{font-size:clamp(1.3rem,2.8vw,1.85rem);font-weight:700;color:#3d6b1f;line-height:1.2}
.nq-pill{display:inline-block;width:auto!important;background:linear-gradient(90deg,#1f5e14,#5a8f1e);color:#fff;font-weight:700;font-size:clamp(1rem,2.2vw,1.35rem);padding:8px 22px;border-radius:999px;box-shadow:0 6px 16px rgba(31,94,20,.3);border:2px solid #e9d27a}
.nq-hero h1.nq-vietgap{font-family:var(--wp--preset--font-family--body);font-weight:800;font-size:clamp(2.6rem,6.6vw,4.6rem);line-height:1.02;margin:18px 0 10px;
  background:linear-gradient(180deg,#c9a227 0%,#5f8f1c 45%,#2e6a12 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
.nq-note-it{font-style:italic;font-size:.88rem;color:#3c4a2c}
.nq-hero-visual{position:relative;min-height:440px;display:flex;align-items:center;justify-content:center}
.nq-hero-visual .nq-hero-product img{max-width:470px;width:100%;filter:drop-shadow(0 22px 28px rgba(40,70,20,.35))}
.nq-bubble{position:absolute;z-index:2;width:140px;height:140px;margin:0!important;border-radius:50%;display:flex;align-items:center;justify-content:center;text-align:center;padding:16px;font-weight:700;font-size:.92rem;line-height:1.3;color:var(--wp--preset--color--green-dark);
  background:radial-gradient(circle at 30% 25%,rgba(255,255,255,.98),rgba(232,248,214,.85) 55%,rgba(160,215,110,.7));
  box-shadow:inset 0 0 18px rgba(255,255,255,.95),inset -6px -8px 18px rgba(110,170,60,.35),0 10px 24px rgba(60,120,40,.22);animation:nqbob 5s ease-in-out infinite}
.nq-b1{left:-4%;top:0}.nq-b2{left:34%;top:-24px;animation-delay:-1.2s}
.nq-b3{right:-2%;top:40px;animation-delay:-2.4s}.nq-b4{right:2%;bottom:30px;animation-delay:-3.6s;width:126px;height:126px;font-size:.85rem}
@keyframes nqbob{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}
@media(prefers-reduced-motion:reduce){.nq-bubble{animation:none}}
@media(max-width:781px){
  .nq-hero{padding-top:28px!important;padding-bottom:120px!important}
  .nq-hero-visual{min-height:0;display:grid;grid-template-columns:repeat(2,1fr);gap:12px;justify-items:center}
  .nq-hero-visual .nq-hero-product{grid-column:1/-1}
  .nq-hero-visual .nq-hero-product img{max-width:330px}
  .nq-bubble{position:static;width:100%;max-width:160px;height:auto;aspect-ratio:1;animation:none}
  .nq-hero-brand .wp-block-image img{width:72px;height:72px}
}

/* ---------- Số liệu nổi bật ---------- */
.nq-highlights{margin-top:-46px!important;position:relative;z-index:3}
.nq-highlights .wp-block-column{background:#fff;border-radius:var(--nq-radius);padding:22px;box-shadow:var(--nq-shadow);border:1px solid var(--nq-line)}
.nq-highlights p{margin:0}
.nq-hl-num{font-family:var(--wp--preset--font-family--heading);font-size:1.45rem;font-weight:700;color:var(--wp--preset--color--green-dark)}
.nq-hl-label{font-size:.9rem;color:var(--wp--preset--color--muted)}
@media(max-width:781px){.nq-highlights{flex-wrap:wrap!important}.nq-highlights .wp-block-column{flex-basis:calc(50% - 8px)!important}}

/* ---------- Hành trình ---------- */
.nq-tl-item{align-items:center!important;gap:36px!important;margin-top:28px!important}
.nq-tl-item.nq-reverse{flex-direction:row-reverse}
.nq-tl-item .wp-block-image{margin:0;border-radius:var(--nq-radius);overflow:hidden;aspect-ratio:7/5;box-shadow:0 10px 26px rgba(0,0,0,.08);background:#fff}
.nq-tl-item .wp-block-image img{width:100%;height:100%;object-fit:cover}
.nq-tl-item .nq-contain img{object-fit:contain}
.nq-year{font-family:var(--wp--preset--font-family--heading);font-size:2.6rem;font-weight:700;color:var(--wp--preset--color--amber-dark);line-height:1;margin:0}
.nq-tl-item h3{font-size:1.3rem;margin:8px 0}
.nq-tl-item p{color:var(--wp--preset--color--muted)}
.nq-fact{background:var(--wp--preset--color--mint);border-left:4px solid var(--wp--preset--color--green-light);padding:10px 14px;border-radius:8px;font-size:.92rem;color:var(--wp--preset--color--green-dark)!important}
@media(max-width:781px){.nq-tl-item.nq-reverse{flex-direction:column}}

/* ---------- Từ một hạt nếp + thư viện ---------- */
.nq-uses{background:#fff;border-top:1px solid var(--nq-line);border-bottom:1px solid var(--nq-line)}
.nq-uses .nq-main img{border-radius:var(--nq-radius);aspect-ratio:1;object-fit:cover;width:100%}
.nq-chips{gap:10px!important}
.nq-chips p{margin:0;background:var(--wp--preset--color--mint);color:var(--wp--preset--color--green-dark);border-radius:999px;padding:7px 16px;font-weight:600;font-size:.9rem}
.nq-gallery{margin-top:44px!important}
.nq-gallery.wp-block-gallery .wp-block-image img{aspect-ratio:1;object-fit:cover;border-radius:12px;transition:transform .3s}
.nq-gallery .wp-block-image{overflow:hidden;border-radius:12px}
.nq-gallery .wp-block-image:hover img{transform:scale(1.06)}

/* ---------- Sản phẩm WooCommerce ---------- */
.nq-products ul.products{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:22px;margin:40px 0 0!important;padding:0;list-style:none}
.nq-products ul.products::before,.nq-products ul.products::after{display:none!important}
.nq-products ul.products li.product{width:auto!important;margin:0!important;float:none!important;background:#fff;border:1px solid var(--nq-line);border-radius:var(--nq-radius);overflow:hidden;display:flex;flex-direction:column;text-align:left;padding:0 0 18px!important;transition:box-shadow .2s}
.nq-products ul.products li.product:hover{box-shadow:0 14px 30px rgba(12,81,42,.12)}
.nq-products ul.products li.product img{aspect-ratio:1;object-fit:cover;width:100%;margin:0 0 14px!important}
.nq-products ul.products li.product .woocommerce-loop-product__title{font-family:var(--wp--preset--font-family--heading);font-size:1.15rem!important;color:var(--wp--preset--color--green-dark);padding:0 18px!important}
.nq-products ul.products li.product .price{display:block;padding:0 18px;font-size:1.35rem!important;font-weight:700;color:var(--wp--preset--color--red)!important}
.nq-products ul.products li.product .button{margin:auto 18px 0!important;display:block;text-align:center;background:var(--wp--preset--color--green-dark)!important;color:#fff!important;border-radius:999px!important;padding:11px!important;font-weight:600}
.nq-products ul.products li.product .added_to_cart{display:block;text-align:center;margin-top:8px}
.nq-ship{color:var(--wp--preset--color--green-dark);font-weight:600}

/* ---------- Báo chí ---------- */
.nq-press{background:var(--wp--preset--color--green-dark);color:#e4eee0}
.nq-press h2,.nq-press h3{color:#fff}
.nq-press .nq-eyebrow{color:var(--wp--preset--color--amber)}
.nq-press .wp-block-column{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);border-radius:var(--nq-radius);overflow:hidden}
.nq-press .wp-block-column>*:not(figure){padding-left:18px;padding-right:18px}
.nq-press .wp-block-column h3{font-size:1.05rem;margin-top:14px;font-family:var(--wp--preset--font-family--body)}
.nq-press .wp-block-embed,.nq-press .wp-block-image{margin:0}
.nq-press .wp-block-image img{aspect-ratio:16/9;object-fit:cover;object-position:top;width:100%}
.nq-press a{color:var(--wp--preset--color--amber)}
.nq-quote{border:0!important;padding:0!important;margin-top:44px!important}
.nq-quote p{font-family:var(--wp--preset--font-family--heading);font-style:italic;font-size:1.18rem;color:#fff}
.nq-quote cite{color:var(--wp--preset--color--amber);font-style:normal;font-size:.9rem}

/* ---------- Tin cậy + liên hệ ---------- */
.nq-trust{background:#fff;border:1px solid var(--nq-line);border-radius:var(--nq-radius);padding:28px!important;align-items:center!important}
.nq-trust .wp-block-image img{width:140px}
.nq-trust p{margin:4px 0;color:var(--wp--preset--color--muted)}
.nq-contact{background:var(--wp--preset--color--green-dark);color:#e4eee0;border-radius:var(--nq-radius);padding:36px!important}
.nq-contact h2{color:#fff}
.nq-contact a{color:var(--wp--preset--color--amber)}
.nq-contact .nq-btn-white .wp-block-button__link{background:#fff;color:var(--wp--preset--color--green-dark)}

/* ---------- Hỏi đáp ---------- */
.nq-faq .wp-block-details{background:#fff;border:1px solid var(--nq-line);border-radius:12px;padding:16px 20px;margin-bottom:10px}
.nq-faq summary{font-weight:600;cursor:pointer}
.nq-faq .wp-block-details p{color:var(--wp--preset--color--muted);margin-top:10px}

/* ---------- Footer ---------- */
.nq-footer{background:#082f18;color:#b6c6b4;padding-top:46px!important;padding-bottom:96px!important;font-size:.92rem}
.nq-footer h4{color:#fff;font-size:1rem;font-family:var(--wp--preset--font-family--body)}
.nq-footer p{margin:0 0 6px}
.nq-footer a{color:#b6c6b4;text-decoration:none}
.nq-footer a:hover{color:var(--wp--preset--color--amber)}
.nq-footer .wp-block-site-logo img{background:#fff;border-radius:50%;padding:4px}

/* ---------- Nút nổi Zalo / Gọi ---------- */
.nq-float{position:fixed;right:16px;bottom:18px;display:flex;flex-direction:column;gap:10px;z-index:60}
.nq-float a{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;color:#fff!important;text-decoration:none;font-weight:700;font-size:.78rem;box-shadow:0 6px 18px rgba(0,0,0,.25)}
.nq-float .z{background:#0068ff}
.nq-float .c{background:var(--wp--preset--color--red);animation:nqpulse 2s infinite}
@keyframes nqpulse{0%{box-shadow:0 0 0 0 rgba(192,57,43,.5)}70%{box-shadow:0 0 0 14px rgba(192,57,43,0)}100%{box-shadow:0 0 0 0 rgba(192,57,43,0)}}

/* ---------- Trang WooCommerce chung ---------- */
.woocommerce .button.alt,.woocommerce button.button.alt,.wc-block-components-button:not(.is-link){background:var(--wp--preset--color--amber)!important;color:#1d1a10!important;border-radius:999px!important}
.woocommerce-page .wp-block-post-title{margin-top:40px}

/* v1.0.1 sửa lỗi hiển thị */
.nq-tl-item p.nq-year{color:var(--wp--preset--color--amber-dark)}
.nq-contact .wp-block-button__link{color:#1d1a10}
.nq-contact .nq-btn-white .wp-block-button__link{color:var(--wp--preset--color--green-dark)}
.nq-quote cite{display:block;text-align:center}
.nq-header .wp-block-button__link{white-space:nowrap}
@media(max-width:600px){.nq-header .wp-block-buttons,.nq-header .wp-block-woocommerce-customer-account{display:none}.nq-header .wp-block-site-title{font-size:1rem}.nq-header .wp-block-site-logo img{width:36px}}

/* v1.0.3 đầu trang cố định khi cuộn */
header.wp-block-template-part{position:sticky;top:0;z-index:100}
.admin-bar header.wp-block-template-part{top:32px}
@media(max-width:782px){.admin-bar header.wp-block-template-part{top:46px}}
.nq-header{position:relative;top:auto!important}
