/*
 * kd-header 0.13.0: listing grids like the homepage New Arrivals (Shannon
 * 2026-11-16: "redesign the pages that have listings such as new arrivals and
 * category listing pages to look like the new arrivals section of the
 * homepage (black background with white cards for each listing)").
 *
 * Card values are copied from kd-popular-types new_arrivals_css() so the two
 * stay identical: section #1b1d21; card white, 1px #2c3036, 10px corners,
 * shadow, lifts 3px with a blue edge on hover; photo 4:3 cover; title 15px
 * bold left (2 lines max); type 13px grey; Ref # 14px bold; price 19px; the two
 * buttons stacked full width.
 *
 * Scope: only the results block #products (count/sort bar + cards + bottom
 * pagination) turns dark. Everything else in the page column (sell form,
 * price band, FAQs, recently sold) and the filter sidebar stay as they are, so
 * no dark text lands on black. Loaded only on listing pages (see enqueue()):
 * category + brand pages, /used-machinery-for-sale/ and search, New Arrivals,
 * Recently Reduced, manufacturer pages. Markup untouched (CSS only).
 */
#products:has(> ul.products:not(.main-category)) { background: #1b1d21; border-radius: 14px; padding: 22px 22px 8px; margin-bottom: 32px; color: rgba(255,255,255,.85); }
/* count / sort / per-page / pagination bars */
#products > .product-action-bar { border-color: #2c3036 !important; }
#products > .product-action-bar .products-counts, #products > .product-action-bar .products-counts * { color: rgba(255,255,255,.75) !important; }
#products > .product-action-bar label, #products > .product-action-bar > span:not(.products-counts) { color: rgba(255,255,255,.75) !important; }
#products > .product-action-bar.bottom { border-top: 1px solid #2c3036 !important; margin-top: 8px; }
/* the grid */
#products > ul.products:not(.main-category) { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 16px 0 18px !important; padding: 0 !important; }
#products > ul.products:not(.main-category)::before, #products > ul.products:not(.main-category)::after { display: none !important; content: none !important; }
#products > ul.products:not(.main-category) > li.product { float: none !important; width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; display: flex !important; flex-direction: column; background: #fff !important; border: 1px solid #2c3036; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.35); transition: transform .18s, box-shadow .18s, border-color .18s; text-align: left !important; }
#products > ul.products:not(.main-category) > li.product:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.5); border-color: #32adfb; }
#products > ul.products:not(.main-category) > li.product > a.woocommerce-LoopProduct-link { display: block; text-decoration: none !important; }
#products > ul.products:not(.main-category) > li.product .img-holder { position: relative; width: 100% !important; height: auto !important; aspect-ratio: 4 / 3; background-size: cover !important; background-position: center !important; border: 0 !important; border-radius: 0 !important; margin: 0 !important; }
#products > ul.products:not(.main-category) > li.product .woocommerce-loop-product__title { padding: 12px 14px 0 !important; margin: 0 !important; text-align: left !important; font-size: 15px !important; font-weight: 700 !important; letter-spacing: 0 !important; line-height: 1.3 !important; color: #1c1c1c !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: auto !important; min-height: 0 !important; text-transform: none !important; }
#products > ul.products:not(.main-category) > li.product .content-area { display: flex; flex-direction: column; flex: 1; padding: 2px 14px 14px !important; text-align: left !important; }
#products > ul.products:not(.main-category) > li.product .content-area p { margin: 0 0 4px !important; text-align: left !important; font-size: 13px !important; line-height: 1.4 !important; color: #555 !important; }
#products > ul.products:not(.main-category) > li.product .content-area p:first-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
#products > ul.products:not(.main-category) > li.product .content-area p.sku { font-size: 14px !important; font-weight: 700 !important; color: #555 !important; }
#products > ul.products:not(.main-category) > li.product .price-section { display: flex; justify-content: flex-start !important; align-items: baseline !important; width: 100% !important; margin: 6px 0 10px !important; text-align: left !important; font-size: 19px !important; font-weight: 800 !important; color: #1c1c1c !important; }
#products > ul.products:not(.main-category) > li.product .price-section > * { text-align: left !important; }
#products > ul.products:not(.main-category) > li.product .price-section .nprice, #products > ul.products:not(.main-category) > li.product .price-section span { color: #50833b !important; font-weight: 800 !important; }
#products > ul.products:not(.main-category) > li.product .buttons-section { display: grid !important; grid-template-columns: 1fr !important; gap: 8px !important; margin: auto 0 0 !important; width: 100% !important; }
#products > ul.products:not(.main-category) > li.product .buttons-section .btn { width: 100% !important; margin: 0 !important; font-size: 13px !important; padding: 9px 10px !important; letter-spacing: .06em !important; }
/* the theme's "Compare" tick box, under the buttons */
#products > ul.products:not(.main-category) > li.product > p.woocommerce-products-compare-compare-button { margin: -4px 0 0 !important; padding: 0 14px 12px !important; text-align: left !important; }
#products > ul.products:not(.main-category) > li.product > p.woocommerce-products-compare-compare-button label { margin: 0 !important; font-size: 13px !important; color: #555 !important; cursor: pointer; }
#products > ul.products:not(.main-category) > li.product > p.woocommerce-products-compare-compare-button a { color: #32adfb !important; font-size: 13px !important; margin-left: 8px; }
@media (max-width: 991.98px) { #products > ul.products:not(.main-category) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 575.98px) { #products:has(> ul.products:not(.main-category)) { padding: 16px 14px 4px; border-radius: 12px; margin-left: -4px; margin-right: -4px; } #products > ul.products:not(.main-category) { grid-template-columns: 1fr; gap: 16px; } }

/* ---------------------------------------------------------------------------
   0.14.0 WHOLE PAGE DARK on listing pages (Shannon 11/16: "i also want the
   black background ... to be the whole page instead of just surrounding the
   listings"). body.kdh-dark-list (KD_Header::listing_body_class). The page is
   #1b1d21 from the title band to the footer; the results panel above just
   blends in. Everything that holds dark text becomes a rounded card: the
   filter box (keeps its light grey), and white cards for the sell form, price band, FAQs,
   buying-guide link, recently sold. The long category description sections
   (pre-footer) turn light-on-dark instead. Parent-category type tiles are
   already white cards.
   ------------------------------------------------------------------------- */
body.kdh-dark-list { background: #1b1d21 !important; }
body.kdh-dark-list .site-wrapper, body.kdh-dark-list .main, body.kdh-dark-list main, body.kdh-dark-list .category-products-block, body.kdh-dark-list .indent-block:not(.kdh-phero), body.kdh-dark-list #content-grid, body.kdh-dark-list .content-area { background-color: transparent !important; }
body.kdh-dark-list .site-wrapper { background: #1b1d21 !important; }
body.kdh-dark-list #products:has(> ul.products) { background: transparent; padding: 0; border-radius: 0; }
body.kdh-dark-list .category-products-block { padding-top: 28px !important; }
/* filter sidebar: the theme's full-height grey wrapper goes; the filter box
   itself (its own light grey, rows unchanged) becomes a rounded card. */
body.kdh-dark-list #filter-sidebar, body.kdh-dark-list .kd-lf-side, body.kdh-dark-list .filter-sidebar-wrapper { background: transparent !important; }
body.kdh-dark-list .filter-sidebar-inner, body.kdh-dark-list form.kd-lf { border-radius: 12px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
@media (min-width: 768px) { body.kdh-dark-list .category-products-block > .container, body.kdh-dark-list .indent-block:not(.kdh-phero) > .container { padding-top: 28px; } }
/* content modules = white cards. The module itself is the card (not its page
   wrapper), so it works on category, parent-category and manufacturer pages
   alike and never nests. A module inside a long category description stays
   light-on-dark like the description around it. */
body.kdh-dark-list .kd-sell-module-wrap, body.kdh-dark-list .kd-price-band-wrap, body.kdh-dark-list .kd-faq-wrap { background: transparent !important; }
body.kdh-dark-list :is(.kd-sell--module, .kd-price-band, .kd-faq, .kd-guide-link, .kd-recently-sold, .kd-wtb, .kd-model-links):not(.pre-footer-category-description *) { background: #fff !important; border-radius: 12px; padding: 24px !important; margin-top: 0 !important; margin-bottom: 18px !important; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
/* manufacturer pages: brand intro (logo + about text) = white card; the note
   above the model list = light text */
body.kdh-dark-list .manufacturer-info-section { background: transparent !important; }
body.kdh-dark-list .manufacturer-info-section > .container { background: #fff; border-radius: 12px; padding: 28px !important; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
body.kdh-dark-list [class*="manufacturer-historical"], body.kdh-dark-list [class*="manufacturer-historical"] * { color: rgba(255,255,255,.8) !important; }
body.kdh-dark-list [class*="manufacturer-historical"] h2, body.kdh-dark-list [class*="manufacturer-historical"] h3, body.kdh-dark-list [class*="manufacturer-historical"] strong { color: #fff !important; }
body.kdh-dark-list [class*="manufacturer-historical"] a { color: #32adfb !important; }
body.kdh-dark-list [class*="manufacturer-historical"] a:hover { color: #7fcbff !important; }
/* long category descriptions: light text on the dark page */
body.kdh-dark-list .pre-footer-category-description { background: transparent !important; }
body.kdh-dark-list .pre-footer-category-description h2, body.kdh-dark-list .pre-footer-category-description h3, body.kdh-dark-list .pre-footer-category-description h4, body.kdh-dark-list .pre-footer-category-description strong, body.kdh-dark-list .pre-footer-category-description b { color: #fff !important; }
body.kdh-dark-list .pre-footer-category-description p, body.kdh-dark-list .pre-footer-category-description li, body.kdh-dark-list .pre-footer-category-description span, body.kdh-dark-list .pre-footer-category-description td, body.kdh-dark-list .pre-footer-category-description dd, body.kdh-dark-list .pre-footer-category-description dt { color: rgba(255,255,255,.8) !important; }
body.kdh-dark-list .pre-footer-category-description a { color: #32adfb !important; }
body.kdh-dark-list .pre-footer-category-description a:hover { color: #7fcbff !important; }
/* /used-machinery-for-sale/ (kd-listing-filters) prints a "Filter machinery" heading above its box */
body.kdh-dark-list .kd-lf-side .kd-lf-title { color: #fff !important; }

/* ---------------------------------------------------------------------------
   0.15.0 PAGINATION (Shannon 11/16: "change the look of the pagination").
   Rounded charcoal buttons on the dark listing page, current page solid KD
   blue, blue edge on hover, labelled Prev / Next (KD_Header::pagination_args).
   Theme drew small square white boxes with a blue arrow.
   🪤 The theme's rule ".woocommerce nav.woocommerce-pagination ul li a" (with
   !important) out-ranks a plain ".woocommerce-pagination" selector, so every
   rule here starts "html body nav.woocommerce-pagination ... ul li".
   ------------------------------------------------------------------------- */
html body nav.woocommerce-pagination ul.page-numbers { display: flex !important; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 !important; padding: 0 !important; border: 0 !important; list-style: none !important; }
html body nav.woocommerce-pagination ul.page-numbers li { margin: 0 !important; padding: 0 !important; border: 0 !important; float: none !important; background: none !important; overflow: visible !important; }
html body nav.woocommerce-pagination ul.page-numbers li::before { display: none !important; }
html body nav.woocommerce-pagination ul li .page-numbers:is(a, span) { display: inline-flex !important; align-items: center; justify-content: center; gap: 4px; min-width: 40px !important; height: 40px !important; padding: 0 12px !important; border: 1px solid #3a3f47 !important; border-radius: 8px !important; background: #2a2e35 !important; color: #fff !important; font-size: 15px !important; font-weight: 700 !important; line-height: 1 !important; text-decoration: none !important; box-sizing: border-box; transition: border-color .15s, background-color .15s, color .15s; }
html body nav.woocommerce-pagination ul li .page-numbers:is(a:hover, a:focus-visible) { border-color: #32adfb !important; color: #32adfb !important; background: #23272d !important; }
html body nav.woocommerce-pagination ul li .page-numbers.current { background: #32adfb !important; border-color: #32adfb !important; color: #fff !important; }
html body nav.woocommerce-pagination ul li .page-numbers.dots { background: transparent !important; border-color: transparent !important; color: rgba(255,255,255,.6) !important; min-width: 24px !important; padding: 0 4px !important; }
html body nav.woocommerce-pagination ul li .page-numbers:is(.prev, .next) { padding: 0 16px !important; font-size: 14px !important; letter-spacing: .04em; }
/* the ‹ › inside Prev/Next is a <span>, which the theme's "ul li span" box rule also styles */
html body nav.woocommerce-pagination ul li .page-numbers:is(.prev, .next) span { display: inline !important; min-width: 0 !important; height: auto !important; padding: 0 !important; margin: 0 !important; border: 0 !important; background: none !important; color: inherit !important; font-size: 22px !important; line-height: 1 !important; position: relative; top: -1px; }
/* bottom bar: pagination to the right on desktop, centred on phones */
#products > .product-action-bar.bottom .pagination { margin-left: auto; }
@media (max-width: 767px) { #products > .product-action-bar.bottom { justify-content: center !important; } #products > .product-action-bar.bottom .pagination { margin: 0 auto; } html body nav.woocommerce-pagination ul.page-numbers { gap: 5px; justify-content: center; } html body nav.woocommerce-pagination ul li .page-numbers:is(a, span) { min-width: 38px !important; height: 38px !important; padding: 0 8px !important; font-size: 14px !important; }
  /* phones: arrows only, so the row fits; the words stay for screen readers */
  html body nav.woocommerce-pagination ul li .page-numbers:is(.prev, .next) { font-size: 0 !important; padding: 0 !important; width: 38px; } html body nav.woocommerce-pagination ul li .page-numbers:is(.prev, .next) span { font-size: 24px !important; } }
