/*
Theme Name: Pole King
Theme URI: https://polekingusa.com/
Description: Child theme of Twenty Twenty-Five for Pole King USA. Brand colors, self-hosted fonts, and product templates.
Author: Vicky Patel
Template: twentytwentyfive
Version: 1.2.3
Requires at least: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: pole-king
*/

/* ---------- Layout helpers ---------- */
.pk-eyebrow { display: flex; align-items: center; gap: 11px; font-size: 12px; text-transform: uppercase; letter-spacing: .18em; font-weight: 700; }
.pk-eyebrow::before { content: ""; width: 23px; height: 1px; background: currentColor; }
.pk-rule { display: flex; gap: 22px; align-items: center; }
.pk-rule::after { content: ""; flex: 1; height: 1px; background: var(--wp--preset--color--accent-3); }

/* ---------- Cards (categories, product grid, related) ---------- */
.pk-cards { display: grid; gap: 23px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin: 0; padding: 0; list-style: none; }
.pk-card { position: relative; border: 1px solid var(--wp--preset--color--accent-3); background: var(--wp--preset--color--accent-4); display: flex; flex-direction: column; min-width: 0; }
.pk-card img { display: block; width: 100%; height: auto; aspect-ratio: 25 / 19; object-fit: contain; background: #fff; }
.pk-card__body { padding: 18px 20px 22px; }
.pk-card__title { margin: 0; font-family: var(--wp--preset--font-family--heading); text-transform: uppercase; font-size: clamp(24px, 2.2vw, 30px); line-height: 1; }
.pk-card__title a { text-decoration: none; color: inherit; }
.pk-card__title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.pk-card__meta { margin: 8px 0 0; font-size: 14px; color: var(--wp--preset--color--accent-2); }
.pk-card:hover { border-color: var(--wp--preset--color--contrast); }
.pk-card a:focus-visible { outline: none; }
.pk-card:focus-within { outline: 2px solid var(--wp--preset--color--contrast); outline-offset: 3px; }

/* Query-loop product grid uses the same card look */
.pk-grid .wp-block-post { border: 1px solid var(--wp--preset--color--accent-3); background: var(--wp--preset--color--accent-4); position: relative; }
.pk-grid .wp-block-post:hover { border-color: var(--wp--preset--color--contrast); }
.pk-grid .wp-block-post-featured-image img { aspect-ratio: 25 / 19; object-fit: contain; background: #fff; }
.pk-grid .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }

/* ---------- Category filter chips ---------- */
.pk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pk-chips a { display: inline-block; padding: 7px 14px; border: 1px solid var(--wp--preset--color--accent-3); text-decoration: none; font-size: 14px; font-weight: 700; background: var(--wp--preset--color--accent-4); }
.pk-chips a:hover, .pk-chips a[aria-current="page"] { background: var(--wp--preset--color--contrast); color: #fff; border-color: var(--wp--preset--color--contrast); }

/* ---------- Breadcrumb ---------- */
.pk-crumbs { font-size: 14px; }
.pk-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pk-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--wp--preset--color--accent-2); }

/* ---------- Product viewer ---------- */
.pk-viewer { margin: 0; }
.pk-viewer__stage { position: relative; aspect-ratio: 25 / 19; background: #fff; border: 1px solid var(--wp--preset--color--accent-3); overflow: hidden; }
.pk-viewer__stage img, .pk-viewer__stage model-viewer { display: block; width: 100%; height: 100%; object-fit: contain; }
.pk-viewer__stage model-viewer { --poster-color: #fff; background: #fff; }
.pk-viewer__btn { position: absolute; right: 14px; bottom: 14px; min-height: 44px; padding: 10px 16px; border: 0; background: var(--wp--preset--color--contrast); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.pk-viewer__btn:hover { background: var(--wp--preset--color--accent-6); }
.pk-viewer__btn[hidden] { display: none; }
.pk-viewer__thumbs { display: flex; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.pk-viewer__thumbs button { padding: 0; border: 1px solid var(--wp--preset--color--accent-3); background: #fff; cursor: pointer; width: 84px; min-height: 44px; }
.pk-viewer__thumbs button[aria-pressed="true"] { border-color: var(--wp--preset--color--contrast); outline: 1px solid var(--wp--preset--color--contrast); }
.pk-viewer__thumbs img { display: block; width: 100%; height: auto; aspect-ratio: 25 / 19; object-fit: contain; }
.pk-viewer__hint, .pk-note { margin: 10px 0 0; font-size: 13px; color: var(--wp--preset--color--accent-2); }

/* ---------- Spec table ---------- */
.pk-specs { width: 100%; border-collapse: collapse; font-size: 15px; }
.pk-specs th, .pk-specs td { text-align: left; vertical-align: top; padding: 10px 0; border-bottom: 1px solid var(--wp--preset--color--accent-3); }
.pk-specs th { width: 42%; padding-right: 16px; font-weight: 700; }
.pk-tagline { margin: 0; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--wp--preset--color--accent-2); }

/* ---------- Buttons ---------- */
.pk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 50px; padding: 12px 22px; background: var(--wp--preset--color--contrast); color: #fff !important; text-decoration: none; font-weight: 700; font-size: 15px; }
.pk-btn:hover { background: var(--wp--preset--color--accent-6); }

/* ---------- Header ---------- */
.pk-header .wp-block-site-logo img { width: 137px; height: auto; }
@media (max-width: 720px) { .pk-header .wp-block-site-logo img { width: 104px; } }

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* Space between the related-products heading and its cards */
.pk-rule + .pk-cards, section > .pk-rule { margin-bottom: 26px; }

/* Home hero product image on a white panel */
.pk-hero-img img { background: #fff; border: 1px solid var(--wp--preset--color--accent-3); }

/* ==========================================================
   Readability and contact page update (Nov 2026)
   ========================================================== */

/* Guides: normal case for long titles and section headings */
.single-post .wp-block-post-title,
.single-post .wp-block-post-content h2,
.single-post .wp-block-post-content h3,
.single-post .wp-block-post-content h4,
.wp-block-post .wp-block-post-title { text-transform: none; letter-spacing: 0; line-height: 1.15; }
.single-post .pk-code-note h3 { text-transform: uppercase; letter-spacing: .02em; }
.wp-block-post .wp-block-post-title { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); }

/* Forms (all Fluent Forms on the site) */
.fluentform .ff-el-input--label label { font-size: 1rem; font-weight: 700; color: var(--wp--preset--color--contrast); }
.fluentform .ff-el-form-control {
  font-family: inherit; font-size: 16px !important; line-height: 1.4; color: var(--wp--preset--color--contrast);
  min-height: 48px; padding: 10px 14px; background: #fff;
  border: 1px solid #a8998a; border-radius: 0; box-shadow: none;
}
.fluentform textarea.ff-el-form-control { min-height: 140px; }
.fluentform .ff-el-form-control:focus { border-color: var(--wp--preset--color--contrast); outline: 2px solid var(--wp--preset--color--contrast); outline-offset: 1px; }
.fluentform input.ff-el-form-control::placeholder { color: transparent; }
.fluentform textarea.ff-el-form-control::placeholder { color: #6b5f52; }
.fluentform .ff-btn-submit,
.fluentform .ff-btn-submit:focus {
  font-family: inherit; font-size: 1rem !important; font-weight: 700; min-height: 50px; padding: 12px 28px !important;
  background: var(--wp--preset--color--contrast) !important; color: #fff !important;
  border: 0 !important; border-radius: 0 !important;
}
.fluentform .ff-btn-submit:hover { background: var(--wp--preset--color--accent-6) !important; opacity: 1 !important; }
@media (max-width: 781px) { .fluentform .ff-btn-submit { width: 100%; } }

/* Contact page */
.pk-contact-actions { gap: 12px; }
.pk-contact-actions .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; font-size: 1rem; }
.pk-contact-actions .is-style-outline .wp-block-button__link { background: transparent; color: var(--wp--preset--color--contrast); border: 1px solid var(--wp--preset--color--contrast); }
.pk-contact-actions .is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--contrast); color: #fff; }
.pk-form-card { background: #fff; border: 1px solid var(--wp--preset--color--accent-3); padding: clamp(20px, 3vw, 32px); }
.pk-form-card > h2 { font-size: 1.5rem; margin-top: 0; }
.pk-contact-details p { margin: 0 0 1.1rem; }
@media (max-width: 781px) {
  .pk-contact-actions { flex-direction: column; align-items: stretch; }
  .pk-contact-actions .wp-block-button, .pk-contact-actions .wp-block-button__link { width: 100%; }
  .pk-contact > .wp-block-column:last-child { order: -1; }
}

/* Menu: switch to the menu button before the links wrap to two lines */
@media (min-width: 600px) and (max-width: 960px) {
  .pk-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
  .pk-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}

/* Opened menu: larger tap targets */
.pk-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.25rem; padding: 8px 0; }
.pk-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 10px; }

/* Form radio buttons and checkboxes: larger tap targets */
.fluentform .ff-el-form-check { margin-bottom: 4px; }
.fluentform .ff-el-form-check-label { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; font-size: 1rem; cursor: pointer; }
.fluentform .ff-el-form-check-input { width: 20px; height: 20px; margin: 0; accent-color: var(--wp--preset--color--contrast); flex: 0 0 auto; }

/* Form email opt-in and contact notice */
.fluentform .pk-optin { margin-top: 8px; }
.fluentform .pk-optin .ff-el-form-check-label { align-items: flex-start; }
.fluentform .pk-optin .ff-el-form-check-input { margin-top: 2px; }
.fluentform .pk-form-note { margin: 0; font-size: 0.875rem; line-height: 1.5; color: #5c4a36; }

/* Tap targets: at least 24px tall for footer links and phone/email links */
footer.wp-block-template-part a,
a[href^="tel:"]:not(.wp-block-button__link),
a[href^="mailto:"]:not(.wp-block-button__link) { display: inline-block; min-height: 24px; padding-block: 3px; }

/* Header: Request a Quote as a button */
.pk-header .pk-nav-cta > .wp-block-navigation-item__content {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px !important;
  background: var(--wp--preset--color--contrast); color: #fff !important; text-decoration: none;
}
.pk-header .pk-nav-cta > .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--accent-6); }
.pk-header .is-menu-open .pk-nav-cta > .wp-block-navigation-item__content { margin-top: 8px; }

/* Phone and tablet: keep a Get a Quote button visible next to the menu icon */
.pk-header-cta { margin: 0; }
.pk-header-cta .wp-block-button__link { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 16px; font-size: 0.9rem; white-space: nowrap; }
@media (min-width: 961px) { .pk-header .pk-header-cta { display: none; } }
@media (max-width: 380px) { .pk-header-cta .wp-block-button__link { padding: 8px 12px; } }

/* Checkboxes and radio buttons in the brand color */
input[type="checkbox"], input[type="radio"] { accent-color: var(--wp--preset--color--contrast); }

/* Home page: the product categories share the full width equally */
.home .pk-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.home .pk-cards .pk-card img { width: 100%; aspect-ratio: 25 / 19; height: auto; object-fit: contain; background: #fff; }
@media (max-width: 599px) { .home .pk-cards { grid-template-columns: 1fr; } }

/* Home page call to action band */
.pk-cta__buttons { gap: 12px; }
.pk-cta__buttons .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; font-size: 1rem; }
.pk-cta h2 { margin-top: 0; }
.pk-cta p { margin-bottom: 0; }
@media (max-width: 781px) {
  .pk-cta__buttons { flex-direction: column; align-items: stretch; }
  .pk-cta__buttons .wp-block-button, .pk-cta__buttons .wp-block-button__link { width: 100%; }
}

/* Guides list: each guide as its own card */
.wp-block-post-template:has(.wp-block-post-excerpt) { display: grid; gap: 16px; margin: 28px 0 0; padding: 0; list-style: none; }
.wp-block-post-template:has(.wp-block-post-excerpt) > .wp-block-post {
  position: relative; margin: 0; padding: clamp(18px, 3vw, 26px);
  background: #fff; border: 1px solid var(--wp--preset--color--accent-3); border-left: 4px solid var(--wp--preset--color--contrast);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.wp-block-post-template:has(.wp-block-post-excerpt) > .wp-block-post:hover { border-color: var(--wp--preset--color--contrast); box-shadow: 0 4px 14px rgba(21, 20, 17, .08); }
.wp-block-post-template:has(.wp-block-post-excerpt) .wp-block-post-title { margin: 0 0 8px; }
.wp-block-post-template:has(.wp-block-post-excerpt) .wp-block-post-title a { text-decoration: none; color: inherit; }
.wp-block-post-template:has(.wp-block-post-excerpt) .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.wp-block-post-template:has(.wp-block-post-excerpt) .wp-block-post-excerpt { margin: 0; }
.wp-block-post-template:has(.wp-block-post-excerpt) .wp-block-post-excerpt__excerpt { margin: 0 0 12px; color: #403a31; }
.wp-block-post-template:has(.wp-block-post-excerpt) .wp-block-post-excerpt__more-text { margin: 0; }
.wp-block-post-template:has(.wp-block-post-excerpt) .wp-block-post-excerpt__more-link { font-weight: 700; text-decoration: none; }
.wp-block-post-template:has(.wp-block-post-excerpt) .wp-block-post-excerpt__more-link::after { content: " \2192"; }
.wp-block-post-template:has(.wp-block-post-excerpt) > .wp-block-post:hover .wp-block-post-excerpt__more-link { text-decoration: underline; text-underline-offset: 3px; }
.wp-block-post-template:has(.wp-block-post-excerpt) .wp-block-post-title a:focus-visible { outline: none; }
.wp-block-post-template:has(.wp-block-post-excerpt) > .wp-block-post:focus-within { outline: 2px solid var(--wp--preset--color--contrast); outline-offset: 2px; }

/* Guide images: product picture rows and drawn diagrams */
.pk-guide-gallery { margin: 20px 0 28px; gap: 12px !important; }
.pk-guide-gallery .wp-block-image { margin: 0; background: #fff; border: 1px solid var(--wp--preset--color--accent-3); }
.pk-guide-gallery .wp-block-image img { width: 100%; height: auto !important; aspect-ratio: 25 / 19; object-fit: contain !important; background: #fff; }
.pk-guide-gallery .wp-block-image figcaption {
  position: static !important; margin: 0 !important; padding: 8px 10px !important; max-height: none !important;
  background: none !important; color: var(--wp--preset--color--contrast) !important; text-shadow: none !important;
  font-size: 0.9rem !important; font-weight: 700; text-align: left !important;
}
.pk-guide-gallery .wp-block-image figcaption::before { display: none !important; }
.pk-guide-gallery .wp-block-image a:hover img { outline: 2px solid var(--wp--preset--color--contrast); outline-offset: -2px; }
.pk-guide-gallery > figcaption.blocks-gallery-caption { flex-basis: 100%; margin: 4px 0 0; font-size: 0.875rem; color: #5c4a36; text-align: left; }
.pk-guide-gallery.columns-3 .wp-block-image { width: calc(33.333% - 8px) !important; flex-grow: 0 !important; }
.pk-guide-gallery.columns-2 .wp-block-image { width: calc(50% - 6px) !important; flex-grow: 0 !important; }
@media (max-width: 599px) {
  .pk-guide-gallery.columns-3 .wp-block-image, .pk-guide-gallery.columns-2 .wp-block-image { width: calc(50% - 6px) !important; flex-grow: 0 !important; }
}
.pk-diagram { margin: 20px 0 28px; padding: clamp(10px, 2vw, 16px); background: #fff; border: 1px solid var(--wp--preset--color--accent-3); }
.pk-diagram svg { display: block; width: 100%; height: auto; }
.pk-diagram figcaption { margin-top: 10px; font-size: 0.9rem; color: #5c4a36; }
.pk-diagram--split { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-start; }
.pk-diagram--split svg { flex: 1 1 260px; width: auto; max-width: 100%; }
.pk-diagram--split figcaption { flex-basis: 100%; }

/* Readable post dates (were near-white on beige) */
.wp-block-post-date, .wp-block-post-date a { color: #5c4a36 !important; }

/* Codes box title (a styled paragraph, keeps heading order correct) */
.pk-code-note .pk-code-note__title { margin: 0 0 0.5rem; font-family: var(--wp--preset--font-family--heading); font-size: 1.1rem; text-transform: uppercase; letter-spacing: .02em; line-height: 1.2; }
.pk-code-note .pk-code-note__title strong { font-weight: 700; }
