/*
Theme Name:   FreshlyAsian
Theme URI:    https://www.freshlyasian.com
Description:  Child theme of Shoptimizer for FreshlyAsian: brand colours and type, the store's footer. No page builder.
Author:       FreshlyAsian
Template:     shoptimizer
Version:      0.5.8
Requires PHP: 7.4
License:      GPL-2.0-or-later
Text Domain:  freshlyasian-child
*/

/* Fraunces, self-hosted (SIL Open Font License, assets/fonts/OFL.txt). No request to a
   third-party font host. */
@font-face {
	font-family: "Fraunces";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("assets/fonts/fraunces-latin-500-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Fraunces";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("assets/fonts/fraunces-latin-600-normal.woff2") format("woff2");
}

:root {
	--fa-ink: #1D1B18;
	--fa-rice: #FAF6EE;
	--fa-paper: #FFFFFF;
	--fa-nori: #1E4D3B;
	--fa-nori-dark: #163A2C;
	--fa-gochu: #C8402F;
	--fa-gochu-dark: #A93526;
	--fa-miso: #D9B77E;
	--fa-line: #E6DFD2;
	--fa-muted: #6B655C;
	--fa-body: #4A453D;
	--fa-serif: Fraunces, Georgia, "Times New Roman", serif;
	--fa-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Type: the system stack for body and interface, Fraunces for headings. Shoptimizer's
   own typography settings name Inter; these rules win over them. */
body,
button,
input,
select,
textarea,
.main-navigation ul.menu > li > a,
.main-navigation ul.nav-menu > li > a,
.woocommerce-loop-product__title,
.product .summary,
.widget,
p {
	font-family: var(--fa-sans);
	letter-spacing: normal;
}
body {
	background: var(--fa-rice);
	color: var(--fa-ink);
	font-size: 16px;
	line-height: 1.6;
}
@media (min-width: 993px) {
	body { font-size: 17px; }
}
h1, h2, h3,
.entry-title,
.product_title,
.woocommerce-products-header__title,
.archive .page-title,
.site-branding .site-title,
.site-branding .site-title a,
.site-branding a {
	font-family: var(--fa-serif);
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--fa-ink);
}
/* Shoptimizer prints bare "h1", "h2"... rules inline after this file; these out-rank them. */
body h1,
body h2,
body h3,
body .entry-content h1,
body .entry-content h2,
body .entry-content h3 {
	font-family: var(--fa-serif);
	font-weight: 600;
	letter-spacing: -0.02em;
}
.entry-content,
.term-description,
.woocommerce-product-details__short-description {
	max-width: 70ch;
}
a { color: var(--fa-nori); }
a:hover { color: var(--fa-nori-dark); }

/* Header: white, wordmark in nori, search as a pill, a thin line below. */
.site-header,
.col-full-nav,
.main-header {
	background: var(--fa-paper);
}
.site-header { border-bottom: 0; }
.col-full-nav { border-bottom: 1px solid var(--fa-line); }
.site-branding .site-title,
.site-branding .site-title a,
.site-branding a.custom-logo-link,
.site-branding > a {
	font-family: var(--fa-serif);
	font-weight: 600;
	font-size: 30px;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--fa-nori);
	text-decoration: none;
}
.site-search input[type="search"],
.site-search .search-field,
.widget_product_search input[type="search"] {
	height: 48px;
	border-radius: 999px;
	background: var(--fa-rice);
	border: 1px solid var(--fa-line);
	font-size: 16px;
	color: var(--fa-ink);
}
.main-navigation ul.menu > li > a,
.main-navigation ul.nav-menu > li > a {
	color: var(--fa-ink);
	font-size: 16px;
	font-weight: 500;
}
.main-navigation ul.menu > li > a:hover,
.main-navigation ul.nav-menu > li > a:hover {
	color: var(--fa-nori);
}

/* Buttons: gochu calls to action, 10 px corners. */
.button,
button.button,
.single_add_to_cart_button,
.woocommerce a.button,
.woocommerce button.button,
.checkout-button,
#place_order {
	border-radius: 10px;
	font-weight: 600;
}
.single-product div.product form.cart .single_add_to_cart_button {
	min-height: 56px;
	font-size: 17px;
	background: var(--fa-gochu);
}
.single-product div.product form.cart .single_add_to_cart_button:hover {
	background: var(--fa-gochu-dark);
}
.single-product div.product form.cart .quantity {
	border-radius: 10px;
	background: var(--fa-paper);
}
/* Shoptimizer's typography settings print inline rules such as ".summary h1" and the card
   title list; these selectors out-rank them. */
body.single-product .summary h1.product_title,
body .product .summary h1 {
	font-family: var(--fa-serif);
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--fa-ink);
}
body ul.products li.product .woocommerce-loop-product__title,
body ul.products li.product .woocommerce-loop-product__title a,
body ul.products li.product h2.woocommerce-loop-product__title {
	font-family: var(--fa-serif);
	font-weight: 600;
	font-size: 22px;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--fa-ink);
}
/* The sections below the summary sit in the page column. */
.single-product .fa-about,
.single-product .fa-pack {
	max-width: min(1170px, calc(100% - 32px));
	margin-left: auto;
	margin-right: auto;
}

/* Product page. */
.single-product .site-content,
.single-product .product-details-wrapper,
.single-product div.product {
	background: var(--fa-rice);
}
.single-product .product_title {
	font-size: clamp(30px, 3.4vw, 44px);
	line-height: 1.1;
	text-wrap: balance;
	margin-bottom: 4px;
}
.single-product .woocommerce-product-gallery__image,
.single-product .woocommerce-product-gallery .flex-viewport {
	background: var(--fa-paper);
	border-radius: 20px;
}
.single-product .woocommerce-product-gallery {
	border: 1px solid var(--fa-line);
	border-radius: 20px;
	background: var(--fa-paper);
	overflow: hidden;
}
.woocommerce-breadcrumb,
.woocommerce-breadcrumb a {
	font-size: 14px;
	color: var(--fa-muted);
}

/* Product cards: rice card, line border, 18 px corners, serif name. */
ul.products li.product {
	background: var(--fa-rice);
	border: 1px solid var(--fa-line);
	border-radius: 18px;
	overflow: hidden;
}
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product h2 {
	font-family: var(--fa-serif);
	font-weight: 600;
	font-size: 22px;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--fa-ink);
}
ul.products li.product .price {
	font-size: 22px;
	font-weight: 700;
	color: var(--fa-ink);
}
ul.products li.product .fa-card-extras {
	padding-bottom: 8px;
}
/* Shoptimizer pads each card on the inside; the brand card keeps the space outside its
   border, as in the mockups (24 px between cards). */
ul.products li.product .woocommerce-card__header {
	padding-left: 22px;
	padding-right: 22px;
}
@media (min-width: 993px) {
	body ul.products {
		gap: 24px;
		width: 100%;
		margin-left: 0;
	}
	body ul.products li.product,
	body ul.products.columns-3 li.product,
	body .columns-3 ul.products li.product {
		float: none;
		width: calc((100% - 48px) / 3);
		padding: 0 0 22px;
	}
	body ul.products.columns-4 li.product,
	body .columns-4 ul.products li.product {
		width: calc((100% - 72px) / 4);
	}
}
@media (max-width: 992px) {
	ul.products li.product .woocommerce-card__header {
		padding-left: 14px;
		padding-right: 14px;
	}
	body ul.products li.product:not(.product-category) {
		padding-bottom: 14px;
	}
}
.price ins,
.price ins .amount {
	color: var(--fa-gochu);
}

/* Shop and category pages. */
.woocommerce-products-header,
.term-description {
	color: var(--fa-body);
}

/* Footer (template-parts/fa-footer.php). */
/* The footer's contents stand in the theme's own column (.col-full), as the header's logo
   and menu do (design/README.md, "Page width"). */
.fa-footer {
	background: var(--fa-ink);
	color: var(--fa-rice);
	padding: clamp(40px, 5vw, 64px) 0 32px;
}
/* Shoptimizer gives "footer .col-full" its own wider, flex column for its widgets; this
   footer takes the header's column instead (main.css: 1170 px, 2.617924em each side on a
   desktop, 1em below 993 px). */
.fa-footer > .col-full { display: block; }
@media (min-width: 993px) {
	.fa-footer > .col-full { max-width: 1170px; padding-left: 2.617924em; padding-right: 2.617924em; }
}
.fa-footer__inner {
	display: flex;
	flex-direction: column;
	gap: 36px;
}
.fa-footer__top {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
	gap: 32px 48px;
}
.fa-footer__wordmark {
	margin: 0 0 10px;
	font-family: var(--fa-serif);
	font-weight: 600;
	font-size: 26px;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--fa-rice);
}
.fa-footer__tagline {
	margin: 0;
	max-width: 17em;
	font-size: 15px;
	line-height: 1.55;
	color: #C9C2B6;
}
.fa-footer__col {
	display: flex;
	flex-direction: column;
}
.fa-footer__col h2 {
	margin: 0 0 6px;
	font-family: var(--fa-sans);
	font-size: 13px;
	line-height: 1.4;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 600;
	color: #C9C2B6;
}
.fa-footer__col a {
	display: flex;
	align-items: center;
	min-height: 40px;
	font-size: 16px;
	color: var(--fa-rice);
	text-decoration: none;
}
.fa-footer__col a:hover { text-decoration: underline; color: #fff; }
.fa-footer__bottom {
	padding-top: 24px;
	border-top: 1px solid #3A362F;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 40px;
	font-size: 14px;
	line-height: 1.6;
	color: #C9C2B6;
}
.fa-footer__bottom p { margin: 0; max-width: 46em; color: #C9C2B6; }

/* Phone. */
@media (max-width: 767px) {
	.site-branding .site-title,
	.site-branding .site-title a,
	.site-branding > a { font-size: 24px; }
	.single-product div.product form.cart { display: flex; flex-wrap: nowrap; align-items: stretch; gap: 12px; }
	.single-product div.product form.cart .quantity { flex: 0 0 auto; margin: 0; }
	.single-product div.product form.cart .single_add_to_cart_button { flex: 1 1 auto; width: auto; margin: 0; }
	body ul.products li.product .woocommerce-loop-product__title,
	body ul.products li.product .woocommerce-loop-product__title a,
	body ul.products li.product h2.woocommerce-loop-product__title { font-size: 18px; }
	body.single-product .summary h1.product_title { font-size: 30px; }
}

/* Home page (Phase 5, content/pages/home.md), on the "Full width, no heading" template. */
.site { overflow-x: clip; }
/* The reading width (70 characters) is for text pages; the home page's sections set
   their own widths. */
.page-template-template-fullwidth-no-heading .entry-content,
.page-template-template-fullwidth .entry-content,
.entry-content:has(> .fa-home),
.entry-content:has(> .fa-recipe-grid) { max-width: none; }
body .fa-recipe-grid .fa-recipe-card h3 a,
body .fa-recipe-grid a.fa-recipe-card__kit,
body .fa-home a.fa-section__link { text-decoration: none; }
.fa-home .fa-section__link:hover,
.fa-recipe-grid .fa-recipe-card h3 a:hover,
.fa-recipe-grid .fa-recipe-card__kit:hover { text-decoration: underline; }
/* The Recipes page (fa/recipe-list): the cards as the home page shows them. */
.entry-content > .fa-recipe-grid { margin: 8px 0 clamp(48px, 6vw, 80px); }
.fa-home { display: flex; flex-direction: column; }
.fa-home .wp-block-group:not(.fa-band):not(.fa-promises):not(.fa-cuisines) { margin: 0; }
.fa-home h2,
.fa-home .fa-section__head h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 10px; }
.fa-hero {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 48px 64px;
	padding: clamp(40px, 6vw, 80px) 0;
}
.fa-hero__text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.fa-hero__text h1 { margin: 0; font-size: clamp(38px, 5vw, 62px); line-height: 1.06; letter-spacing: -0.02em; text-wrap: balance; }
.fa-hero__text p { margin: 0; max-width: 31em; font-size: 19px; line-height: 1.55; color: var(--fa-body); }
.fa-hero .fa-hero-card { flex: 1 1 380px; max-width: 420px; box-shadow: 0 18px 40px rgba(29, 27, 24, 0.08); }
.fa-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.fa-buttons .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: 0 28px;
	border-radius: 10px;
	background: var(--fa-gochu);
	color: #fff;
	font-size: 17px;
	font-weight: 600;
	text-decoration: none;
}
.fa-buttons .wp-block-button__link:hover { background: var(--fa-gochu-dark); color: #fff; }
.fa-buttons .is-style-outline .wp-block-button__link { background: transparent; border: 1.5px solid var(--fa-nori); color: var(--fa-nori); }
.fa-buttons .is-style-outline .wp-block-button__link:hover { background: var(--fa-nori); color: #fff; }
.fa-buttons--light .wp-block-button__link { background: #fff; color: var(--fa-nori); min-height: 50px; padding: 0 26px; font-size: 16px; }
.fa-buttons--light .wp-block-button__link:hover { background: var(--fa-rice); color: var(--fa-nori); }
.fa-home .fa-promises {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
	gap: 32px 40px;
	padding-top: 40px;
	margin: 0 0 clamp(48px, 6vw, 80px);
	border-top: 1px solid var(--fa-line);
}
.fa-promise-item h3 { margin: 0 0 6px; font-size: 21px; line-height: 1.25; }
.fa-promise-item p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--fa-body); }
.fa-home .fa-cuisines { margin: 0 0 clamp(48px, 6vw, 80px); }
.fa-cuisines > h2 { margin-bottom: 32px; }
.fa-cuisine-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.fa-cuisine { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 240px; padding: 24px; border-radius: 18px; background: #E9E3D8; }
.fa-cuisine--korean { background: #F4DCD6; }
.fa-cuisine--japanese { background: #DCE7E1; }
.fa-cuisine--thai-sea { background: #F1E5C9; }
.fa-cuisine--chinese-pan-asian { background: #E9E3D8; }
.fa-cuisine h3 { margin: 0; font-size: 26px; line-height: 1.2; }
.fa-cuisine h3 a { color: var(--fa-ink); text-decoration: none; }
.fa-cuisine h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.fa-cuisine h3 a:focus-visible::after { outline: 3px solid var(--fa-nori); outline-offset: 2px; }
.fa-cuisine p { margin: 0; max-width: 14em; font-size: 15px; line-height: 1.5; color: var(--fa-body); }
/* A band runs the full width of the window; its contents keep the page's column: the
   side padding is exactly what the band reaches past the column on each side. */
.fa-home .fa-band {
	margin-top: 0;
	margin-bottom: 0;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: clamp(48px, 6vw, 80px) calc(50vw - 50%);
}
.fa-band--white { background: var(--fa-paper); border-top: 1px solid var(--fa-line); border-bottom: 1px solid var(--fa-line); }
.fa-band--white .fa-section { margin: 0; }
.fa-band--nori { background: var(--fa-nori); color: #fff; }
.fa-band--miso { background: var(--fa-miso); color: var(--fa-ink); }
.fa-vegband { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 72px; }
.fa-vegband__text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.fa-vegband__text h2 { color: #fff; margin: 0; }
.fa-vegband__text p { margin: 0; max-width: 32em; font-size: 18px; line-height: 1.6; color: #E4EDE8; }
.fa-vegband__labels { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.fa-eyebrow-light { margin: 0; font-size: 13px; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; color: #C9DBD1; }
.fa-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.fa-chips li { margin: 0; padding: 8px 16px; border: 1.5px solid #B9CFC3; border-radius: 999px; color: #fff; font-size: 15px; line-height: 1.4; font-weight: 600; }
.fa-chips li:first-child { background: #fff; border-color: #fff; color: var(--fa-nori); }
.fa-vegband__note { margin: 0; font-size: 15px; color: #E4EDE8; }
.fa-home .fa-section--recipes { margin: clamp(48px, 6vw, 80px) 0; }
@media (max-width: 992px) {
	.fa-cuisine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 767px) {
	.fa-cuisine { min-height: 120px; padding: 18px; }
	.fa-cuisine h3 { font-size: 21px; }
	.fa-cuisine p { display: none; }
	/* content/pages/home.md: up to six kits on desktop, four on a phone. */
	.fa-section--kits ul.products li.product:nth-child(n+5) { display: none; }
	.fa-buttons { width: 100%; }
	.fa-buttons .wp-block-button { flex: 1 1 100%; }
	.fa-buttons .wp-block-button__link { width: 100%; }
}

/* Recipe posts: the serif title (Shoptimizer prints ".single-post h1" inline), and room
   between the kit button and the next heading. */
body.single-post h1.entry-title,
body.single-post .entry-header h1 {
	font-family: var(--fa-serif);
	font-weight: 600;
	letter-spacing: -0.02em;
	font-size: clamp(30px, 3.4vw, 44px);
	line-height: 1.1;
}
.single-post .entry-content .fa-buttons { margin: 24px 0 32px; }

/* The product gallery shows at once (Phase 7, task 7). WooCommerce hides it until its jQuery
   slider has started, which kept the product picture, the page's largest element, from
   painting for over a second on a phone. Until the slider starts, only the first picture
   shows, so a product with several photos does not jump. */
.woocommerce div.product .woocommerce-product-gallery { opacity: 1 !important; }
.woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:nth-child(n+2) { display: none; }
