/*
Theme Name: Frishkeit FSE
Theme URI: https://frishkeit.com
Author: Frishkeit.com
Description: A Full Site Editing block theme for Frishkeit.com, featuring flexible deal cards and a local-business directory.
Version: 2.0.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: frishkeit
*/

:root {
  --fr-navy: #00183b;
  --fr-navy-2: #062654;
  --fr-teal: #08c8c3;
  --fr-teal-dark: #00a7a4;
  --fr-mint: #e7fbfa;
  --fr-sky: #f4f9fc;
  --fr-ink: #10213a;
  --fr-muted: #607089;
  --fr-line: #dce6ee;
  --fr-radius: 24px;
  --fr-shadow: 0 18px 50px rgba(0, 24, 59, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
a { text-underline-offset: 3px; }
.wp-site-blocks { overflow: clip; }
/* Keep the page content flush with the header and footer. */
.wp-site-blocks > main,
.wp-site-blocks > footer { margin-block-start: 0; }
.wp-block-site-logo img { width: min(330px, 48vw); max-height: 58px; object-fit: contain; }
.frishkeit-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(0,24,59,.08); }
.admin-bar .frishkeit-header { top: 32px; }
.frishkeit-header .wp-block-navigation-item__content { font-size: .86rem; font-weight: 800; text-decoration: none; }
.frishkeit-header .wp-block-navigation-item__content:hover { color: var(--fr-teal-dark); }

.frishkeit-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 610px;
  display: grid;
  align-items: center;
  background: linear-gradient(122deg, var(--fr-navy) 0%, var(--fr-navy-2) 53%, #007c83 100%);
}
.frishkeit-hero::before,
.frishkeit-hero::after { content: ""; position: absolute; z-index: -1; border: 2px solid rgba(8,200,195,.28); border-radius: 50%; pointer-events: none; }
.frishkeit-hero::before { width: 560px; height: 560px; top: -250px; right: -90px; }
.frishkeit-hero::after { width: 310px; height: 310px; bottom: -200px; left: 7%; }
.frishkeit-hero-title { max-width: 900px; margin-top: 0 !important; font-size: clamp(3.1rem, 7.7vw, 7rem) !important; line-height: .88 !important; letter-spacing: -.065em; text-transform: uppercase; }
.frishkeit-hero .wp-block-button__link { min-height: 54px; display: inline-flex; align-items: center; padding-inline: 26px; font-weight: 900; transition: transform .2s ease, box-shadow .2s ease; }
.frishkeit-hero .wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(8,200,195,.22); }
.frishkeit-eyebrow { margin-bottom: 14px !important; color: var(--fr-teal); font-size: .78rem !important; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }

.frishkeit-section { padding-block: clamp(62px, 7vw, 88px); }
.frishkeit-section-heading { margin-bottom: 34px; }
.frishkeit-section-heading h2 { letter-spacing: -.045em; line-height: 1; }

.frishkeit-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.frishkeit-category-card { position: relative; min-height: 230px; overflow: hidden; padding: 30px; border: 1px solid var(--fr-line); border-radius: var(--fr-radius); color: var(--fr-navy); background: #fff; box-shadow: 0 8px 28px rgba(0,24,59,.06); text-decoration: none; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.frishkeit-category-card:hover { transform: translateY(-5px); color: var(--fr-navy); border-color: var(--fr-teal); box-shadow: var(--fr-shadow); }
.frishkeit-category-card::after { content: "→"; position: absolute; right: 28px; top: 27px; color: var(--fr-teal-dark); font-size: 1.6rem; font-weight: 900; }
.frishkeit-category-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: var(--fr-mint); font-size: 1.6rem; }
.frishkeit-category-card h3 { margin: 34px 0 8px; font-size: 1.35rem; line-height: 1.15; }
.frishkeit-category-card p { margin: 0; color: var(--fr-muted); font-size: .95rem; }

.frishkeit-deal-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.frishkeit-deal-card { position: relative; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--fr-line); border-radius: var(--fr-radius); background: #fff; box-shadow: 0 8px 28px rgba(0,24,59,.06); transition: transform .2s ease, box-shadow .2s ease; }
.frishkeit-deal-card:hover { transform: translateY(-4px); box-shadow: var(--fr-shadow); }
.frishkeit-deal-image { position: relative; aspect-ratio: 4 / 3; overflow: hidden; display: block; padding: 52px 24px 24px; background: #fff; border-bottom: 1px solid var(--fr-line); }
.frishkeit-deal-image img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.frishkeit-deal-card:hover .frishkeit-deal-image img { transform: none; }
.frishkeit-placeholder { width: 100%; height: 100%; min-height: 220px; display: grid; place-items: center; color: var(--fr-teal-dark); background: linear-gradient(135deg,var(--fr-mint),#d9edf5); font-size: 3rem; font-weight: 900; }
.frishkeit-deal-tag { position: absolute; left: 16px; top: 16px; padding: 7px 11px; border-radius: 999px; color: var(--fr-navy); background: var(--fr-teal); font-size: .72rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.frishkeit-deal-body { display: flex; flex: 1; flex-direction: column; padding: 23px; }
.frishkeit-deal-body h3 { margin: 0 0 10px; color: var(--fr-navy); font-size: 1.25rem; line-height: 1.2; }
.frishkeit-deal-body h3 a { color: inherit; text-decoration: none; }
.frishkeit-deal-excerpt { margin: 0 0 20px; color: var(--fr-muted); font-size: .94rem; }
.frishkeit-price-row { display: flex; align-items: baseline; gap: 10px; margin-top: auto; }
.frishkeit-price { color: var(--fr-navy); font-size: 1.55rem; font-weight: 950; }
.frishkeit-old-price { color: #8995a7; font-size: .9rem; text-decoration: line-through; }
.frishkeit-deal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.frishkeit-code { padding: 7px 10px; border: 1px dashed var(--fr-teal-dark); border-radius: 9px; color: var(--fr-navy); background: var(--fr-mint); font-size: .78rem; font-weight: 900; }
.frishkeit-more { font-size: .88rem; font-weight: 900; text-decoration: none; }

.frishkeit-business-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.frishkeit-business-card { min-height: 160px; display: grid; place-items: center; padding: 24px; border: 1px solid rgba(0,24,59,.09); border-radius: 20px; background: #fff; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.frishkeit-business-card:hover { transform: translateY(-4px); box-shadow: var(--fr-shadow); }
.frishkeit-business-card img { max-width: 170px; max-height: 80px; object-fit: contain; }
.frishkeit-business-card strong { color: var(--fr-navy); text-align: center; }

.frishkeit-empty { grid-column: 1 / -1; padding: 44px; border: 2px dashed var(--fr-line); border-radius: var(--fr-radius); text-align: center; background: #fff; }
.frishkeit-empty h3 { margin-top: 0; }
.frishkeit-single-deal { display: grid; grid-template-columns: 1fr 1fr; gap: 55px; align-items: start; }
.frishkeit-single-deal .frishkeit-featured { overflow: hidden; border-radius: 28px; background: var(--fr-sky); }
.frishkeit-single-deal .frishkeit-featured img { width: 100%; height: auto; }
.frishkeit-single-price { margin: 18px 0; color: var(--fr-navy); font-size: 2.1rem; font-weight: 950; }
.frishkeit-single-price del { margin-left: 10px; color: var(--fr-muted); font-size: 1rem; font-weight: 500; }
.frishkeit-deal-box { margin-block: 24px; padding: 22px; border: 1px solid var(--fr-line); border-radius: 18px; background: var(--fr-sky); }
.frishkeit-deal-box p { margin: 0; }
.frishkeit-deal-box p + p { margin-top: 8px; }
.frishkeit-action { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 24px; border-radius: 14px; color: var(--fr-navy); background: var(--fr-teal); font-weight: 900; text-decoration: none; }
.frishkeit-action:hover { color: var(--fr-navy); background: #37dfda; }
.frishkeit-footer .wp-block-site-logo img { filter: brightness(0) invert(1); }

@media (max-width: 980px) {
  .frishkeit-deal-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .frishkeit-business-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 782px) { .admin-bar .frishkeit-header { top: 46px; } }
@media (max-width: 700px) {
  .wp-block-site-logo img { width: min(250px,66vw); max-height: 46px; }
  .frishkeit-hero { min-height: 570px; }
  .frishkeit-hero-title { font-size: clamp(3rem,16vw,5.4rem) !important; }
  .frishkeit-category-grid,
  .frishkeit-deal-grid,
  .frishkeit-single-deal { grid-template-columns: 1fr; }
  .frishkeit-business-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .frishkeit-business-card { min-height: 130px; padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Product purchase details and complete card descriptions. */
.frishkeit-card-buy { min-height: 40px; padding: 8px 16px; font-size: .88rem; }
.frishkeit-deal-footer { flex-wrap: wrap; }
.frishkeit-offer-note { margin: 16px 0 0; color: var(--fr-muted); font-size: .85rem; }
.frishkeit-purchase-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-block: 20px; }
.frishkeit-purchase-option { padding: 20px; border: 1px solid var(--fr-line); border-radius: 14px; }
.frishkeit-purchase-option h2 { margin: 0 0 10px; font-size: 1.2rem; }
.frishkeit-purchase-option p { margin: 8px 0; }
.frishkeit-purchase-option .frishkeit-option-price { font-size: 1.4rem; font-weight: 800; }
@media (max-width: 700px) { .frishkeit-purchase-options { grid-template-columns: 1fr; } }

/* Optional food-product notice. */
.frishkeit-kosher-notice { margin: 12px 0; padding: 12px 14px; background: #f5f4ef; border-radius: 8px; color: #454840; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.frishkeit-kosher-notice p { margin: 0; }
.frishkeit-kosher-notice p + p { margin-top: 6px; }

/* Advertising: warm surface, substantial frame, and patterned masthead. */
.frishkeit-deal-card.frishkeit-ad-card { border: 2px solid #bc9149; background: #fff8e9; box-shadow: 0 8px 28px rgba(93,65,20,.09); }
.frishkeit-ad-banner { display: flex; align-items: center; gap: 9px; padding: 12px 18px; color: #684619; background: #f7e8c9; font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid #d9bd87; }
.frishkeit-ad-symbol { font-size: 18px; line-height: 1; }
.frishkeit-ad-pattern { flex: 1; height: 10px; min-width: 16px; margin-left: 10px; background: repeating-linear-gradient(125deg,transparent 0 4px,#c3a16b 4px 5px,transparent 5px 9px); }
.frishkeit-ad-card .frishkeit-deal-image { margin: 14px 14px 0; padding: 20px; border: 0; border-radius: 12px; aspect-ratio: 4 / 3; }
.frishkeit-ad-card .frishkeit-deal-tag { display: none; }
.frishkeit-ad-card .frishkeit-deal-body { padding: 23px; }
.frishkeit-ad-card .frishkeit-action { background: #76501f; color: #fff; }
.frishkeit-ad-card .frishkeit-action:hover { background: #583912; color: #fff; }
.frishkeit-ad-card .frishkeit-more { color: #684619; }
.frishkeit-ad-card .frishkeit-code { border-color: #bc9149; background: #f7e8c9; }
.frishkeit-ad-identity { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; min-height: 310px; padding: 36px 24px 26px; color: var(--fr-navy); text-align: center; text-decoration: none; background: radial-gradient(ellipse at 50% 25%,#fffcf6,transparent 75%); }
.frishkeit-ad-logo { display: grid; place-items: center; width: 100%; }
.frishkeit-ad-logo img { display: block; max-width: 180px; width: auto; height: auto; max-height: 125px; object-fit: contain; }
.frishkeit-ad-identity h3 { margin: 0; max-width: 100%; font-size: 1.7rem; line-height: 1.15; overflow-wrap: anywhere; }
.frishkeit-ad-business .frishkeit-deal-body { padding-top: 4px; text-align: center; }
.frishkeit-ad-business .frishkeit-deal-footer { margin-top: auto; padding-top: 18px; }
.frishkeit-ad-cta { width: 100%; gap: 20px; }
.frishkeit-ad-card a:focus-visible { outline: 3px solid #76501f; outline-offset: 3px; }
.frishkeit-ad-card .frishkeit-deal-body h3 { overflow-wrap: anywhere; }
@media (max-width: 700px) { .frishkeit-ad-identity { min-height: 280px; } }

/* Keep the hero emphasis free of the browser's default mark background. */
.frishkeit-hero-title mark { background-color: transparent; }

/* Slider-inspired editorial rating; a read-only meter for visitors. */
.frishkeit-rating { margin: 18px 0 20px; }
.frishkeit-rating-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--fr-ink, #10213a); font-size: 12px; line-height: 1.5; }
.frishkeit-rating-heading > span { font-weight: 600; }
.frishkeit-rating-heading > strong { font-size: 12px; font-weight: 600; color: var(--fr-muted, #607089); }
.frishkeit-rating-track { height: 24px; padding: 0 12px; border-radius: 999px; background: #e8e8eb; box-shadow: inset 0 0 0 1px rgba(0,0,0,.035); }
.frishkeit-rating-rail { position: relative; display: block; height: 100%; }
.frishkeit-rating-fill { position: absolute; inset: 0 auto 0 -12px; width: calc(var(--rating-position) + 24px); border-radius: 999px; background: #3981f7; }
.frishkeit-rating-tick { position: absolute; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: rgba(16,33,58,.25); transform: translate(-50%,-50%); }
.frishkeit-rating-thumb { position: absolute; top: 50%; left: var(--rating-position); width: 28px; height: 28px; transform: translate(-50%,-50%); border: 1px solid #e0e2e6; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.frishkeit-rating.is-unrated .frishkeit-rating-fill { display: none; }

.frishkeit-deal-details > .frishkeit-rating { width: 100%; max-width: 360px; margin: 20px 0 28px; }

/* Content-driven deal layout: keep purchase choices ahead of long descriptions. */
.frishkeit-adaptive-page { padding-block: clamp(20px, 4vw, 48px); }
.frishkeit-adaptive-deal { display:grid; grid-template-columns:minmax(220px,.85fr) minmax(0,1.3fr); grid-template-areas:"photo heading" "photo purchase" "photo description"; gap:20px 36px; align-items:start; }
.frishkeit-adaptive-deal > * { min-width:0; margin:0 !important; }
.frishkeit-deal-heading { grid-area:heading; }
.frishkeit-deal-heading h1 { margin:8px 0 0; line-height:1.15; overflow-wrap:anywhere; }
.frishkeit-deal-heading .frishkeit-eyebrow { margin:0; }
.frishkeit-deal-purchase { grid-area:purchase; }
.frishkeit-deal-photo { grid-area:photo; background:#fff; border:1px solid var(--fr-line); border-radius:24px; padding:24px; }
.frishkeit-deal-photo figure { margin:0; }
.frishkeit-deal-photo img { display:block; width:100%; height:auto; max-height: min(440px,55svh); object-fit:contain !important; }
.frishkeit-deal-description { grid-area:description; overflow-wrap:anywhere; }
.frishkeit-deal-description > :first-child { margin-top:0; }
.frishkeit-adaptive-deal .frishkeit-purchase-options { grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:12px; margin:0; }
.frishkeit-adaptive-deal .frishkeit-purchase-option { padding:16px; min-width:0; }
.frishkeit-adaptive-deal .frishkeit-retailer-offers { display:grid !important; grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr)); gap:12px !important; }
.frishkeit-adaptive-deal .frishkeit-action { max-width:100%; white-space:normal; overflow-wrap:anywhere; text-align:center; min-height:44px; }
.frishkeit-adaptive-deal .frishkeit-single-price { margin:0 0 12px; }
.frishkeit-adaptive-deal .frishkeit-offer-note { font-size:.85rem; margin:12px 0 0; }
.frishkeit-deal-image { cursor:pointer; }
.frishkeit-deal-image:focus-visible { outline:3px solid var(--fr-teal-dark); outline-offset:-4px; }
.frishkeit-buy-dock { position:fixed; z-index:99; bottom:0; left:0; right:0; padding:10px max(16px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)); background:#fff; border-top:1px solid var(--fr-line); box-shadow:0 -4px 20px #00183b14; }
.frishkeit-buy-dock[hidden] { display:none; }
.frishkeit-buy-dock > a, .frishkeit-buy-dock > details { display:block; max-width:620px; margin:auto; }
.frishkeit-buy-dock > a { display:flex; justify-content:center; }
.frishkeit-buy-dock summary { cursor:pointer; padding:12px 20px; background:var(--fr-navy); color:white; border-radius:12px; font-weight:700; text-align:center; }
.frishkeit-buy-dock nav { display:grid; gap:8px; max-height:55svh; overflow-y:auto; padding:12px 0; }
.frishkeit-buy-dock nav a { display:flex; justify-content:center; text-align:center; white-space:normal; }
body:has(.frishkeit-buy-dock) { padding-bottom:90px; }
@media(max-width:700px) {
 .frishkeit-adaptive-deal { grid-template-columns:minmax(0,1fr); grid-template-areas:"heading" "purchase" "photo" "description"; gap:20px; }
 .frishkeit-deal-photo img { max-height:260px; }
 .frishkeit-deal-heading h1 { font-size:clamp(1.65rem,7vw,2.3rem); }
}

/* Let description lines use the full content width below the product photo. */
@media (min-width:701px) {
 .frishkeit-adaptive-deal { display:flow-root; }
 .frishkeit-adaptive-deal > .frishkeit-deal-photo { float:left; box-sizing:border-box; width:calc((100% - 36px) * .85 / 2.15); margin:0 36px 12px 0 !important; }
 .frishkeit-adaptive-deal > .frishkeit-deal-heading,
 .frishkeit-adaptive-deal > .frishkeit-deal-purchase { margin-left:calc((100% - 36px) * .85 / 2.15 + 36px) !important; margin-bottom:20px !important; }
 .frishkeit-adaptive-deal > .frishkeit-deal-description { display:block; overflow:visible; clear:none; }
}
/* Keep header category dropdowns inside the page and show complete labels. */
.frishkeit-header .wp-block-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container {
  left: auto;
  right: 0;
  min-width: min(280px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  background: #fff;
}
.frishkeit-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  white-space: normal;
  overflow-wrap: anywhere;
}
/* Compact catalog cards with readable product-link buttons. */
.frishkeit-deal-card:not(.frishkeit-ad-card) > .frishkeit-deal-image { aspect-ratio:auto; height:210px; box-sizing:border-box; flex-shrink:0; padding:48px 18px 14px; }
.frishkeit-deal-card > p:empty { display:none; }
.frishkeit-deal-card:not(.frishkeit-ad-card) .frishkeit-deal-body { padding:16px 18px; }
.frishkeit-deal-card:not(.frishkeit-ad-card) .frishkeit-deal-body h3 { margin-bottom:8px; font-size:1.125rem; line-height:1.25; }
.frishkeit-deal-card .frishkeit-deal-excerpt { margin-bottom:10px; line-height:1.45; }
.frishkeit-deal-card .frishkeit-deal-footer { margin-top:10px; gap:8px; }
.frishkeit-deal-card .frishkeit-price { font-size:1.3rem; }
.frishkeit-deal-card .frishkeit-card-products { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:2px 0 8px !important; }
.frishkeit-deal-card .frishkeit-card-products li { display:flex; flex-direction:column; gap:4px; padding:0 !important; border:0 !important; min-width:0; }
.frishkeit-deal-card .frishkeit-card-products a { display:flex; align-items:center; justify-content:center; flex:1; box-sizing:border-box; min-height:36px; padding:6px 8px; border:1px solid #b5d4d2; border-radius:8px; background:#edf7f5; color:#002b3b; font-size:13px; font-weight:600; line-height:1.3; text-align:center; text-decoration:none; overflow-wrap:anywhere; }
.frishkeit-deal-card .frishkeit-card-products a:hover { background:#d7efea; border-color:#427e77; }
.frishkeit-deal-card .frishkeit-card-products a:focus-visible { outline:3px solid var(--fr-teal-dark); outline-offset:2px; }
.frishkeit-deal-card .frishkeit-card-products strong { font-size:13px; line-height:1.3; text-align:center; }
.frishkeit-deal-card .frishkeit-card-buy { min-height:36px; padding:6px 12px; font-size:13px; }
.frishkeit-deal-image .frishkeit-paired-products { min-height:0; }
.frishkeit-deal-image .frishkeit-paired-products img.frishkeit-pair-photo { max-height:140px !important; }
@media(max-width:480px) { .frishkeit-deal-card:not(.frishkeit-ad-card) > .frishkeit-deal-image { height:190px; } }
