/* ══════════════════════════════════════════════════════════════
   WoodworkGuide — block layer
   Maps the design onto WordPress core blocks (group, paragraph, heading,
   list, buttons, details) so every page can be edited in the block editor.
   Loaded after main.css.
   ══════════════════════════════════════════════════════════════ */

/* Brand tokens are set from Customize → Brand Colours (inline :root vars).
   Everything else derives from them. */
:root {
  --bg: var(--cream); --fg: var(--charcoal); --fg2: color-mix(in srgb, var(--charcoal) 75%, var(--cream));
  --accent: var(--walnut); --accent2: var(--amber); --accent-hover: color-mix(in srgb, var(--walnut) 82%, #000);
  --accent-light: color-mix(in srgb, var(--walnut) 9%, #fff);
  --green: var(--forest); --green-bg: var(--sage); --star: var(--amber);
  --wood-dark: var(--forest); --wood-mid: var(--walnut);
  --forest-deep: color-mix(in srgb, var(--forest) 78%, #000);
  --walnut-deep: color-mix(in srgb, var(--walnut) 82%, #000);
  --amber-hover: color-mix(in srgb, var(--amber) 88%, #000);
}

/* Neutralise WordPress' default block spacing inside the designed pages */
:where(.wwg-blocks) :where(.wp-block-group, .wp-block-buttons, .wp-block-list, .wp-block-heading, p, .wp-block-details) { margin-block: 0; }
:where(.wwg-blocks) :where(.is-layout-flow) > * { margin-block-start: 0; }
:where(.wwg-blocks) .wp-block-buttons { gap: 10px; }
.wwg-blocks .wp-block-button__link { box-sizing: border-box; }
.wwg-admin-hint { margin: 14px 0; padding: 12px 16px; border: 1px dashed var(--walnut); border-radius: 10px; background: #fff; color: var(--charcoal); font-size: .85rem; }
.wwg-admin-hint a { color: var(--forest); font-weight: 700; }

/* ───────── Buttons (Styles panel in the editor) ───────── */
.wp-block-button .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 8px; border: 1.5px solid transparent; padding: 12px 24px;
  font-family: 'Inter', sans-serif; font-size: .92rem; font-weight: 700; line-height: 1.25;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.wp-block-button.has-custom-width .wp-block-button__link { width: 100%; }
.wp-block-button.is-style-amber .wp-block-button__link { background: var(--amber); color: var(--charcoal); }
.wp-block-button.is-style-amber .wp-block-button__link:hover { background: var(--amber-hover); color: var(--charcoal); }
.wp-block-button.is-style-forest .wp-block-button__link { background: var(--forest); color: var(--cream); }
.wp-block-button.is-style-forest .wp-block-button__link:hover { background: var(--forest-deep); color: var(--cream); }
.wp-block-button.is-style-walnut .wp-block-button__link { background: var(--walnut); color: var(--cream); }
.wp-block-button.is-style-walnut .wp-block-button__link:hover { background: var(--walnut-deep); color: var(--cream); }
.wp-block-button.is-style-outline .wp-block-button__link { background: #fff; color: var(--fg2); border-color: var(--border); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: var(--forest); color: var(--forest); }
.wp-block-button.is-style-ghost-light .wp-block-button__link { background: rgba(247,243,234,.08); color: var(--cream); border-color: rgba(247,243,234,.4); }
.wp-block-button.is-style-ghost-light .wp-block-button__link:hover { background: rgba(247,243,234,.16); }
.wp-block-button.is-style-chip .wp-block-button__link { background: #fff; color: var(--fg2); border-color: var(--border); border-radius: 999px; padding: 7px 16px; font-size: .8rem; font-weight: 600; }
.wp-block-button.is-style-chip .wp-block-button__link:hover,
.wp-block-button.is-style-chip.is-active .wp-block-button__link { background: var(--forest); color: var(--cream); border-color: var(--forest); }

/* ───────── Hero ───────── */
.hero h1 strong { color: var(--amber); font-weight: inherit; }
.hero-eyebrow { display: inline-flex; }
.hero-rating { margin-bottom: 28px; color: rgba(247,243,234,.8); font-size: .9rem; display: block; text-align: center; }
.hero-rating strong { color: var(--star); font-size: 1.2rem; letter-spacing: 2px; font-weight: 400; margin-right: 6px; vertical-align: -1px; }
.hero-rating em { font-style: normal; font-weight: 700; color: #fff; }
.hero-btns.wp-block-buttons { justify-content: center; gap: 12px; }
.hero-btns .wp-block-button__link { font-size: 1rem; padding: 15px 32px; }
.hero-btns .is-style-amber .wp-block-button__link { box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.hero-btns .is-style-amber .wp-block-button__link:hover { transform: translateY(-2px); }
@media (max-width: 960px) {
  .hero-btns.wp-block-buttons { flex-direction: column; align-items: center; gap: 10px; }
  .hero-btns .wp-block-button { width: 100%; max-width: 340px; }
  .hero-btns .wp-block-button__link { width: 100%; padding: 14px 24px; font-size: .95rem; }
}

/* ───────── Trust bar (paragraph + icon style) ───────── */
.trust-item { position: relative; padding-left: 41px; min-height: 32px; display: block; line-height: 32px; font-size: .85rem; font-weight: 600; color: var(--forest); white-space: nowrap; }
.trust-item strong { font-weight: 800; }
.trust-item::before { content: ""; position: absolute; left: 0; top: 50%; width: 32px; height: 32px; transform: translateY(-50%); border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(36,75,58,.12); }
.trust-item::after { content: ""; position: absolute; left: 7px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); background: var(--forest); -webkit-mask: var(--ico, none) center / contain no-repeat; mask: var(--ico, none) center / contain no-repeat; }
.is-style-icon-plans    { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h9l4 4v14H6z'/%3E%3Cpath d='M15 3v4h4'/%3E%3Cpath d='M9 12h7M9 16h7M9 8h3'/%3E%3C/svg%3E"); }
.is-style-icon-video    { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M10 8.5v7l6-3.5z' fill='black' stroke='none'/%3E%3C/svg%3E"); }
.is-style-icon-shield   { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5c0 4.5-3 8.3-7 10-4-1.7-7-5.5-7-10V6z'/%3E%3Cpath d='M8.8 12.2l2.2 2.2 4.3-4.6'/%3E%3C/svg%3E"); }
.is-style-icon-skill    { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M5 20v-5M12 20V10M19 20V4M3 20h18'/%3E%3C/svg%3E"); }
.is-style-icon-download { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7.5 10.5L12 15l4.5-4.5M5 19h14'/%3E%3C/svg%3E"); }
.is-style-icon-star     { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M12 3.5l2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 16.9l-5.2 2.7 1-5.8-4.3-4.1 5.9-.9z'/%3E%3C/svg%3E"); }
.is-style-icon-clock    { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.is-style-icon-tool     { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 5.5a4 4 0 0 0 4.9 4.9L20 11l-9 9-3.5-3.5 9-9z'/%3E%3Cpath d='M4 20l3.5-3.5'/%3E%3C/svg%3E"); }
.is-style-icon-lock     { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); }
.is-style-icon-heart    { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z'/%3E%3C/svg%3E"); }
/* icon styles on any other paragraph: small inline icon */
p[class*="is-style-icon-"]:not(.trust-item) { position: relative; padding-left: 30px; }
p[class*="is-style-icon-"]:not(.trust-item)::before { content: ""; position: absolute; left: 0; top: .15em; width: 20px; height: 20px; background: var(--forest); -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }

@media (max-width: 960px) {
  .trust-bar-inner { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; justify-items: stretch; }
  .trust-item { background: #fff; border: 1px solid rgba(36,75,58,.10); border-radius: 12px; padding: 12px 12px 12px 56px; min-height: 58px; display: flex; align-items: center; line-height: 1.3; font-size: .8rem; white-space: normal; box-shadow: 0 1px 2px rgba(36,75,58,.05); }
  .trust-item::before { left: 12px; width: 34px; height: 34px; background: var(--sage); box-shadow: none; }
  .trust-item::after { left: 20px; }
  .trust-item.trust-lead { grid-column: 1 / -1; background: var(--forest); border-color: var(--forest); color: var(--cream); display: flex; justify-content: center; align-items: center; padding: 14px 16px; font-size: .95rem; }
  .trust-item.trust-lead strong { color: var(--amber); margin-right: .3em; }
  /* icon circle + icon as flex items before the text */
  .trust-item.trust-lead::before { position: static; transform: none; order: -2; flex: 0 0 34px; margin-right: 10px; background: rgba(247,243,234,.14); }
  .trust-item.trust-lead::after { position: static; transform: none; order: -1; flex: 0 0 18px; margin: 0 18px 0 -36px; background: var(--amber); }
}
@media (min-width: 601px) and (max-width: 960px) { .trust-bar-inner { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ───────── Review card ───────── */
.review-card-header { margin: 0; }
.review-meta { display: block; line-height: 2; }
.review-meta strong { background: var(--green-bg); color: var(--green); font-weight: 700; font-size: .8rem; padding: 3px 10px; border-radius: 5px; margin-right: 8px; }
.review-body > p { margin-bottom: 22px; }
.pros .wp-block-list, .cons .wp-block-list { list-style: none; display: flex; flex-direction: column; gap: 6px; padding: 0; }
.review-cta-wrap .wp-block-button__link { font-size: 1rem; padding: 15px; border-radius: 9px; }
#review { scroll-margin-top: 90px; }

/* ───────── Home cards (plans / features) ───────── */
#page-home .plan-card p.plan-icon { font-size: 1.9rem; color: inherit; line-height: 1.2; margin-bottom: 4px; }
#page-home .plan-card p.plan-count { margin-top: 6px; font-size: .78rem; font-weight: 700; color: var(--accent); }
.feat-card p.feat-icon { font-size: 1.6rem; color: inherit; line-height: 1.2; margin-bottom: 10px; }
.feat-card h3 { margin-bottom: 5px; }
@media (max-width: 960px) { #page-home .plan-card p.plan-icon { font-size: 1.8rem; } .feat-card p.feat-icon { font-size: 1.4rem; margin-bottom: 8px; } }

/* ───────── Sidebar ───────── */
.sbox-head { margin: 0; }
.sbox .wp-block-buttons { margin-top: 16px; }
.sbox .wp-block-button__link { padding: 13px; font-size: .92rem; }
.score-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; font-size: .82rem; color: var(--fg2); }
.score-row strong { color: var(--fg); }
.score-row::after { content: ""; flex: 0 0 100%; height: 5px; margin-top: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--forest) var(--w, 0%), var(--sage) var(--w, 0%)); }
.verdict-big p { margin: 0; }
.cta-note { font-size: .72rem; text-align: center; color: var(--fg2); margin-top: 8px; }
.checklist.wp-block-list, .announce-list.wp-block-list, .pr-perks.wp-block-list { padding: 0; }
.announce-list li { display: block; }

/* Pricing card */
.price-card p { margin: 0; }
.pr-badge { width: max-content; }
.pr-now { display: flex; align-items: flex-start; justify-content: center; gap: 4px; color: var(--forest); margin: 4px 0 6px; line-height: 1; font-family: 'Lora', Georgia, serif; font-size: 4.4rem; font-weight: 700; letter-spacing: -.02em; }
.pr-now sup { font-size: 1.9rem; margin-top: 8px; vertical-align: baseline; line-height: 1; }
.pr-now sub { align-self: center; vertical-align: baseline; text-align: left; font-family: 'Inter', sans-serif; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--fg2); line-height: 1.25; margin-left: 6px; max-width: 6.5em; }
.pr-save { width: max-content; margin: 0 auto 14px !important; }
.pr-cta .wp-block-button__link { font-size: 1.08rem; padding: 16px; border-radius: 10px; box-shadow: 0 6px 18px rgba(217,138,50,.35); }
@media (max-width: 960px) {
  .pr-now { font-size: 5rem; }
  .pr-cta .wp-block-button__link { font-size: 1.15rem; padding: 18px; }
}

/* ───────── FAQ (details block) ───────── */
.faq-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.faq-col + .faq-col { border-left: 1px solid var(--border); padding-left: 28px; }
.faq-col { display: flex; flex-direction: column; gap: 12px; }
details.faq-item { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
details.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; font-size: .92rem; font-weight: 600; color: var(--fg); }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: "▾"; flex-shrink: 0; font-size: .9rem; color: var(--fg2); transition: transform .2s; }
details.faq-item[open] summary::after { transform: rotate(180deg); }
details.faq-item summary:hover { background: var(--sage); }
details.faq-item > p { padding: 0 20px 16px; font-size: .9rem; color: var(--fg2); line-height: 1.65; }
.faq-full-inner > .section-heading { margin-bottom: 28px; }
@media (max-width: 680px) {
  .faq-two-col { grid-template-columns: 1fr; gap: 12px; }
  .faq-col + .faq-col { border-left: 0; padding-left: 0; }
}
@media (max-width: 960px) {
  details.faq-item summary { padding: 14px 16px; font-size: .88rem; }
  details.faq-item > p { padding: 0 16px 14px; font-size: .86rem; }
}

/* ───────── Tools section ───────── */
.tools-full-section:not(:has(.tool-card)):not(:has(.wwg-admin-hint)) { display: none; }
.tools-full-header .wp-block-button__link { padding: 12px 28px; font-size: .9rem; font-weight: 600; }
.tool-img.has-img, .shop-img.has-img { padding: 0; overflow: hidden; background: #fff; }
.tool-img.has-img img, .shop-img.has-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; box-sizing: border-box; }
.tool-badge.badge-deal, .shop-badge-top.badge-deal { background: #C0392B; color: #fff; }
.tool-badge.badge-new, .shop-badge-top.badge-new { background: var(--forest); color: var(--cream); }
@media (max-width: 960px) {
  .tools-full-header .wp-block-buttons, .tools-full-header .wp-block-button { width: 100%; }
  .tools-full-header .wp-block-button__link { width: 100%; }
}

/* ───────── Inner page banners ───────── */
.inner-hero .hero-badge { display: inline-block; }
.inner-hero h1 em { color: var(--amber); }

/* ───────── Reviews page ───────── */
.rl-thumb { margin: 0; }
.rl-tags.wp-block-list { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; padding: 0; }
.rl-tags li { font-size: .7rem; padding: 3px 10px; background: var(--sage); color: var(--forest); border-radius: 20px; font-weight: 600; }
.rl-meta strong { color: var(--star); font-weight: 400; letter-spacing: 1px; margin-right: 6px; }
.rl-footer .verdict-badge { width: max-content; }
.rl-footer .wp-block-button__link { padding: 9px 20px; font-size: .82rem; }
.sec-sub { margin-bottom: 24px; }

/* ───────── Plans page ───────── */
.plans-filter.wp-block-buttons { gap: 10px; margin-bottom: 28px; }
.plan-thumb p { margin: 0; }
.plan-thumb .plan-emoji { font-size: 3.5rem; line-height: 1; }
.plan-body .wp-block-buttons { margin-top: 4px; }
.plan-body .wp-block-button__link { padding: 9px; font-size: .8rem; }
.plan-card.is-hidden { display: none !important; }

/* ───────── Shops page ───────── */
.shop-reset { margin-top: 4px; background: none; border: 0; padding: 0; color: var(--forest); font-weight: 700; font-size: .8rem; cursor: pointer; text-decoration: underline; }
.shop-card.is-hidden { display: none; }
.shop-disclaimer { margin-top: 18px; font-size: .75rem; color: var(--fg2); }
.wwg-empty[hidden] { display: none; }
.filter-check input[type=radio] { accent-color: var(--forest); }
@media (max-width: 700px) { .shop-sidebar { position: static; } }

.shop-filter-toggle > summary { list-style: none; cursor: pointer; }
.shop-filter-toggle > summary::-webkit-details-marker { display: none; }
.shop-filter-toggle > summary h3 { display: inline; margin: 0; }
@media (max-width: 700px) {
  .shop-sidebar { padding: 14px 16px; }
  .shop-filter-toggle > summary { display: flex; justify-content: space-between; align-items: center; }
  .shop-filter-toggle > summary::after { content: "▾"; color: var(--fg2); transition: transform .2s; }
  .shop-filter-toggle[open] > summary { margin-bottom: 14px; }
  .shop-filter-toggle[open] > summary::after { transform: rotate(180deg); }
}
@media (min-width: 701px) { .shop-filter-toggle > summary { pointer-events: none; margin-bottom: 14px; } }

/* ───────── Entry-content FAQ accordion (blog posts) ───────── */
.entry-content details.faq-item { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.entry-content details.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; font-size: .95rem; font-weight: 600; color: var(--fg); }
.entry-content details.faq-item summary::-webkit-details-marker { display: none; }
.entry-content details.faq-item summary::after { content: "▾"; flex-shrink: 0; font-size: .9rem; color: var(--fg2); transition: transform .2s; }
.entry-content details.faq-item[open] summary::after { transform: rotate(180deg); }
.entry-content details.faq-item summary:hover { background: var(--sage); }
.entry-content details.faq-item > .faq-answer { padding: 0 20px 16px; font-size: .92rem; color: var(--fg2); line-height: 1.7; margin-top: 0; }
@media (max-width: 960px) {
  .entry-content details.faq-item summary { padding: 14px 16px; font-size: .9rem; }
  .entry-content details.faq-item > .faq-answer { padding: 0 16px 14px; font-size: .88rem; }
}

/* ───────── Footer menus ───────── */
.sf-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sf-links li { margin: 0; }
.sf-col .sf-links a { display: inline-block; }
/* columns adapt to how many footer menus are assigned (1–4) */
.sf-cols { grid-template-columns: repeat(var(--sf-n, 3), minmax(0, 1fr)); }
.sf-cols:has(> .sf-col:nth-child(4)) { --sf-n: 4; }
.sf-cols:not(:has(> .sf-col:nth-child(3))) { --sf-n: 2; }
.sf-cols:not(:has(> .sf-col:nth-child(2))) { --sf-n: 1; }
@media (max-width: 960px) {
  .sf-cols { grid-template-columns: repeat(min(var(--sf-n, 3), 3), minmax(0, 1fr)) !important; }
  .sf-cols:has(> .sf-col:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; row-gap: 22px; }
}
