﻿/* Cart — dropdowns, ATC modal, koszyk, checkout */

.fm-label {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.fm-label--red { background: var(--fm-red); }
.fm-label--gray { background: #6b7280; }
.fm-label--black { background: #111111; }
.fm-label--payu {
  background: #a6c307;
  color: #fff;
}
.fm-label--ship {
  background: var(--fm-red);
  letter-spacing: 0.01em;
}

.fm-hdr__tool-wrap {
  position: relative;
  z-index: 1;
}
.fm-hdr__tool-wrap.is-open {
  z-index: 55;
}
.fm-hdr__tool-wrap.is-open > .fm-hdr__tool { color: var(--fm-red); }
.fm-hdr__tool[data-cart-tool].is-active { color: var(--fm-red); }
.fm-hdr__tool-wrap::after {
  content: '';
  position: absolute;
  left: -8px;
  right: -8px;
  top: 100%;
  height: 14px;
  display: none;
}
.fm-hdr__tool-wrap.is-open::after { display: block; }

.fm-drop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1300;
  min-width: 260px;
  padding: 22px 20px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  text-align: center;
  pointer-events: auto;
}
.fm-drop--login { min-width: 240px; }
.fm-drop--cart {
  min-width: 320px;
  width: min(360px, calc(100vw - 24px));
  max-width: min(360px, calc(100vw - 24px));
  max-height: min(calc(100vh - 96px), 640px);
  overflow: hidden;
  text-align: left;
  padding: 16px 16px 14px;
}
.fm-drop[hidden] { display: none !important; }

.fm-drop__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-family: inherit;
  box-sizing: border-box;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.fm-drop__btn--primary {
  background: var(--fm-red, #d62828) !important;
  color: #fff !important;
  border-color: var(--fm-red, #d62828) !important;
}
.fm-drop__btn--primary:hover,
.fm-drop__btn--primary:focus,
.fm-drop__btn--primary:active {
  background: var(--fm-red-dark, #b01f1f) !important;
  color: #fff !important;
  border-color: var(--fm-red-dark, #b01f1f) !important;
}
.fm-drop__btn--ghost {
  background: #fff !important;
  color: var(--fm-gray-900, #1a1a1a) !important;
  border-color: #111 !important;
}
.fm-drop__btn--ghost:hover,
.fm-drop__btn--ghost:focus {
  border-color: var(--fm-red, #d62828) !important;
  color: var(--fm-red, #d62828) !important;
  background: #fff !important;
}
.fm-drop__hint {
  margin: 14px 0 4px;
  font-size: 13px;
  color: var(--fm-gray-900);
}
.fm-drop__link {
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.fm-drop__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}
.fm-drop__sub {
  margin: 0 0 16px;
  font-size: 13px;
  text-align: center;
  color: var(--fm-gray-600);
}

/* Mini-cart — Agata-like: ≤4 rows, 2-line titles, no list scrollbar */
.fm-minicart__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  max-height: none;
  overflow: visible;
}
.fm-minicart__title {
  text-align: left !important;
  margin: 0 0 4px !important;
  font-size: 16px;
}
.fm-minicart__row {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 28px 12px 0;
  border-bottom: 1px solid #eee;
  color: #1a1a1a;
}
.fm-minicart__row:last-child { border-bottom: 0; }
.fm-minicart__thumb {
  display: block;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  text-decoration: none;
}
.fm-minicart__thumb img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #fff;
  border-radius: 2px;
}
.fm-minicart__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}
.fm-minicart__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: #1a1a1a !important;
  text-decoration: none !important;
}
.fm-minicart__name:hover {
  color: var(--fm-red, #d62828) !important;
}
.fm-minicart__row-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fm-minicart__qty {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 2px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  line-height: 1.2;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}
.fm-minicart__qty--text {
  font-style: normal;
}
.fm-minicart__qty-btn {
  display: none !important;
}
/* Hide legacy qty inputs if fragment cache still serves them. */
.fm-minicart__qty input.fm-minicart__qty-input,
.fm-drop--cart input.fm-minicart__qty-input {
  display: none !important;
}
.fm-minicart__qty-unit {
  display: none !important;
}
.fm-minicart__price {
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  color: #1a1a1a;
}
.fm-minicart__price .amount,
.fm-minicart__price .woocommerce-Price-amount {
  color: inherit;
}
.fm-minicart__remove {
  position: absolute;
  top: 10px;
  right: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 4px;
}
.fm-minicart__remove:hover {
  color: var(--fm-red, #d62828);
}
.fm-minicart__remove svg {
  display: block;
}
.fm-minicart__more {
  display: block;
  margin: 4px 0 10px;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  text-decoration: none;
}
.fm-minicart__more span {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.fm-minicart__more:hover,
.fm-minicart__more:hover span {
  color: var(--fm-red, #d62828);
}
.fm-minicart__sum {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  margin: 0 -16px 12px;
  background: #f3f3f3;
  font-size: 14px;
  color: #1a1a1a;
}
.fm-minicart__sum strong {
  font-size: 16px;
  color: #1a1a1a;
}
.fm-drop--cart.is-busy {
  pointer-events: none;
  opacity: .72;
}

body.is-atc-open { overflow: hidden; }
.fm-atc {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 24px;
}
.fm-atc__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}
.fm-atc__panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(90vh, 860px);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  padding: 28px 28px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.fm-atc__x {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #333;
}
.fm-atc__top {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: center;
  padding-right: 40px;
}
.fm-atc__thumb {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #f5f5f5;
  border-radius: 6px;
}
.fm-atc__ok {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fm-atc__ok span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 12px;
}
.fm-atc__name {
  margin: 0;
  font-size: 14px;
  color: #444;
}
.fm-atc__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 22px 0 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--fm-gray-200);
}
.fm-atc__reco h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
}
.fm-atc__rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.fm-atc-card { min-width: 0; font-size: 13px; }
.fm-atc-card__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 20px;
  margin-bottom: 6px;
}
.fm-atc-card__media {
  display: block;
  aspect-ratio: 1;
  background: #f5f5f5;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.fm-atc-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.fm-atc-card h3 {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
}
.fm-atc-card p {
  margin: 2px 0 6px;
  color: #555;
  font-size: 12px;
}
.fm-atc-card__price {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.fm-atc-card__price strong { font-size: 16px; }
.fm-atc-card__price s {
  font-size: 11px;
  color: #999;
  margin-right: auto;
}
.fm-atc-card__add {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #ccc;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.fm-atc-card__add svg {
  width: 16px;
  height: 16px;
  stroke: #333;
  fill: none;
  stroke-width: 1.6;
}
.fm-atc-card__add.is-done {
  border-color: #16a34a;
  background: #16a34a;
}
.fm-atc-card__add.is-done svg { stroke: #fff; }
.fm-atc__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}
.fm-atc__dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ddd;
  display: block;
}
.fm-atc__dots i.is-on { background: #111; }

.fm-cart-page { padding: 12px 0 64px; }
.fm-cart-page__toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}
.fm-cart-page__head {
  display: none !important;
}
.fm-cart-page__head h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
}
.fm-cart-clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
}
.fm-cart-clear:hover { color: var(--fm-red); }
.fm-cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(340px, 440px);
  gap: 28px;
  align-items: start;
}
.fm-cart-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto auto auto;
  gap: 16px 20px;
  align-items: center;
  border: 1px solid var(--fm-gray-200);
  border-radius: 6px;
  padding: 16px 18px;
  background: #fff;
}
.fm-cart-item + .fm-cart-item { margin-top: 0; }
.fm-cart-item__media {
  grid-column: 1;
  width: 96px;
  height: 96px;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.fm-cart-item__media a {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}
/* One thumb only — kill WoodMart hover/gallery grids in cart */
.fm-cart-item__media img,
.fm-cart-item__media .attachment-woocommerce_thumbnail,
.fm-cart-item__media .wp-post-image {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
  margin: 0 !important;
  background: #fff;
}
.fm-cart-item__media img:not(:first-of-type),
.fm-cart-item__media .hover-img,
.fm-cart-item__media .wd-product-grid,
.fm-cart-item__media .product-image-summary,
.fm-cart-item__media .wd-gallery-thumb,
.fm-cart-item__media picture + picture,
.fm-cart-item__media a > img ~ img {
  display: none !important;
}
.fm-cart-item__body {
  grid-column: 2;
  min-width: 0;
}
.fm-cart-item__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.fm-cart-item__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}
.fm-cart-item__ship {
  margin: 0 0 10px;
  font-size: 13px;
  color: #15803d;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fm-cart-item__ship::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}
.fm-cart-item__prices {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.fm-cart-item__price {
  font-size: 16px;
  font-weight: 800;
  color: var(--fm-red);
}
.fm-cart-item__old {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
}
.fm-cart-item__qty {
  grid-column: 3;
  justify-self: end;
}
.fm-cart-item__qty .quantity {
  display: inline-flex !important;
  align-items: center;
  margin: 0 !important;
  width: auto !important;
}
.fm-cart-item__qty .qty,
.fm-cart-item__qty input.qty {
  width: 48px !important;
  min-width: 48px !important;
  max-width: 56px !important;
  height: 40px !important;
  text-align: center;
  margin: 0 !important;
}
.fm-cart-item__line {
  grid-column: 4;
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
  justify-self: end;
  min-width: 7ch;
  text-align: right;
}
.fm-cart-item__actions {
  grid-column: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fm-cart-item__actions button,
.fm-cart-item__actions a {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #555;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fm-cart-item__actions svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
}
/* Legacy two-row markup (if cached) */
.fm-cart-item__top,
.fm-cart-item__bottom {
  display: contents;
}
.fm-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}
.fm-qty button {
  width: 36px;
  height: 36px;
  border: 0;
  background: #f5f5f5;
  font-size: 18px;
  cursor: pointer;
}
.fm-qty span {
  min-width: 40px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}
.fm-cart-item__line {
  font-size: 18px;
  font-weight: 800;
}
.fm-cart-promo {
  margin-top: 14px;
  padding: 14px 16px;
  background: #e8f4fc;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
}
.fm-cart-promo strong { color: var(--fm-red); }

.fm-cart-side {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fm-cart-box {
  border: 1px solid var(--fm-gray-200);
  border-radius: 6px;
  padding: 18px;
  background: #fff;
}
.fm-cart-box h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
}
.fm-cart-code {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.fm-cart-code input {
  height: 42px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0 12px;
  font: inherit;
}
.fm-cart-code button {
  height: 42px;
  padding: 0 16px;
  background: #111;
  color: #fff;
  border: 0;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
}
.fm-cart-sum-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  margin-bottom: 8px;
}
.fm-cart-sum-row--disc { color: var(--fm-red); font-weight: 600; }
.fm-cart-sum-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--fm-gray-200);
  font-size: 16px;
  font-weight: 800;
}
.fm-cart-checkout {
  display: block;
  width: 100%;
  margin-top: 16px;
  min-height: 48px;
  line-height: 48px;
  text-align: center;
  background: var(--fm-red);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
}
.fm-cart-checkout:hover { background: var(--fm-red-dark); }
.fm-cart-empty {
  text-align: center;
  padding: 48px 20px;
  border: 1px solid var(--fm-gray-200);
  border-radius: 8px;
}
.fm-cart-empty h2 { margin: 0 0 8px; }
.fm-cart-empty p { margin: 0 0 20px; color: var(--fm-gray-600); }
.fm-cart-empty .fm-drop__btn { max-width: 280px; margin: 0 auto; }
.fm-cart-empty__alt { margin-top: 16px !important; font-size: 13px; }
.fm-cart-empty__alt a { color: #555; text-decoration: underline; }

.fm-chk-simple {
  min-height: 100vh;
  background: #f6f6f6;
}
.fm-chk-simple__bar {
  background: #fff;
  border-bottom: 1px solid var(--fm-gray-200);
  padding: 14px 0;
}
.fm-chk-simple__bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.fm-chk-simple__logo {
  display: block;
  line-height: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: inherit;
  text-decoration: none;
}
.fm-chk-simple__logo span { color: var(--fm-red); }
.fm-chk-simple__logo img {
  height: 36px;
  width: auto;
  max-width: 220px;
  display: block;
  object-fit: contain;
}
.fm-chk-simple__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 12px;
  color: #555;
  align-items: center;
}
.fm-chk-simple__meta strong { display: block; font-size: 13px; color: #111; }
.fm-chk-simple__trust {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.fm-chk-simple__shield {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.fm-chk-account {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 28px;
  padding: 40px 0 64px;
  align-items: start;
}
.fm-chk-card {
  background: #fff;
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--fm-shadow-sm);
}
.fm-chk-card h1,
.fm-chk-card h2 {
  margin: 0 0 20px;
  font-size: 26px;
  font-weight: 700;
}
.fm-chk-field { margin-bottom: 0; }
.fm-chk-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #222;
}
.fm-chk-field input,
.fm-chk-field select,
.fm-chk-field textarea {
  width: 100%;
  height: 46px;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: #111;
}
.fm-chk-field input::placeholder,
.fm-chk-field textarea::placeholder {
  color: #9a9a9a;
}
.fm-chk-field select.fm-chk-select--filled,
.fm-chk-field .fm-chk-select--filled {
  background: #f3f3f3;
  color: #333;
}
.fm-chk-field textarea { height: auto; min-height: 88px; padding: 10px 12px; }
.fm-chk-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}
.fm-chk-legal {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: #777;
}
.fm-chk-consents {
  margin-top: 22px;
}
.fm-chk-consents > strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}
.fm-chk-alt-addr {
  margin-top: 8px;
  padding: 18px 16px;
  background: #fafafa;
  border: 1px solid #ebebeb;
  border-radius: 8px;
}
.fm-chk-alt-addr__title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
}
.fm-chk-firma { margin-bottom: 4px; }
.fm-chk-field--row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.fm-chk-forgot {
  display: block;
  text-align: right;
  font-size: 13px;
  text-decoration: underline;
  margin: -4px 0 14px;
}
.fm-chk-side-block { margin-bottom: 20px; }
.fm-chk-side-block h2 {
  margin: 0 0 6px;
  font-size: 18px;
}
.fm-chk-side-block p {
  margin: 0 0 12px;
  font-size: 13px;
  color: #555;
}
.fm-chk-benefit {
  background: #eee;
  border-radius: 8px;
  padding: 20px;
}
.fm-chk-benefit h2 { font-size: 16px; margin-bottom: 10px; }
.fm-chk-benefit ul {
  margin: 0 0 14px;
  padding-left: 18px;
  font-size: 13px;
}
.fm-chk-benefit li + li { margin-top: 6px; }
.fm-chk-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  padding: 10px 14px;
  border: 1.5px solid #111;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.fm-chk {
  background: #f5f5f5;
  min-height: 100vh;
}
.fm-chk__wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(360px, 460px);
  gap: 32px;
  max-width: var(--fm-page-max, 1440px);
  margin: 0 auto;
  padding-block: 32px 64px;
  padding-inline: var(--fm-gutter, 24px);
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}
.fm-chk__main { padding-right: 8px; }
.fm-chk__aside {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 24px 22px;
  position: sticky;
  top: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.fm-chk__aside h2 {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 700;
}
.fm-chk-step {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 28px 28px 26px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.fm-chk-step__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.fm-chk-step.is-collapsed .fm-chk-step__head { margin-bottom: 0; }
.fm-chk-step__head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.fm-chk-step.is-collapsed { padding: 18px 22px; }
.fm-chk-step.is-collapsed .fm-chk-step__body { display: none; }
.fm-chk-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.fm-chk-edit[hidden] { display: none !important; }
.fm-chk-edit:hover { color: var(--fm-red); }
.fm-chk-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  margin-bottom: 22px;
  font-size: 14px;
  font-weight: 600;
}
.fm-chk-radios label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.fm-chk-radios input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #1976d2;
}
.fm-chk-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px 12px;
  margin-bottom: 8px;
}
.fm-chk-grid .fm-chk-field--half { grid-column: span 6; }
.fm-chk-grid .fm-chk-field--street { grid-column: span 6; }
.fm-chk-grid .fm-chk-field--house { grid-column: span 3; }
.fm-chk-grid .fm-chk-field--apt { grid-column: span 3; }
.fm-chk-grid .fm-chk-field--kod { grid-column: span 4; }
.fm-chk-grid .fm-chk-field--city { grid-column: span 8; }
.fm-chk-grid .fm-chk-field--full { grid-column: 1 / -1; }
.fm-chk-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  margin: 14px 0;
  line-height: 1.45;
}
.fm-chk-check a { color: inherit; text-decoration: underline; }
.fm-chk-check input { margin-top: 3px; width: 16px; height: 16px; accent-color: #1976d2; }
.fm-chk-next {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  margin-top: 22px;
  padding: 0 28px;
  background: var(--fm-red);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: .01em;
  transition: background .15s ease, transform .1s ease;
}
.fm-chk-next:hover { background: var(--fm-red-dark, #b01f1f); }
.fm-chk-next:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.fm-chk-next--ghost {
  display: inline-flex;
  width: auto;
  min-width: 200px;
  background: #fff;
  color: #111;
  border: 1.5px solid #111;
  margin-top: 12px;
  border-radius: 999px;
}
.fm-chk-next--ghost:hover { background: #f7f7f7; }
.fm-chk-summary-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.fm-chk-summary-card {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 16px;
  font-size: 13px;
  line-height: 1.55;
}
.fm-chk-summary-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}
.fm-chk-ship-done {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
}
.fm-chk-pay-heading {
  margin: 0 0 14px;
  font-weight: 700;
  font-size: 14px;
}
.fm-chk-ship-opt,
.fm-chk-pay-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.fm-chk-ship-opt input,
.fm-chk-pay-opt input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #1976d2;
}
.fm-chk-ship-opt.is-on,
.fm-chk-pay-opt.is-on {
  border-color: var(--fm-red);
  box-shadow: inset 0 0 0 1px var(--fm-red);
}
.fm-chk-opt__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 40px;
  flex-shrink: 0;
  color: #333;
}
.fm-chk-opt__icon--pay {
  width: 56px;
}
.fm-chk-opt__icon--pay img {
  max-height: 28px;
  width: auto;
  object-fit: contain;
  display: block;
}
.fm-chk-opt__text {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: #111;
}
.fm-chk-ship-opt em,
.fm-chk-pay-opt em {
  font-style: normal;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.fm-chk-foot {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: #888;
}
.fm-chk-foot a { color: inherit; }

@media (max-width: 900px) {
  .fm-cart-layout,
  .fm-chk-account,
  .fm-chk__wrap,
  .fm-atc__actions,
  .fm-atc__rail,
  .fm-chk-summary-cards,
  .fm-chk-field--row { grid-template-columns: 1fr; }
  .fm-chk-grid { grid-template-columns: 1fr 1fr; }
  .fm-chk-grid .fm-chk-field--half,
  .fm-chk-grid .fm-chk-field--kod,
  .fm-chk-grid .fm-chk-field--city,
  .fm-chk-grid .fm-chk-field--house,
  .fm-chk-grid .fm-chk-field--apt { grid-column: span 1; }
  .fm-chk-grid .fm-chk-field--street,
  .fm-chk-grid .fm-chk-field--full { grid-column: 1 / -1; }
  .fm-cart-item__top { grid-template-columns: 80px 1fr; }
  .fm-cart-item__actions { grid-column: 2; }
  .fm-cart-item {
    grid-template-columns: 80px minmax(0, 1fr) auto;
    grid-template-areas:
      "media body actions"
      "media qty line";
    gap: 12px 14px;
  }
  .fm-cart-item__media { grid-area: media; width: 80px; height: 80px; }
  .fm-cart-item__body { grid-area: body; }
  .fm-cart-item__qty { grid-area: qty; justify-self: start; }
  .fm-cart-item__line { grid-area: line; justify-self: end; }
  .fm-cart-item__actions { grid-area: actions; }
  .fm-cart-side { position: static; }
  .fm-chk__main { padding-right: 0; }
  .fm-chk__aside { position: static; margin-top: 20px; }
  .fm-atc__rail {
    display: flex;
    overflow-x: auto;
    gap: 12px;
  }
  .fm-atc-card { flex: 0 0 180px; }
  .fm-drop { right: -20px; }
}

/* ── WooCommerce bridge (FM Agata cart/checkout) ── */

/* Expand WoodMart wrappers to full viewport — then re-cap at --fm-page-max like header */
body.fm-cart-page-body,
body.fm-checkout-page-body {
  --wd-container-w: 100vw;
}
body.fm-cart-page-body .website-wrapper,
body.fm-checkout-page-body .website-wrapper,
body.fm-cart-page-body .wd-page-wrapper,
body.fm-checkout-page-body .wd-page-wrapper,
body.fm-cart-page-body .main-page-wrapper,
body.fm-checkout-page-body .main-page-wrapper,
body.fm-cart-page-body .wd-page-content,
body.fm-checkout-page-body .wd-page-content,
body.fm-cart-page-body #main-content,
body.fm-checkout-page-body #main-content,
body.fm-cart-page-body #content,
body.fm-checkout-page-body #content,
body.fm-cart-page-body .container,
body.fm-checkout-page-body .container,
body.fm-cart-page-body .container-fluid,
body.fm-checkout-page-body .container-fluid,
body.fm-cart-page-body .row,
body.fm-checkout-page-body .row,
body.fm-cart-page-body [class*="col-"],
body.fm-checkout-page-body [class*="col-"],
body.fm-cart-page-body .wd-content-layout,
body.fm-checkout-page-body .wd-content-layout,
body.fm-cart-page-body .wd-content-area,
body.fm-checkout-page-body .wd-content-area,
body.fm-cart-page-body .wd-entry-content,
body.fm-checkout-page-body .wd-entry-content,
body.fm-cart-page-body .site-content,
body.fm-checkout-page-body .site-content,
body.fm-cart-page-body .content-layout-wrapper,
body.fm-checkout-page-body .content-layout-wrapper,
body.fm-cart-page-body article,
body.fm-checkout-page-body article,
body.fm-cart-page-body .entry-content,
body.fm-checkout-page-body .entry-content,
body.fm-cart-page-body .post-inner,
body.fm-checkout-page-body .post-inner,
body.fm-cart-page-body .page-content,
body.fm-checkout-page-body .page-content {
  max-width: none !important;
  width: 100% !important;
  flex: 1 1 100% !important;
  flex-basis: 100% !important;
  padding-inline: 0 !important;
  margin-inline: 0 !important;
  float: none !important;
}
body.fm-cart-page-body .woocommerce,
body.fm-checkout-page-body .woocommerce {
  max-width: var(--fm-page-max, 1440px) !important;
  margin-inline: auto !important;
  padding-block: 12px 64px;
  padding-inline: var(--fm-gutter, 24px);
  width: 100%;
  box-sizing: border-box;
}
body.fm-cart-page-body .fm-cart-page {
  padding: 0;
  max-width: none;
  width: 100%;
}
body.fm-cart-page-body .fm-cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(340px, 440px);
  gap: 32px;
  align-items: start;
  width: 100%;
}
body.fm-cart-page-body .woocommerce-cart-form__contents {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--fm-gray-200, #e5e7eb);
  border-radius: 8px;
  overflow: hidden;
}
body.fm-cart-page-body .woocommerce-cart-form__contents th {
  background: #fafafa;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
}
body.fm-cart-page-body .woocommerce-cart-form__contents td {
  padding: 16px 14px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
body.fm-cart-page-body .product-thumbnail img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  background: #f5f5f5;
  border-radius: 4px;
}
body.fm-cart-page-body .fm-cart-code {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 12px;
}
body.fm-cart-page-body .fm-cart-side,
body.fm-cart-page-body .cart-collaterals {
  position: sticky;
  top: 120px;
}
body.fm-cart-page-body .cart_totals {
  border: 1px solid var(--fm-gray-200, #e5e7eb);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}
body.fm-cart-page-body .wc-proceed-to-checkout .checkout-button,
body.fm-checkout-page-body #place_order {
  display: block;
  width: 100%;
  min-height: 48px;
  line-height: 48px;
  text-align: center;
  background: var(--fm-red, #d62828) !important;
  color: #fff !important;
  font-weight: 700;
  border-radius: 999px !important;
  border: 0 !important;
}
body.fm-checkout-page-body .fm-chk__wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(360px, 460px);
  gap: 32px;
  align-items: start;
  padding-block: 24px 64px;
  padding-inline: 0;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}
body.fm-checkout-page-body #customer_details,
body.fm-checkout-page-body .woocommerce-checkout-payment {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 16px;
}
body.fm-checkout-page-body #order_review {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 22px;
  position: sticky;
  top: 20px;
}
body.fm-chk-simple .woocommerce-form-login .woocommerce-form-row {
  margin-bottom: 14px;
}
body.fm-chk-simple .woocommerce-form-login button[type="submit"] {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--fm-red, #d62828);
  color: #fff;
  border: 0;
  font-weight: 700;
  cursor: pointer;
}
@media (max-width: 900px) {
  body.fm-cart-page-body .fm-cart-layout,
  body.fm-checkout-page-body .fm-chk__wrap {
    grid-template-columns: 1fr;
  }
  body.fm-cart-page-body .fm-cart-side,
  body.fm-checkout-page-body #order_review {
    position: static;
  }
}

/* ── FM cart cards (Agata) ── */
body.fm-cart-page-body .wd-empty-block-title,
body.fm-cart-page-body .wd-empty-page-text,
body.fm-cart-page-body .cart-empty.wd-empty-block-title,
body.fm-cart-page-body .return-to-shop,
body.fm-cart-page-body .title-wrapper,
body.fm-cart-page-body .wd-page-title,
body.fm-cart-page-body .entry-title,
body.fm-checkout-page-body .title-wrapper,
body.fm-checkout-page-body .wd-page-title,
body.fm-checkout-page-body .entry-title {
  display: none !important;
}
body.fm-cart-page-body .fm-cart-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}
body.fm-cart-page-body .fm-cart-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto auto auto;
  gap: 16px 20px;
  align-items: center;
  border: 1px solid var(--fm-gray-200, #e5e7eb);
  border-radius: 6px;
  padding: 16px 18px;
  background: #fff;
}
body.fm-cart-page-body .fm-cart-item__media {
  width: 96px !important;
  height: 96px !important;
  overflow: hidden;
  position: relative;
  background: #fff;
  border-radius: 4px;
}
body.fm-cart-page-body .fm-cart-item__media a {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}
body.fm-cart-page-body .fm-cart-item__media img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  margin: 0 !important;
  max-width: none !important;
}
body.fm-cart-page-body .fm-cart-item__media img:not(:first-of-type),
body.fm-cart-page-body .fm-cart-item__media .hover-img,
body.fm-cart-page-body .fm-cart-item__media a > img ~ img {
  display: none !important;
}
body.fm-cart-page-body .fm-cart-item__qty .quantity {
  display: inline-flex !important;
  width: auto !important;
  margin: 0 !important;
}
body.fm-cart-page-body .fm-cart-item__line {
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
}
@media (max-width: 900px) {
  body.fm-cart-page-body .fm-cart-item {
    grid-template-columns: 80px minmax(0, 1fr) auto;
    grid-template-areas:
      "media body actions"
      "media qty line";
    gap: 12px 14px;
  }
  body.fm-cart-page-body .fm-cart-item__media { grid-area: media; width: 80px !important; height: 80px !important; }
  body.fm-cart-page-body .fm-cart-item__body { grid-area: body; }
  body.fm-cart-page-body .fm-cart-item__qty { grid-area: qty; justify-self: start; }
  body.fm-cart-page-body .fm-cart-item__line { grid-area: line; justify-self: end; }
  body.fm-cart-page-body .fm-cart-item__actions { grid-area: actions; }
}
body.fm-cart-page-body .fm-cart-item__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}
body.fm-cart-page-body .fm-cart-item__title a {
  color: inherit;
  text-decoration: none;
}
body.fm-cart-page-body .fm-cart-item__remove {
  display: inline-flex;
  color: #555;
  text-decoration: none !important;
}
body.fm-cart-page-body .fm-cart-item__remove svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
}
body.fm-cart-page-body .fm-cart-item__remove:hover { color: var(--fm-red, #d62828); }
body.fm-cart-page-body .fm-cart-list__actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 4px;
}
body.fm-cart-page-body .fm-cart-update {
  background: #fff !important;
  color: #111 !important;
  border: 1.5px solid #111 !important;
  border-radius: 999px !important;
  min-height: 40px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}
body.fm-cart-page-body .fm-cart-side .cross-sells { display: none !important; }
body.fm-cart-page-body .fm-cart-side .cart_totals.fm-cart-box,
body.fm-cart-page-body .fm-cart-box {
  border: 1px solid var(--fm-gray-200, #e5e7eb);
  border-radius: 6px;
  padding: 18px;
  background: #fff;
}
body.fm-cart-page-body .fm-cart-box h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
}
body.fm-cart-page-body .fm-cart-sum-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  margin-bottom: 8px;
}
body.fm-cart-page-body .fm-cart-sum-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--fm-gray-200, #e5e7eb);
  font-size: 16px;
  font-weight: 800;
}
body.fm-cart-page-body a.fm-cart-checkout,
body.fm-cart-page-body .wc-proceed-to-checkout .checkout-button {
  display: block;
  width: 100%;
  margin-top: 16px;
  min-height: 48px;
  line-height: 48px;
  text-align: center;
  background: var(--fm-red, #d62828) !important;
  color: #fff !important;
  font-weight: 700;
  border-radius: 999px !important;
  border: 0 !important;
  text-decoration: none !important;
}
body.fm-cart-page-body a.fm-cart-checkout:hover {
  background: var(--fm-red-dark, #b91c1c) !important;
}
body.fm-checkout-page-body .fm-chk-page__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 8px;
  padding-block: 16px 0;
  padding-inline: 0; /* gutter already on .woocommerce */
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}
body.fm-checkout-page-body .fm-chk-page__head h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
}
body.fm-checkout-page-body .fm-chk-back-link {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  text-decoration: none;
}
body.fm-checkout-page-body .fm-chk-back-link:hover { color: var(--fm-red, #d62828); }
body.fm-checkout-page-body #place_order {
  background: var(--fm-red, #d62828) !important;
}
body.fm-chk-simple .fm-drop__btn--primary {
  background: var(--fm-red, #d62828) !important;
  border-color: var(--fm-red, #d62828) !important;
  color: #fff !important;
}
body.fm-chk-simple .fm-drop__btn--primary:hover,
body.fm-chk-simple .fm-drop__btn--primary:focus {
  background: var(--fm-red-dark, #b01f1f) !important;
  border-color: var(--fm-red-dark, #b01f1f) !important;
  color: #fff !important;
}

/* Hide WP blog sidebar / widgets on cart */
body.fm-cart-page-body .sidebar-container,
body.fm-cart-page-body .wd-sidebar,
body.fm-cart-page-body .widget_search,
body.fm-cart-page-body .widget_recent_entries,
body.fm-cart-page-body .widget_recent_comments,
body.fm-cart-page-body .widget_archive,
body.fm-cart-page-body .widget_categories,
body.fm-cart-page-body aside.widget-area,
body.fm-checkout-page-body .sidebar-container,
body.fm-checkout-page-body .wd-sidebar {
  display: none !important;
}

/* Hide promo / related / WoodMart empty-cart product rails under cart */
body.fm-cart-page-body .fm-cart-promos,
body.fm-cart-page-body .wd-cart-promotions,
body.fm-cart-page-body .cart-collaterals .cross-sells,
body.fm-cart-page-body .cross-sells,
body.fm-cart-page-body .wd-carousel-container,
body.fm-cart-page-body .wd-products,
body.fm-cart-page-body .related.products,
body.fm-cart-page-body .upsells.products,
body.fm-cart-page-body .woocommerce-cart .products,
body.fm-cart-page-body .entry-content > .wd-products-element,
body.fm-cart-page-body .entry-content > .woocommerce > .products,
body.fm-cart-page-body section.related,
body.fm-cart-page-body .fm-section--reco,
body.fm-cart-page-body h2.fm-section__title,
body.fm-cart-page-body .wd-empty-page + .products,
body.fm-cart-page-body .cart-empty + .products,
body.fm-cart-page-body .fm-cart-empty ~ .products,
body.fm-cart-page-body .fm-cart-empty ~ .wd-products-element,
body.fm-cart-page-body .fm-cart-empty ~ section,
body.fm-cart-page-body .fm-cart-page ~ .products,
body.fm-cart-page-body .fm-cart-page ~ section.fm-section {
  display: none !important;
}

/* Kill WoodMart side cart completely */
.cart-widget-side,
.wd-close-side,
body .cart-widget-side {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Checkout Agata layout — beat WoodMart flex/scallop + 50% column caps */
body.fm-checkout-page-body .fm-chk-page {
  width: 100%;
  max-width: none;
}
body.fm-checkout-page-body form.woocommerce-checkout.fm-chk__wrap,
body.fm-checkout-page-body .fm-chk__wrap {
  display: grid !important;
  grid-template-columns: minmax(0, 1.7fr) minmax(360px, 460px) !important;
  gap: 32px !important;
  align-items: start !important;
  max-width: none !important;
  margin: 0 !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
  padding-inline: 0 !important;
  box-sizing: border-box !important;
}
body.fm-checkout-page-body form.woocommerce-checkout > *,
body.fm-checkout-page-body form.woocommerce-checkout > .fm-chk__main,
body.fm-checkout-page-body form.woocommerce-checkout > .fm-chk__aside,
body.fm-checkout-page-body form.woocommerce-checkout > .customer-details,
body.fm-checkout-page-body form.woocommerce-checkout > .checkout-order-review {
  flex: none !important;
  flex-basis: auto !important;
  max-width: none !important;
  width: auto !important;
  order: unset !important;
}
body.fm-checkout-page-body .fm-chk__main,
body.fm-checkout-page-body .customer-details {
  width: 100% !important;
  max-width: none !important;
  flex: none !important;
  order: 0 !important;
}
body.fm-checkout-page-body .fm-chk__aside,
body.fm-checkout-page-body #fm-order-aside {
  width: 100% !important;
  max-width: none !important;
  flex: none !important;
  order: 0 !important;
  position: sticky;
  top: 100px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 22px 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
body.fm-checkout-page-body .fm-chk__aside::before,
body.fm-checkout-page-body .fm-chk__aside::after,
body.fm-checkout-page-body .checkout-order-review::before,
body.fm-checkout-page-body .checkout-order-review::after,
body.fm-checkout-page-body #fm-order-aside::before,
body.fm-checkout-page-body #fm-order-aside::after {
  content: none !important;
  display: none !important;
}
body.fm-checkout-page-body #order_review_heading {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  background: transparent !important;
  padding: 0 !important;
}
body.fm-checkout-page-body #order_review {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  position: static !important;
  box-shadow: none !important;
}
body.fm-checkout-page-body #customer_details,
body.fm-checkout-page-body .woocommerce-billing-fields,
body.fm-checkout-page-body .woocommerce-additional-fields {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 16px;
}
body.fm-checkout-page-body .woocommerce-billing-fields h3,
body.fm-checkout-page-body .woocommerce-additional-fields h3 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
}
body.fm-checkout-page-body #payment {
  background: #fafafa !important;
  border: 1px solid #eee !important;
  border-radius: 8px !important;
  padding: 16px !important;
  margin-top: 16px;
}

/* Payment methods: checkbox → logo → text (kill WoodMart flex/float breakage) */
body.fm-checkout-page-body #payment ul.payment_methods,
body.fm-checkout-page-body #payment ul.wc_payment_methods {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  float: none !important;
  width: 100% !important;
}
body.fm-checkout-page-body #payment ul.payment_methods > li.wc_payment_method {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "radio row"
    ".    box";
  column-gap: 12px;
  row-gap: 8px;
  align-items: center;
  margin: 0 0 10px !important;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  float: none !important;
  width: auto !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
body.fm-checkout-page-body #payment ul.payment_methods > li.wc_payment_method:last-child {
  margin-bottom: 0 !important;
}
body.fm-checkout-page-body #payment ul.payment_methods > li.wc_payment_method > .input-radio {
  grid-area: radio;
  align-self: center;
  margin: 0 !important;
  float: none !important;
  position: static !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  flex: none !important;
  accent-color: var(--fm-red, #d62828);
}
body.fm-checkout-page-body #payment ul.payment_methods > li.wc_payment_method > label,
body.fm-checkout-page-body #payment ul.payment_methods > li.wc_payment_method > .fm-pay-method__label {
  grid-area: row;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 12px;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  width: auto !important;
  max-width: 100%;
  min-width: 0;
  font-weight: 600;
  line-height: 1.3;
  color: #1a1a1a;
  cursor: pointer;
}
body.fm-checkout-page-body #payment .fm-pay-method__logo {
  /* Before any gateway-injected label text (Comfino prepends copy into <label>). */
  order: -1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 104px;
}
body.fm-checkout-page-body #payment .fm-pay-method__logo:empty {
  display: none;
}
body.fm-checkout-page-body #payment .fm-pay-method__text {
  order: 1;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
body.fm-checkout-page-body #payment .fm-pay-method__title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* Comfino SDK injects its own title text into the label — hide our duplicate. */
body.fm-checkout-page-body #payment .payment_method_comfino .fm-pay-method__text {
  display: none !important;
}
body.fm-checkout-page-body #payment .payment_method_comfino .fm-pay-method__label {
  flex-wrap: wrap;
}
body.fm-checkout-page-body #payment .payment_method_comfino .comfino-payment-method-item__logo,
body.fm-checkout-page-body #payment .payment_method_comfino .fm-pay-method__logo img {
  max-height: 24px !important;
  max-width: 110px !important;
}
body.fm-checkout-page-body #payment ul.payment_methods li img,
body.fm-checkout-page-body #payment .fm-pay-method__logo img,
body.fm-checkout-page-body #payment .montonio-payment-method-icon,
body.fm-checkout-page-body #payment img.payu-method-logo {
  display: block !important;
  float: none !important;
  margin: 0 !important;
  max-height: 28px !important;
  max-width: 96px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  vertical-align: middle;
}
body.fm-checkout-page-body #payment ul.payment_methods > li.wc_payment_method > .payment_box {
  grid-area: box;
  margin: 2px 0 0 !important;
  float: none !important;
  clear: none !important;
}
body.fm-checkout-page-body #payment .payment_box {
  background: #fff8e1 !important;
  color: #333 !important;
  width: auto !important;
  max-width: 100% !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere;
  padding: 12px 14px !important;
  border-radius: 6px;
  box-sizing: border-box;
}
body.fm-checkout-page-body #payment .payment_box:before {
  display: none !important;
}
body.fm-checkout-page-body #payment .payment_box p:last-child {
  margin-bottom: 0;
}
body.fm-checkout-page-body .fm-chk-page__head h1 {
  display: none !important;
}
@media (max-width: 900px) {
  body.fm-checkout-page-body form.woocommerce-checkout.fm-chk__wrap,
  body.fm-checkout-page-body .fm-chk__wrap {
    grid-template-columns: 1fr !important;
  }
  body.fm-checkout-page-body .fm-chk__aside {
    position: static;
  }
}

.fm-atc[hidden] { display: none !important; }
body.is-atc-open .fm-atc:not([hidden]) { display: grid; }

/* ATC set-deal cards */
.fm-atc-card--deal .fm-atc-card__old {
  display: block;
  font-size: 12px;
  color: #888;
  text-decoration: line-through;
  font-weight: 500;
  margin-bottom: 2px;
}
.fm-atc-card--deal .fm-atc-card__price strong { color: var(--fm-red, #d62828); }

/* Checkout wniesienie */
.fm-chk-extra {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: #fff8f8;
  border: 1px solid #f0c9c9;
  border-radius: 8px;
}
.fm-chk-extra__label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  margin: 0;
}
.fm-chk-extra__label input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--fm-red, #d62828);
}
.fm-chk-extra__label strong {
  display: block;
  font-size: 15px;
  color: #1a1a1a;
}
.fm-chk-extra__label em {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: #555;
  margin-top: 2px;
}

.fm-set-deal {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--fm-red, #d62828);
}

/* My Account — expand WoodMart wrappers to full page-max (match header width) */
body.fm-account-page-body {
  --wd-container-w: 100vw;
}
body.fm-account-page-body .website-wrapper,
body.fm-account-page-body .wd-page-wrapper,
body.fm-account-page-body .main-page-wrapper,
body.fm-account-page-body .wd-page-content,
body.fm-account-page-body #main-content,
body.fm-account-page-body #content,
body.fm-account-page-body .container,
body.fm-account-page-body .container-fluid,
body.fm-account-page-body .row,
body.fm-account-page-body [class*="col-"],
body.fm-account-page-body .wd-content-layout,
body.fm-account-page-body .wd-content-area,
body.fm-account-page-body .wd-entry-content,
body.fm-account-page-body .site-content,
body.fm-account-page-body .content-layout-wrapper,
body.fm-account-page-body article,
body.fm-account-page-body .entry-content,
body.fm-account-page-body .post-inner,
body.fm-account-page-body .page-content {
  max-width: none !important;
  width: 100% !important;
  flex: 1 1 100% !important;
  flex-basis: 100% !important;
  padding-inline: 0 !important;
  margin-inline: 0 !important;
  float: none !important;
}
body.fm-account-page-body .woocommerce {
  max-width: var(--fm-page-max, 1440px) !important;
  margin: 0 auto !important;
  padding: 28px var(--fm-gutter, 24px) 64px !important;
  width: 100%;
  box-sizing: border-box;
}
body.fm-account-page-body .wd-my-account-wrapper.wd-grid-g {
  display: grid !important;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr) !important;
  gap: 28px 36px !important;
  align-items: start;
  width: 100% !important;
  max-width: none !important;
  --wd-col: 1;
  --wd-col-lg: 1;
}
body.fm-account-page-body .wd-my-account-sidebar,
body.fm-account-page-body .woocommerce-MyAccount-content,
body.fm-account-page-body .fm-account-content {
  float: none !important;
  width: auto !important;
  max-width: none !important;
  grid-column: auto !important;
  background: #fff;
  min-width: 0;
}
body.fm-account-page-body .wd-my-account-sidebar {
  position: sticky;
  top: 96px;
  padding-inline-end: 0 !important;
  border-inline-end: none !important;
}
body.fm-account-page-body .woocommerce-MyAccount-title {
  margin: 0 0 12px;
  padding: 0 4px 0 2px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  border: none;
}
body.fm-account-page-body .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 10px;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
body.fm-account-page-body .woocommerce-MyAccount-navigation li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}
body.fm-account-page-body .woocommerce-MyAccount-navigation a {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  color: #1a1a1a;
  transition: background .15s, color .15s;
}
body.fm-account-page-body .woocommerce-MyAccount-navigation .is-active a,
body.fm-account-page-body .woocommerce-MyAccount-navigation li.is-active a,
body.fm-account-page-body .woocommerce-MyAccount-navigation a:hover {
  background: #fde8e8;
  color: var(--fm-red, #d62828);
}
.fm-account-dash {
  width: 100%;
  max-width: 100%;
}
.fm-account-dash__hero {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
}
.fm-account-dash__intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}
.fm-account-dash__hero h2,
.fm-account-dash__intro h2 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  font-weight: 700;
}
.fm-account-dash__hero p,
.fm-account-dash__intro p {
  margin: 0;
  color: #666;
  font-size: 14px;
  line-height: 1.45;
}
.fm-account-dash__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fde8e8;
  color: var(--fm-red, #d62828);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  align-self: center;
}
.fm-account-dash__avatar svg {
  display: block;
  width: 36px;
  height: 36px;
}
.fm-account-tiles {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
  width: 100%;
}
.fm-account-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 18px;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  text-decoration: none !important;
  color: inherit !important;
  background: #fff;
  min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
.fm-account-tile:hover {
  border-color: #f0c9c9;
  box-shadow: 0 6px 20px rgba(214, 40, 40, .08);
  color: inherit !important;
}
.fm-account-tile__ico {
  color: var(--fm-red, #d62828);
  margin-bottom: 4px;
  line-height: 0;
}
.fm-account-tile__ico svg {
  display: block;
}
.fm-account-tile strong {
  font-size: 15px;
  line-height: 1.3;
}
.fm-account-tile span:last-child {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}
.fm-account-empty {
  text-align: center;
  padding: 36px 20px;
  background: #fafafa;
  border-radius: 12px;
  border: 1px dashed #ddd;
}
.fm-account-empty__art { margin-bottom: 12px; }
.fm-account-empty h3 { margin: 0 0 8px; font-size: 18px; }
.fm-account-empty p { margin: 0 0 18px; color: #666; }
.fm-account-empty .fm-drop__btn { max-width: 260px; margin: 0 auto; }
.fm-account-dash__note { font-size: 14px; color: #555; }
.fm-account-dash__note a { color: var(--fm-red, #d62828); font-weight: 600; }

@media (max-width: 1100px) {
  body.fm-account-page-body .fm-account-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  body.fm-account-page-body .woocommerce {
    padding-top: 20px;
  }
  body.fm-account-page-body .wd-my-account-wrapper.wd-grid-g {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  body.fm-account-page-body .wd-my-account-sidebar {
    position: static;
  }
  body.fm-account-page-body .woocommerce-MyAccount-navigation ul {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
    padding: 8px;
  }
  body.fm-account-page-body .woocommerce-MyAccount-navigation a {
    white-space: nowrap;
    padding: 10px 12px;
  }
  body.fm-account-page-body .fm-account-tiles {
    grid-template-columns: 1fr;
  }
  .fm-account-dash__hero {
    gap: 14px;
  }
  .fm-account-dash__avatar {
    width: 56px;
    height: 56px;
  }
}

/* Kill WoodMart a:hover red-on-red for FM primary buttons */
body.fm-proto a.fm-drop__btn--primary,
body.fm-proto a.fm-drop__btn--primary:hover,
body.fm-proto a.fm-drop__btn--primary:focus,
body.fm-chk-simple a.fm-drop__btn--primary,
body.fm-chk-simple a.fm-drop__btn--primary:hover,
body.fm-chk-simple a.fm-drop__btn--primary:focus,
body.fm-account-page-body a.fm-drop__btn--primary,
body.fm-account-page-body a.fm-drop__btn--primary:hover {
  color: #fff !important;
}
body.fm-proto .fm-pcard__atc:hover,
body.fm-proto .fm-acat__atc:hover,
body.fm-archive-page .fm-acat__atc:hover {
  color: #fff !important;
}
body.fm-proto .fm-pcard__atc:hover svg,
body.fm-proto .fm-acat__atc:hover svg,
body.fm-archive-page .fm-acat__atc:hover svg {
  stroke: #fff !important;
  fill: none !important;
  color: #fff !important;
}

/* WoodMart / global: nigdy czerwony/ciemny tekst na czerwonym tle przy hover */
body.fm-proto .button.alt:hover,
body.fm-proto .button.alt:focus,
body.fm-proto button.button:hover,
body.fm-proto a.button:hover,
body.fm-proto .woocommerce-button:hover,
body.fm-proto .fm-cat-filters__apply:hover,
body.fm-proto .fm-cat-filters__apply:focus,
body.fm-archive-page .fm-cat-filters__apply:hover,
body.fm-archive-page .fm-cat-filters__apply:focus,
body.fm-chk-simple .button:hover,
body.fm-chk-simple button.button:hover,
body.fm-account-page-body .woocommerce-button:hover,
body.fm-account-page-body button.button:hover,
body.fm-pdp-page .single_add_to_cart_button:hover,
body.fm-pdp-page .woobt-form .single_add_to_cart_button:hover {
  color: #fff !important;
}

/* WPC FBT — czytelne przekreślenia + badge */
.woobt-wrap .woobt-before-text,
.woobt-wrap .woobt-above {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--fm-red, #d62828);
  border-radius: 4px;
}
.woobt-wrap del,
.woobt-wrap .woobt-price-ori,
.woobt-wrap .price del {
  opacity: 0.65;
  text-decoration: line-through;
  margin-right: 6px;
  color: #666 !important;
}
.woobt-wrap .woobt-price-new,
.woobt-wrap ins,
.woobt-wrap .price ins {
  color: var(--fm-red, #d62828) !important;
  text-decoration: none;
  font-weight: 700;
}
.fm-set-deal {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--fm-red, #d62828);
}

/* Gate: koszyk tylko z dopłatami (bez mebla) */
.fm-addon-gate {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.fm-addon-gate[hidden] {
  display: none !important;
}
.fm-addon-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.fm-addon-gate__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 28px 24px 22px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}
.fm-addon-gate__x {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #666;
}
.fm-addon-gate__panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  color: #111;
}
.fm-addon-gate__panel p {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.45;
  color: #333;
}
.fm-addon-gate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
body.is-addon-gate-open {
  overflow: hidden;
}
