/* Fresh Market — web part. Light, fresh grocery look in the store's brand.
   Brand colors and fonts come from the platform (--brand-*); everything else
   is neutral. Classes are prefixed fm- so platform pages keep their styles. */

.fm {
  --fm-p: var(--brand-primary, #16a34a);
  --fm-p-rgb: var(--brand-primary-rgb, 22 163 74);
  --fm-s: var(--brand-secondary, #f59e0b);
  --fm-s-rgb: var(--brand-secondary-rgb, 245 158 11);
  --fm-ink: #17221a;
  --fm-text: #354239;
  --fm-muted: #6c7a70;
  --fm-line: #e6ece6;
  --fm-bg: #ffffff;
  --fm-soft: #f4f8f3;
  --fm-deal: #e0412f;
  --fm-radius: 22px;
  --fm-radius-sm: 14px;
  --fm-shadow: 0 10px 30px -12px rgba(23, 34, 26, .18);
  --fm-head: var(--brand-font-heading, system-ui, sans-serif);
  --fm-body: var(--brand-font-body, system-ui, sans-serif);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fm-bg);
  color: var(--fm-text);
  font-family: var(--fm-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
:where(.fm) *, :where(.fm) *::before, :where(.fm) *::after { box-sizing: border-box; }
:where(.fm) img { max-width: 100%; display: block; }
:where(.fm) a { color: inherit; text-decoration: none; }
:where(.fm) button, :where(.fm) input, :where(.fm) select { font: inherit; color: inherit; }

/* Pastel tones (fixed set; the same for every brand) */
.fm-tone-0 { background: #eaf6ec; }
.fm-tone-1 { background: #fff3e2; }
.fm-tone-2 { background: #e8f2fd; }
.fm-tone-3 { background: #fdeef2; }
.fm-tone-4 { background: #f1ecfb; }
.fm-tone-5 { background: #fdf8e1; }

.fm-wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .fm-wrap { padding-inline: 28px; } }

.fm-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fm-skip { position: absolute; inset-inline-start: 12px; top: -48px; z-index: 100; background: var(--fm-ink); color: #fff; padding: 8px 14px; border-radius: 10px; }
.fm-skip:focus { top: 12px; }
.fm-ico { flex: 0 0 auto; }
.fm-muted { color: var(--fm-muted); margin: 0; }
.fm-link { color: var(--fm-p); font-weight: 600; }
.fm-link:hover { text-decoration: underline; }
.fm :focus-visible { outline: 3px solid rgb(var(--fm-p-rgb) / .45); outline-offset: 2px; border-radius: 8px; }

.fm-h1, .fm-h2, .fm-h3, .fm-slide-title { font-family: var(--fm-head); color: var(--fm-ink); letter-spacing: -.02em; margin: 0; }
.fm-h1 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.12; font-weight: 800; }
.fm-h2 { font-size: clamp(21px, 2.4vw, 28px); line-height: 1.18; font-weight: 800; }
.fm-h3 { font-size: 18px; font-weight: 700; }
.fm-kicker { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fm-p); margin-bottom: 4px; }

/* Buttons */
.fm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding-inline: 22px; border: 0; border-radius: 999px; background: var(--fm-p); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; white-space: nowrap; }
.fm-btn:hover { box-shadow: 0 10px 22px -10px rgb(var(--fm-p-rgb) / .9); transform: translateY(-1px); }
.fm-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.fm-btn-light { background: #fff; color: var(--fm-ink); }
.fm-btn-small { height: 36px; padding-inline: 16px; font-size: 13px; }
.fm-btn-lg { height: 54px; font-size: 16px; padding-inline: 28px; }
.fm-btn-block { width: 100%; }
.fm-btn.is-added, .fm-add.is-added { background: var(--fm-ink); }

/* Announcement + header */
.fm-announce { background: var(--fm-ink); color: #e9f2ea; font-size: 13px; }
.fm-announce .fm-wrap { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; text-align: center; }
.fm-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--fm-line); }
.fm-header-row { display: flex; align-items: center; gap: 12px; min-height: 68px; flex-wrap: wrap; padding-block: 10px; }
.fm-logo { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.fm-logo img { height: 42px; width: auto; max-width: 170px; object-fit: contain; }
.fm-logo-mark { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--fm-p); color: #fff; font-family: var(--fm-head); font-weight: 800; font-size: 20px; }
.fm-logo-text { font-family: var(--fm-head); font-weight: 800; font-size: 20px; color: var(--fm-ink); }
.fm-search { order: 3; flex: 1 1 100%; position: relative; display: flex; align-items: center; height: 46px; border-radius: 999px; background: var(--fm-soft); border: 1px solid var(--fm-line); padding-inline: 16px 5px; gap: 8px; color: var(--fm-muted); }
.fm-search:focus-within { border-color: rgb(var(--fm-p-rgb) / .6); background: #fff; box-shadow: 0 0 0 4px rgb(var(--fm-p-rgb) / .12); }
.fm-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; height: 100%; color: var(--fm-ink); }
.fm-search button { height: 36px; padding-inline: 16px; border: 0; border-radius: 999px; background: var(--fm-p); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.fm-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.fm-action { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding-inline: 10px; border-radius: 999px; color: var(--fm-ink); font-weight: 600; font-size: 14px; }
.fm-action:hover { background: var(--fm-soft); }
.fm-action-label { display: none; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-cart { background: rgb(var(--fm-p-rgb) / .1); color: var(--fm-p); }
.fm-cart:hover { background: rgb(var(--fm-p-rgb) / .16); }
.fm-cart-count { position: absolute; top: 2px; inset-inline-start: 26px; min-width: 19px; height: 19px; padding-inline: 5px; border-radius: 999px; background: var(--fm-s); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
.fm-cart-count[data-cart-count="0"] { display: none; }
@media (min-width: 900px) {
  .fm-header-row { flex-wrap: nowrap; }
  .fm-search { order: 0; flex: 1 1 auto; max-width: 560px; margin-inline: 12px; }
  .fm-action-label { display: inline; }
  .fm-cart .fm-action-label { order: 1; }
  .fm-cart-count { position: static; order: 2; border: 0; }
}

/* Popovers (details/summary — no JavaScript) */
.fm details > summary { list-style: none; cursor: pointer; }
.fm details > summary::-webkit-details-marker { display: none; }
.fm-pop { position: relative; }
.fm-pop > summary { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding-inline: 10px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--fm-ink); }
.fm-pop > summary:hover { background: var(--fm-soft); }
.fm-pop-panel { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); min-width: 180px; padding: 6px; background: #fff; border: 1px solid var(--fm-line); border-radius: 16px; box-shadow: var(--fm-shadow); z-index: 50; }
.fm-pop-panel a { display: block; padding: 9px 12px; border-radius: 10px; font-size: 14px; }
.fm-pop-panel a:hover, .fm-pop-panel a.is-active { background: var(--fm-soft); color: var(--fm-p); font-weight: 700; }
.fm-burger > summary { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--fm-ink); }
.fm-burger > summary:hover { background: var(--fm-soft); }
.fm-drawer { position: absolute; inset-inline: 12px; top: calc(100% - 4px); max-height: 70vh; overflow-y: auto; padding: 10px; background: #fff; border: 1px solid var(--fm-line); border-radius: 20px; box-shadow: var(--fm-shadow); z-index: 60; display: grid; gap: 2px; }
.fm-drawer-link { padding: 11px 14px; border-radius: 12px; font-weight: 600; color: var(--fm-ink); }
.fm-drawer-link:hover { background: var(--fm-soft); color: var(--fm-p); }
.fm-drawer-strong { color: var(--fm-p); }
@media (min-width: 900px) { .fm-burger { display: none; } }

.fm-catbar { border-top: 1px solid var(--fm-line); }
.fm-catbar-row { display: flex; gap: 8px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; }
.fm-catbar-row::-webkit-scrollbar { display: none; }
.fm-chip { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; height: 36px; padding-inline: 14px; border-radius: 999px; background: var(--fm-soft); border: 1px solid transparent; color: var(--fm-ink); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s; }
.fm-chip:hover { border-color: rgb(var(--fm-p-rgb) / .35); background: #fff; }
.fm-chip.is-active { background: var(--fm-p); color: #fff; }
.fm-chip-deal { background: #fff0ec; color: var(--fm-deal); }
.fm-chip-plain { background: transparent; }

.fm-main { flex: 1 0 auto; padding-bottom: 88px; }
@media (min-width: 900px) { .fm-main { padding-bottom: 24px; } }

/* Hero slider: horizontal scroll-snap, dots are anchors */
.fm-hero { padding-block: 18px 6px; }
.fm-slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; gap: 14px; border-radius: var(--fm-radius); scrollbar-width: none; }
.fm-slider::-webkit-scrollbar { display: none; }
.fm-slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; min-height: 300px; border-radius: var(--fm-radius); overflow: hidden; background: var(--fm-p); color: #fff; display: flex; align-items: flex-end; scroll-margin-top: 200px; }
.fm-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fm-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 25, 14, .78) 0%, rgba(10, 25, 14, .35) 55%, rgba(10, 25, 14, 0) 100%); }
[dir="rtl"] .fm-slide::after { background: linear-gradient(270deg, rgba(10, 25, 14, .78) 0%, rgba(10, 25, 14, .35) 55%, rgba(10, 25, 14, 0) 100%); }
.fm-slide-text { position: relative; z-index: 1; padding: 28px 24px; max-width: 600px; display: grid; gap: 10px; justify-items: start; }
.fm-slide-text p, .fm-hero-plain p { margin: 0; font-size: 16px; color: rgba(255, 255, 255, .88); }
.fm-slide-kicker { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--fm-s); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.fm-slide-title { color: #fff; font-size: clamp(28px, 4vw, 46px); line-height: 1.05; font-weight: 800; }
.fm-dots { display: flex; justify-content: center; gap: 8px; padding-top: 12px; }
.fm-dots a { width: 9px; height: 9px; border-radius: 999px; background: rgb(var(--fm-p-rgb) / .25); }
.fm-dots a:hover, .fm-dots a:focus { background: var(--fm-p); width: 24px; }
.fm-hero-plain { border-radius: var(--fm-radius); padding: 48px 28px; color: #fff; display: grid; gap: 12px; justify-items: start; background: radial-gradient(120% 140% at 100% 0%, rgb(var(--fm-s-rgb) / .55) 0%, transparent 55%), linear-gradient(135deg, var(--fm-p), rgb(var(--fm-p-rgb) / .8)); }
@media (min-width: 768px) {
  .fm-slide { min-height: 420px; }
  .fm-slide-text { padding: 48px 56px; }
  .fm-hero-plain { padding: 72px 56px; }
}

/* Perks */
.fm-perks { padding-block: 14px; }
.fm-perks-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fm-perk { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--fm-radius-sm); background: var(--fm-soft); color: var(--fm-p); }
.fm-perk div { display: grid; line-height: 1.3; }
.fm-perk b { color: var(--fm-ink); font-size: 14px; }
.fm-perk span { color: var(--fm-muted); font-size: 12.5px; }
@media (min-width: 900px) { .fm-perks-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Sections */
.fm-section { padding-block: 22px; }
.fm-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.fm-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--fm-p); white-space: nowrap; }
.fm-more:hover { gap: 10px; }

/* Category tiles */
.fm-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fm-tile { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 14px 8px 12px; border-radius: var(--fm-radius); transition: transform .15s, box-shadow .15s; }
.fm-tile:hover { transform: translateY(-3px); box-shadow: var(--fm-shadow); }
.fm-tile-img { width: 76px; height: 76px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .7); display: block; }
.fm-tile-img img { width: 100%; height: 100%; object-fit: cover; }
.fm-tile b { color: var(--fm-ink); font-size: 14px; line-height: 1.25; margin-top: 6px; }
.fm-tile small { color: var(--fm-muted); font-size: 12px; }
@media (min-width: 640px) { .fm-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .fm-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } .fm-tile-img { width: 92px; height: 92px; } }

/* Product grid + card */
.fm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .fm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .fm-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .fm-grid-shop { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fm-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--fm-line); border-radius: var(--fm-radius); overflow: hidden; transition: box-shadow .18s, transform .18s, border-color .18s; }
.fm-card:hover { box-shadow: var(--fm-shadow); transform: translateY(-2px); border-color: transparent; }
.fm-card-media { position: relative; display: block; aspect-ratio: 1 / 1; margin: 8px; border-radius: 16px; overflow: hidden; }
.fm-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.fm-card:hover .fm-card-media img { transform: scale(1.05); }
.fm-card-badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; flex-wrap: wrap; gap: 4px; z-index: 1; }
.fm-badge { display: inline-flex; align-items: center; height: 22px; padding-inline: 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: #fff; color: var(--fm-ink); }
.fm-badge-sale { background: var(--fm-deal); color: #fff; }
.fm-badge-new { background: var(--fm-p); color: #fff; }
.fm-badge-pre { background: var(--fm-s); color: #fff; }
.fm-badge-out { background: #e9ecea; color: var(--fm-muted); }
.fm-card-body { display: flex; flex-direction: column; gap: 4px; padding: 4px 14px 14px; flex: 1; }
.fm-card-unit { font-size: 12px; color: var(--fm-muted); font-weight: 600; }
.fm-card-title { margin: 0; font-family: var(--fm-body); font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--fm-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.fm-card-title a:hover { color: var(--fm-p); }
.fm-card-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--fm-ink); font-weight: 600; }
.fm-card-rating .fm-ico { color: #f5a524; fill: #f5a524; }
.fm-card-rating small { color: var(--fm-muted); font-weight: 500; }
.fm-card-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fm-price { display: grid; line-height: 1.15; }
.fm-price b { font-size: 17px; font-weight: 800; color: var(--fm-ink); font-family: var(--fm-head); }
.fm-price b.is-deal { color: var(--fm-deal); }
.fm-price s { font-size: 12.5px; color: var(--fm-muted); }
.fm-add { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 999px; border: 0; display: grid; place-items: center; background: var(--fm-p); color: #fff; cursor: pointer; transition: transform .15s, background .15s; }
.fm-add:hover { transform: scale(1.08); }
.fm-add:disabled { background: #dfe5e0; color: #9aa59d; cursor: not-allowed; transform: none; }

/* Deals band */
.fm-deals-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; margin-bottom: 16px; border-radius: var(--fm-radius); background: linear-gradient(120deg, #fff0e8 0%, #fff8e6 100%); }
.fm-deals-band p { margin: 4px 0 0; color: var(--fm-muted); }
.fm-deals-band .fm-kicker { color: var(--fm-deal); }

/* Aisle (category with a row of products) */
.fm-aisle { display: grid; gap: 14px; }
.fm-aisle-card { position: relative; display: grid; align-content: start; gap: 6px; padding: 22px; border-radius: var(--fm-radius); overflow: hidden; min-height: 200px; }
.fm-aisle-card p { margin: 0; color: var(--fm-text); font-weight: 600; }
.fm-aisle-card img { position: absolute; inset-inline-end: 18px; bottom: 18px; width: 120px; height: 120px; object-fit: cover; border-radius: 999px; border: 5px solid rgba(255, 255, 255, .8); }
.fm-aisle-card .fm-btn { justify-self: start; margin-top: 8px; position: relative; z-index: 1; }
.fm-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 46%); gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; scrollbar-width: thin; }
.fm-row > * { scroll-snap-align: start; }
@media (min-width: 768px) { .fm-row { grid-auto-columns: minmax(190px, 23%); } }
@media (min-width: 1024px) { .fm-aisle { grid-template-columns: 280px minmax(0, 1fr); } .fm-row { grid-auto-columns: calc((100% - 36px) / 4); } }

/* Breadcrumbs */
.fm-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding-block: 18px 6px; font-size: 13px; color: var(--fm-muted); }
.fm-crumbs a:hover { color: var(--fm-p); }
.fm-crumbs span { color: var(--fm-ink); font-weight: 600; }
[dir="rtl"] .fm-crumbs .fm-ico { transform: scaleX(-1); }

/* Shop */
.fm-shop-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding-block: 6px 14px; }
.fm-sorts, .fm-subcats { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-subcats { margin-bottom: 14px; }
.fm-shop-body { display: grid; gap: 18px; }
@media (min-width: 1024px) { .fm-shop-body { grid-template-columns: 260px minmax(0, 1fr); align-items: start; } .fm-filters { position: sticky; top: 140px; } }
.fm-filters { display: grid; gap: 14px; }
.fm-filters-box { border: 1px solid var(--fm-line); border-radius: var(--fm-radius-sm); background: #fff; }
.fm-filters-box > summary { display: flex; align-items: center; gap: 8px; padding: 14px 16px; font-weight: 700; color: var(--fm-ink); }
.fm-filter-form { display: grid; gap: 10px; padding: 0 16px 16px; }
.fm-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fm-muted); margin: 6px 0 0; }
.fm-input { width: 100%; height: 44px; padding-inline: 12px; border-radius: 12px; border: 1px solid var(--fm-line); background: var(--fm-soft); color: var(--fm-ink); }
.fm-input:focus { outline: none; border-color: rgb(var(--fm-p-rgb) / .6); background: #fff; box-shadow: 0 0 0 4px rgb(var(--fm-p-rgb) / .12); }
.fm-price-range { display: flex; align-items: center; gap: 8px; color: var(--fm-muted); }
.fm-clear { text-align: center; font-size: 14px; }
.fm-filter-cats { display: none; border: 1px solid var(--fm-line); border-radius: var(--fm-radius-sm); padding: 12px; }
.fm-filter-cats .fm-label { padding: 0 8px 6px; margin: 0; }
.fm-filter-cats a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; font-size: 14px; color: var(--fm-text); }
.fm-filter-cats a small { color: var(--fm-muted); }
.fm-filter-cats a:hover, .fm-filter-cats a.is-active { background: rgb(var(--fm-p-rgb) / .1); color: var(--fm-p); font-weight: 700; }
@media (min-width: 1024px) { .fm-filter-cats { display: block; } }
.fm-empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 56px 20px; border: 1px dashed var(--fm-line); border-radius: var(--fm-radius); color: var(--fm-muted); }

.fm-pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; padding-block: 26px 8px; }
.fm-pager-num, .fm-pager-step, .fm-pager-gap { min-width: 42px; height: 42px; padding-inline: 12px; border-radius: 999px; display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; }
.fm-pager-num, .fm-pager-step { border: 1px solid var(--fm-line); background: #fff; color: var(--fm-ink); }
.fm-pager-num:hover, .fm-pager-step:hover { border-color: var(--fm-p); color: var(--fm-p); }
.fm-pager-num.is-active { background: var(--fm-p); border-color: var(--fm-p); color: #fff; }
.fm-pager-gap { color: var(--fm-muted); }

/* Product page */
.fm-product-grid { display: grid; gap: 24px; padding-block: 8px 12px; }
@media (min-width: 960px) { .fm-product-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: start; } .fm-gallery { position: sticky; top: 140px; } }
.fm-gallery-main { position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--fm-radius); background: var(--fm-soft); scrollbar-width: none; }
.fm-gallery-main::-webkit-scrollbar { display: none; }
.fm-gallery-slide { flex: 0 0 100%; margin: 0; aspect-ratio: 1 / 1; scroll-snap-align: start; display: grid; place-items: center; scroll-margin-top: 200px; }
.fm-gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
.fm-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.fm-thumbs a { flex: 0 0 76px; height: 76px; border-radius: 14px; background: var(--fm-soft); border: 2px solid transparent; overflow: hidden; }
.fm-thumbs a:hover, .fm-thumbs a:focus { border-color: var(--fm-p); }
.fm-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.fm-info { display: grid; gap: 14px; align-content: start; }
.fm-info .fm-kicker { justify-self: start; }
.fm-info-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fm-pill { display: inline-flex; align-items: center; height: 30px; padding-inline: 12px; border-radius: 999px; background: var(--fm-soft); font-weight: 700; font-size: 13px; color: var(--fm-ink); }
.fm-stock { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--fm-p); }
.fm-stock-out { color: var(--fm-muted); }
.fm-stock-pre { color: var(--fm-s); }
.fm-info-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.fm-info-price b { font-family: var(--fm-head); font-size: 34px; font-weight: 800; color: var(--fm-ink); line-height: 1; }
.fm-info-price b.is-deal { color: var(--fm-deal); }
.fm-info-price s { font-size: 18px; color: var(--fm-muted); }
.fm-info-short { margin: 0; color: var(--fm-text); }
.fm-variants { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.fm-variants legend { margin-bottom: 8px; }
.fm-variant { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--fm-line); border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.fm-variant:hover { border-color: rgb(var(--fm-p-rgb) / .45); }
.fm-variant:has(input:checked) { border-color: var(--fm-p); background: rgb(var(--fm-p-rgb) / .06); }
.fm-variant input { accent-color: var(--fm-p); width: 18px; height: 18px; }
.fm-variant-name { flex: 1; font-weight: 600; color: var(--fm-ink); }
.fm-variant-price { font-weight: 800; color: var(--fm-ink); }
.fm-variant.is-out { opacity: .55; }
.fm-buy { display: flex; gap: 10px; }
.fm-qty { width: 86px; height: 54px; text-align: center; font-weight: 700; font-size: 16px; border-radius: 999px; }
.fm-btn-grow { flex: 1; }
.fm-info-perks { list-style: none; margin: 0; padding: 14px 16px; display: grid; gap: 8px; border-radius: var(--fm-radius-sm); background: var(--fm-soft); font-size: 14px; }
.fm-info-perks li { display: flex; align-items: center; gap: 10px; }
.fm-info-perks .fm-ico { color: var(--fm-p); }
.fm-desc { display: grid; gap: 8px; padding-top: 6px; border-top: 1px solid var(--fm-line); }
.fm-desc p { margin: 0; }
.fm-sku { font-size: 13px; }

/* Platform pages (cart, checkout, account, legal) sit in the same frame */
.fm-page-checkout .fm-main, .fm-page-account .fm-main { background: var(--fm-soft); }

/* Footer */
.fm-footer { margin-top: 32px; background: var(--fm-ink); color: #c9d6cc; padding-top: 44px; }
.fm-footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fm-footer-brand { grid-column: 1 / -1; display: grid; gap: 12px; align-content: start; }
.fm-footer-brand p { margin: 0; max-width: 360px; font-size: 14px; }
.fm-logo-footer img { height: 44px; background: #fff; border-radius: 12px; padding: 4px 8px; }
.fm-logo-footer .fm-logo-text { color: #fff; }
.fm-socials { display: flex; gap: 8px; }
.fm-socials a { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #fff; font-size: 12px; font-weight: 800; }
.fm-socials a:hover { background: var(--fm-p); }
.fm-footer-title { margin: 0 0 12px; font-family: var(--fm-head); font-size: 15px; font-weight: 700; color: #fff; }
.fm-footer-links, .fm-footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14px; }
.fm-footer-links a:hover, .fm-footer-contact a:hover { color: #fff; text-decoration: underline; }
.fm-footer-contact li { display: flex; align-items: flex-start; gap: 8px; }
.fm-footer-contact .fm-ico { margin-top: 3px; color: var(--fm-s); }
.fm-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 36px; padding-block: 18px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; }
.fm-legal-links { display: inline-flex; gap: 16px; }
.fm-legal a:hover { color: #fff; text-decoration: underline; }
.fm-maker { opacity: .7; margin-inline-start: auto; }
.fm-maker a { font-weight: 700; }
@media (min-width: 900px) { .fm-footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; } .fm-footer-brand { grid-column: auto; } }

/* Mobile tab bar */
.fm-tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--fm-line); padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(10px); }
.fm-tabbar a { position: relative; display: grid; justify-items: center; gap: 2px; padding-block: 9px 8px; font-size: 11px; font-weight: 600; color: var(--fm-muted); }
.fm-tabbar a.is-active { color: var(--fm-p); }
.fm-tabbar-cart b { position: absolute; top: 4px; inset-inline-start: calc(50% + 6px); min-width: 17px; height: 17px; padding-inline: 4px; border-radius: 999px; background: var(--fm-s); color: #fff; font-size: 10px; display: grid; place-items: center; }
.fm-tabbar-cart b[data-cart-count="0"] { display: none; }
@media (min-width: 900px) { .fm-tabbar { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .fm *, .fm *::before, .fm *::after { transition: none !important; scroll-behavior: auto !important; }
}
