/*
Theme Name: Fus7a
Theme URI: https://github.com/MMagde/fusha-games
Description: فُسحة: calm, premium block theme for a cash-on-delivery kids' games store. Arabic first (RTL), English ready. Presentation only: selling features come from the Fus7a Commerce plugin.
Version: 0.2.1
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Text Domain: fusha
*/

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--wp--preset--color--deep); outline-offset: 2px; }
::selection { background: var(--wp--preset--color--mint); color: var(--wp--preset--color--ink); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* ---------- header ---------- */
.fs-header { position: sticky; top: 0; z-index: 900; background: rgba(251, 250, 246, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--wp--preset--color--line); }
.admin-bar .fs-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .fs-header { top: 0; } }
.fs-header__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 64px; max-width: var(--wp--style--global--wide-size); margin: 0 auto; padding: 0 8px; }
.fs-header__start { display: flex; align-items: center; gap: 4px; justify-self: start; }
.fs-header__logo { justify-self: center; }
.fs-header__end { display: flex; align-items: center; gap: 2px; justify-self: end; }
.fs-header .wp-block-site-logo img, .fs-header .custom-logo { width: 116px; height: auto; display: block; }
.fs-header .fs-core-nav, .fs-header .fs-core-search { margin: 0; }
@media (min-width: 960px) {
	.fs-header__row { grid-template-columns: auto 1fr auto; gap: 24px; padding: 0 16px; min-height: 76px; }
	.fs-header__logo { order: -1; justify-self: start; }
	.fs-header__start { justify-self: center; }
	.fs-header .wp-block-site-logo img, .fs-header .custom-logo { width: 132px; }
}
.fs-lang { display: inline-grid; place-items: center; min-width: 44px; height: 44px; border-radius: 999px; font: 700 13px var(--wp--preset--font-family--rubik); color: var(--wp--preset--color--ink); text-decoration: none; }
.fs-lang:hover { background: var(--wp--preset--color--tint); text-decoration: none; }

/* minimal header (checkout, ad landing) */
.fs-header--min .fs-header__row { grid-template-columns: 1fr auto 1fr; }
.fs-header--min .fs-header__logo { order: 0; justify-self: center; }
.fs-header__safe { display: flex; align-items: center; gap: 6px; justify-self: end; font-size: 12px; font-weight: 600; color: var(--wp--preset--color--deeper); }

/* ---------- footer ---------- */
.fs-footer { background: var(--wp--preset--color--ink); color: #DCE6E0; margin-top: var(--wp--preset--spacing--70); }
.fs-footer a { color: #DCE6E0; }
.fs-footer a:hover { color: #fff; }
.fs-footer h2, .fs-footer h3 { color: #fff; }
.fs-footer h3 { font-size: 15px; margin: 0 0 10px; }
.fs-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.fs-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; color: #A9B8B0; }
.fs-footer .wp-block-image img { width: 132px; }

/* ---------- sections ---------- */
.fs-section { padding-block: var(--wp--preset--spacing--60); }
.fs-eyebrow { display: inline-block; padding: 6px 12px; border-radius: 999px; background: #fff; color: var(--wp--preset--color--deeper); font-size: 12px; font-weight: 600; }
.fs-lead { font-size: 17px; line-height: 1.8; color: #3B4A44; }
.is-style-fs-card { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 24px; }
.is-style-fs-tinted { background: var(--wp--preset--color--tint); border-radius: 28px; }
.is-style-fs-dark { background: var(--wp--preset--color--ink); color: #fff; border-radius: 28px; }
.is-style-fs-dark :where(h1, h2, h3, h4, p) { color: #fff; }
.wp-block-button.is-style-fs-ghost .wp-block-button__link { background: transparent; border: 1.5px solid var(--wp--preset--color--deep); color: var(--wp--preset--color--deeper); }
.wp-block-button.is-style-fs-green .wp-block-button__link { background: var(--wp--preset--color--deep); color: #fff; }
.wp-block-button.is-style-fs-green .wp-block-button__link:hover { background: var(--wp--preset--color--deeper); }

/* hero */
.fs-hero { border-radius: 28px; overflow: hidden; background: var(--wp--preset--color--mint-soft); }
.fs-hero__text { padding: 28px 22px 18px; }
.fs-hero h1 { font-size: clamp(32px, 6vw, 56px); line-height: 1.2; margin: 12px 0; }
.fs-hero .wp-block-image { margin: 0; }
.fs-hero .wp-block-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
@media (min-width: 900px) {
	.fs-hero { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
	.fs-hero__text { padding: 56px 48px; align-self: center; }
	.fs-hero .wp-block-image img { height: 100%; aspect-ratio: auto; min-height: 460px; }
}

/* shop by age / skill */
.fs-ages { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fs-ages a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 4px; border-radius: 18px; background: #fff; border: 1px solid var(--wp--preset--color--line); text-decoration: none !important; color: var(--wp--preset--color--ink); transition: border-color .15s, transform .15s; }
.fs-ages a:hover { border-color: var(--wp--preset--color--deep); transform: translateY(-2px); }
.fs-ages b { font-size: 22px; font-weight: 800; line-height: 1.2; }
.fs-ages span { font-size: 12px; color: var(--wp--preset--color--muted); }
.fs-skills-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .fs-skills-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fs-skills-grid a { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 20px; text-decoration: none !important; color: var(--wp--preset--color--ink); font-weight: 700; transition: transform .15s; }
.fs-skills-grid a:hover { transform: translateY(-2px); }
.fs-skills-grid a:nth-child(4n+1), .fs-skills-grid a:nth-child(4n+4) { background: var(--wp--preset--color--tint); }
.fs-skills-grid a:nth-child(4n+2), .fs-skills-grid a:nth-child(4n+3) { background: var(--wp--preset--color--mustard-tint); }
.fs-skills-grid svg { color: var(--wp--preset--color--deep); }

/* value props */
.fs-why { display: grid; gap: 18px; }
@media (min-width: 900px) { .fs-why { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fs-why__item { display: flex; gap: 12px; align-items: flex-start; }
.fs-why__ic { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--wp--preset--color--deep); color: #fff; display: grid; place-items: center; }
.fs-why__item p { margin: 2px 0 0; color: #C9D6CF; font-size: 14px; line-height: 1.7; }

/* ---------- product page ---------- */
.fs-product { padding-top: 12px; }
.fs-product__grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 960px) {
	.fs-product__grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 48px; }
	.fs-product__media { position: sticky; top: 100px; }
}
.fs-product__info { display: flex; flex-direction: column; gap: 14px; }
.fs-product__info .wp-block-post-title { margin: 0; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.35; }
.fs-product__info .wp-block-woocommerce-product-price { margin: 0; }
.fs-product__info .wp-block-woocommerce-product-price del { font-size: 18px; font-weight: 400; color: #8A968F; }
.fs-product__info .wp-block-woocommerce-product-price ins { text-decoration: none; }
.fs-product__info .wp-block-post-excerpt__excerpt { margin: 0; }
.fs-product__more { display: grid; gap: var(--wp--preset--spacing--60); margin-top: var(--wp--preset--spacing--60); }
@media (min-width: 960px) { .fs-product__more { max-width: 820px; } }
.woocommerce-breadcrumb, .wc-block-breadcrumbs { font-size: 13px; color: var(--wp--preset--color--muted); }

/* landing (ad traffic) */
body.fs-landing .fs-footer { margin-top: 32px; }

/* ---------- archive ---------- */
.fs-archive-head { padding-block: 20px 8px; }
.fs-archive-head h1 { margin: 0; font-size: clamp(26px, 4vw, 40px); }
.fs-archive-head .wp-block-term-description { color: var(--wp--preset--color--muted); }

/* ---------- generic content ---------- */
.wp-block-post-content > * + * { margin-block-start: 1em; }
.fs-page-title { margin-block: 24px 16px; }
.fs-404 { text-align: center; padding-block: 64px; }

/* ---------- coming soon (WooCommerce site visibility) ---------- */
.fs-soon { min-height: calc(100vh - 80px); display: flex; flex-direction: column; justify-content: center; gap: 14px; padding-block: 48px; background: radial-gradient(1200px 520px at 50% 0%, var(--wp--preset--color--tint), transparent 70%); }
.fs-soon__logo { margin: 0 auto 12px !important; }
.fs-soon .fs-eyebrow { align-self: center; background: var(--wp--preset--color--mustard-tint); color: #6B4E0F; }
.fs-soon h1 { margin: 0; font-size: clamp(32px, 6vw, 54px); }
.fs-soon .fs-lead { margin: 0 auto; max-width: 520px; color: var(--wp--preset--color--muted); }
.fs-soon__foot { margin: 0; padding: 0 16px 24px; font-size: 13px; color: var(--wp--preset--color--muted); }
.fs-soon__foot a { color: var(--wp--preset--color--muted); text-decoration: underline; }

/* header: no block-gap margins inside the header row, everything centred on one line */
.fs-header :where(.fs-header__row, .fs-header__start, .fs-header__logo, .fs-header__end) > * { margin-block: 0 !important; }
.fs-header__row { align-items: center; }
.fs-header__start, .fs-header__end { align-items: center; }
.fs-header .wp-block-site-logo, .fs-header .wp-block-site-logo a { display: block; line-height: 0; }
