/*
Theme Name: Chil Bo Food
Version: 0.5.0
Description: Source-based catalogue and editorial restoration.
*/
@font-face { font-family: Arimo; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/arimo-bold.woff2') format('woff2'); }
@font-face { font-family: 'Libre Franklin'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/libre-franklin-regular.woff2') format('woff2'); }
/* Values below come from the live SHOPLINE HTML/CSS, recorded in VISUAL-RESTORATION.md. */
:root { --page-width: 1400px; --border: #eaecec; --button: #74716c; --light-text: #949494; }
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: #000; font: 400 16px/1.6 'Libre Franklin', sans-serif; }
a { color: inherit; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; vertical-align: middle; }
h1, h2, h3 { margin: 0 0 20px; font-family: Arimo, sans-serif; font-weight: 700; line-height: 1.2; }
h1 { font-size: 22px; } h2 { font-size: 20px; } h3 { font-size: 18px; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; max-width: 100%; }
button, input[type=submit], .button { cursor: pointer; border: 1px solid var(--button); border-radius: 0; padding: 10px 19px; background: var(--button); color: #fff; font-size: 14px; line-height: 1.6; }
input:not([type=checkbox]):not([type=radio]):not([type=submit]), textarea, select { background: #fff; color: #000; border: 1px solid #737373; border-radius: 0; padding: 10px 19px; }
textarea { width: 100%; }
:focus-visible { outline: 2px solid var(--button); outline-offset: 3px; }
button:hover, .button:hover { opacity: .85; }
[hidden] { display: none !important; }
.screen-reader-text, .skip-link { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { width: auto; height: auto; clip-path: none; padding: 10px 19px; top: 0; left: 0; z-index: 200; background: #fff; }
.site-main { max-width: calc(var(--page-width) + 60px); margin: 40px auto; padding: 0 10px; min-width: 0; overflow-wrap: break-word; }
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 120; }
.header-inner { display: flex; align-items: center; justify-content: space-between; max-width: calc(var(--page-width) + 60px); margin: auto; padding: 0 30px; position: relative; gap: 8px; }
.site-brand { flex-shrink: 0; margin: 10px 0; }
.site-brand a { display: block; text-decoration: none; }
.site-brand img { display: block; width: 100px; height: auto; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: transparent; color: #000; padding: 0; }
.header-search { flex-shrink: 0; }
.header-search summary { cursor: pointer; list-style: none; }
.header-search summary::-webkit-details-marker { display: none; }
.search-panel { position: absolute; top: 100%; left: 0; right: 0; padding: 20px 30px; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 10px 20px rgb(0 0 0 / 9%); }
.search-form { display: flex; gap: 10px; }
.search-form label { flex: 1; min-width: 0; }
.search-field { width: 100%; }
.primary-menu, .sub-menu { list-style: none; margin: 0; padding: 0; }
.primary-menu a { display: inline-block; padding: 12px 16px; font-size: 14px; text-decoration: none; }
.primary-menu .menu-item { position: relative; }
.sub-menu { padding-left: 20px; }
.submenu-toggle { background: none; color: #000; border: 0; padding: 0; width: 28px; height: 44px; vertical-align: middle; }
.drawer-heading { display: none; }
.menu-backdrop { background: rgb(0 0 0 / 60%); border: 0; position: fixed; inset: 0; padding: 0; width: 100%; height: 100%; z-index: 129; }
.nav-enhanced .sub-menu { display: none; }
.nav-enhanced .sub-menu[data-open=true] { display: block; }
@media (max-width: 959.98px) {
    .header-inner { flex-wrap: wrap; }
    .primary-navigation { width: 100%; order: 4; }
    .nav-enhanced .primary-navigation { display: none; position: fixed; top: 0; bottom: 0; left: 0; width: 340px; max-width: 95%; background: #fff; z-index: 130; overflow-y: auto; overscroll-behavior: contain; }
    .nav-enhanced .primary-navigation[data-open=true] { display: block; }
    .nav-enhanced .drawer-heading { display: flex; align-items: center; justify-content: flex-end; height: 70px; padding: 0 30px; border-bottom: 1px solid var(--border); }
    .menu-close { color: #000; background: transparent; border: 0; padding: 10px 0; }
    .menu-close span { padding-left: 12px; }
    .primary-menu > li { border-bottom: 1px solid var(--border); }
    .primary-menu a { padding: 12px 30px; }
    .primary-menu .submenu-toggle { position: absolute; top: 0; right: 12px; width: 44px; }
    .primary-menu .menu-item-has-children > a { padding-right: 60px; }
    body.menu-open { overflow: hidden; }
}
.breadcrumbs { margin-bottom: 20px; font-size: 14px; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs span { opacity: .6; }
.catalogue { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.product-card { min-width: 0; margin: 0; }
.product-card-link { display: block; text-decoration: none; }
.product-card img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #f8f8f8; }
.product-card h2 { margin: 10px 0 0; font: 400 14px/1.6 'Libre Franklin', sans-serif; }
.catalogue-price { color: #171f2b; font-size: 14px; margin: 5px 0 0; }
.post-type-archive-chilbo_product .site-main > h1, .tax-product_collection .site-main > h1, .collection-landing > h1 { font-size: 25px; text-align: center; margin-bottom: 20px; }
.collection-landing .breadcrumbs { text-align: center; margin-bottom: 10px; }
.collection-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.collection-card { display: block; text-decoration: none; }
.collection-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.collection-card span { display: block; margin-top: 10px; font-size: 14px; }
.navigation.pagination { margin: 40px 0 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 10px; }
.page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; padding: 10px; align-items: center; justify-content: center; border: 1px solid var(--border); text-decoration: none; font-size: 14px; }
.page-numbers.current { border-color: #000; }
.home .site-main { max-width: none; padding: 0; margin-top: 0; }
.home-hero { display: flex; flex-direction: column; position: relative; }
.home-hero > img { display: block; width: 100%; height: 450px; object-fit: cover; }
.hero-copy { padding: 30px 40px; text-align: center; }
.hero-copy h1 { font-size: 30px; margin: 0 0 8px; }
.hero-copy p { margin: 8px 0 16px; }
.hero-copy p:last-child { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 0; }
.hero-copy a { display: inline-block; padding: 10px 19px; color: #fff; background: var(--button); border: 1px solid var(--button); font-size: 14px; text-decoration: none; }
.home .site-main > h2 { max-width: 920px; margin: 40px auto 20px; padding: 0 10px; text-align: center; }
.home .site-main > p { max-width: 920px; margin: 0 auto 40px; padding: 0 10px; text-align: center; }
.home-featured, .rice-feature { max-width: calc(var(--page-width) + 60px); margin: 40px auto; padding: 0 10px; }
.home-featured > h2, .rice-feature > h2 { text-align: center; margin-bottom: 20px; }
.rice-feature > h2 { font-size: 18px; }
.home-featured .catalogue { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-bottom: 5px; }
.home-featured .product-card { flex: 0 0 90%; scroll-snap-align: start; }
.rice-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.rice-feature .product-card img { aspect-ratio: 1; object-fit: contain; padding: 20px; background: #fff; }
.rice-side-dish { display: flex; flex-direction: column; text-decoration: none; min-width: 0; }
.rice-side-dish img { width: 100%; flex: 1; min-height: 0; aspect-ratio: 1; object-fit: cover; }
.rice-side-dish > span { padding: 12px; font-size: 14px; }
.product-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.product-gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; min-width: 0; align-items: flex-start; }
.product-gallery a { flex: 0 0 100%; scroll-snap-align: start; }
.product-gallery img { display: block; width: 100%; height: auto; }
.product-information { min-width: 0; padding: 0 20px; }
.product-information h1 { margin-bottom: 10px; }
.product-information .catalogue-price { font-size: 18px; margin-bottom: 20px; }
.product-variants { margin: 25px 0; }
.product-variants h2 { font: 700 16px/1.6 'Libre Franklin', sans-serif; margin-bottom: 10px; }
.product-variants ul { list-style: none; padding: 0; margin: 0; }
.product-variants li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.variant-option { display: inline-block; border: 1px solid rgb(0 0 0 / 55%); border-radius: 40px; padding: 7px 16px; font-size: 14px; }
.variant-name { font-weight: 700; }
.variant-price { font-size: 14px; color: #171f2b; }
.product-description { margin-top: 48px; }
.product-collections { margin-top: 30px; font-size: 14px; }
.single-chilbo_product .site-main { padding: 0; }
.single-post .site-main, .page:not(.home):not(.chilbo-collections) .site-main { max-width: 1020px; }
.single-post .site-main { margin-top: 40px; margin-bottom: 40px; }
.article-heading h1 { margin-bottom: 20px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; font-size: 12px; margin-bottom: 20px; }
.article-meta time, .article-meta .article-author { opacity: .6; }
.article-meta .article-separator { color: var(--border); }
.article-content { padding-bottom: 40px; }
.article-content img, .article-content iframe { max-width: 100%; }
.article-content iframe[src*="youtube"] { width: min(100%, 640px); aspect-ratio: 16/9; height: auto; }
.article-content table { max-width: 100%; }
.article-content pre { overflow: auto; }
.article-content p:not(:first-child) { margin: 1em 0; }
.editorial-archive > h1 { margin-bottom: 30px; }
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.article-card { min-width: 0; text-align: center; }
.article-image { display: block; margin-bottom: 20px; }
.article-card img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.article-card h2 { font-size: 18px; margin-bottom: 10px; }
.article-card a { text-decoration: none; }
.article-card .article-meta { justify-content: center; margin-top: 10px; }
.article-card > p:last-child { margin-top: 20px; }
.single-post .site-main > nav[aria-label="Article navigation"], .post-navigation .nav-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; margin-bottom: 40px; }
.comments-area { border-top: 1px solid var(--border); padding-top: 40px; }
.comment-form label { display: block; margin-bottom: 10px; }
.comment-form input:not([type=checkbox]):not([type=submit]) { width: 100%; }
.chilbo-faq .article-content h2 { font: 700 16px/1.6 'Libre Franklin', sans-serif; color: #169179; margin: 20px 0 0; }
.site-main > section > ul { padding-left: 20px; }
.search .site-main > h1 { font-size: 25px; margin-bottom: 30px; }
.search .site-main > article { padding: 20px 0; border-bottom: 1px solid var(--border); }
.search .site-main > article h2 { font-size: 20px; }
.search .site-main > article img { max-width: 240px; margin-bottom: 20px; }
.chilbo-placeholder { border: 1px dashed var(--light-text); padding: 20px; }
.site-footer { border-top: 1px solid var(--border); padding: 20px; font-size: 13px; overflow-wrap: anywhere; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: var(--page-width); margin: auto; }
.footer-grid > * { min-width: 0; }
.footer-brand { width: 200px; max-width: 100%; margin: 0 auto; }
.footer-brand img { width: 200px; aspect-ratio: 1; object-fit: cover; }
.footer-navigation .menu { list-style: none; padding: 0; margin: 0; }
.footer-navigation a { display: inline-block; padding: 7px 0; text-decoration: none; }
.site-footer h2 { font: 400 16px/1.6 'Libre Franklin', sans-serif; margin-bottom: 15px; }
.site-footer p { margin-bottom: 1em; }
.site-footer a:hover { text-decoration: underline; }
.footer-copyright { max-width: var(--page-width); margin: 40px auto 0 !important; font-size: 13px; }
@media (min-width: 750px) {
    h1 { font-size: 36px; } h2 { font-size: 30px; } h3 { font-size: 25px; }
    button, input[type=submit], .button { font-size: 16px; }
    .site-main { margin-top: 60px; margin-bottom: 60px; padding: 0 30px; }
    .site-brand { margin: 16px 0; }
    .product-card h2, .catalogue-price { font-size: 16px; }
    .post-type-archive-chilbo_product .site-main > h1, .tax-product_collection .site-main > h1, .collection-landing > h1 { font-size: 50px; margin-bottom: 30px; }
    .collection-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .collection-card span { font-size: 16px; }
    .home-hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-hero > img { height: 650px; }
    .home-hero::after { content: ''; position: absolute; inset: 0; background: rgb(0 0 0 / 29%); pointer-events: none; }
    .hero-copy { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 100%; max-width: 800px; padding: 40px; color: #fff; }
    .hero-copy h1 { font-size: 50px; }
    .hero-copy > p:first-of-type { font-size: 22px; }
    .hero-copy a { background: #fff; color: #000; border-color: #fff; font-size: 16px; }
    .home .site-main > h2 { margin: 60px auto 30px; }
    .home .site-main > p { margin-bottom: 60px; }
    .home-featured, .rice-feature { margin: 60px auto; padding: 0 30px; }
    .home-featured > h2, .rice-feature > h2 { margin-bottom: 30px; }
    .home-featured .catalogue { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
    .rice-feature > h2 { font-size: 25px; }
    .rice-feature-grid { grid-template-columns: 2fr 1fr; }
    .rice-feature-grid > .product-card { min-height: 620px; }
    .rice-side-dish > span { padding: 20px 0; font-size: 16px; }
    .product-detail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .single-chilbo_product .site-main { padding: 0 30px; }
    .product-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; overflow: visible; }
    .product-gallery a:first-child { grid-column: 1 / -1; }
    .product-information { padding: 0; }
    .article-meta { font-size: 14px; }
    .single-post .site-main { margin-top: 75px; margin-bottom: 75px; }
    .editorial-archive { padding-top: 15px; padding-bottom: 15px; }
    .editorial-archive > h1 { margin-bottom: 50px; }
    .article-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .article-card h2 { font-size: 25px; }
    .article-card > p:last-child { padding: 0 20px; margin-top: 15px; }
    .search .site-main > h1 { font-size: 50px; }
    .site-footer { padding: 40px 30px; }
    .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .footer-brand { margin-left: 0; }
}
@media (min-width: 960px) {
    .menu-toggle, .drawer-heading, .menu-backdrop { display: none !important; }
    .primary-navigation { flex: 1; align-self: stretch; }
    .primary-menu { display: flex; flex-wrap: wrap; align-items: center; height: 100%; }
    .primary-menu > li { align-self: stretch; display: flex; align-items: center; }
    .primary-menu > .menu-item-has-children > a { padding-right: 4px; }
    .primary-menu > li > .sub-menu { position: absolute; top: calc(100% - 1px); left: 0; min-width: 100%; padding: 10px 0 5px; background: #fff; box-shadow: 0 10px 20px rgb(0 0 0 / 9%); z-index: 7; white-space: nowrap; }
    .primary-menu > li:nth-child(2) { position: static; }
    .primary-menu > li:nth-child(2) > .sub-menu { left: 0; right: 0; white-space: normal; }
    .nav-enhanced .primary-menu > li:nth-child(2) > .sub-menu[data-open=true] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .primary-menu > li:nth-child(2) > .sub-menu > li > .sub-menu { display: block; padding-left: 0; }
    .primary-menu > li:nth-child(2) > .sub-menu > li > .submenu-toggle { display: none; }
    .catalogue { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .home-featured .catalogue { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.search-results-content > h1, .search-results-content > h2 { font-size: 25px; margin-bottom: 30px; }
.search-results-content > .search-form { margin-bottom: 40px; }
.search-results-grid .article-card { text-align: left; }
@media (min-width: 750px) { .search-results-content > h1, .search-results-content > h2 { font-size: 50px; } }

.submenu-toggle[aria-expanded=true] svg { transform: rotate(180deg); }
.policy-review { max-width: 960px; margin-inline: auto; }
@media (max-width: 749.98px) { .home-featured .catalogue { margin: 0 10px; } .footer-navigation a { min-height: 44px; display: flex; align-items: center; } }

.footer-contact .social-icon { width: 28px; height: 28px; margin-right: 8px; }
@media (max-width: 749.98px) { .footer-contact a:has(.social-icon) { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; } }

/* Phase 5 selective refinement. Preserve LocalWP content, assets and navigation structure. */
:root { --chilbo-ink: #27231f; --chilbo-muted: #625a52; --chilbo-accent: #8b2e24; --chilbo-soft: #faf7f2; --chilbo-line: #e5ded5; }
body { color: var(--chilbo-ink); }
a:hover { color: var(--chilbo-accent); }
:focus-visible { outline: 3px solid var(--chilbo-accent); outline-offset: 3px; }
.site-header { position: relative; border-color: var(--chilbo-line); }
.site-main { max-width: 1264px; }
h1, h2, h3 { letter-spacing: -.02em; }
h1 { font-size: clamp(28px, 3vw, 42px); }
h2 { font-size: clamp(24px, 2.4vw, 32px); }
h3 { font-size: clamp(20px, 2vw, 24px); }
.primary-menu a, .footer-navigation a { font-size: 15px; }
.primary-menu .current-menu-item > a, .primary-menu .current-menu-ancestor > a { text-decoration: underline; text-underline-offset: 6px; }
.product-card img { aspect-ratio: 1; object-fit: contain; background: var(--chilbo-soft); }
.product-card h2 { font-size: 16px; line-height: 1.4; }
.catalogue-price, .variant-price { color: var(--chilbo-muted); }
.variant-option { border-radius: 4px; border-color: var(--chilbo-line); }
.product-gallery img { aspect-ratio: 1; object-fit: contain; background: var(--chilbo-soft); }
.product-information { max-width: 72ch; }
.product-description { margin-top: 32px; }
.size-price-list { max-width: 460px; }
.size-price-list li { display: flex; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--chilbo-line); padding: 9px 0; margin: 0; }
.size-price-list .variant-price { white-space: nowrap; }
.collection-card img { aspect-ratio: 4/3; object-fit: cover; }
.collection-card:hover span, .product-card-link:hover h2 { text-decoration: underline; }
.article-content { max-width: 75ch; }
.article-content img { height: auto; }
.menu-article .article-content { max-width: none; }
.menu-article .article-content img { cursor: zoom-in; }
.menu-article .article-content img:focus-visible { outline: 3px solid var(--chilbo-accent); outline-offset: 4px; }
.chilbo-menu-dialog { max-width: min(96vw, 1200px); max-height: 96vh; padding: 12px; border: 0; box-shadow: 0 16px 60px #0006; }
.chilbo-menu-dialog::backdrop { background: #000b; }
.chilbo-menu-dialog img { display: block; max-width: 100%; max-height: calc(96vh - 52px); object-fit: contain; }
.chilbo-menu-dialog button { display: block; margin-left: auto; background: #fff; color: var(--chilbo-ink); border: 1px solid var(--chilbo-ink); padding: 6px 14px; }
.site-footer { background: var(--chilbo-soft); border-color: var(--chilbo-line); font-size: 14px; }
.footer-navigation a { min-height: 44px; display: inline-flex; align-items: center; }
@media (min-width: 750px) {
  .collection-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .home-hero { grid-template-columns: minmax(0, 1fr) minmax(260px, .78fr) minmax(0, 1fr); align-items: center; }
  .home-hero > img { height: clamp(380px, 42vw, 590px); }
  .home-hero::after { display: none; }
  .hero-copy { position: static; transform: none; width: auto; color: var(--chilbo-ink); padding: 24px; }
  .hero-copy h1 { font-size: clamp(30px, 2.8vw, 42px); }
  .hero-copy > p:first-of-type { font-size: 18px; }
  .hero-copy a { background: var(--chilbo-accent); color: #fff; border-color: var(--chilbo-accent); }
}
@media (max-width: 749.98px) {
  .home-hero > img { height: min(80vw, 340px); }
  .hero-copy { padding: 24px 16px; }
  .catalogue { gap: 24px 16px; }
  .product-card h2 { font-size: 15px; }
  .article-content { max-width: 100%; }
  .site-footer { padding: 32px 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; } }

/* Phase 6: measured desktop headline and mobile reading space. */
.product-card h2, .product-information h1 { word-break: keep-all; overflow-wrap: break-word; }
@media (min-width: 750px) {
  .home-hero { grid-template-columns: minmax(0, 1fr) minmax(400px, 1.45fr) minmax(0, 1fr); }
  .hero-copy { padding-inline: 16px; }
  .hero-copy h1 { font-size: clamp(32px, 2.85vw, 38px); line-height: 1.22; letter-spacing: -.025em; text-wrap: balance; }
}
@media (min-width: 750px) and (max-width: 959.98px) {
  .home-hero { display: flex; flex-direction: column; }
  .home-hero > img { width: 100%; height: min(46vw, 420px); }
  .hero-copy { width: min(100%, 640px); margin-inline: auto; padding: 28px 24px; }
}
@media (max-width: 749.98px) {
  .site-main { padding-inline: 16px; }
  .home .site-main, .single-chilbo_product .site-main { padding-inline: 0; }
  .product-gallery img { aspect-ratio: 4/3; }
  .footer-brand, .footer-brand img { width: 150px; }
}
