/*
Theme Name: Sami Flowers
Theme URI: https://samiflowers.co.il/
Author: PunchVPS
Description: ערכת עיצוב לאתר פרחי סמי. כל הטקסטים והתמונות ניתנים לעריכה מתוך עורך הבלוקים.
Version: 2.0.6
Requires at least: 6.5
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: sami-flowers
*/

:root {
	--gut: clamp(1rem, 4vw, 2.5rem);
	--wrap: 1200px;
	--r-lg: 28px;
	--r-md: 18px;
	--r-sm: 12px;
	--hero-text: #cfe6d7;
	--ico-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
	--ico-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
	--insta-grad: linear-gradient(45deg, #feda75 0%, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5 100%);
	--ico-insta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.5' cy='6.5' r='0.6' fill='black'/%3E%3C/svg%3E");
	--ico-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.5-7-12a7 7 0 0 1 14 0c0 5.5-7 12-7 12z'/%3E%3Ccircle cx='12' cy='9' r='2.5'/%3E%3C/svg%3E");
}

/* ---------- base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
:where(a, button, input, summary):focus-visible { outline: 2px solid var(--wp--preset--color--green); outline-offset: 3px; }
img { height: auto; }
.wp-site-blocks { padding-top: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
[id] { scroll-margin-top: 96px; }

/* ---------- header ---------- */
.sf-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
/* blur sits on its own layer: on the header itself it would trap the fixed mobile menu inside the header */
.sf-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(255, 255, 255, 0.94);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	backdrop-filter: saturate(1.4) blur(10px);
}
.admin-bar .sf-header { top: 32px; }
.sf-header-in {
	width: min(var(--wrap), calc(100% - 2 * var(--gut)));
	margin-inline: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding-block: 0.75rem;
}
.sf-header-in > * { margin: 0 !important; }
.sf-logo img { display: block; width: 190px; height: auto; }
.sf-nav { gap: 2rem; font-size: 1rem; font-weight: 500; }
.sf-nav .wp-block-navigation-item__content { color: var(--wp--preset--color--ink); padding-block: 0.35rem; }
.sf-nav .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--green); }
.sf-nav .wp-block-navigation__responsive-container-open svg { width: 30px; height: 30px; fill: var(--wp--preset--color--deep); }
.sf-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem var(--gut); }
.sf-nav .is-menu-open .wp-block-navigation__container { gap: 1.25rem; font-size: 1.35rem; }
.sf-header-call .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.6rem 1.25rem;
	font-size: 1rem;
	direction: ltr;
}
.sf-header-call .wp-block-button:not(.sf-ig) .wp-block-button__link::after,
.sf-btn-light .wp-block-button__link::after {
	content: "";
	width: 17px;
	height: 17px;
	background: currentColor;
	-webkit-mask: var(--ico-phone) center / contain no-repeat;
	mask: var(--ico-phone) center / contain no-repeat;
}

/* ---------- page frame ---------- */
.sf-home { padding-top: clamp(1rem, 2.5vw, 1.75rem); }
.sf-home > * {
	width: min(var(--wrap), calc(100% - 2 * var(--gut)));
	margin-inline: auto !important;
}
.sf-home > * + * { margin-block-start: clamp(4.5rem, 9vw, 7.5rem) !important; }
.sf-home h2 { margin: 0 0 1.75rem; }
.sf-page { padding: clamp(2.5rem, 6vw, 4.5rem) var(--gut); }

/* ---------- hero ---------- */
.sf-hero {
	background: var(--wp--preset--color--deep);
	color: #fff;
	border-radius: var(--r-lg);
	padding: clamp(1.75rem, 4.5vw, 4rem);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	gap: clamp(2rem, 4vw, 4rem);
	align-items: center;
	overflow: hidden;
}
.sf-hero > * { margin: 0 !important; }
.sf-hero-text > * { margin-block: 0; }
.sf-hero h1 { color: #fff; font-size: clamp(2.4rem, 4.6vw, 3.9rem); line-height: 1.08; }
.sf-lead { margin-top: 1.4rem !important; max-width: 30ch; font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.6; color: var(--hero-text); }
.sf-hero-btns { gap: 0.75rem; margin-top: 2rem !important; }
.sf-btn-light .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	background: #fff;
	color: var(--wp--preset--color--deep);
}
.sf-btn-light .wp-block-button__link:hover { background: var(--wp--preset--color--mint); color: var(--wp--preset--color--deep); }
.sf-btn-ghost .wp-block-button__link { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45); }
.sf-btn-ghost .wp-block-button__link:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.sf-hero-info {
	list-style: none;
	padding: 0;
	margin-top: 2.25rem !important;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1.75rem;
	font-size: 0.98rem;
	color: var(--hero-text);
}
.sf-hero-info li { display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.sf-hero-info li::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background: #7fd0a1;
	-webkit-mask: var(--ico-clock) center / contain no-repeat;
	mask: var(--ico-clock) center / contain no-repeat;
}
.sf-hero-info li:nth-child(2)::before { -webkit-mask-image: var(--ico-pin); mask-image: var(--ico-pin); }
.sf-hero-photos {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 14px;
	height: clamp(360px, 38vw, 520px);
}
.sf-hero-photos .wp-block-image { margin: 0 !important; height: 100%; border-radius: var(--r-md); overflow: hidden; }
.sf-hero-photos .wp-block-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sf-hero-photos .sf-ph-main { grid-row: 1 / 3; }

/* ---------- what we sell ---------- */
.sf-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 2.5vw, 2.25rem) clamp(1rem, 2vw, 1.75rem); }
.sf-cards > * { margin: 0 !important; }
.sf-card > * { margin: 0; }
.sf-card .wp-block-image { aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; }
.sf-card .wp-block-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.sf-card:hover .wp-block-image img { transform: scale(1.04); }
.sf-card h3 { margin-top: 1rem !important; font-size: 1.2rem; color: var(--wp--preset--color--deep); }
.sf-card p { margin-top: 0.3rem !important; font-size: 1rem; line-height: 1.55; color: var(--wp--preset--color--muted); }
.sf-note { margin-top: 2rem !important; color: var(--wp--preset--color--muted); }

/* ---------- bouquets: equal tiles, the rest open with "עוד זרים" ---------- */
.sf-bouquets.wp-block-gallery { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sf-bouquets.wp-block-gallery > .wp-block-image {
	width: 100% !important;
	margin: 0 !important;
	aspect-ratio: 3 / 4;
	border-radius: var(--r-md);
	overflow: hidden;
}
.sf-bouquets.wp-block-gallery > .wp-block-image > .wp-lightbox-container { height: 100%; }
.sf-bouquets.wp-block-gallery > .wp-block-image img { display: block; width: 100% !important; height: 100% !important; object-fit: cover; }
.sf-more-bouquets { margin-top: 12px; }
.sf-more-bouquets > summary {
	display: inline-flex;
	margin-top: 1.25rem;
	padding: 0.7rem 1.4rem;
	border-radius: 999px;
	background: #fff;
	box-shadow: inset 0 0 0 1.5px var(--wp--preset--color--mint-deep);
	color: var(--wp--preset--color--deep);
	font-weight: 600;
	list-style: none;
	cursor: pointer;
}
.sf-more-bouquets > summary::-webkit-details-marker { display: none; }
.sf-more-bouquets > summary:hover { color: var(--wp--preset--color--green); }
.sf-more-bouquets[open] > summary { display: none; }

/* ---------- wholesale ---------- */
.sf-wholesale {
	background: var(--wp--preset--color--mint);
	border-radius: var(--r-lg);
	padding: clamp(1.75rem, 4.5vw, 3.5rem);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	gap: clamp(2rem, 4vw, 4rem);
	align-items: center;
}
.sf-wholesale > * { margin: 0 !important; }
.sf-wholesale-text > * { margin-block: 0; }
.sf-wholesale-text h2 { margin-bottom: 1rem; }
.sf-wholesale-text p { font-size: 1.1rem; max-width: 40ch; }
.sf-tags { list-style: none; padding: 0; margin: 1.6rem 0 2rem !important; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sf-tags li {
	margin: 0;
	padding: 0.45rem 0.95rem;
	background: #fff;
	border: 1px solid var(--wp--preset--color--mint-deep);
	border-radius: 999px;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--wp--preset--color--deep);
}
.sf-wholesale-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sf-wholesale-photos .wp-block-image { margin: 0 !important; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; }
.sf-wholesale-photos .wp-block-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sf-wholesale-photos .sf-ph-wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; }

/* ---------- about ---------- */
.sf-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.sf-about > * { margin: 0 !important; }
.sf-about-photo { aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; }
.sf-about-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sf-about-text > * { margin-block: 0; }
.sf-about-text p { margin-top: 1rem; max-width: 52ch; font-size: 1.1rem; line-height: 1.8; }

/* ---------- gallery ---------- */
.sf-gallery.wp-block-gallery { display: block !important; columns: 4 220px; column-gap: 12px; }
.sf-gallery.wp-block-gallery > .wp-block-image {
	display: block;
	width: 100% !important;
	margin: 0 0 12px !important;
	break-inside: avoid;
	border-radius: var(--r-sm);
	overflow: hidden;
}
.sf-gallery.wp-block-gallery > .wp-block-image img { display: block; width: 100%; height: auto !important; }
.sf-insta-btns { margin-top: 1.75rem; }

/* ---------- instagram links: brand gradient, white glyph ---------- */
.sf-btn-insta .wp-block-button__link,
.sf-ig .wp-block-button__link { background: var(--insta-grad); color: #fff; }
.sf-btn-insta .wp-block-button__link:hover,
.sf-ig .wp-block-button__link:hover { color: #fff; filter: saturate(1.15) brightness(1.05); }
.sf-btn-insta .wp-block-button__link,
.sf-foot-insta a { display: inline-flex; align-items: center; gap: 0.55rem; }
.sf-header-call { align-items: center; gap: 0.6rem; }
.sf-ig .wp-block-button__link {
	width: 42px;
	height: 42px;
	padding: 0 !important;
	justify-content: center;
	gap: 0;
	border-radius: 50%;
	font-size: 0 !important;
}
.sf-btn-insta .wp-block-button__link::after,
.sf-ig .wp-block-button__link::after,
.sf-foot-insta a::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: var(--ico-insta) center / contain no-repeat;
	mask: var(--ico-insta) center / contain no-repeat;
}
.sf-ig .wp-block-button__link::after { width: 22px; height: 22px; }

/* ---------- visit ---------- */
.sf-visit { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(1rem, 2vw, 1.5rem); align-items: stretch; }
.sf-visit > * { margin: 0 !important; }
.sf-visit-card { background: var(--wp--preset--color--mint); border-radius: var(--r-lg); padding: clamp(1.5rem, 3.5vw, 2.75rem); }
.sf-visit-card > * { margin-block: 0; }
.sf-visit-card h2 { margin-bottom: 1.5rem; }
.sf-visit-card p { margin-bottom: 1.1rem; line-height: 1.6; }
.sf-visit-card a { font-weight: 500; text-decoration: none; }
.sf-visit-card a:hover { text-decoration: underline; }
.sf-visit-card strong { font-size: 0.92rem; font-weight: 600; color: var(--wp--preset--color--green); }
.sf-visit-card .wp-block-buttons { margin-top: 1.75rem; gap: 0.6rem; }
.sf-btn-soft .wp-block-button__link { background: #fff; color: var(--wp--preset--color--deep); box-shadow: inset 0 0 0 1.5px var(--wp--preset--color--mint-deep); }
.sf-btn-soft .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--green); }
.sf-map { min-height: 420px; border-radius: var(--r-lg); overflow: hidden; background: var(--wp--preset--color--mint); }
.sf-map iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; }

/* ---------- footer ---------- */
.sf-footer {
	width: min(var(--wrap), calc(100% - 2 * var(--gut)));
	margin: clamp(4.5rem, 9vw, 7.5rem) auto 1.25rem;
	padding: clamp(1.75rem, 4vw, 3rem);
	background: var(--wp--preset--color--deep);
	border-radius: var(--r-lg);
	color: var(--hero-text);
	font-size: 0.98rem;
}
.sf-footer > *, .sf-footer-in > * { margin: 0 !important; }
.sf-footer-in { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
.sf-footer p { margin: 0; line-height: 1.65; }
.sf-foot-logo img { display: block; width: 170px; height: auto; }
.sf-foot-brand p { margin-top: 0.9rem; }
.sf-foot-head { margin-bottom: 0.35rem !important; font-weight: 600; color: #fff; }
.sf-footer a { color: #fff; text-decoration: none; }
.sf-footer a:hover { text-decoration: underline; }
.sf-copy { margin-top: 2.25rem !important; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.85rem; color: #9cc3ab; }

/* mobile call button: hidden on desktop */
.wp-block-group.sf-callbar { display: none !important; }

/* six menu links do not fit in one row below 1100px: use the menu button there too (core switches only below 600px) */
@media (min-width: 600px) and (max-width: 1100px) {
	.sf-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.sf-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
/* below 1100px the menu is a button: keep it next to the instagram and phone buttons */
@media (max-width: 1100px) {
	.sf-header-in > .sf-nav { margin-inline-start: auto !important; }
}

/* ---------- tablet ---------- */
@media (max-width: 1000px) {
	.sf-hero { grid-template-columns: 1fr; }
	.sf-hero-photos { height: clamp(300px, 62vw, 520px); }
	.sf-wholesale, .sf-about, .sf-visit { grid-template-columns: 1fr; }
	.sf-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sf-footer-in { grid-template-columns: 1fr 1fr; }
	.sf-nav { gap: 1.25rem; }
}

/* ---------- phone ---------- */
@media (max-width: 781px) {
	.admin-bar .sf-header { top: 46px; }
	.sf-header-call .wp-block-button:not(.sf-ig) { display: none !important; }
	.sf-logo img { width: 150px; }
	.sf-hero { border-radius: var(--r-md); }
	.sf-hero-photos { gap: 10px; }
	.sf-gallery.wp-block-gallery { columns: 2; column-gap: 10px; }
	.sf-bouquets.wp-block-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.sf-more-bouquets { margin-top: 10px; }
	.sf-gallery.wp-block-gallery > .wp-block-image { margin-bottom: 10px !important; }
	.sf-footer-in { grid-template-columns: 1fr; gap: 1.25rem; }
	.wp-block-group.sf-callbar {
		display: block !important;
		position: fixed;
		inset-inline: 12px;
		bottom: 12px;
		z-index: 60;
		margin: 0;
	}
	.sf-callbar p { margin: 0; }
	.sf-callbar a {
		display: flex;
		justify-content: center;
		align-items: center;
		padding: 0.95rem 1rem;
		background: var(--wp--preset--color--green);
		border-radius: 999px;
		box-shadow: 0 8px 24px rgba(12, 74, 45, 0.28);
		color: #fff;
		font-weight: 600;
		text-decoration: none;
	}
	body { padding-bottom: 84px; }
}
@media (max-width: 600px) {
	.admin-bar .sf-header { top: 0; }
}
@media (max-width: 520px) {
	.sf-cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.sf-card .wp-block-image img { transition: none; }
}
