:root {
  --fm-bg: #f6f2e9;
  --fm-surface: #fff;
  --fm-green: #16231a;
  --fm-green-2: #223629;
  --fm-gold: #b8862d;
  --fm-red: #b7352e;
  --fm-text: #182019;
  --fm-muted: #6d736c;
  --fm-line: #ddd8cd;
  --fm-container: 1240px;
}

.fm-page,
.fm-page * { box-sizing: border-box; }
.fm-page { color: var(--fm-text); background: var(--fm-bg); }
.fm-container { width: min(var(--fm-container), calc(100% - 40px)); margin-inline: auto; }
.fm-section { padding: 78px 0; background: var(--fm-bg); }
.fm-page h1,
.fm-page h2 { letter-spacing: -.025em; }
.fm-page h2 { font-size: clamp(34px, 4vw, 52px); line-height: 1.05; margin: 0 0 28px; }
.fm-kicker { margin: 0 0 12px !important; color: var(--fm-gold); font-size: 12px; line-height: 1.2; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.fm-lead { color: var(--fm-muted); font-size: 18px; line-height: 1.65; }

/* HERO — desktop: tekst po lewej, zdjęcie po prawej. Mobile: H1 -> zdjęcie -> akapit. */
.fm-hero { padding: 72px 0 58px; background: var(--fm-bg); }
.fm-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(500px, 1.08fr);
  grid-template-areas: "intro media" "body media";
  grid-template-rows: auto 1fr;
  column-gap: 68px;
  align-items: start;
}
.fm-hero-intro { grid-area: intro; align-self: end; }
.fm-hero-body { grid-area: body; padding-top: 24px; }
.fm-hero-media { grid-area: media; position: relative; min-height: 600px; margin: 0 !important; overflow: hidden; border-radius: 22px; background: #ddd; }
.fm-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fm-hero-media::after { content: ""; position: absolute; inset: 54% 0 0; background: linear-gradient(to bottom, transparent, rgba(10,18,13,.76)); pointer-events: none; }
.fm-hero-media figcaption { position: absolute; z-index: 2; left: 26px; right: 26px; bottom: 24px; margin: 0 !important; color: #fff; display: grid; gap: 3px; text-align: left; }
.fm-hero-media figcaption span { color: #ead38f; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.fm-hero-media figcaption strong { font-size: 20px; }
.fm-hero-title { max-width: 690px; margin: 0 !important; font-size: clamp(48px, 5.2vw, 76px); line-height: .98; font-weight: 500; }
.fm-hero-title em { color: var(--fm-gold); font-style: italic; }
.fm-hero-body .fm-lead { max-width: 620px; margin: 0 0 28px; }
.fm-hero-actions { gap: 10px; margin-bottom: 28px; }
.fm-hero-actions .wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; padding: 12px 20px; border-radius: 10px; font-size: 14px; font-weight: 700; text-decoration: none; }
.fm-hero-actions .is-style-fill .wp-block-button__link { background: var(--fm-green); color: #fff; }
.fm-hero-actions .is-style-outline .wp-block-button__link { background: transparent; color: var(--fm-green); border: 1px solid #cfc8bb; }

.fm-benefits { display: flex !important; flex-wrap: wrap !important; gap: 14px 22px !important; margin: 0 !important; }
.fm-benefit { display: inline-flex; align-items: center; gap: 9px; color: #505951; font-size: 13px; font-weight: 700; }
.fm-benefit-icon { width: 30px; height: 30px; flex: 0 0 30px; display: inline-grid; place-items: center; background: #fff; border: 1px solid var(--fm-line); border-radius: 50%; }
.fm-benefit-icon svg { width: 18px; height: 18px; fill: none; stroke: var(--fm-green); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fm-benefit-icon--flag { overflow: hidden; border-radius: 6px; }
.fm-benefit-icon--flag svg { width: 22px; height: 15px; stroke: none; }

/* WooCommerce — spokojna, sklepowa stylistyka */
.fm-page .woocommerce ul.products { margin-bottom: 0; }
.fm-page .woocommerce ul.products li.product {
  background: var(--fm-surface);
  border: 1px solid var(--fm-line);
  border-radius: 14px;
  overflow: hidden;
  padding: 0 0 16px;
  transition: transform .2s ease, border-color .2s ease;
}
.fm-page .woocommerce ul.products li.product:hover { transform: translateY(-2px); border-color: #c7c0b4; }
.fm-page .woocommerce ul.products li.product a img { margin: 0 0 14px; aspect-ratio: 4 / 5; width: 100%; object-fit: cover; background: #eee8de; }
.fm-page .woocommerce ul.products li.product .woocommerce-loop-product__title { padding: 0 14px; color: var(--fm-text); font-size: 15px; line-height: 1.35; }
.fm-page .woocommerce ul.products li.product .price { padding: 0 14px; color: var(--fm-green); font-size: 15px; font-weight: 800; }
.fm-page .woocommerce ul.products li.product .button { margin: 8px 14px 0; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; background: var(--fm-green); color: #fff; border-radius: 9px; font-size: 13px; }
.fm-page .woocommerce span.onsale { background: var(--fm-red); }

.fm-product-slider .woocommerce ul.products {
  display: grid !important;
  grid-auto-flow: column;
  grid-auto-columns: minmax(255px, 292px);
  grid-template-columns: none !important;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 8px;
}
.fm-product-slider .woocommerce ul.products::-webkit-scrollbar { display: none; }
.fm-product-slider .woocommerce ul.products li.product { width: auto !important; float: none !important; margin: 0 !important; scroll-snap-align: start; }

.fm-categories { padding-top: 34px; }
.fm-categories .woocommerce ul.products li.product-category a img { aspect-ratio: 1.35 / 1; }
.fm-categories .woocommerce-loop-category__title { padding: 0 14px !important; font-size: 20px !important; }
.fm-categories mark.count { background: transparent; color: var(--fm-muted); font-size: 12px; }

.fm-story { padding: 86px 0; background: var(--fm-green); color: #fff; }
.fm-story-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.fm-story-media { min-height: 500px; margin: 0 !important; border-radius: 18px; overflow: hidden; }
.fm-story-media img { width: 100%; height: 100%; min-height: 500px; object-fit: cover; }
.fm-story-copy h2 { color: #fff; margin-bottom: 18px; }
.fm-story-copy p:not(.fm-kicker) { color: #d5ddd6; font-size: 17px; line-height: 1.7; }

.fm-contact-cta { padding: 58px 0; background: #fff; border-block: 1px solid var(--fm-line); }
.fm-contact-cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 36px; }
.fm-contact-cta h2 { margin: 0 0 8px; font-size: clamp(30px, 3vw, 44px); }
.fm-contact-cta p:not(.fm-kicker) { margin: 0; color: var(--fm-muted); }
.fm-contact-cta .wp-block-button__link { background: var(--fm-green); color: #fff; border-radius: 10px; padding: 13px 22px; }

/* CONTACT */
.fm-contact-hero { padding: 72px 0 34px; background: var(--fm-bg); }
.fm-contact-hero h1 { margin: 0 0 16px; font-size: clamp(46px, 5vw, 72px); line-height: 1; }
.fm-contact-grid { display: grid; grid-template-columns: .72fr 1.28fr; gap: 60px; align-items: start; }
.fm-contact-details,
.fm-contact-form-wrap { background: #fff; border: 1px solid var(--fm-line); border-radius: 16px; padding: 28px; }
.fm-contact-details h2,
.fm-contact-form-wrap h2 { font-size: 30px; margin-bottom: 20px; }
.fm-contact-details p { color: var(--fm-muted); }
.fm-contact-details strong { color: var(--fm-text); }
.fm-contact-details a { color: var(--fm-green); }
.fm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fm-contact-form label { display: grid; gap: 7px; color: var(--fm-text); font-size: 13px; font-weight: 700; }
.fm-contact-form label span { color: var(--fm-muted); font-weight: 400; }
.fm-contact-form input,
.fm-contact-form textarea { width: 100%; border: 1px solid #cfc8bb; border-radius: 9px; background: #fff; padding: 12px 13px; color: var(--fm-text); }
.fm-contact-form input:focus,
.fm-contact-form textarea:focus { outline: 2px solid rgba(184,134,45,.35); border-color: var(--fm-gold); }
.fm-wide { grid-column: 1 / -1; }
.fm-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.fm-submit { margin-top: 18px; border: 0; border-radius: 9px; background: var(--fm-green); color: #fff; padding: 13px 20px; font-weight: 800; cursor: pointer; }
.fm-form-success { margin-bottom: 18px; padding: 12px 14px; border: 1px solid #9fbea7; background: #eef6ef; color: #23482d; border-radius: 9px; }

/* MOBILE CART SHORTCUT */
.fm-mobile-cart { display: none; }

/* CHECKOUT — osobna podstrona WooCommerce. */
.fm-payment-maintenance {
  margin: 18px 0 22px;
  padding: 17px 18px;
  border: 1px solid #dbb54f;
  border-radius: 12px;
  background: #fff8df;
  color: #4d3b0e;
}
.fm-payment-maintenance strong { display: block; margin-bottom: 5px; font-size: 16px; }
.fm-payment-maintenance p { margin: 0; line-height: 1.55; }

/* MADE WITH <3 */
.fm-site-credit { width: 100%; padding: 13px 16px max(13px, env(safe-area-inset-bottom)); background: #101411; border-top: 1px solid rgba(255,255,255,.08); }
.fm-site-credit a { width: max-content; max-width: 100%; margin-inline: auto; display: flex; align-items: center; justify-content: center; gap: 8px; color: #d8ddd9; text-decoration: none; font-size: 11px; letter-spacing: .02em; }
.fm-site-credit img { width: 74px; max-height: 30px; object-fit: contain; }

@media (max-width: 980px) {
  .fm-container { width: min(var(--fm-container), calc(100% - 32px)); }
  .fm-hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "intro" "media" "body";
    grid-template-rows: auto auto auto;
  }
  .fm-hero-media { min-height: 540px; margin-top: 28px !important; }
  .fm-hero-body { padding-top: 26px; }
  .fm-story-grid { grid-template-columns: 1fr; gap: 32px; }
  .fm-contact-grid { grid-template-columns: 1fr; gap: 22px; }
}

@media (max-width: 782px) {
  .fm-container { width: min(100% - 24px, var(--fm-container)); }
  .fm-section { padding: 54px 0; }
  .fm-hero { padding: 42px 0 46px; }
  .fm-hero-title { font-size: clamp(42px, 12vw, 58px); }
  .fm-hero-media { min-height: 420px; margin-top: 22px !important; border-radius: 17px; }
  .fm-hero-body { padding-top: 20px; }
  .fm-hero-body .fm-lead { font-size: 16px; line-height: 1.6; }
  .fm-hero-actions { display: grid !important; grid-template-columns: 1fr 1fr; }
  .fm-hero-actions .wp-block-button,
  .fm-hero-actions .wp-block-button__link { width: 100%; }

  .fm-benefits { display: grid !important; grid-template-columns: 1fr; gap: 9px !important; }
  .fm-benefit { min-height: 44px; padding: 8px 10px; background: rgba(255,255,255,.56); border: 1px solid var(--fm-line); border-radius: 11px; }
  .fm-benefit-icon { border: 0; background: transparent; }

  .fm-product-slider .woocommerce ul.products { grid-auto-columns: minmax(235px, 78vw); gap: 12px; }
  .fm-story { padding: 58px 0; }
  .fm-story-media,
  .fm-story-media img { min-height: 360px; }
  .fm-contact-cta-inner { align-items: flex-start; flex-direction: column; }
  .fm-form-grid { grid-template-columns: 1fr; }
  .fm-wide { grid-column: auto; }

  .fm-mobile-cart {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
    z-index: 9997;
    width: 58px;
    height: 58px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--fm-green);
    color: #fff;
    box-shadow: 0 12px 30px rgba(10,19,13,.30);
    text-decoration: none;
  }
  .fm-mobile-cart svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .fm-mobile-cart-count { position: absolute; top: -3px; right: -2px; min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center; border: 2px solid var(--fm-bg); border-radius: 999px; background: var(--fm-red); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; }
}

@media (max-width: 480px) {
  .fm-hero-actions { grid-template-columns: 1fr; }
  .fm-hero-media { min-height: 360px; }
  .fm-hero-media figcaption { left: 17px; right: 17px; bottom: 16px; }
  .fm-page .woocommerce ul.products[class*=columns-] li.product { width: 100% !important; }
  .fm-all-products .woocommerce ul.products { display: grid; grid-template-columns: 1fr; gap: 12px; }
}

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