:root {
    --paper: #f6f6f6;
    --ink: #17241c;
    --muted: #4b5f51;
    --green: #008647;
    --green-deep: #006f39;
    --line: rgb(32 83 54 / 16%);
    --radius: 1.5rem;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 1rem/1.55 system-ui, sans-serif;
}

a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--green-deep); outline-offset: 3px; }
p, h1, h2, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 10; padding: .75rem; background: white; }
.skip-link:not(:focus) { clip-path: inset(50%); }
.site-frame { width: min(100%, 100rem); margin-inline: auto; }
.site-header { display: grid; align-items: center; gap: .75rem; }
.brand {
    display: grid;
    place-items: center;
    width: 6.5rem;
    min-height: 2.75rem;
    text-decoration: none;
}
.brand img { display: block; width: 100%; height: auto; }
.brand__placeholder { font-size: .75rem; }
.hxc-preview--home .brand__placeholder { color: white; }

.glass,
.contact-card {
    border: 1px solid var(--line);
    background: rgb(255 255 255 / 82%);
    box-shadow: 0 .45rem 1.35rem rgb(23 63 38 / 8%), inset 0 1px 0 white;
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    backdrop-filter: blur(18px) saturate(145%);
}

.nav-track {
    --nav-inset: .25rem;
    position: relative;
    isolation: isolate;
    border-radius: 999px;
    padding: var(--nav-inset);
}

.desktop-nav .nav-track,
.desktop-languages {
    border-color: rgb(255 255 255 / 42%);
    background: rgb(255 255 255 / 42%);
    box-shadow: 0 .45rem 1.35rem rgb(0 0 0 / 12%), inset 0 1px 0 rgb(255 255 255 / 55%);
    -webkit-backdrop-filter: blur(22px) saturate(130%);
    backdrop-filter: blur(22px) saturate(130%);
}

.nav-track ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nav-indicator {
    position: absolute;
    z-index: -1;
    inset-block: var(--nav-inset);
    inset-inline-start: var(--nav-inset);
    width: calc((100% - 2 * var(--nav-inset)) / 4);
    transform: translateX(calc(var(--active-index) * 100%));
    border-radius: 999px;
    background: var(--green);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 28%);
}

.nav-track a {
    display: grid;
    place-content: center;
    text-align: center;
    border-radius: 999px;
    font-weight: 650;
    text-decoration: none;
}

.nav-track a:hover:not([aria-current]) { background: rgb(25 106 60 / 8%); }
.nav-track [aria-current="page"] { color: white; }

.desktop-languages a,
.mobile-languages a {
    display: block;
    border-radius: 999px;
    text-align: center;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 650;
}

.desktop-languages a[aria-current],
.mobile-languages a[aria-current] { color: white; background: var(--green); }

.company-name { font-size: .875rem; font-weight: 750; color: var(--muted); }
.intro h1 { margin-block: .35em .28em; line-height: 1.15; letter-spacing: -.045em; }
:lang(th) .intro h1 { letter-spacing: normal; }
.description { max-width: 35rem; color: var(--muted); }
.primary { display: inline-flex; justify-content: space-between; gap: 1.25rem; align-items: center; min-width: 10.25rem; margin-top: 1.4rem; padding: .75rem 1.1rem; border-radius: 999px; background: var(--green); color: white; font-weight: 750; text-decoration: none; }
.primary:hover { background: var(--green-deep); }

.feature-panel { display: grid; justify-items: center; align-content: center; gap: .8rem; min-width: 0; }
.feature-panel__image { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.feature-panel__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; }
.feature-panel__tags li { min-width: 5.5rem; text-align: center; border-radius: 999px; padding: .36rem .7rem; background: var(--green); color: white; font-size: .875rem; font-weight: 650; }

.contact-stack { display: grid; gap: .75rem; }
.contact-card { border-radius: var(--radius); padding: clamp(1rem, 3vw, 2.5rem); }
.contact-card--lead { background: rgb(223 243 230 / 78%); }
.contact-card h2 { font-size: clamp(1.5rem, 4vw, 3.3rem); line-height: 1.12; margin-bottom: .4em; }
.fallback { padding: 2rem; }

@media (prefers-reduced-motion: no-preference) {
    .home-hero__copy,
    .about-intro,
    .catalog-results,
    .contact-page {
        animation: hxc-enter-content 180ms ease-out;
    }

    @keyframes hxc-enter-content {
        from { opacity: .72; transform: translateY(6px); }
    }

    .wechat-dialog[open] { animation: hxc-open-dialog 160ms ease-out; }

    @keyframes hxc-open-dialog {
        from { transform: translateY(.4rem); }
    }
}

.page-layout.page-layout--products {
    display: block;
    min-width: 0;
}

.catalog {
    --catalog-radius: 4px;
    --catalog-green: #007d40;
    display: grid;
    gap: .9rem;
    align-items: start;
}

.catalog-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .4rem;
    max-width: 42rem;
}

.catalog-toolbar input, .catalog-form button, .catalog-pagination a {
    min-height: 2.75rem;
    border: 1px solid var(--line);
    border-radius: var(--catalog-radius);
    padding: .42rem .7rem;
    color: var(--catalog-green);
    background: white;
    font: inherit;
}

.catalog-toolbar input { width: 100%; min-width: 0; color: var(--ink); }
.catalog-form button { cursor: pointer; font-weight: 650; }
.catalog-filter-panel button[type="submit"] {
    display: grid;
    place-items: center;
    border-color: var(--catalog-green);
    background: var(--catalog-green);
    color: white;
}

.catalog-search {
    position: sticky;
    top: 0;
    z-index: 8;
    min-height: 2.75rem;
    padding-block: .4rem;
    background: var(--paper);
}
.catalog-form { max-width: 42rem; }
.catalog-filter-toggle { white-space: nowrap; }
.catalog-filter-toggle[aria-expanded="true"] { border-color: var(--catalog-green); background: #e3f8eb; }
.catalog-filter-panel {
    position: absolute;
    z-index: 6;
    width: min(100%, 42rem);
    margin-top: .4rem;
    max-height: 70dvh;
    border: 1px solid var(--line);
    border-radius: var(--catalog-radius);
    background: white;
    box-shadow: 0 .5rem 1.5rem rgb(12 29 19 / 13%);
}

.catalog-filter-panel:not([hidden]) { display: flex; flex-direction: column; }
.catalog-filter-panel footer { display: flex; gap: .5rem; padding: .65rem .9rem; }
.catalog-filter-body { overflow: auto; padding: .8rem .9rem 1rem; }
.catalog-filter-body fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
.catalog-filter-body fieldset + fieldset { margin-top: 1rem; }
.catalog-filter-body legend { padding: 0; margin-bottom: .45rem; font-weight: 700; }
.catalog-filter-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.catalog-filter-options label { position: relative; cursor: pointer; }
.catalog-filter-options input { position: absolute; opacity: 0; }
.catalog-filter-options span {
    display: grid;
    place-items: center;
    min-height: 2.75rem;
    padding: .3rem .45rem;
    border: 1px solid transparent;
    border-radius: var(--catalog-radius);
    background: #f1f5f2;
    text-align: center;
    font-size: .9rem;
    overflow-wrap: anywhere;
}

.catalog-filter-options input:checked + span { border-color: #14a85e; background: #e3f8eb; color: var(--catalog-green); }
.catalog-filter-options input:focus-visible + span { outline: 2px solid var(--catalog-green); outline-offset: 2px; }
.catalog-filter-panel footer { border-top: 1px solid var(--line); }
.catalog-filter-panel footer > * { flex: 1; text-align: center; text-decoration: none; }

.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.catalog-grid > li { min-width: 0; }
.catalog-card {
    height: 100%;
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--catalog-radius);
    background: white;
}

.catalog-card__placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-bottom: 1px solid var(--line);
    background: #efefef;
    color: var(--muted);
    font-size: .8rem;
}

.catalog-card__body { display: grid; grid-template-rows: 1fr auto auto; gap: .2rem; padding: .46rem .55rem; }
.catalog-card h2 { font-size: .9rem; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.catalog-card__price { color: var(--catalog-green); font-size: 1rem; font-weight: 800; }
.catalog-card__unit { color: var(--muted); font-size: .82rem; font-weight: 500; }

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

@media (min-width: 64rem) {
    .catalog-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .65rem; }
}

.catalog-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: .15rem .4rem; color: var(--muted); font-size: .73rem; }
.catalog-card__rating { padding: 0 .25rem; border: 1px solid #f5c519; border-radius: 2px; background: #fffbe5; color: var(--ink); }
.catalog-card__star { color: #ffc400; font-size: .95em; }

@media (max-width: 39.999rem) {
    html:has(.catalog-form.is-filtering) { overflow: hidden; }
    .catalog-search:has(.is-filtering)::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 20;
        background: rgb(12 29 19 / 45%);
    }

    .catalog-form.is-filtering {
        position: fixed;
        z-index: 21;
        inset: 0 0 auto;
        display: flex;
        flex-direction: column;
        max-width: none;
        max-height: 80dvh;
        background: white;
    }

    .is-filtering .catalog-toolbar {
        max-width: none;
        padding: max(.5rem, env(safe-area-inset-top)) .6rem .5rem;
        border-bottom: 1px solid var(--line);
    }

    .catalog-filter-panel {
        position: static;
        width: 100%;
        max-height: none;
        min-height: 0;
        margin: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
}

.catalog-pagination { display: flex; justify-content: center; align-items: center; gap: .8rem; margin-top: 1.1rem; }
.catalog-empty { padding: 1rem; border-radius: var(--catalog-radius); }

.quick-contact {
    position: fixed;
    z-index: 4;
    inset-inline-end: 1rem;
    inset-block-end: 1rem;
    width: max-content;
    max-width: calc(100% - 2rem);
    border-radius: 999px;
    color: var(--green-deep);
    min-height: 2.55rem;
    padding: .45rem .7rem;
    align-content: center;
    text-align: center;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 750;
}

.page-layout.page-layout--about {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.about-intro {
    width: 100%;
    margin-inline: auto;
    padding-block: clamp(1.7rem, 8vw, 6rem);
    text-align: center;
}

.about-intro h1 {
    margin: .65rem auto .9rem;
    color: var(--green-deep);
    font-size: clamp(1.65rem, 5.5vw, 3.75rem);
    line-height: 1.15;
    text-wrap: balance;
}

.about-intro h1 span { display: inline-block; max-width: 100%; }

.about-story, .about-description { max-width: 38rem; margin-inline: auto; }
.about-description { margin-top: .7rem; color: var(--muted); font-size: .9rem; }

.about-offering { margin-block: 0 clamp(1.6rem, 5vw, 3.25rem); }
.about-offering h2 { margin-bottom: .75rem; font-size: clamp(1.25rem, 3vw, 1.8rem); }
.about-offering__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(.55rem, 1.5vw, 1rem);
}

.about-offering__card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: .4rem;
    background: white;
    text-decoration: none;
}

.about-offering__text { padding: .75rem; }
.about-offering__text h3 { margin: 0 0 .25rem; font-size: 1rem; line-height: 1.35; }
.about-offering__text p { color: var(--muted); font-size: .86rem; }

@media (min-width: 42rem) {
    .about-offering__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 64rem) {
    .about-offering__grid--products { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.hxc-preview--about .site-frame {
    --about-gutter: 1.1rem;
    width: 100%;
    max-width: none;
}
.about-hero {
    display: grid;
    grid-template-rows: 1fr auto;
    place-items: center;
    min-height: 100svh;
    margin-inline: calc(-1 * var(--about-gutter));
    padding: 1.75rem var(--about-gutter);
    color: white;
    background:
        linear-gradient(rgb(0 0 0 / 60%), rgb(0 0 0 / 68%)),
        url("https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=1920&q=78") center / cover no-repeat,
        url("images/catalog/broccoli.webp") center / cover no-repeat #17241c;
}
.about-hero :is(.company-name, h1, .about-description) { color: inherit; }
.about-scroll-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.75rem;
    font-size: .875rem;
    text-decoration: none;
}
.about-scroll-link:hover { text-decoration: underline; }
.about-scroll-link:focus-visible { outline-color: white; }
@media (prefers-reduced-motion: no-preference) {
    html:has(.hxc-preview--about) { scroll-behavior: smooth; }
}
.about-proofs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
    margin-block: clamp(1.25rem, 4vw, 3rem) clamp(1.6rem, 5vw, 3.25rem);
}
.about-proof {
    padding: clamp(.75rem, 2vw, 1.25rem);
    border: 1px solid var(--line);
    border-radius: .5rem;
    background: white;
}
.about-proof:first-child { border-inline-start: 3px solid var(--green); }
.about-proof h2 { margin-bottom: .3rem; font-size: 1.05rem; }
.about-orders { color: var(--muted); }
.about-orders strong {
    display: block;
    color: var(--green-deep);
    font-size: clamp(1.65rem, 3vw, 2.65rem);
    line-height: 1.1;
}
.about-proof > p { color: var(--muted); font-size: .9rem; }
@media (max-width: 24rem) {
    .about-proofs { grid-template-columns: 1fr; }
}
.about-catalog-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; margin-top: .35rem; color: var(--green-deep); font-weight: 700; }

html:has(.hxc-preview--home),
.hxc-preview--home {
    overflow: hidden;
    overscroll-behavior: none;
}

.hxc-preview--home {
    isolation: isolate;
    background: #14221a;
}

.hxc-preview--home::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgb(0 0 0 / 54%), rgb(0 0 0 / 76%)),
        url("images/catalog/broccoli.webp") center / cover no-repeat;
}

.hxc-preview.hxc-preview--home .site-frame {
    display: grid;
    height: 100dvh;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
}

.page-layout.page-layout--home {
    display: block;
    margin-top: 0;
    min-height: 0;
}

.home-hero {
    height: 100%;
    display: grid;
    align-items: center;
    color: white;
}

.home-hero__copy {
    align-self: center;
    max-width: 44rem;
}

.home-hero__copy .company-name { color: #e1ebe3; }
.home-hero h1 {
    margin-block: .3rem .55rem;
    font-size: clamp(1.65rem, 5vw, 4.5rem);
    line-height: 1.12;
    text-wrap: balance;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: clamp(.85rem, 2vw, 1.4rem);
}

.home-hero__actions .primary,
.home-hero__about {
    margin-top: 0;
    min-width: 0;
    min-height: 2.75rem;
}

.home-hero__about {
    display: inline-flex;
    align-items: center;
    padding: .5rem .95rem;
    border: 1px solid rgb(255 255 255 / 70%);
    border-radius: 999px;
    color: white;
    font-weight: 700;
    text-decoration: none;
}

.home-hero__actions a:focus-visible { outline-color: white; }

@media (width < 64rem) or (height < 42rem) {
    .hxc-preview.hxc-preview--home .site-frame {
        padding-bottom: calc(4.4rem + env(safe-area-inset-bottom));
    }
}

@media (height < 28rem) {
    .home-hero h1 { font-size: clamp(1.3rem, 4vw, 2.25rem); }
    .home-hero__copy > p { font-size: .85rem; }
}

.page-layout.page-layout--contact { display: block; }
.contact-page { width: min(100%, 38rem); margin-inline: auto; }
.contact-page h1 { font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1.16; }
.contact-description { margin-block: .55rem 1.25rem; color: var(--muted); }
.contact-channels { margin-top: 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.contact-channel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 4rem;
    padding: .65rem;
    border: 0;
    border-radius: .6rem;
    color: #112619;
    font: inherit;
    font-weight: 750;
    text-decoration: none;
}
.contact-channel--wechat { background: #07c160; color: white; cursor: pointer; }
.contact-channel--line { border: 1px solid var(--line); background: white; color: #008248; }
.contact-channel:is(button, a):hover { filter: brightness(.94); }
.contact-company { margin: 0; border-top: 1px solid var(--line); }
.contact-company > div {
    display: grid;
    grid-template-columns: minmax(5rem, 32%) minmax(0, 1fr);
    gap: .5rem;
    padding: .52rem 0;
    border-bottom: 1px solid var(--line);
}
.contact-company dt { color: var(--muted); }
.contact-company dd { margin: 0; overflow-wrap: anywhere; }
.wechat-dialog {
    width: min(calc(100% - 1rem), calc(100dvh - 9rem), 46rem);
    max-height: calc(100dvh - 1rem);
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
}
.wechat-dialog::backdrop { background: rgb(0 0 0 / 65%); }
.wechat-dialog form { display: grid; margin-top: .55rem; }
.wechat-close, .wechat-id button { min-height: 2.75rem; padding: .25rem .65rem; cursor: pointer; font: inherit; }
.wechat-close {
    border: 1px solid rgb(255 255 255 / 65%);
    border-radius: .55rem;
    background: rgb(0 0 0 / 45%);
    color: white;
}
.wechat-close:focus-visible { outline: 2px solid white; outline-offset: -4px; }
.wechat-qr {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}
div.wechat-qr { border: 1px dashed rgb(255 255 255 / 50%); color: white; }
.wechat-id {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem .65rem;
    margin-top: .55rem;
    padding: .55rem .7rem;
    border-radius: .55rem;
    background: white;
}
.wechat-id strong { overflow-wrap: anywhere; }
.wechat-id button { margin-inline-start: auto; }
.wechat-id button:disabled { cursor: default; }
.wechat-id [role="status"]:empty { display: none; }

.home-hero__image {
    position: fixed;
    inset: 0;
    z-index: -1;
}
.home-hero__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(0 0 0 / 54%), rgb(0 0 0 / 76%));
}
.home-hero__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hxc-preview--home:has(.home-hero__image)::before { display: none; }
.brand img { max-height: 2.75rem; object-fit: contain; }
img.catalog-card__placeholder { width: 100%; object-fit: cover; }

.hxc-nav-pending { filter: brightness(.87); }
.hxc-navigation-status {
    position: fixed;
    z-index: 30;
    inset: 0 0 auto;
    height: 3px;
    overflow: hidden;
    pointer-events: none;
    background: rgb(43 209 129 / 24%);
}

.hxc-navigation-status::before {
    content: "";
    display: block;
    width: 36%;
    height: 100%;
    background: #25d987;
}

.hxc-navigation-status .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
    .hxc-navigation-status::before { animation: hxc-navigation-progress 950ms ease-in-out infinite; }

    @keyframes hxc-navigation-progress {
        from { transform: translateX(-100%); }
        to { transform: translateX(280%); }
    }
}
