/*
Theme Name: 樣板咖啡選物
Theme URI: https://cosmogrid.com.tw/
Author: CosmoGrid × Codex
Description: 為精品咖啡、濾掛與手沖器材打造的現代 WooCommerce 商城佈景主題。
Version: 1.0.4
Requires at least: 6.8
Tested up to: 7.1
Requires PHP: 8.1
Text Domain: sample-coffee
*/

:root {
    --coffee-ink: #2c201b;
    --coffee-deep: #3a2720;
    --coffee-brown: #644638;
    --coffee-cream: #f7f1e8;
    --coffee-paper: #fffdf9;
    --coffee-sage: #73806a;
    --coffee-sage-soft: #dfe4d8;
    --coffee-terracotta: #b96345;
    --coffee-terracotta-dark: #91472f;
    --coffee-gold: #c6a86b;
    --coffee-line: rgba(66, 44, 35, .14);
    --coffee-muted: #776a63;
    --coffee-shadow: 0 22px 60px rgba(55, 36, 28, .12);
    --coffee-radius: 26px;
    --coffee-container: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--coffee-ink);
    background: var(--coffee-paper);
    font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link:focus { position: fixed !important; z-index: 99999; top: 12px; left: 12px; width: auto; height: auto; clip: auto; padding: 10px 16px; background: #fff; }
.container { width: var(--coffee-container); margin-inline: auto; }
.section { padding: 96px 0; }
.section--cream { background: var(--coffee-cream); }
.section--sage { background: #e8ece4; }
.section--dark { background: var(--coffee-deep); color: #fff; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 36px; }
.section__head h2, .page-title, .hero h1, .story-panel h2, .gift-banner h2 {
    margin: 0;
    font-family: "Iowan Old Style", "Noto Serif TC", "Songti TC", Georgia, serif;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.035em;
}
.section__head h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
.section__head p { max-width: 580px; margin: 8px 0 0; color: var(--coffee-muted); }
.section--dark .section__head p { color: rgba(255,255,255,.7); }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    color: var(--coffee-terracotta-dark);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.eyebrow--light { color: #f4c7b6; }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--coffee-terracotta-dark); font-weight: 800; }
.text-link:hover { color: var(--coffee-deep); }
.button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .wp-element-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--coffee-deep);
    color: #fff;
    font-weight: 800;
    line-height: 1.2;
    transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .wp-element-button:hover {
    transform: translateY(-2px);
    background: var(--coffee-terracotta-dark);
    color: #fff;
    box-shadow: 0 12px 28px rgba(80, 43, 31, .18);
}
.button--accent { background: var(--coffee-terracotta); }
.button--ghost { border-color: rgba(255,255,255,.55); background: transparent; color: #fff; }
.button--light { background: var(--coffee-paper); color: var(--coffee-deep); }

.announcement-bar { background: var(--coffee-deep); color: #fff; font-size: .82rem; }
.announcement-bar .container { min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.announcement-bar strong { color: #f4c7b6; }
.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(255,253,249,.94); border-bottom: 1px solid var(--coffee-line); backdrop-filter: blur(16px); }
.site-header__inner { min-height: 78px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand__mark { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--coffee-terracotta); }
.brand__mark::before, .brand__mark::after { content: ""; position: absolute; width: 9px; height: 19px; border: 1.8px solid #fff; border-radius: 50%; transform: rotate(28deg); }
.brand__mark::after { transform: rotate(-28deg); }
.brand__text { display: grid; line-height: 1.05; }
.brand__text strong { font-family: "Noto Serif TC", Georgia, serif; font-size: 1.14rem; letter-spacing: .08em; }
.brand__text small { margin-top: 5px; color: var(--coffee-muted); font-size: .65rem; letter-spacing: .14em; }
.primary-nav { justify-self: center; }
.primary-nav ul { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { position: relative; padding: 26px 0; font-size: .92rem; font-weight: 700; }
.primary-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 20px; height: 2px; background: var(--coffee-terracotta); transition: right .2s ease; }
.primary-nav a:hover::after, .primary-nav .current-menu-item > a::after { right: 0; }
.header-actions { display: flex; align-items: center; gap: 5px; }
.icon-link, .nav-toggle { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--coffee-ink); }
.icon-link:hover, .nav-toggle:hover { background: var(--coffee-cream); }
.icon-link svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.cart-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; border-radius: 999px; background: var(--coffee-terracotta); color: #fff; font-size: .66rem; font-weight: 900; }
.nav-toggle { display: none; }
.nav-toggle span:not(.screen-reader-text) { position: absolute; width: 20px; height: 1.5px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle span:nth-child(1) { transform: translateY(-6px); }
.nav-toggle span:nth-child(3) { transform: translateY(6px); }
.nav-open .nav-toggle span:nth-child(1) { transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: rotate(-45deg); }

.hero { position: relative; isolation: isolate; min-height: 710px; display: grid; align-items: center; overflow: hidden; background: var(--coffee-cream); }
.hero__media { position: absolute; inset: 0; z-index: -2; background-position: center; background-size: cover; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(38,25,20,.84) 0%, rgba(38,25,20,.6) 37%, rgba(38,25,20,.05) 72%); }
.hero__content { max-width: 650px; padding: 80px 0; color: #fff; }
.hero h1 { max-width: 620px; font-size: clamp(3rem, 6.5vw, 5.8rem); }
.hero h1 span { display: block; color: #f0b39b; }
.hero__lead { max-width: 600px; margin: 24px 0 30px; color: rgba(255,255,255,.84); font-size: 1.12rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { display: flex; flex-wrap: wrap; gap: 18px 30px; margin-top: 38px; color: rgba(255,255,255,.8); font-size: .86rem; }
.hero__note span { display: inline-flex; align-items: center; gap: 7px; }
.hero__note span::before { content: "✓"; color: #f4c7b6; font-weight: 900; }

.service-strip { border-bottom: 1px solid var(--coffee-line); background: #fff; }
.service-strip__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.service-item { padding: 30px 34px; display: grid; grid-template-columns: 42px 1fr; gap: 13px; align-items: center; border-right: 1px solid var(--coffee-line); }
.service-item:last-child { border-right: 0; }
.service-item__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--coffee-sage-soft); color: var(--coffee-sage); font-size: 1.15rem; }
.service-item strong { display: block; font-size: .94rem; }
.service-item small { color: var(--coffee-muted); }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.category-card { position: relative; min-height: 390px; overflow: hidden; border-radius: var(--coffee-radius); background: var(--coffee-deep); box-shadow: var(--coffee-shadow); }
.category-card__media { position: absolute; inset: 0; background-position: center; background-size: cover; transition: transform .5s ease; }
.category-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(38,25,20,.85)); }
.category-card__body { position: absolute; z-index: 2; inset: auto 24px 24px; color: #fff; }
.category-card h3 { margin: 0 0 3px; font-family: "Noto Serif TC", Georgia, serif; font-size: 1.55rem; }
.category-card p { margin: 0; color: rgba(255,255,255,.72); font-size: .86rem; }
.category-card:hover .category-card__media { transform: scale(1.045); }

.products-grid, .woocommerce ul.products { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 34px 20px; margin: 0 !important; padding: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; content: none !important; }
.product-card, .woocommerce ul.products li.product { display: flex !important; flex-direction: column; min-width: 0; width: auto !important; height: 100%; margin: 0 !important; float: none !important; clear: none !important; list-style: none; }
.product-card__media { display: block; width: 100%; flex: 0 0 auto; }
.product-card__media, .woocommerce ul.products li.product a img { position: relative; overflow: hidden; aspect-ratio: 1; margin: 0 0 18px !important; border-radius: 22px; background: var(--coffee-cream); object-fit: cover; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-card__media img { transform: scale(1.035); }
.product-card__badge, .woocommerce span.onsale { position: absolute; z-index: 2; top: 14px !important; left: 14px !important; right: auto !important; min-width: auto !important; min-height: auto !important; padding: 5px 11px !important; border-radius: 999px !important; background: var(--coffee-terracotta) !important; color: #fff; font-size: .72rem !important; font-weight: 800 !important; line-height: 1.4 !important; }
.product-card__category { color: var(--coffee-sage); font-size: .76rem; font-weight: 800; letter-spacing: .09em; }
.product-card h3, .woocommerce ul.products li.product .woocommerce-loop-product__title { min-height: 3.25rem; margin: 6px 0 7px !important; padding: 0 !important; color: var(--coffee-ink); font-family: "Noto Serif TC", Georgia, serif; font-size: 1.12rem !important; line-height: 1.45; }
.product-card__bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.product-card__price, .woocommerce ul.products li.product .price { color: var(--coffee-terracotta-dark) !important; font-size: 1rem !important; font-weight: 900 !important; }
.product-card__price del, .woocommerce .price del { color: #aa9d96; font-weight: 500; opacity: 1; }
.product-card__price ins, .woocommerce .price ins { text-decoration: none; }
.product-card__action { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--coffee-deep); color: #fff; font-size: 1.1rem; }
.woocommerce ul.products li.product .woocommerce-LoopProduct-link { display: block; }
.woocommerce ul.products li.product .button { align-self: flex-start; margin-top: auto; min-height: 40px; padding: 9px 15px; font-size: .82rem; }

.story-panel { display: grid; grid-template-columns: 1.08fr .92fr; min-height: 580px; overflow: hidden; border-radius: 34px; background: var(--coffee-deep); color: #fff; box-shadow: var(--coffee-shadow); }
.story-panel__media { min-height: 520px; background-position: center; background-size: cover; }
.story-panel__body { padding: clamp(44px, 7vw, 86px); display: flex; flex-direction: column; justify-content: center; }
.story-panel h2 { font-size: clamp(2.25rem, 4vw, 3.75rem); }
.story-panel p { color: rgba(255,255,255,.75); }
.story-values { display: grid; gap: 16px; margin: 26px 0 32px; padding: 0; list-style: none; }
.story-values li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; }
.story-values li::before { content: attr(data-index); width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; font-size: .68rem; }

.roast-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.roast-card { padding: 32px; border: 1px solid var(--coffee-line); border-radius: 22px; background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.roast-card:hover { transform: translateY(-5px); box-shadow: var(--coffee-shadow); }
.roast-card__dot { width: 46px; height: 46px; margin-bottom: 24px; border: 8px solid #ead8bb; border-radius: 50%; background: #b9865d; box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); }
.roast-card--medium .roast-card__dot { border-color: #d7bc99; background: #80543c; }
.roast-card--dark .roast-card__dot { border-color: #bba189; background: #34231d; }
.roast-card h3 { margin: 0 0 7px; font-family: "Noto Serif TC", Georgia, serif; font-size: 1.45rem; }
.roast-card p { margin: 0 0 20px; color: var(--coffee-muted); }
.flavor-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.flavor-tags span { padding: 4px 9px; border-radius: 999px; background: var(--coffee-cream); color: var(--coffee-brown); font-size: .74rem; }

.gift-banner { position: relative; isolation: isolate; min-height: 460px; display: flex; align-items: center; overflow: hidden; border-radius: 34px; background: var(--coffee-deep); color: #fff; }
.gift-banner__media { position: absolute; z-index: -2; inset: 0; background-position: center; background-size: cover; }
.gift-banner::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(37,23,18,.9), rgba(37,23,18,.48) 55%, rgba(37,23,18,.06)); }
.gift-banner__body { width: min(580px, 80%); padding: clamp(42px, 7vw, 78px); }
.gift-banner h2 { font-size: clamp(2.25rem, 4.8vw, 4rem); }
.gift-banner p { color: rgba(255,255,255,.78); }

.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.journal-card { overflow: hidden; border: 1px solid var(--coffee-line); border-radius: 24px; background: #fff; }
.journal-card__media { aspect-ratio: 16 / 10; background-position: center; background-size: cover; }
.journal-card__body { padding: 25px; }
.journal-card time { color: var(--coffee-sage); font-size: .78rem; font-weight: 700; }
.journal-card h3 { margin: 8px 0; font-family: "Noto Serif TC", Georgia, serif; font-size: 1.34rem; line-height: 1.45; }
.journal-card p { margin: 0 0 16px; color: var(--coffee-muted); font-size: .91rem; }

.page-hero, .shop-hero { padding: 90px 0 76px; background: var(--coffee-cream); border-bottom: 1px solid var(--coffee-line); text-align: center; }
.page-hero .container, .shop-hero .container { max-width: 800px; }
.page-title { font-size: clamp(2.6rem, 6vw, 5rem); }
.page-intro { margin: 18px auto 0; color: var(--coffee-muted); font-size: 1.06rem; }
.breadcrumbs, .woocommerce .woocommerce-breadcrumb { margin: 0 0 16px !important; color: var(--coffee-muted); font-size: .8rem !important; }
.content-wrap { padding: 76px 0 100px; }
.prose { max-width: 820px; margin-inline: auto; }
.prose h2 { margin: 2.1em 0 .55em; font-family: "Noto Serif TC", Georgia, serif; font-size: 1.9rem; }
.prose h3 { margin: 1.7em 0 .45em; font-size: 1.25rem; }
.prose p, .prose li { color: #51453f; }
.prose a { color: var(--coffee-terracotta-dark); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { margin: 32px 0; padding: 8px 0 8px 24px; border-left: 3px solid var(--coffee-terracotta); color: var(--coffee-brown); font-family: "Noto Serif TC", Georgia, serif; font-size: 1.24rem; }

.shop-content { padding: 58px 0 100px; }
.shop-toolbar { margin-bottom: 28px; }
.woocommerce .woocommerce-result-count { color: var(--coffee-muted); }
.woocommerce .woocommerce-ordering select { min-height: 44px; padding: 7px 36px 7px 12px; border: 1px solid var(--coffee-line); border-radius: 12px; background: #fff; }
.woocommerce nav.woocommerce-pagination ul { border: 0 !important; display: flex; gap: 7px; }
.woocommerce nav.woocommerce-pagination ul li { border: 0 !important; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 !important; border-radius: 50%; background: var(--coffee-cream); }
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--coffee-deep); color: #fff; }

.woocommerce div.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .82fr); gap: 68px; }
.woocommerce div.product div.images, .woocommerce div.product div.summary { float: none !important; width: auto !important; }
.woocommerce div.product div.images img { border-radius: 24px; background: var(--coffee-cream); }
.woocommerce div.product .product_title { font-family: "Noto Serif TC", Georgia, serif; font-size: clamp(2.1rem, 4vw, 3.4rem); line-height: 1.25; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--coffee-terracotta-dark); font-size: 1.45rem; font-weight: 900; }
.woocommerce-product-details__short-description { color: var(--coffee-muted); }
.woocommerce div.product form.cart { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0; }
.woocommerce .quantity .qty { min-height: 50px; border: 1px solid var(--coffee-line); border-radius: 999px; }
.woocommerce div.product form.cart .variations { width: 100%; }
.woocommerce div.product form.cart .variations th { text-align: left; }
.woocommerce div.product form.cart .variations select { min-height: 46px; padding: 8px 34px 8px 12px; border: 1px solid var(--coffee-line); border-radius: 12px; }
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0 !important; border-bottom: 1px solid var(--coffee-line); }
.woocommerce div.product .woocommerce-tabs ul.tabs::before { border: 0 !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { margin: 0 20px 0 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { padding: 13px 0 !important; }
.woocommerce div.product .woocommerce-tabs .panel { max-width: 820px; }
.woocommerce .related.products, .woocommerce .upsells.products { grid-column: 1 / -1; margin-top: 48px; }
.woocommerce .related.products > h2, .woocommerce .upsells.products > h2 { font-family: "Noto Serif TC", Georgia, serif; font-size: 2rem; }

.woocommerce table.shop_table { overflow: hidden; border-color: var(--coffee-line); border-radius: 18px; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { padding: 16px; }
.woocommerce-cart table.cart img { width: 84px; border-radius: 12px; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select, .select2-container .select2-selection--single {
    min-height: 48px; padding: 10px 12px; border: 1px solid var(--coffee-line); border-radius: 10px; background: #fff;
}
.select2-container .select2-selection--single .select2-selection__rendered { line-height: 26px; }
.woocommerce-info, .woocommerce-message, .woocommerce-error { border-top-color: var(--coffee-sage); background: var(--coffee-cream); }
.woocommerce-info::before, .woocommerce-message::before { color: var(--coffee-sage); }
#add_payment_method #payment, .woocommerce-cart #payment, .woocommerce-checkout #payment { border-radius: 18px; background: var(--coffee-cream); }

.site-footer { background: #251915; color: #fff; }
.site-footer__main { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 50px; padding: 76px 0 54px; }
.site-footer .brand__text small { color: rgba(255,255,255,.56); }
.site-footer__about p { max-width: 330px; color: rgba(255,255,255,.62); font-size: .9rem; }
.site-footer h3 { margin: 0 0 16px; color: #f0b39b; font-size: .84rem; letter-spacing: .08em; }
.site-footer ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.site-footer li, .site-footer a { color: rgba(255,255,255,.7); font-size: .88rem; }
.site-footer a:hover { color: #fff; }
.site-footer__bottom { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid rgba(255,255,255,.1); }
.site-footer__bottom p { margin: 0; color: rgba(255,255,255,.48); font-size: .78rem; }
.demo-badge { padding: 5px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: rgba(255,255,255,.7); font-size: .7rem; }

.empty-state { padding: 44px; border: 1px dashed var(--coffee-line); border-radius: 22px; text-align: center; color: var(--coffee-muted); }
.not-found { min-height: 60vh; display: grid; place-items: center; padding: 80px 0; text-align: center; }

@media (max-width: 1040px) {
    .primary-nav ul { gap: 18px; }
    .primary-nav a { font-size: .84rem; }
    .category-grid, .products-grid, .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
    .story-panel { grid-template-columns: 1fr; }
    .story-panel__media { min-height: 440px; }
    .woocommerce div.product { gap: 38px; }
}

@media (max-width: 820px) {
    :root { --coffee-container: min(100% - 28px, 680px); }
    .section { padding: 70px 0; }
    .site-header__inner { min-height: 70px; grid-template-columns: auto 1fr auto; }
    .nav-toggle { display: grid; }
    .primary-nav { position: fixed; top: 108px; left: 0; right: 0; bottom: auto; z-index: 999; justify-self: stretch; align-self: stretch; width: 100%; height: calc(100dvh - 108px); overflow-y: auto; padding: 26px 24px; background: var(--coffee-paper); opacity: 0; visibility: hidden; transform: translateY(-12px); transition: .22s ease; }
    body.admin-bar .primary-nav { top: 154px; height: calc(100dvh - 154px); }
    .nav-open .primary-nav { opacity: 1; visibility: visible; transform: none; }
    .primary-nav ul { display: grid; align-content: start; gap: 0; }
    .primary-nav a { display: block; padding: 16px 0; border-bottom: 1px solid var(--coffee-line); font-family: "Noto Serif TC", Georgia, serif; font-size: 1.2rem; }
    .primary-nav a::after { display: none; }
    .header-actions .account-link { display: none; }
    .hero { min-height: 670px; }
    .hero__media::after { background: linear-gradient(90deg, rgba(38,25,20,.84), rgba(38,25,20,.55)); }
    .service-strip__grid { grid-template-columns: 1fr; }
    .service-item { border-right: 0; border-bottom: 1px solid var(--coffee-line); }
    .service-item:last-child { border-bottom: 0; }
    .section__head { align-items: start; flex-direction: column; }
    .roast-grid, .journal-grid { grid-template-columns: 1fr; }
    .gift-banner { min-height: 500px; }
    .gift-banner::after { background: rgba(37,23,18,.65); }
    .gift-banner__body { width: 100%; }
    .woocommerce div.product { grid-template-columns: 1fr; }
    .site-footer__main { grid-template-columns: repeat(2, 1fr); }
    .site-footer__about { grid-column: 1 / -1; }
}

@media (max-width: 540px) {
    .announcement-bar .container { min-height: 44px; }
    .brand__text strong { font-size: 1rem; }
    .brand__text small { letter-spacing: .09em; }
    .hero { min-height: 650px; }
    .hero__content { padding: 64px 0; }
    .hero h1 { font-size: clamp(2.65rem, 14vw, 4rem); }
    .hero__lead { font-size: 1rem; }
    .hero__actions .button { width: 100%; }
    .category-grid, .products-grid, .woocommerce ul.products { grid-template-columns: 1fr; }
    .product-card h3, .woocommerce ul.products li.product .woocommerce-loop-product__title { min-height: 0; }
    .category-card { min-height: 360px; }
    .story-panel__media { min-height: 330px; }
    .story-panel__body { padding: 38px 26px; }
    .page-hero, .shop-hero { padding: 66px 0 56px; }
    .shop-content { padding-top: 38px; }
    .woocommerce .woocommerce-result-count, .woocommerce .woocommerce-ordering { float: none; }
    .woocommerce .woocommerce-ordering { margin-bottom: 26px; }
    .site-footer__main { grid-template-columns: 1fr; gap: 34px; }
    .site-footer__about { grid-column: auto; }
    .site-footer__bottom { align-items: flex-start; flex-direction: column; justify-content: center; padding: 18px 0; }
}
