/*
Theme Name: Yalhem Olive
Description: Café and brunch theme for Yalhem Sites: photo-collage hero, card menu with chips and search, seating gallery, WhatsApp ordering. Requires the Yalhem Sites plugin.
Version: 0.1.5
Requires at least: 6.6
Requires PHP: 8.2
Author: Yalhem
Text Domain: yalhem-olive
*/

:root {
	--ys-accent: var(--olive); --ys-on-accent: #fff; --ys-ink: var(--ink); --ys-bg: var(--bg); --ys-line: var(--line); /* shared header tokens */
	--bg: var(--wp--preset--color--bg); --surface: #fff; --ink: var(--wp--preset--color--ink); --muted: var(--wp--preset--color--muted);
	--line: #E6E8DF; --olive: var(--wp--preset--color--olive); --olive-ink: #3A4720; --olive-soft: var(--wp--preset--color--olive-soft);
	--r: 18px; --r-sm: 12px; --wrap: 1200px; --font: var(--wp--preset--font-family--body);
	--shadow: 0 1px 2px rgba(35, 38, 31, .06), 0 8px 24px rgba(35, 38, 31, .07);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html.ys-locked { overflow: hidden; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--olive); outline-offset: 2px; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.ys-main p, .ys-main h1, .ys-main h2, .ys-main h3, .ys-main figure, .ys-main ul { margin: 0; }
.ys-wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.ys-icon { font-style: normal; line-height: 1; }
h1, h2, h3 { letter-spacing: -.01em; }

/* buttons */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.wp-block-button__link, .ys-order-btn, .ys-orderbar__btn, .ys-send {
	display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 13px 24px;
	background: var(--olive); color: #fff; font: 700 15px/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
	transition: transform .15s, background .15s;
}
.wp-block-button__link:hover, .ys-order-btn:hover, .ys-send:hover { background: var(--olive-ink); color: #fff; }
.wp-block-button__link:active, .ys-order-btn:active, .ys-orderbar__btn:active { transform: scale(.98); }
.ys-btn-soft .wp-block-button__link { background: var(--olive-soft); color: var(--olive-ink); }
.ys-btn-white .wp-block-button__link { background: #fff; color: var(--olive-ink); }
.ys-btn-out .wp-block-button__link { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .8); }
.ys-btn-soft .wp-block-button__link:hover, .ys-btn-white .wp-block-button__link:hover { background: #fff; color: var(--olive); }
.ys-btn-out .wp-block-button__link:hover { background: rgba(255, 255, 255, .12); }
.ys-btn-order .wp-block-button__link::before, .ys-btn-map .wp-block-button__link::before, .ys-btn-phone .wp-block-button__link::before { font-family: 'tabler-icons'; font-size: 19px; font-weight: 400; }
.ys-btn-order .wp-block-button__link::before { content: "\eeff"; }
.ys-btn-map .wp-block-button__link::before { content: "\eae8"; }
.ys-btn-phone .wp-block-button__link::before { content: "\eb09"; }
.ys-order-btn i, .ys-orderbar__btn i, .ys-send i { font-size: 19px; }

/* header */
.ys-hdr { position: sticky; top: 0; z-index: 30; background: rgba(250, 250, 246, .92); backdrop-filter: blur(10px); }
.ys-hdr__in { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; height: 70px; display: flex; align-items: center; gap: 20px; }
.ys-logo { display: flex; align-items: center; gap: 10px; }
.ys-logo .ys-icon { width: 38px; height: 38px; border-radius: 50%; background: var(--olive); color: #fff; display: grid; place-items: center; font-size: 20px; }
.ys-logo .wp-block-site-title { font-weight: 800; font-size: 22px; margin: 0; }
.ys-logo .wp-block-site-title a { text-decoration: none; }
.ys-nav { margin-inline-start: auto; gap: 20px; font-weight: 500; font-size: 15px; }
.ys-nav a { text-decoration: none; }
.ys-order-btn { position: relative; }
.ys-badge { position: absolute; top: -6px; inset-inline-start: -6px; min-width: 22px; height: 22px; border-radius: 11px; background: #C2410C; color: #fff; font: 700 12px/22px var(--font); text-align: center; padding: 0 5px; }

/* hero */
.ys-hero { padding-block: 28px 56px; }
.ys-hero__in { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.ys-hero h1 { font-size: clamp(34px, 3.6vw, 48px); }
.ys-hero h1 em { font-style: normal; color: var(--olive); }
.ys-hero__text > p { font-size: 18px; color: var(--muted); margin-top: 14px; max-width: 34ch; }
.ys-hero .wp-block-buttons { margin-top: 26px; }
.ys-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; color: var(--muted); font-size: 14px; }
.ys-fact { display: flex; align-items: center; gap: 6px; }
.ys-fact .ys-icon { color: var(--olive); font-size: 18px; }
.ys-collage { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; height: clamp(320px, 42vw, 500px); }
.ys-collage figure { margin: 0; min-height: 0; }
.ys-collage figure:first-child { grid-row: span 2; }
.ys-collage img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); }

/* menu (plugin block, cards layout) */
.ys-menu-sec { padding-bottom: 70px; }
.ys-bar { position: sticky; top: 70px; z-index: 20; background: var(--bg); padding-block: 12px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.ys-scroll--chips { flex: 1; --ys-scroll-btn-fg: var(--olive-ink); }
.ys-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.ys-chips::-webkit-scrollbar { display: none; }
.ys-chip { flex: none; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 16px; font: 500 14px/1 var(--font); color: var(--ink); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.ys-chip i { font-size: 17px; color: var(--olive); }
.ys-chip[aria-pressed="true"] { background: var(--olive); border-color: var(--olive); color: #fff; }
.ys-chip[aria-pressed="true"] i { color: #fff; }
.ys-search { position: relative; flex: 0 0 240px; }
.ys-search input { width: 100%; border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 40px 9px 14px; font: 400 14px var(--font); background: var(--surface); color: var(--ink); }
.ys-search input:focus { outline: 0; border-color: var(--olive); }
.ys-search i { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.ys-menu .ys-menu__heading { font-size: clamp(28px, 3vw, 38px); margin: 30px 0 0; }
.ys-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 18px; }
.ys-card { background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.ys-card__img { position: relative; aspect-ratio: 4/3; background: var(--olive-soft); margin: 0; overflow: hidden; }
.ys-card__img img, .ys-card__img .ys-noimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ys-noimg { display: grid; place-items: center; color: var(--olive); font-size: 34px; }
.ys-card__tag { position: absolute; top: 10px; inset-inline-start: 10px; background: var(--surface); color: var(--olive-ink); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.ys-card__in { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.ys-card h3 { font-size: 16px; font-weight: 700; margin: 0; }
.ys-card p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 4px 0 0; flex: 1; }
.ys-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.ys-price { font-weight: 800; font-size: 17px; white-space: nowrap; }
.ys-add { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--olive); color: #fff; font-size: 20px; cursor: pointer; display: grid; place-items: center; transition: transform .15s; }
.ys-add:hover { transform: scale(1.08); }
.ys-step { display: flex; align-items: center; background: var(--olive-soft); border-radius: 999px; color: var(--olive-ink); }
.ys-step button { width: 34px; height: 36px; border: 0; background: none; color: inherit; font-size: 18px; cursor: pointer; }
.ys-step output { min-width: 18px; text-align: center; font-weight: 800; }
.ys-none, .ys-empty { text-align: center; color: var(--muted); padding: 30px 0; }

/* places */
.ys-places { padding-bottom: 70px; }
.ys-places h2, .ys-vcard h2 { font-size: clamp(28px, 3vw, 38px); }
.ys-places .ys-wrap > p { color: var(--muted); margin-top: 6px; }
.ys-snap { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 32%); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin-top: 18px; padding-bottom: 6px; }
.ys-snap figure { margin: 0; scroll-snap-align: start; }
.ys-snap img { border-radius: var(--r); aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* visit card */
.ys-visit { padding-bottom: 70px; }
.ys-vcard { background: var(--olive); color: #fff; border-radius: var(--r); display: grid; grid-template-columns: 1.2fr 1fr; overflow: hidden; }
.ys-vcard__in { padding: 40px; }
.ys-vcard h2 { color: #fff; margin-bottom: 14px; }
.ys-vcard .ys-fact { gap: 10px; margin-top: 10px; font-weight: 700; }
.ys-vcard .ys-fact .ys-icon { color: #DDE5C8; }
.ys-vcard .wp-block-buttons { margin-top: 26px; }
.ys-map { border: 0; width: 100%; height: 100%; min-height: 300px; display: block; }

/* footer */
.ys-ftr { padding: 24px max(20px, calc((100% - var(--wrap)) / 2 + 20px)); color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.ys-ftr { gap: 12px; }
.ys-ftr p { margin: 0; }
.ys-social .wp-social-link { background: var(--olive) !important; }

/* order pill + bottom sheet (plugin) */
.ys-orderbar { position: fixed; bottom: 18px; left: 50%; transform: translate(-50%, 150%); z-index: 40; transition: transform .25s; display: flex; align-items: center; border-radius: 999px; background: var(--olive); box-shadow: 0 10px 26px rgba(78, 94, 42, .35); }
.ys-orderbar.is-open { transform: translate(-50%, 0); }
.ys-orderbar__sum { color: #fff; font-size: 14px; padding-inline-start: 20px; white-space: nowrap; }
.ys-sheet { position: fixed; inset: 0; z-index: 50; }
.ys-sheet__scrim { position: absolute; inset: 0; background: rgba(35, 38, 31, .45); }
.ys-sheet__panel { position: absolute; inset-inline: 0; bottom: 0; margin-inline: auto; width: min(560px, 100%); max-height: 90vh; background: var(--surface); border-radius: var(--r) var(--r) 0 0; display: flex; flex-direction: column; animation: ys-up .25s ease-out; }
@keyframes ys-up { from { transform: translateY(40px); opacity: .5; } }
.ys-sheet__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px 12px; }
.ys-sheet__head h3 { font-size: 22px; margin: 0; }
.ys-sheet__x { border: 0; background: var(--olive-soft); width: 38px; height: 38px; border-radius: 50%; font-size: 20px; cursor: pointer; color: var(--ink); }
.ys-sheet__body { overflow: auto; padding: 0 22px 16px; flex: 1; }
.ys-line { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding-block: 10px; border-bottom: 1px solid var(--line); }
.ys-line img { width: 52px; height: 52px; border-radius: var(--r-sm); object-fit: cover; }
.ys-line__name { font-weight: 500; font-size: 15px; }
.ys-line__name small { display: block; color: var(--muted); font-size: 13px; }
.ys-fld { display: block; margin-top: 14px; }
.ys-fld span { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.ys-fld input, .ys-fld textarea { width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; font: 400 15px var(--font); color: var(--ink); background: var(--bg); }
.ys-fld input:focus, .ys-fld textarea:focus { outline: 0; border-color: var(--olive); }
.ys-seg { display: flex; background: var(--olive-soft); border-radius: 999px; padding: 4px; margin-top: 16px; }
.ys-seg label { flex: 1; text-align: center; padding: 9px; border-radius: 999px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--olive-ink); position: relative; }
.ys-seg input { position: absolute; opacity: 0; }
.ys-seg label:has(input:checked) { background: var(--surface); box-shadow: var(--shadow); }
.ys-seg label:has(input:focus-visible) { outline: 3px solid var(--olive); }
.ys-sheet__foot { padding: 14px 22px 18px; border-top: 1px solid var(--line); }
.ys-sheet__total { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 10px; }
.ys-send { width: 100%; justify-content: center; padding-block: 15px; font-size: 16px; }


/* brand block (logo or icon + name) and info values from بيانات النشاط */
.ys-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.ys-brand__logo { max-height: 46px; width: auto; display: block; }
.ys-info { color: inherit; text-decoration: none; }
.ys-info--phone { direction: ltr; unicode-bidi: isolate; }
.ys-brand__icon { width: 38px; height: 38px; border-radius: 50%; background: var(--olive); color: #fff; display: grid; place-items: center; font-size: 20px; font-style: normal; }
.ys-brand__name { font-weight: 800; font-size: 22px; }
.ys-ftr .ys-brand__name { font-size: 17px; }

@media (max-width: 1000px) { .ys-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) {
	.ys-nav { display: none; }
	.ys-hdr .ys-order-btn { margin-inline-start: auto; }
	.ys-hero__in { grid-template-columns: 1fr; gap: 26px; }
	.ys-collage { height: 280px; }
	.ys-bar { flex-direction: column; align-items: stretch; gap: 10px; }
	.ys-search { flex: none; }
	.ys-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
	.ys-card__in { padding: 12px; }
	.ys-card p { display: none; }
	.ys-card__foot { flex-wrap: wrap; gap: 8px; }
	.ys-step button { width: 30px; }
	.ys-snap { grid-auto-columns: 78%; }
	.ys-vcard { grid-template-columns: 1fr; }
	.ys-vcard__in { padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
