/*
Theme Name: Cropflute (MANNKIE)
Theme URI: https://cropflute.com
Description: Astra child theme for cropflute.com. Carries the MANNKIE design tokens, the dynamic claim table styles, and the shared content components used by the static HTML blocks.
Author: QINGDAO MANNKIE INTERNATIONAL TRADE CO.,LTD
Author URI: https://cropflute.com
Template: astra
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.7
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cropflute
*/

/* ---- Design tokens (DESIGN.md §3) ---- */
:root {
  --cf-white: #FFFFFF;
  --cf-mist: #F1F5F3;
  --cf-teal: #123F38;
  --cf-ink: #1C2B27;
  --cf-gray: #586B64;
  --cf-red: #C9442D;
  --cf-red-hover: #AF3522;
  --cf-line: #D6E0DB;
  --cf-field: #80938A;
  --cf-dark-muted: #D2E1DA;
  --cf-error: #A72C27;
  --cf-wrap: 1320px;
}

/* ---- Base typography ---- */
body {
  color: var(--cf-ink);
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}
h1, h2, h3, h4, .cf-display {
  font-family: "Bricolage Grotesque", "Source Sans 3", sans-serif;
  font-weight: 600;
  color: var(--cf-teal);
  line-height: 1.15;
}
a { color: var(--cf-teal); }
a:hover { color: var(--cf-red-hover); }

/* ---- Content width ---- */
.cf-wrap { max-width: var(--cf-wrap); margin-inline: auto; padding-inline: 20px; }
@media (min-width: 681px) { .cf-wrap { padding-inline: 32px; } }
@media (min-width: 1121px) { .cf-wrap { padding-inline: 52px; } }

/* ---- Buttons (DESIGN.md §11) ---- */
.cf-btn {
  display: inline-block;
  background: var(--cf-red);
  color: #fff !important;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 24px;
  border-radius: 6px;
  min-height: 44px;
  box-sizing: border-box;
  text-decoration: none;
}
.cf-btn:hover { background: var(--cf-red-hover); }
.cf-link { color: var(--cf-teal); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---- Dynamic claim table (rendered by [cf_claim_block]) ---- */
.cf-claim-table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
.cf-claim-table th, .cf-claim-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--cf-line); vertical-align: top; }
.cf-claim-table th { font-weight: 600; color: var(--cf-ink); white-space: nowrap; }
.cf-claim-table tr:nth-child(even) th, .cf-claim-table tr:nth-child(even) td { background: #FBFDFC; }
.cf-claim-table tr.cf-tier-on_request td { color: var(--cf-gray); font-style: italic; }
.cf-claim-table tr.cf-tier-public_qualified td { font-variant-numeric: tabular-nums; }
.cf-claim-wrap { overflow-x: auto; border: 1px solid var(--cf-line); border-radius: 10px; background: #fff; }

/* ---- Screen reader helper ---- */
.cf-sr { position: absolute; left: -9999px; }

/* ---- Hide Astra's duplicate page title ----
   Every page block owns its own <h1>, so the theme title bar would create a
   second h1. Astra renders it as .entry-header .entry-title. */
.entry-header .entry-title,
.ast-single-entry-banner .entry-title,
.page .entry-header { display: none; }

/* Astra default content width is narrower than the 1320px design grid. */
.ast-container, .site-content .ast-container { max-width: 1360px; }

/* ---- Header / navigation ---- */
.site-header { background: #fff; }
.ast-primary-header-bar { border-bottom: 1px solid var(--cf-line); min-height: 72px; }
@media (min-width: 922px) {
  .main-header-menu > li > a { line-height: 72px; height: 72px; }
  .main-header-menu .sub-menu > li > a { line-height: 1.35; height: auto; }
}
.ast-site-identity .site-title,
.ast-site-identity .site-title a {
  font-family: "Bricolage Grotesque", "Source Sans 3", sans-serif;
  font-weight: 700; letter-spacing: -.02em; font-size: 25px; color: var(--cf-teal);
}
.ast-site-identity .site-description { font-size: 12.5px; color: var(--cf-gray); margin-top: 2px; }

.main-header-menu > li > a {
  font-family: "Source Sans 3", sans-serif; font-weight: 600; font-size: 15px;
  color: var(--cf-ink); padding: 0 15px; position: relative; background: transparent;
}
.main-header-menu > li > a:hover,
.main-header-menu > li.current-menu-item > a,
.main-header-menu > li.current-menu-ancestor > a { color: var(--cf-red); }
.main-header-menu > li > a::after {
  content: ""; position: absolute; left: 15px; right: 15px; bottom: -2px; height: 2px;
  background: var(--cf-red); transform: scaleX(0); transform-origin: left; transition: transform .18s ease;
}
.main-header-menu > li > a:hover::after,
.main-header-menu > li.current-menu-item > a::after { transform: scaleX(1); }

/* dropdown */
.main-header-menu .sub-menu {
  background: #fff; border: 1px solid var(--cf-line); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(18, 63, 56, .15); padding: 8px; min-width: 240px; margin-top: 6px;
}
.main-header-menu .sub-menu li a {
  display: block; padding: 10px 14px; border-radius: 8px; font-size: 15px;
  color: var(--cf-ink) !important; font-weight: 600;
}
.main-header-menu .sub-menu li a:hover { background: var(--cf-mist); color: var(--cf-teal) !important; }
.main-header-menu .ast-menu-toggle { border: 0 !important; background: transparent !important; box-shadow: none !important; }
@media (min-width: 922px) {
  .main-header-menu li.menu-item-has-children > a { padding-right: 30px; }
  .main-header-menu li.menu-item-has-children > a::before {
    content: ""; position: absolute; right: 14px; top: 50%; width: 6px; height: 6px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: translateY(-70%) rotate(45deg);
  }
}

/* CTA in nav */
.main-header-menu li.cf-nav-cta { align-self: center !important; display: flex; align-items: center; }
.main-header-menu li.cf-nav-cta > a {
  background: var(--cf-red); color: #fff !important; border-radius: 6px;
  padding: 11px 20px !important; margin: 0 0 0 14px; height: auto !important;
  max-height: 46px; display: inline-flex; align-items: center; line-height: 1.1;
}
.main-header-menu li.cf-nav-cta > a:hover { background: var(--cf-red-hover); }
.main-header-menu li.cf-nav-cta > a::after,
.main-header-menu li.cf-nav-cta > a::before { display: none; }

/* mobile toggle + drawer */
@media (max-width: 921px) {
  .ast-mobile-header-content {
    background: #fff !important; min-height: 100vh !important;
    border-top: 1px solid var(--cf-line);
  }
  .main-header-menu > li > a { line-height: 1.35 !important; height: auto !important; }
}
.ast-mobile-popup-drawer.active .ast-mobile-popup-inner,
.ast-mobile-popup-inner,
.ast-mobile-popup-content,
.ast-mobile-header-content { background: #fff !important; }
.ast-mobile-popup-drawer .ast-mobile-popup-inner,
.ast-mobile-popup-drawer.active .ast-mobile-popup-inner { height: 100%; min-height: 100vh !important; }
.ast-mobile-popup-content { padding: 10px 18px 40px; }
.ast-mobile-popup-content .main-header-menu { margin: 0 !important; }
.ast-mobile-popup-content .main-header-menu > li { margin: 0 !important; }
.ast-mobile-popup-content .main-header-menu,
.ast-mobile-header-content .main-header-menu { width: 100%; }
.ast-mobile-popup-content .main-header-menu > li > a,
.ast-mobile-header-content .main-header-menu > li > a {
  font-size: 17px !important; font-weight: 600; padding: 13px 4px !important; border-bottom: 1px solid var(--cf-line);
}
.ast-mobile-popup-content .main-header-menu .sub-menu a { font-size: 15.5px !important; padding: 12px 4px 12px 18px !important; }
.ast-mobile-popup-content .cf-nav-cta,
.ast-mobile-header-content .cf-nav-cta { border: 0 !important; margin: 20px 18px 0 !important; }
.ast-mobile-popup-content .cf-nav-cta > a,
.ast-mobile-header-content .cf-nav-cta > a { box-sizing: border-box; width: 100%; }
.ast-mobile-popup-content .cf-nav-cta > a,
.ast-mobile-header-content .cf-nav-cta > a,
.ast-mobile-popup-drawer .cf-nav-cta > a {
  display: block !important; background: var(--cf-red) !important; color: #fff !important;
  text-align: center; border-radius: 6px; padding: 14px 18px !important; border-bottom: 0 !important;
}
.main-header-menu-toggle,
.ast-mobile-menu-trigger-minimal {
  border: 1px solid var(--cf-line) !important; border-radius: 10px; padding: 10px 12px !important; background: #fff !important;
}
.main-header-menu-toggle .ast-menu-toggle-icon span,
.ast-mobile-menu-trigger-minimal span { color: var(--cf-teal) !important; }
.ast-mobile-popup-drawer .ast-mobile-header-content .main-header-menu > li > a { font-size: 17px; padding: 14px 16px; }
.ast-mobile-popup-drawer .main-header-menu .sub-menu { border: 0; box-shadow: none; padding-left: 12px; }
.ast-mobile-popup-drawer .main-header-menu li.cf-nav-cta > a { text-align: center; margin: 12px 16px 0; }

/* =======================================================================
   Design corrections — applied after landing.css, based on the Opus 5.5
   design review (2026-10-15). Kept separate so landing.css stays a faithful
   extract of the client's template.
   ======================================================================= */

/* 1. ONE ink colour. Astra was painting h1 with #1E293B (slate) and the nav
      active item with #045CB4 (blue) - neither is in the brand palette. */
.site-content h1, .site-content h2, .site-content h3, .site-content h4,
#content h1, #content h2, #content h3,
h1.entry-title, .hero h1, .hero h2, .section h1, .section h2,
.opening h1, .opening h2 { color: #0F2E29 !important; }

/* 2. Buttons must not inherit Astra's content-link underline. */
.btn, a.btn, .entry-content .btn, .site-content .btn,
.btn:link, .btn:visited, .btn:hover, .btn:focus, .btn:active {
  text-decoration: none !important;
}

/* 3. Navigation: brand ink, red rule on the active item. */
.main-header-menu > li > a,
.main-header-menu > li > a:visited { color: #0F2E29 !important; }
.main-header-menu > li > a:hover,
.main-header-menu > li.current-menu-item > a,
.main-header-menu > li.current-menu-ancestor > a,
.main-header-menu > li.current-menu-parent > a,
.main-header-menu > li.current_page_item > a,
.main-header-menu > li.current_page_ancestor > a {
  color: #0F2E29 !important;
  box-shadow: inset 0 -2px 0 var(--cf-red);
}

/* 4. Let the design system own the width. Astra's container capped the
      content at ~1096px while the grid is built for 1320px. */
.site-content .ast-container { max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; display: block; }
.site-content .content-area, .site-content .widget-area { width: 100%; max-width: none; }
.site-content .ast-article-single, .site-content .ast-article-post,
.site-content .entry-content { padding-left: 0 !important; padding-right: 0 !important; max-width: none; }

/* 5. Hero paragraph measure: 355px produced ~40-character ragged lines. */
.opening-description, .opening-copy .opening-description,
.hero-copy .lead, .hero-copy p { max-width: 34em; }

/* 6. Tables: drop the full grid, strengthen the header rule, tabular figures. */
table, table.spec-table { border-collapse: collapse; width: 100%; }
table th, table td, table.spec-table th, table.spec-table td {
  border-left: 0 !important; border-right: 0 !important;
}
table.spec-table th, table.spec-table thead th {
  color: #5E6B67; font-weight: 600; font-size: 13px; letter-spacing: .02em;
}
table.spec-table td { color: #0F2E29; font-variant-numeric: tabular-nums; }
table.spec-table tr:first-child th { border-bottom: 1px solid #0F2E29; }

/* 7. One radius, one surface. */
.hero-visual img, .product-figure img, .fit-figure img, .print-figure img,
.format-image img, .opening-photo img { border-radius: 8px; }
.format-image, .format-image-sheet, .format-image-box,
.hero-visual, .opening-photo, .print-figure { background: #EEF2F0; background-image: none; }

/* 8. Eyebrow: one accent square instead of a leading dash, capped per page. */
.eyebrow { color: #123F38; }
.eyebrow::before { background: var(--cf-red); }


/* 4b. Astra's global styles cap every <section> at var(--wp--custom--ast-content-width-size)
       (1200px), which is what held the design grid down to 1096px. */
:root {
  --wp--custom--ast-container-width: 1440px;
  --wp--custom--ast-content-width-size: 1440px;
  --wp--custom--ast-default-block-left-padding: 0px;
  --wp--custom--ast-default-block-right-padding: 0px;
}
.site-content section, .entry-content section, .site-content > .ast-container > * { max-width: none !important; }

/* ---- Brand logo ---- */
.ast-site-identity .site-logo-img img,
.site-logo-img img,
.custom-logo-link img { max-height: 42px; width: auto; height: auto; }
.custom-logo-link { display: flex; align-items: center; }
@media (max-width: 544px) {
  .ast-site-identity .site-logo-img img, .custom-logo-link img { max-height: 34px; }
}

/* The custom logo carries the wordmark, so Astra's text site title would
   otherwise render a second "MANNKIE" next to it. */
.site-branding .site-title,
.ast-site-identity .site-title,
.site-branding .site-description { display: none !important; }
.site-branding .ast-site-identity { gap: 0; }
