/*
Theme Name: Jin Li Foods
Theme URI: https://jinlifoods.co.uk
Author: Brantwick
Description: Block theme for Jin Li Foods, Asian foodservice specialists. Pairs with the Jin Li Foods Core plugin.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.2.0
License: GPL-2.0-or-later
Text Domain: jinli
*/

/* Base */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
::selection { background: var(--wp--preset--color--temple-gold); color: var(--wp--preset--color--wok-black); }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.screen-reader-text:focus { background: #fff; clip: auto !important; clip-path: none; color: #0b0b0b; display: block; font-weight: 700; height: auto; left: 8px; padding: 12px 16px; top: 8px; width: auto; z-index: 100000; }
:where(h1, h2, h3) { text-wrap: balance; }
:where(p) { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--wp--preset--color--temple-gold); outline-offset: 3px; }
.jl-eyebrow { font-size: .8125rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--wp--preset--color--temple-gold); margin: 0; }
.jl-eyebrow--ink { color: var(--wp--preset--color--gold-ink); }
.jl-eyebrow--red { color: var(--wp--preset--color--chilli-red); }
:lang(th) .jl-eyebrow, :lang(zh) .jl-eyebrow { letter-spacing: .04em; }
:lang(th) h1, :lang(th) h2, :lang(th) h3 { line-height: 1.35; }
:lang(zh) h1, :lang(zh) h2 { line-height: 1.25; word-break: keep-all; }

/* Layout primitives */
.wp-site-blocks > * { margin-block: 0 !important; }
.jl-site-header > *, .jl-header > *, .wp-site-blocks > footer > * { margin-block: 0 !important; }
.jl-home > * { margin-block-start: 0 !important; }
.jl-pad { padding-inline: clamp(16px, 4vw, 24px); }
.jl-wrap { max-width: 1240px; margin-inline: auto; width: 100%; }
.jl-wrap--narrow { max-width: 760px; }
.is-layout-flow > .jl-wrap { margin-inline: auto !important; }

/* Top bar */
.jl-topbar { background: var(--wp--preset--color--chilli-red); color: #fff; font-size: .8125rem; font-weight: 600; }
.jl-topbar .jlc-topbar__inner { padding-block: 8px; max-width: 1240px; margin-inline: auto; }

/* Header */
.jl-header { background: var(--wp--preset--color--wok-black); color: #fff; position: relative; z-index: 50; }
.jl-header__inner { max-width: 1240px; margin-inline: auto; display: flex; align-items: center; gap: 12px 32px; padding-block: 10px; flex-wrap: wrap; }
.jl-header__logo { flex: none; margin: 0; }
.jl-header__logo a { display: block; }
.jl-header__logo img { display: block; height: 92px; width: auto; }
.jl-header .wp-block-navigation { flex: 1; }
.jl-header .wp-block-navigation a { color: #fff; text-decoration: none; padding-block: 10px; }
.jl-header .wp-block-navigation a:hover { color: var(--wp--preset--color--temple-gold); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.jl-header .wp-block-navigation .current-menu-item > a, .jl-header .wp-block-navigation a[aria-current="page"] { color: var(--wp--preset--color--temple-gold); }
.jl-header .wp-block-navigation__responsive-container-open, .jl-header .wp-block-navigation__responsive-container-close { color: #fff; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.jl-header .wp-block-navigation__responsive-container-open svg { width: 32px; height: 32px; }
.jl-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--wok-black) !important; color: #fff !important; padding: 24px !important; }
.jl-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 56px; gap: 8px; }
.jl-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a { font-size: 1.375rem; font-weight: 800; padding: 10px 0; }
.jl-header .jlc-header-actions { margin-left: auto; }
@media (max-width: 1100px) {
	.jl-header__logo img { height: 76px; }
	.jl-header__inner { gap: 10px 20px; }
}
@media (max-width: 781px) {
	.jl-header__inner { padding-block: 8px; }
	.jl-header__logo img { height: 64px; }
	.jl-header .wp-block-navigation { flex: 0 0 auto; order: 2; margin-left: auto; }
	.jl-header .jlc-header-actions { order: 3; width: 100%; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 8px; }
	.jl-header .jlc-header-actions .jlc-btn { width: 100%; min-width: 0; padding-inline: .5em; font-size: .875rem; white-space: normal; text-align: center; }
	.jl-header .jlc-header-actions .jlc-btn:only-child { grid-column: 1 / -1; }
}

/* Search strip on catalogue pages */
.jl-searchbar { background: var(--wp--preset--color--wok-black); padding-block: 0 16px; }
.jl-searchbar .jlc-search { max-width: 1240px; margin-inline: auto; border-color: transparent; }

/* Layout helpers */
.jl-main { padding-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50); }
.jl-section { padding-block: var(--wp--preset--spacing--50) 0; }
.jl-section:last-child { padding-bottom: var(--wp--preset--spacing--50); }
.jl-section-head, .jlc-section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 28px; }
.jl-section-head h2, .jlc-section-head h2 { margin: 0; flex: 1 1 100%; }
.jl-section-head p, .jlc-section-head p { margin: 0; color: var(--wp--preset--color--muted); font-size: 1.0625rem; flex: 1 1 auto; }
.jl-section-head .jl-more { font-weight: 800; white-space: nowrap; text-decoration: none; }
.jl-section-head .jl-more:hover { text-decoration: underline; }
.jl-breadcrumbs-wrap { margin-bottom: 20px; }

/* Hero */
.jl-hero { position: relative; background: var(--wp--preset--color--wok-black); color: #fff; overflow: hidden; }
.jl-hero__media { margin: 0 !important; position: absolute; inset: 0 0 0 auto; width: 66%; }
.jl-hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jl-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #0b0b0b 34%, rgba(11, 11, 11, .72) 52%, rgba(11, 11, 11, .1) 78%, rgba(11, 11, 11, 0) 100%); }
.jl-hero__content { position: relative; z-index: 2; max-width: 1240px; margin-inline: auto; padding-block: clamp(56px, 9vw, 120px); }
.jl-hero__copy { max-width: 620px; display: flex; flex-direction: column; gap: 22px; }
.jl-hero h1 { color: #fff; margin: 0; font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem); line-height: 1.04; letter-spacing: -.01em; }
.jl-hero__lead { margin: 0; font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); line-height: 1.65; color: #ddd; }
.jl-hero .wp-block-buttons { gap: 12px; margin-top: 6px; }
@media (max-width: 781px) {
	.jl-hero__media { position: relative; width: 100%; height: 240px; inset: auto; }
	.jl-hero::before { background: linear-gradient(180deg, rgba(11, 11, 11, 0) 0, rgba(11, 11, 11, .2) 120px, #0b0b0b 240px); }
	.jl-hero__content { padding-block: 0 48px; margin-top: -40px; }
	.jl-hero .wp-block-buttons .wp-block-button { flex: 1 1 100%; }
	.jl-hero .wp-block-button__link { width: 100%; }
}

/* Button styles */
.wp-block-button.is-style-gold .wp-block-button__link { background: var(--wp--preset--color--temple-gold); color: var(--wp--preset--color--wok-black); }
.wp-block-button.is-style-gold .wp-block-button__link:hover { background: #ffc61a; color: var(--wp--preset--color--wok-black); }
.wp-block-button.is-style-dark .wp-block-button__link { background: var(--wp--preset--color--wok-black); color: #fff; }
.wp-block-button.is-style-dark .wp-block-button__link:hover { background: #262626; }
.wp-block-button.is-style-ghost .wp-block-button__link { background: transparent; color: inherit; border: 2px solid currentColor; padding: calc(.85em - 2px) calc(1.4em - 2px); }
.wp-block-button.is-style-ghost .wp-block-button__link:hover { background: rgba(255, 255, 255, .08); }
.wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; transition: transform .15s, background-color .15s; }
.wp-block-button__link:hover { transform: translateY(-1px); }

/* Trust bar */
.jl-trustbar { background: var(--wp--preset--color--temple-gold); color: var(--wp--preset--color--wok-black); padding-block: 18px; }
.jl-trustbar .jlc-trust { max-width: 1240px; margin-inline: auto; }

/* Cuisine cards */
.jl-cuisines { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 20px !important; }
@media (min-width: 782px) { .jl-cuisines { grid-template-columns: 1fr 1fr; } }
.jl-cuisine { position: relative; border-radius: 18px; padding: 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-decoration: none; overflow: hidden; min-height: 132px; }
.jl-cuisine--thai { background: var(--wp--preset--color--wok-black); color: #fff; }
.jl-cuisine--chinese { background: var(--wp--preset--color--chilli-red); color: #fff; }
.jl-cuisine__eyebrow { display: block; font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 8px; }
.jl-cuisine--thai .jl-cuisine__eyebrow { color: var(--wp--preset--color--temple-gold); }
.jl-cuisine__title { display: block; font-weight: 900; font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); line-height: 1.15; }
.jl-cuisine__cta { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 8px; font-weight: 800; }
.jl-cuisine--thai .jl-cuisine__cta { background: var(--wp--preset--color--temple-gold); color: var(--wp--preset--color--wok-black); }
.jl-cuisine--chinese .jl-cuisine__cta { background: var(--wp--preset--color--wok-black); color: #fff; }
.jl-cuisine:hover { color: #fff; }
.jl-cuisine:hover .jl-cuisine__cta { transform: translateX(3px); }
.jl-cuisine__cta { transition: transform .2s; }

/* How it works */
.jl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: jlstep; }
.jl-steps li { counter-increment: jlstep; display: flex; flex-direction: column; gap: 10px; }
.jl-steps li::before { content: counter(jlstep); width: 52px; height: 52px; border-radius: 50%; background: var(--wp--preset--color--wok-black); color: var(--wp--preset--color--temple-gold); font-weight: 900; font-size: 1.25rem; display: grid; place-items: center; }
.jl-steps strong { font-size: 1.1875rem; font-weight: 800; }
.jl-steps span { color: var(--wp--preset--color--muted); line-height: 1.55; }

/* Delivery band */
.jl-band { position: relative; border-radius: 20px; overflow: hidden; background: var(--wp--preset--color--wok-black); color: #fff; }
.jl-band__media { margin: 0 !important; position: absolute; inset: 0 0 0 auto; width: 55%; }
.jl-band__media img { width: 100%; height: 100%; object-fit: cover; opacity: .8; display: block; }
.jl-band::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #0b0b0b 42%, rgba(11, 11, 11, .55) 56%, rgba(11, 11, 11, 0) 76%); }
.jl-band__copy { position: relative; z-index: 2; padding: clamp(28px, 5vw, 56px); max-width: 640px; display: flex; flex-direction: column; gap: 16px; }
.jl-band h2 { color: #fff; margin: 0; font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem); }
.jl-band p { margin: 0; color: #ddd; }
.jl-band p:empty, .jl-content p:empty { display: none; }
@media (max-width: 781px) {
	.jl-band__media { width: 100%; opacity: .35; }
	.jl-band::before { background: linear-gradient(90deg, rgba(11, 11, 11, .9), rgba(11, 11, 11, .6)); }
}

/* Page heads */
.jl-pagehead { background: var(--wp--preset--color--wok-black); color: #fff; position: relative; overflow: hidden; }
.jl-pagehead__media { position: absolute; inset: 0; margin: 0 !important; }
.jl-pagehead__media img { width: 100%; height: 100%; object-fit: cover; opacity: .45; display: block; }
.jl-pagehead__inner { position: relative; z-index: 1; max-width: 1240px; margin-inline: auto; padding-block: clamp(36px, 6vw, 72px); }
.jl-pagehead h1 { color: #fff; margin: 8px 0 0; font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
.wp-block-post-title { margin-top: 0; }

/* Entry content */
.jl-content > * { max-width: 760px; }
.jl-content > .alignwide, .jl-content > .jlc-register, .jl-content > .jlc-grid, .jl-content > .jlc-contact, .jl-content > .jlc-facts, .jl-content > .jlc-postcode { max-width: 1240px; }
.jl-content p, .jl-content li { font-size: 1.0625rem; line-height: 1.75; }
.jl-content h2 { margin-top: 1.6em; }
.jl-content h3 { margin-top: 1.4em; }
.jl-content table { width: 100%; border-collapse: collapse; }
.jl-content .jlc-grid, .jl-content .jlc-register { margin-top: 28px; }
.jl-content th, .jl-content td { border: 1px solid var(--wp--preset--color--line); padding: 10px 12px; text-align: left; }

/* Guide cards (blog) */
.jl-postcard { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 14px; overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.jl-postcard .wp-block-post-featured-image { margin: 0; }
.jl-postcard .wp-block-post-featured-image img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.jl-postcard__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.jl-postcard .wp-block-post-title { font-size: 1.25rem; line-height: 1.3; margin: 0; }
.jl-postcard .wp-block-post-title a { text-decoration: none; }
.jl-postcard .wp-block-post-excerpt { color: var(--wp--preset--color--muted); margin: 0; }
.jl-cta-box { background: var(--wp--preset--color--wok-black); color: #fff; border-radius: 18px; padding: clamp(24px, 4vw, 40px); }
.jl-cta-box h2 { color: #fff; margin-top: 0; }
.jl-cta-box p { color: #ddd; }

/* Footer */
.jl-footer { background: var(--wp--preset--color--wok-black); color: #ccc; font-size: .9375rem; }
.jl-footer__inner { max-width: 1240px; margin-inline: auto; padding-block: 56px 28px; }
.jl-footer__cols { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .jl-footer__cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .jl-footer__cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.jl-footer__brand img { width: 140px; height: auto; display: block; }
.jl-footer__brand p { margin: 14px 0 0; max-width: 32ch; }
.jl-footer h2 { color: #fff; font-size: 1rem; font-weight: 800; margin: 0 0 14px; letter-spacing: .02em; }
.jl-footer a { color: #ccc; }
.jl-footer a:hover { color: var(--wp--preset--color--temple-gold); }
.jl-footer__bottom { border-top: 1px solid #262626; margin-top: 40px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: flex-start; }
.jl-footer__bottom .jlc-legal { flex: 1 1 520px; }
.jl-footer__links { display: flex; gap: 20px; flex-wrap: wrap; font-size: .8125rem; margin: 0; padding: 0; list-style: none; }

/* WooCommerce account and login */
@media (min-width: 782px) {
	.woocommerce-account.logged-in .jl-content .woocommerce { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
	.woocommerce-account .woocommerce-MyAccount-navigation, .woocommerce-account .woocommerce-MyAccount-content { float: none !important; width: auto !important; }
}
.woocommerce form .form-row { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.woocommerce form .form-row label { font-weight: 700; font-size: .9375rem; }
.woocommerce form .form-row input.input-text { width: 100%; }
.woocommerce form .form-row .woocommerce-form__label-for-checkbox { flex-direction: row; display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.woocommerce form.login .form-row:has(.woocommerce-form-login__submit) { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px; }
.woocommerce-account .jl-content > *, .woocommerce-account .woocommerce { max-width: 1240px; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce-page form .form-row input.input-text {
	min-height: 50px; padding: 12px 14px; border: 1px solid #bdb5a6; border-radius: 8px; font: inherit; background: #fff; box-sizing: border-box;
}
.woocommerce form .form-row input.input-text:focus { outline: none; border-color: var(--wp--preset--color--wok-black); box-shadow: 0 0 0 3px var(--wp--preset--color--temple-gold); }
.woocommerce form.login, .woocommerce form.lost_reset_password, .woocommerce form.register { border: 1px solid var(--wp--preset--color--line) !important; border-radius: 16px !important; background: #fff; padding: clamp(20px, 3vw, 32px) !important; max-width: 520px; }
.woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce-page .button {
	background: var(--wp--preset--color--wok-black) !important; color: #fff !important; border-radius: 8px !important; font-weight: 800 !important; min-height: 48px; padding: .8em 1.4em !important; font-family: inherit !important; border: 0 !important;
}
.woocommerce .button:hover { background: #262626 !important; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.woocommerce-MyAccount-navigation a { display: block; padding: 10px 14px; border-radius: 8px; text-decoration: none; font-weight: 700; }
.woocommerce-MyAccount-navigation .is-active a { background: var(--wp--preset--color--wok-black); color: #fff; }
.woocommerce-error, .woocommerce-message, .woocommerce-info { border-radius: 10px; }
.jl-login-help { max-width: 520px; margin-top: 20px; color: var(--wp--preset--color--muted); }

@media (prefers-reduced-motion: reduce) {
	.wp-block-button__link, .jl-cuisine__cta { transition: none; transform: none !important; }
}
.jl-lead { font-size: 1.125rem; color: var(--wp--preset--color--muted); margin-top: 8px; }
