/*
Theme Name: Fenmay
Theme URI: https://fenmay.com
Author: Fenmay
Description: Fenmay Shop-Theme – Dashcams & Zubehör. Weißes E-Commerce-Design mit Orange-Akzent.
Version: 1.0.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: fenmay
*/

/* ====== Tokens ====== */
:root {
  --fm-bg: #ffffff;
  --fm-bg-soft: #f7f7f8;
  --fm-bg-warm: #fff6f1;
  --fm-ink: #101112;
  --fm-ink-soft: #55595f;
  --fm-muted: #8a8f98;
  --fm-line: #ececee;
  --fm-accent: #ff5a00;
  --fm-accent-dark: #e04f00;
  --fm-accent-soft: #ffe9dd;
  --fm-dark: #0b0b0c;
  --fm-green: #1a7f37;
  --fm-radius: 14px;
  --fm-radius-sm: 10px;
  --fm-shadow: 0 10px 30px rgba(16, 17, 18, .08);
  --fm-shadow-lg: 0 18px 50px rgba(16, 17, 18, .14);
  --fm-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fm-w: 1200px;
}

/* ====== Base ====== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--fm-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fm-ink);
  background: var(--fm-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--fm-accent); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.fm-wrap { max-width: var(--fm-w); margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ====== Buttons ====== */
.fm-btn, .button, button.single_add_to_cart_button, .woocommerce #respond input#submit,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.wc-block-components-button, .checkout-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--fm-accent); color: #fff !important;
  border: 0; border-radius: var(--fm-radius-sm);
  padding: 13px 24px; font-size: 15px; font-weight: 700; font-family: var(--fm-font);
  cursor: pointer; transition: background .15s ease, transform .1s ease;
  text-decoration: none; line-height: 1.2;
}
.fm-btn:hover, .button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--fm-accent-dark); color: #fff; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt,
.woocommerce div.product form.cart .single_add_to_cart_button {
  background-color: var(--fm-accent) !important; color: #fff !important; border-radius: var(--fm-radius-sm);
  font-family: var(--fm-font); font-weight: 700;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover,
.woocommerce div.product form.cart .single_add_to_cart_button:hover { background-color: var(--fm-accent-dark) !important; }
.fm-btn:active { transform: translateY(1px); }
.fm-btn--ghost { background: transparent; color: var(--fm-ink) !important; border: 1.5px solid var(--fm-ink); }
.fm-btn--ghost:hover { background: var(--fm-ink); color: #fff !important; }
.fm-btn--dark { background: var(--fm-dark); }
.fm-btn--dark:hover { background: #222; }
.fm-btn--sm { padding: 9px 16px; font-size: 13.5px; border-radius: 9px; }

/* ====== Topbar ====== */
.fm-topbar { background: var(--fm-dark); color: #fff; font-size: 12.5px; }
.fm-topbar .fm-wrap { display: flex; justify-content: center; gap: 34px; padding-top: 8px; padding-bottom: 8px; }
.fm-topbar span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; opacity: .92; }
.fm-topbar svg { width: 13px; height: 13px; flex: none; }
@media (max-width: 760px) { .fm-topbar span:nth-child(n+2) { display: none; } }

/* ====== Header ====== */
.fm-header { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--fm-line); }
.fm-header .fm-wrap { display: flex; align-items: center; gap: 28px; height: 66px; }
.fm-logo { font-size: 23px; font-weight: 900; letter-spacing: -.02em; }
.fm-logo b { color: var(--fm-accent); }
.fm-nav { display: flex; gap: 4px; margin: 0 auto; }
.fm-nav > ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.fm-nav a { display: block; padding: 8px 13px; font-size: 14.5px; font-weight: 600; color: var(--fm-ink-soft); border-radius: 8px; }
.fm-nav a:hover { color: var(--fm-ink); background: var(--fm-bg-soft); }
.fm-nav li.current-menu-item > a, .fm-nav li.current_page_item > a { color: var(--fm-ink); position: relative; }
.fm-nav li.current-menu-item > a::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px; height: 2px; background: var(--fm-accent); border-radius: 2px; }
.fm-nav li { position: relative; }
.fm-nav li ul { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; border: 1px solid var(--fm-line); border-radius: 12px; box-shadow: var(--fm-shadow); padding: 8px; margin: 6px 0 0; list-style: none; z-index: 70; }
.fm-nav li:hover > ul, .fm-nav li:focus-within > ul { display: block; }
.fm-nav li ul a { padding: 9px 12px; border-radius: 8px; font-weight: 500; }
.fm-hicons { display: flex; align-items: center; gap: 6px; }
.fm-hicon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; color: var(--fm-ink); }
.fm-hicon:hover { background: var(--fm-bg-soft); color: var(--fm-ink); }
.fm-hicon svg { width: 21px; height: 21px; }
.fm-cart-count { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; background: var(--fm-accent); color: #fff; font-size: 10.5px; font-weight: 800; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.fm-burger { display: none; }

/* Mobile nav */
@media (max-width: 960px) {
  .fm-nav { display: none; position: fixed; inset: 66px 0 0 0; background: #fff; padding: 18px 20px; overflow: auto; z-index: 55; }
  .fm-nav > ul { flex-direction: column; gap: 2px; }
  .fm-nav a { font-size: 17px; padding: 12px 10px; }
  .fm-nav li ul { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 14px; margin: 0; }
  body.fm-nav-open .fm-nav { display: block; }
  body.fm-nav-open { overflow: hidden; }
  .fm-burger { display: inline-flex; }
}

/* ====== Search overlay ====== */
.fm-search { display: none; border-top: 1px solid var(--fm-line); background: #fff; }
body.fm-search-open .fm-search { display: block; }
.fm-search form { display: flex; gap: 10px; padding: 14px 0; }
.fm-search input[type="search"] { flex: 1; border: 1.5px solid var(--fm-line); border-radius: 10px; padding: 12px 16px; font-size: 15px; font-family: var(--fm-font); }
.fm-search input[type="search"]:focus { outline: none; border-color: var(--fm-accent); }

/* ====== Hero ====== */
.fm-hero { background: var(--fm-bg-warm); overflow: hidden; }
.fm-hero .fm-wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; align-items: center; padding-top: 46px; padding-bottom: 54px; }
.fm-hero-eyebrow { color: var(--fm-accent); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.fm-hero h1 { font-size: clamp(34px, 4.6vw, 56px); margin-bottom: 18px; }
.fm-hero-sub { font-size: 17px; color: var(--fm-ink-soft); max-width: 46ch; margin-bottom: 26px; }
.fm-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.fm-hero-trust { display: flex; align-items: center; gap: 12px; color: var(--fm-ink-soft); font-size: 13.5px; }
.fm-hero-trust svg { width: 17px; height: 17px; color: var(--fm-accent); flex: none; }
.fm-hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.fm-hero-visual { position: relative; min-height: 380px; }
.fm-hero-visual > .fm-hero-img { position: absolute; inset: 0; margin: auto; width: min(88%, 430px); border-radius: 22px; overflow: hidden; box-shadow: var(--fm-shadow-lg); }
.fm-hero-card { position: absolute; display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 13px; padding: 9px 13px 9px 9px; box-shadow: var(--fm-shadow); z-index: 2; }
.fm-hero-card img { width: 46px; height: 46px; border-radius: 9px; object-fit: cover; }
.fm-hero-card .t { font-size: 12.5px; font-weight: 700; line-height: 1.25; }
.fm-hero-card .p { font-size: 12.5px; color: var(--fm-accent); font-weight: 800; }
.fm-hero-card--1 { top: 4%; left: -2%; }
.fm-hero-card--2 { top: 16%; right: -1%; }
.fm-hero-card--3 { bottom: 12%; left: 1%; }
.fm-hero-card--4 { bottom: 4%; right: 4%; }
@media (max-width: 960px) {
  .fm-hero .fm-wrap { grid-template-columns: 1fr; padding-top: 34px; }
  .fm-hero-visual { min-height: 340px; }
  .fm-hero-card--1 { left: 0; } .fm-hero-card--2 { right: 0; }
}

/* ====== Feature strip ====== */
.fm-features { border-bottom: 1px solid var(--fm-line); background: #fff; }
.fm-features .fm-wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-top: 22px; padding-bottom: 22px; }
.fm-feature { display: flex; gap: 13px; align-items: flex-start; }
.fm-feature svg { width: 26px; height: 26px; color: var(--fm-ink); flex: none; margin-top: 2px; }
.fm-feature .t { font-size: 14.5px; font-weight: 800; }
.fm-feature .d { font-size: 13px; color: var(--fm-muted); }
@media (max-width: 960px) { .fm-features .fm-wrap { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .fm-features .fm-wrap { grid-template-columns: 1fr; } }

/* ====== Sections ====== */
.fm-section { padding: 46px 0 10px; }
.fm-sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.fm-sechead h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 0; }
.fm-sechead a { font-size: 14px; font-weight: 700; color: var(--fm-ink-soft); white-space: nowrap; }
.fm-sechead a:hover { color: var(--fm-accent); }

/* ====== Category tiles ====== */
.fm-cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.fm-cat { position: relative; border-radius: var(--fm-radius); overflow: hidden; aspect-ratio: 3 / 4; background: var(--fm-bg-soft); }
.fm-cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.fm-cat:hover img { transform: scale(1.04); }
.fm-cat .lbl { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: rgba(255,255,255,.94); border-radius: 10px; padding: 9px 12px; }
.fm-cat .lbl .n { font-size: 13.5px; font-weight: 800; }
.fm-cat .lbl .s { font-size: 11.5px; color: var(--fm-muted); font-weight: 600; }
.fm-cat .lbl svg { width: 15px; height: 15px; color: var(--fm-accent); flex: none; }
@media (max-width: 960px) { .fm-cats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .fm-cats { grid-template-columns: repeat(2, 1fr); } }

/* ====== Product cards ====== */
.fm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fm-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .fm-grid, .fm-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .fm-grid, .fm-grid--3 { grid-template-columns: 1fr 1fr; gap: 10px; } }

.fm-card { position: relative; background: #fff; border: 1px solid var(--fm-line); border-radius: var(--fm-radius); padding: 12px; display: flex; flex-direction: column; transition: box-shadow .2s ease, transform .2s ease; }
.fm-card:hover { box-shadow: var(--fm-shadow); transform: translateY(-2px); }
.fm-card-img { position: relative; border-radius: 10px; overflow: hidden; background: var(--fm-bg-soft); aspect-ratio: 1 / 1; margin-bottom: 12px; }
.fm-card-img img { width: 100%; height: 100%; object-fit: cover; }
.fm-badge { position: absolute; top: 10px; left: 10px; z-index: 2; font-size: 11px; font-weight: 800; letter-spacing: .02em; padding: 4px 9px; border-radius: 7px; background: var(--fm-dark); color: #fff; }
.fm-badge--sale { background: var(--fm-accent); }
.fm-badge--best { background: #ffb020; color: #241a00; }
.fm-card-cat { font-size: 11.5px; font-weight: 700; color: var(--fm-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.fm-card-title { font-size: 15px; font-weight: 700; line-height: 1.3; margin-bottom: 6px; flex: 1; }
.fm-card-title a:hover { color: var(--fm-accent); }
.fm-price { display: flex; align-items: baseline; gap: 8px; font-size: 16.5px; font-weight: 800; }
.fm-price del { color: var(--fm-muted); font-weight: 600; font-size: 13.5px; }
.fm-price ins { text-decoration: none; color: var(--fm-accent); }
.fm-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.fm-card .fm-vat { font-size: 10.5px; color: var(--fm-muted); margin-top: 2px; }
.fm-addcart { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; background: var(--fm-dark); color: #fff !important; border-radius: 10px; border: 0; cursor: pointer; transition: background .15s; padding: 0; }
.fm-addcart:hover { background: var(--fm-accent); }
.fm-addcart svg { width: 18px; height: 18px; }
.fm-addcart.loading { opacity: .5; pointer-events: none; }
.fm-addcart.added { background: var(--fm-green); }

/* ====== Bestseller wide cards ====== */
.fm-best { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fm-bestcard { display: grid; grid-template-columns: 132px 1fr; gap: 14px; background: var(--fm-bg-soft); border-radius: var(--fm-radius); padding: 14px; align-items: center; position: relative; border: 1px solid transparent; transition: border-color .2s, background .2s; }
.fm-bestcard:hover { border-color: var(--fm-line); background: #fff; box-shadow: var(--fm-shadow); }
.fm-bestcard .img { border-radius: 10px; overflow: hidden; aspect-ratio: 1/1; background: #fff; }
.fm-bestcard .img img { width: 100%; height: 100%; object-fit: cover; }
.fm-bestcard .fm-badge { position: static; display: inline-block; margin-bottom: 7px; }
.fm-bestcard .t { font-size: 15.5px; font-weight: 800; line-height: 1.25; margin-bottom: 4px; }
.fm-bestcard .d { font-size: 12.5px; color: var(--fm-muted); line-height: 1.45; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 960px) { .fm-best { grid-template-columns: 1fr; } }

/* ====== Promo banners ====== */
.fm-promos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fm-promo { position: relative; border-radius: var(--fm-radius); overflow: hidden; min-height: 240px; display: flex; align-items: center; }
.fm-promo img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fm-promo .in { position: relative; z-index: 2; padding: 30px; max-width: 62%; }
.fm-promo--sale .in { color: #fff; }
.fm-promo--sale::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(200,60,0,.88) 0%, rgba(255,90,0,.45) 55%, rgba(255,90,0,0) 100%); z-index: 1; }
.fm-promo--dark .in { color: #fff; }
.fm-promo--dark::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,5,8,.82) 0%, rgba(5,5,8,.35) 60%, rgba(5,5,8,0) 100%); z-index: 1; }
.fm-promo .k { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .85; margin-bottom: 8px; }
.fm-promo .h { font-size: clamp(21px, 2.4vw, 30px); font-weight: 900; line-height: 1.15; margin-bottom: 10px; }
.fm-promo .s { font-size: 13.5px; opacity: .9; margin-bottom: 16px; }
@media (max-width: 860px) { .fm-promos { grid-template-columns: 1fr; } .fm-promo .in { max-width: 78%; } }

/* ====== Blog cards ====== */
.fm-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fm-post { border: 1px solid var(--fm-line); border-radius: var(--fm-radius); overflow: hidden; background: #fff; transition: box-shadow .2s, transform .2s; display: flex; flex-direction: column; }
.fm-post:hover { box-shadow: var(--fm-shadow); transform: translateY(-2px); }
.fm-post .img { aspect-ratio: 16 / 9; background: var(--fm-bg-soft); overflow: hidden; }
.fm-post .img img { width: 100%; height: 100%; object-fit: cover; }
.fm-post .in { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.fm-post .cat { font-size: 11.5px; font-weight: 800; color: var(--fm-accent); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; }
.fm-post .t { font-size: 16.5px; font-weight: 800; line-height: 1.3; margin-bottom: 8px; }
.fm-post .x { font-size: 13.5px; color: var(--fm-ink-soft); line-height: 1.5; margin-bottom: 12px; flex: 1; }
.fm-post .meta { font-size: 12px; color: var(--fm-muted); }
@media (max-width: 860px) { .fm-posts { grid-template-columns: 1fr; } }

/* ====== Newsletter / bottom strip ====== */
.fm-strip { background: var(--fm-bg-soft); border-radius: var(--fm-radius); padding: 26px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 960px) { .fm-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .fm-strip { grid-template-columns: 1fr; } }

/* ====== Footer ====== */
.fm-footer { margin-top: 56px; border-top: 1px solid var(--fm-line); background: #fff; }
.fm-footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding: 44px 0 30px; }
.fm-footer h4 { font-size: 13.5px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; color: var(--fm-ink); }
.fm-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.fm-footer ul a { font-size: 14px; color: var(--fm-ink-soft); }
.fm-footer ul a:hover { color: var(--fm-accent); }
.fm-footer-brand p { font-size: 13.5px; color: var(--fm-ink-soft); max-width: 34ch; }
.fm-paychips { display: flex; gap: 7px; margin-top: 14px; flex-wrap: wrap; }
.fm-paychips span { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; border: 1px solid var(--fm-line); border-radius: 6px; padding: 5px 9px; color: var(--fm-ink-soft); background: var(--fm-bg-soft); }
.fm-footer-bottom { border-top: 1px solid var(--fm-line); padding: 16px 0 18px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--fm-muted); }
@media (max-width: 860px) { .fm-footer-main { grid-template-columns: 1fr 1fr; } }

/* ====== Cookie banner ====== */
.fm-cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; background: var(--fm-dark); color: #fff; border-radius: 14px; padding: 16px 18px; display: none; box-shadow: var(--fm-shadow-lg); max-width: 760px; margin: 0 auto; }
.fm-cookie.show { display: block; }
.fm-cookie-main { display: flex; gap: 16px; align-items: center; }
.fm-cookie p { margin: 0; font-size: 13px; opacity: .92; flex: 1; }
.fm-cookie a { text-decoration: underline; color: #fff; }
.fm-cookie .fm-btn { padding: 9px 14px; font-size: 13px; flex: none; white-space: nowrap; }
.fm-cookie-actions { display: flex; gap: 8px; flex: none; flex-wrap: wrap; }
.fm-cookie-ghost { background: transparent !important; border: 1.5px solid rgba(255,255,255,.45); color: #fff !important; }
.fm-cookie-ghost:hover { background: rgba(255,255,255,.12) !important; border-color: #fff; }
.fm-cookie-panel { border-top: 1px solid rgba(255,255,255,.18); margin-top: 14px; padding-top: 14px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.fm-cookie-panel[hidden] { display: none; }
.fm-cookie-opt { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }
.fm-cookie-opt span { opacity: .6; font-size: 12px; }
.fm-cookie-opt input { accent-color: var(--fm-accent); width: 16px; height: 16px; }
.fm-cookie-panel .fm-btn { margin-left: auto; }
@media (max-width: 720px) {
  .fm-cookie-main { flex-direction: column; align-items: stretch; text-align: center; }
  .fm-cookie-actions { justify-content: center; }
  .fm-cookie-panel { flex-direction: column; align-items: flex-start; }
  .fm-cookie-panel .fm-btn { margin-left: 0; width: 100%; }
}

/* ====== Inner pages / content ====== */
.fm-page { padding: 40px 0 30px; }
.fm-page-head { margin-bottom: 26px; }
.fm-page-head h1 { font-size: clamp(26px, 3.4vw, 40px); }
.fm-page-head .sub { color: var(--fm-ink-soft); font-size: 16px; max-width: 64ch; }
.fm-content { max-width: 760px; }
.fm-content h2 { font-size: 24px; margin: 1.4em 0 .5em; }
.fm-content h3 { font-size: 19px; margin: 1.2em 0 .4em; }
.fm-content ul, .fm-content ol { padding-left: 22px; margin: 0 0 1.1em; }
.fm-content li { margin-bottom: .35em; }
.fm-content a { color: var(--fm-accent); font-weight: 600; }
.fm-content a:hover { text-decoration: underline; }
.fm-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.3em; font-size: 14.5px; }
.fm-content th, .fm-content td { border: 1px solid var(--fm-line); padding: 9px 12px; text-align: left; vertical-align: top; }
.fm-content th { background: var(--fm-bg-soft); font-weight: 700; }
.fm-content img { border-radius: 12px; }
.fm-content blockquote { border-left: 3px solid var(--fm-accent); margin: 0 0 1.2em; padding: 6px 0 6px 18px; color: var(--fm-ink-soft); }

/* Blog listing */
.fm-bloglist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .fm-bloglist { grid-template-columns: 1fr; } }
.fm-pagination { display: flex; gap: 6px; margin: 30px 0 10px; flex-wrap: wrap; }
.fm-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 8px; border: 1px solid var(--fm-line); border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--fm-ink-soft); }
.fm-pagination .page-numbers.current { background: var(--fm-dark); color: #fff; border-color: var(--fm-dark); }
.fm-pagination a.page-numbers:hover { border-color: var(--fm-accent); color: var(--fm-accent); }

/* Single post */
.fm-single-head { max-width: 760px; margin-bottom: 22px; }
.fm-single-head .cat { color: var(--fm-accent); font-weight: 800; font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; }
.fm-single-head h1 { font-size: clamp(26px, 3.4vw, 38px); margin: 8px 0 10px; }
.fm-single-head .meta { color: var(--fm-muted); font-size: 13px; }
.fm-single-fig { max-width: 900px; margin: 0 0 28px; }
.fm-single-fig img { border-radius: var(--fm-radius); width: 100%; }
.fm-related { margin-top: 44px; }

/* ====== WooCommerce overrides ====== */
.woocommerce .fm-wrap { padding-top: 10px; }
.woocommerce-breadcrumb { font-size: 12.5px !important; color: var(--fm-muted) !important; margin-bottom: 18px !important; }
.woocommerce-breadcrumb a { color: var(--fm-muted); }
.woocommerce-result-count { color: var(--fm-muted); font-size: 13.5px; }
.woocommerce-ordering select { border: 1.5px solid var(--fm-line); border-radius: 9px; padding: 8px 12px; font-family: var(--fm-font); font-size: 13.5px; background: #fff; }
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-NoticeGroup .woocommerce-error {
  border-radius: 12px; border: 1px solid var(--fm-line); background: var(--fm-bg-soft);
  color: var(--fm-ink); padding: 14px 18px !important; margin-bottom: 20px; list-style: none;
  border-top: 3px solid var(--fm-accent) !important;
}
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before,
p.cart-empty::before, .wc-block-components-notice-banner::before {
  display: none !important; content: none !important;
}
.woocommerce-message, .woocommerce-info, .woocommerce-error, p.cart-empty {
  padding: 14px 18px !important; margin-left: 0; list-style: none;
}
p.cart-empty.woocommerce-info {
  border: 1px solid var(--fm-line); border-top: 3px solid var(--fm-accent); border-radius: 12px;
  background: var(--fm-bg-soft); color: var(--fm-ink);
}
.woocommerce-message:focus, .woocommerce-info:focus, .woocommerce-error:focus {
  outline: 2px solid var(--fm-accent-soft); outline-offset: 2px;
}
.woocommerce-error { border-top-color: #d63638 !important; }
.woocommerce-message .button, .woocommerce-info .button { background: var(--fm-dark); }

/* Single product — маппинг на разметку Woo */
.woocommerce div.product { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 48px; align-items: start; padding: 10px 0 30px; position: relative; }
@media (max-width: 860px) { .woocommerce div.product { grid-template-columns: 1fr; gap: 24px; } }
.woocommerce div.product div.images, .woocommerce #content div.product div.images { width: 100% !important; float: none !important; margin: 0 !important; border: 1px solid var(--fm-line); border-radius: var(--fm-radius); overflow: hidden; background: var(--fm-bg-soft); }
.woocommerce div.product div.images img { width: 100%; height: auto; }
.woocommerce div.product div.summary, .woocommerce #content div.product div.summary { width: 100% !important; float: none !important; margin: 0 !important; }
.woocommerce div.product .fm-tabs, .woocommerce div.product .related.products { grid-column: 1 / -1; }
.woocommerce span.onsale { position: absolute; top: 12px; left: 12px; z-index: 3; background: var(--fm-accent); color: #fff; font-size: 12px; font-weight: 800; min-height: 0; min-width: 0; line-height: 1; padding: 6px 10px; border-radius: 8px; margin: 0 !important; }
.woocommerce div.product div.images { position: relative; }
.woocommerce div.product p.price { font-size: 26px; font-weight: 800; color: var(--fm-ink); margin-bottom: 4px; }
.woocommerce div.product p.price del { color: var(--fm-muted); font-weight: 600; font-size: 17px; opacity: 1; }
.woocommerce div.product p.price ins { color: var(--fm-accent); text-decoration: none; font-weight: 800; }
.woocommerce div.product .product_title { font-size: clamp(24px, 3vw, 34px); margin-bottom: 10px; }
.woocommerce div.product .woocommerce-product-details__short-description { font-size: 15.5px; color: var(--fm-ink-soft); margin-bottom: 18px; }
.woocommerce div.product form.cart { display: flex; gap: 10px; margin: 0 0 20px; flex-wrap: wrap; }
.woocommerce div.product form.cart div.quantity { float: none; margin: 0; }
.woocommerce div.product form.cart .qty { width: 74px; height: 100%; min-height: 48px; border: 1.5px solid var(--fm-line); border-radius: 10px; text-align: center; font-size: 15px; font-weight: 700; font-family: var(--fm-font); }
.woocommerce div.product .product_meta { font-size: 13px; color: var(--fm-muted); margin-top: 14px; }
.woocommerce div.product .product_meta a { color: var(--fm-accent); font-weight: 600; }
.fm-product-gal { position: sticky; top: 90px; border: 1px solid var(--fm-line); border-radius: var(--fm-radius); overflow: hidden; background: var(--fm-bg-soft); }
.fm-product-gal img { width: 100%; height: auto; }
.fm-product-info .cats { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--fm-muted); margin-bottom: 8px; }
.fm-product-info .cats a { color: var(--fm-accent); }
.fm-product-info h1 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 12px; }
.fm-product-info .fm-price { font-size: 26px; margin-bottom: 4px; }
.fm-product-info .fm-vat { font-size: 12px; color: var(--fm-muted); margin-bottom: 18px; }
.fm-product-info .fm-vat a { text-decoration: underline; }
.fm-product-short { font-size: 15.5px; color: var(--fm-ink-soft); margin-bottom: 20px; }
.fm-product-info form.cart { display: flex; gap: 10px; align-items: stretch; margin-bottom: 22px; flex-wrap: wrap; }
.fm-product-info form.cart .quantity { display: flex; }
.fm-product-info form.cart .qty { width: 74px; border: 1.5px solid var(--fm-line); border-radius: 10px; text-align: center; font-size: 15px; font-weight: 700; font-family: var(--fm-font); }
.fm-product-info form.cart .qty:focus { outline: none; border-color: var(--fm-accent); }
.single_add_to_cart_button { padding: 14px 30px !important; font-size: 15.5px !important; }
.fm-prod-usps { display: grid; gap: 9px; border: 1px solid var(--fm-line); border-radius: 12px; padding: 15px 17px; margin-bottom: 22px; background: #fff; }
.fm-prod-usps span { display: flex; gap: 9px; align-items: center; font-size: 13.5px; color: var(--fm-ink-soft); }
.fm-prod-usps svg { width: 16px; height: 16px; color: var(--fm-green); flex: none; }
.fm-tabs { margin-top: 8px; }
.fm-tabs h2 { font-size: 21px; margin: 26px 0 12px; }
.fm-specs { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.fm-specs th, .fm-specs td { border-bottom: 1px solid var(--fm-line); padding: 10px 12px; text-align: left; }
.fm-specs th { width: 42%; color: var(--fm-muted); font-weight: 600; background: transparent; }
.related.products { margin-top: 40px; }
.related.products > h2 { font-size: 24px; margin-bottom: 18px; }

/* Cart */
.woocommerce-cart-form { margin-bottom: 24px; }
.woocommerce table.shop_table { border: 1px solid var(--fm-line) !important; border-radius: var(--fm-radius); border-collapse: separate !important; border-spacing: 0; overflow: hidden; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { border-bottom: 1px solid var(--fm-line) !important; padding: 13px 14px !important; font-size: 14.5px; }
.woocommerce table.shop_table thead th { background: var(--fm-bg-soft); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.woocommerce table.shop_table img { width: 64px; border-radius: 9px; }
.woocommerce table.shop_table .product-name a { font-weight: 700; }
.woocommerce table.shop_table td.actions { background: var(--fm-bg-soft); }
.woocommerce .quantity .qty { width: 66px; border: 1.5px solid var(--fm-line); border-radius: 9px; padding: 8px; text-align: center; font-family: var(--fm-font); }
.woocommerce a.remove { color: #d63638 !important; font-size: 22px; width: 26px; height: 26px; line-height: 24px; border-radius: 7px; }
.woocommerce a.remove:hover { background: #d63638 !important; }
.cart_totals { border: 1px solid var(--fm-line); border-radius: var(--fm-radius); padding: 20px 22px; background: var(--fm-bg-soft); }
.cart_totals h2 { font-size: 19px; margin-bottom: 10px; }
.cart_totals table.shop_table { border: 0 !important; background: transparent; }
.wc-proceed-to-checkout .checkout-button { width: 100%; padding: 15px 20px !important; font-size: 16px !important; }

/* Checkout */
.woocommerce-checkout .fm-page-head { margin-bottom: 12px; }
.woocommerce form .form-row label { font-size: 13px; font-weight: 700; margin-bottom: 4px; color: var(--fm-ink-soft); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select,
.select2-container--default .select2-selection--single {
  border: 1.5px solid var(--fm-line) !important; border-radius: 10px !important; padding: 12px 14px !important;
  font-size: 14.5px; font-family: var(--fm-font); background: #fff; height: auto !important; line-height: 1.4 !important;
}
.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row textarea:focus { outline: none; border-color: var(--fm-accent) !important; box-shadow: 0 0 0 3px var(--fm-accent-soft); }
.select2-container--default .select2-selection__rendered { line-height: 1.4 !important; padding: 0 !important; }
.select2-container--default .select2-selection__arrow { height: 100% !important; }
#order_review_heading { font-size: 21px; margin: 26px 0 12px; }
#order_review { border: 1px solid var(--fm-line); border-radius: var(--fm-radius); padding: 20px; background: var(--fm-bg-soft); }
#order_review table.shop_table { border: 0 !important; background: transparent; }
#payment { background: transparent !important; }
#payment ul.payment_methods { border-bottom: 1px solid var(--fm-line) !important; padding: 0 0 14px !important; }
#payment ul.payment_methods li { list-style: none; }
#payment div.payment_box { background: #fff !important; border: 1px solid var(--fm-line); border-radius: 10px; }
#payment div.payment_box::before { display: none; }
#place_order { width: 100%; padding: 15px 20px !important; font-size: 16px !important; background: var(--fm-accent) !important; }
#place_order:hover { background: var(--fm-accent-dark) !important; }
.woocommerce-privacy-policy-text { font-size: 12.5px; color: var(--fm-muted); }

/* Fake card fields */
.fm-cardform { display: grid; gap: 12px; }
.fm-cardform .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fm-cardform label { font-size: 12.5px; font-weight: 700; color: var(--fm-ink-soft); display: block; margin-bottom: 4px; }
.fm-cardform input { width: 100%; border: 1.5px solid var(--fm-line); border-radius: 10px; padding: 12px 14px; font-size: 15px; font-family: var(--fm-font); letter-spacing: .04em; }
.fm-cardform input:focus { outline: none; border-color: var(--fm-accent); box-shadow: 0 0 0 3px var(--fm-accent-soft); }
.fm-cardform .hint { font-size: 11.5px; color: var(--fm-muted); display: flex; align-items: center; gap: 6px; }
.fm-cardform .hint svg { width: 13px; height: 13px; }

/* Payment-unavailable / lead form */
.fm-paynote { max-width: 620px; margin: 0 auto; text-align: center; padding: 30px 0 10px; }
.fm-paynote .ico { width: 64px; height: 64px; border-radius: 50%; background: var(--fm-accent-soft); color: var(--fm-accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.fm-paynote .ico svg { width: 30px; height: 30px; }
.fm-paynote h1 { font-size: clamp(24px, 3vw, 32px); }
.fm-paynote .sub { color: var(--fm-ink-soft); font-size: 15.5px; margin-bottom: 26px; }
.fm-leadform { text-align: left; border: 1px solid var(--fm-line); border-radius: var(--fm-radius); padding: 24px; background: #fff; box-shadow: var(--fm-shadow); display: grid; gap: 14px; }
.fm-leadform label { font-size: 13px; font-weight: 700; color: var(--fm-ink-soft); display: block; margin-bottom: 5px; }
.fm-leadform input { width: 100%; border: 1.5px solid var(--fm-line); border-radius: 10px; padding: 12px 14px; font-size: 15px; font-family: var(--fm-font); }
.fm-leadform input:focus { outline: none; border-color: var(--fm-accent); box-shadow: 0 0 0 3px var(--fm-accent-soft); }
.fm-leadform .fm-btn { width: 100%; }
.fm-leadform .privacy { font-size: 12px; color: var(--fm-muted); }
.fm-leadform .privacy a { text-decoration: underline; }
.fm-lead-ok { text-align: center; padding: 20px 10px; }
.fm-lead-ok .ico { width: 64px; height: 64px; border-radius: 50%; background: #e7f5eb; color: var(--fm-green); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.fm-lead-ok .ico svg { width: 30px; height: 30px; }

/* Thank you */
.woocommerce-order .woocommerce-thankyou-order-received { font-size: 21px; font-weight: 800; margin-bottom: 18px; }
.woocommerce ul.order_details { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; padding: 18px; margin: 0 0 24px; border: 1px solid var(--fm-line); border-radius: var(--fm-radius); background: var(--fm-bg-soft); }
.woocommerce ul.order_details li { border-right: 1px dashed var(--fm-line); padding-right: 14px; font-size: 12px; text-transform: uppercase; color: var(--fm-muted); }
.woocommerce ul.order_details li strong { display: block; font-size: 14.5px; color: var(--fm-ink); margin-top: 3px; }

/* Shop archive wrapper */
.fm-shop-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.fm-shop-head h1 { font-size: clamp(24px, 3vw, 34px); margin: 0; }
.fm-catchips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.fm-catchips a { font-size: 13px; font-weight: 700; border: 1.5px solid var(--fm-line); padding: 8px 14px; border-radius: 999px; color: var(--fm-ink-soft); }
.fm-catchips a:hover, .fm-catchips a.on { border-color: var(--fm-accent); color: var(--fm-accent); background: var(--fm-accent-soft); }

/* ====== Shop toolbar: счётчик + сортировка (Woo-флоаты) ====== */
.woocommerce-result-count { float: left; margin: 8px 0 20px !important; }
.woocommerce-ordering { float: right; margin: 0 0 20px !important; }
.woocommerce-ordering select { min-width: 220px; appearance: auto; -webkit-appearance: menulist; }
.fm-grid { clear: both; }
.fm-catchips { clear: both; }

/* Woo-пагинация в архивах */
.woocommerce nav.woocommerce-pagination { clear: both; text-align: center; margin: 30px 0 10px; }
.woocommerce nav.woocommerce-pagination ul { display: inline-flex; gap: 6px; list-style: none; margin: 0; padding: 0; border: 0 !important; flex-wrap: wrap; }
.woocommerce nav.woocommerce-pagination ul li { border: 0 !important; margin: 0; }
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px;
  border: 1px solid var(--fm-line); border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--fm-ink-soft); background: #fff;
}
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--fm-dark); color: #fff; border-color: var(--fm-dark); }
.woocommerce nav.woocommerce-pagination ul li a:hover { border-color: var(--fm-accent); color: var(--fm-accent); background: #fff; }

/* ====== Корзина: купон и таблица ====== */
.woocommerce-cart-form table.shop_table td.actions { padding: 14px !important; }
.woocommerce-cart-form td.actions .coupon { float: none !important; display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; margin-bottom: 10px; }
.woocommerce-cart-form td.actions .coupon .input-text {
  width: 230px !important; float: none !important; margin: 0 !important;
  border: 1.5px solid var(--fm-line) !important; border-radius: 10px; padding: 11px 14px !important;
  font-size: 14px; font-family: var(--fm-font); background: #fff; box-sizing: border-box; height: auto;
}
.woocommerce-cart-form td.actions .coupon .input-text:focus { outline: none; border-color: var(--fm-accent) !important; }
.woocommerce-cart-form td.actions .coupon button { flex: none; }
.woocommerce-cart-form td.actions > .button { float: right; }
.woocommerce table.shop_table td.product-name { overflow-wrap: anywhere; min-width: 140px; }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { vertical-align: middle; }
.woocommerce-cart table.cart td.product-thumbnail { width: 84px; }
.woocommerce-cart .cart-collaterals { margin-top: 10px; }
.woocommerce-cart .cart-collaterals .cart_totals { width: 100%; max-width: 460px; margin-left: auto; float: none; }

/* ====== Mein Konto ====== */
.woocommerce-MyAccount-navigation { float: none !important; width: 100% !important; margin-bottom: 24px; }
.woocommerce-MyAccount-navigation ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.woocommerce-MyAccount-navigation li a { display: inline-block; font-size: 13.5px; font-weight: 700; border: 1.5px solid var(--fm-line); padding: 9px 15px; border-radius: 999px; color: var(--fm-ink-soft); }
.woocommerce-MyAccount-navigation li.is-active a, .woocommerce-MyAccount-navigation li a:hover { border-color: var(--fm-accent); color: var(--fm-accent); background: var(--fm-accent-soft); }
.woocommerce-MyAccount-content { float: none !important; width: 100% !important; }
.woocommerce-form-login, .woocommerce-form-register {
  max-width: 440px; border: 1px solid var(--fm-line) !important; border-radius: var(--fm-radius) !important;
  padding: 24px !important; background: #fff; box-shadow: var(--fm-shadow);
}
.woocommerce-form-login .woocommerce-form-login__rememberme { display: block; margin-bottom: 12px; }
#customer_login { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
#customer_login .u-column1, #customer_login .u-column2 { width: 100%; float: none; }
@media (max-width: 860px) { #customer_login { grid-template-columns: 1fr; } }
.woocommerce-EditAccountForm fieldset { border: 1px solid var(--fm-line); border-radius: 12px; padding: 16px; margin: 0 0 18px; }

/* ====== Checkout: колонки и мобильный ====== */
.woocommerce-checkout .col2-set { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; width: 100%; }
.woocommerce-checkout .col2-set .col-1, .woocommerce-checkout .col2-set .col-2 { width: 100% !important; float: none !important; }
@media (max-width: 860px) { .woocommerce-checkout .col2-set { grid-template-columns: 1fr; } }
#order_review table.shop_table { font-size: 14px; }
#order_review table.shop_table td, #order_review table.shop_table th { padding: 10px 8px !important; }

/* ====== Контент-таблицы на мобильном ====== */
@media (max-width: 700px) {
  .fm-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .fm-specs { display: block; overflow-x: auto; }
  .woocommerce table.shop_table { font-size: 13.5px; }
  .fm-hero-card { padding: 7px 10px 7px 7px; }
  .fm-hero-card img { width: 38px; height: 38px; }
  .fm-hero-card .t, .fm-hero-card .p { font-size: 11.5px; }
  .fm-hero-card--2 { right: 0; }
  .fm-hero-card--1 { left: 0; }
  .fm-hero-card--3 { left: 0; }
  .fm-hero-card--4 { right: 0; }
}

/* ====== Заказ принят: модалка ====== */
.fm-modal-overlay {
  position: fixed; inset: 0; z-index: 120; background: rgba(10, 10, 12, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity .25s ease;
}
.fm-modal-overlay.show { opacity: 1; }
.fm-modal-overlay[hidden] { display: none; }
.fm-modal {
  background: #fff; border-radius: 18px; padding: 30px 28px; max-width: 430px; width: 100%;
  text-align: center; box-shadow: var(--fm-shadow-lg);
  transform: translateY(14px) scale(.97); transition: transform .25s ease;
}
.fm-modal-overlay.show .fm-modal { transform: translateY(0) scale(1); }
.fm-modal-ico { width: 64px; height: 64px; border-radius: 50%; background: #e7f5eb; color: var(--fm-green); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.fm-modal-ico svg { width: 30px; height: 30px; }
.fm-modal h3 { font-size: 22px; margin-bottom: 8px; }
.fm-modal p { color: var(--fm-ink-soft); font-size: 14.5px; margin-bottom: 20px; }
.fm-modal .fm-btn { width: 100%; }

/* Utility */
.fm-mt0 { margin-top: 0 !important; }
.fm-center { text-align: center; }
.fm-hide { display: none !important; }
