/* WordPress and Blocksy adjustments on top of cp.css (the prototype styles). */

/* Blocksy wraps content in #main-container / main.site-main: no extra spacing or background from the parent. */
.cp-theme #main-container { display: block; min-height: 0; }
.cp-theme main.site-main { display: block; padding: 0; margin: 0; }
.cp-page-home main.site-main > .hero:first-child { margin-top: 0; }


/* WooCommerce price markup inside cards. */
.card__price .woocommerce-Price-amount { font: inherit; color: inherit; }
.card__media img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }

/* Newsletter embed (Omnisend) sits where the prototype form was. */
.signup__embed { margin-bottom: 18px; }
.signup__embed form { display: flex; gap: 10px; flex-wrap: wrap; }

/* Brand strip: WordPress outputs width/height attributes; keep logos small and greyed. */
.brandstrip .brand-tile img, .brand-grid .brand-tile img { width: auto; max-width: 84%; max-height: 84%; }

/* Home club names are links. */
.clubs a { padding: 9px 16px; border: 2px solid transparent; border-radius: var(--radius); background: var(--cream); font-size: 14px; font-weight: 600; }
.clubs a:hover, .clubs a:focus-visible { border-color: var(--ink); }

/* Old Flatsome accordion shortcodes (content from the previous theme). */
.custom-fallback-item { border-bottom: 1px solid var(--line); padding: 10px 0; }
.custom-fallback-summary { cursor: pointer; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; list-style: none; }
.custom-fallback-summary::-webkit-details-marker { display: none; }
.cp-theme .custom-fallback-summary::after { content: "+"; flex: 0 0 auto; color: var(--accent-ink); font-size: 22px; font-weight: 400; line-height: 1; }
.cp-theme .custom-fallback-item[open] > .custom-fallback-summary::after { content: "\2212"; }
.custom-fallback-content { padding-top: 8px; }

/* Listings: server page links look like the browser page buttons. */
.pager a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px; border: 2px solid var(--sand); border-radius: var(--radius); background: var(--white); color: var(--black); font-size: 16px; font-weight: 700; }
.pager a[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: var(--white); }
.subcat { text-decoration: none; }
.subcat img { aspect-ratio: auto; }

/* Ninja Forms: the page shows its own form heading. */
.cp-theme .nf-form-title { display: none; }

/* Blog article: text column, images and tables from the old Elementor posts. */
.cp-article { max-width: 820px; }
.cp-article img { height: auto; border-radius: 6px; margin: 8px 0 20px; }
.cp-article .cp-article__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.cp-article ul, .cp-article ol { margin: 0 0 16px; padding-left: 22px; }
.cp-article li + li { margin-top: 6px; }
.cp-article table { width: 100%; margin: 0 0 20px; border-collapse: collapse; font-size: 15px; }
.cp-article th, .cp-article td { padding: 10px 12px; border: 1px solid var(--sand); text-align: left; vertical-align: top; }
.cp-article th { background: var(--cream); }
.cp-article details { margin: 0 0 10px; padding: 12px 16px; border: 1px solid var(--sand); border-radius: 6px; background: var(--white); }
.cp-article summary { cursor: pointer; font-weight: 700; }
.cp-article svg { max-width: 100%; height: auto; }
.cp-article__back { margin-top: 32px; font-weight: 700; }

/* Visual audit fixes (23 Oct 2026): Blocksy's global form and button styles on theme components. */
/* Header search: Blocksy's [type=submit] padding squeezed the icon to 4 px. */
.cp-theme form.search button { min-height: 0; padding: 0; font: inherit; }
.cp-theme form.search button svg { flex-shrink: 0; }
/* Filter lists: Blocksy's label/legend defaults (15 px, 0.5em bottom margin, legend shifted left). */
.cp-theme .filters label { margin: 0; font-size: inherit; line-height: inherit; font-weight: inherit; }
.cp-theme .filters legend { margin-left: 0; padding: 0; }
.cp-theme .shop__sort { margin: 0; font-size: inherit; }
.cp-theme .shop__sort select { padding: 0 34px 0 12px; }

/* Blocksy variables set to the prototype tokens: quantity boxes sand, focus ink, links accent-ink, buttons CTA. */
.cp-theme {
  --quantity-initial-color: var(--sand);
  --quantity-hover-color: var(--ink);
  --quantity-arrows-initial-color: var(--black);
  --quantity-arrows-hover-color: var(--accent-ink);
  --theme-form-field-border-focus-color: var(--ink);
  --theme-form-field-background-initial-color: var(--white);
  --theme-form-field-background-focus-color: var(--white);
  --theme-link-initial-color: var(--accent-ink);
  --theme-link-hover-color: var(--black);
  --theme-button-background-initial-color: var(--cta);
  --theme-button-background-hover-color: var(--ink);
  --theme-button-font-weight: 700;
  --theme-button-border-radius: var(--radius);
}
/* My account menu: Blocksy fills the active item with #FF4521 (white text 3.3:1); use the CTA colour (4.7:1). */
.cp-theme .woocommerce-MyAccount-navigation li.is-active > a { background-color: var(--cta); }

/* 23 Oct round 2: 3 cards per row in listings (30 per page). */
.shop .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 767px) { .shop .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Long category text sits under the product grid, same left edge and width. */
@media (min-width: 1024px) {
  #category-description > .wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; }
  #category-description .seo { grid-column: 2; max-width: none; }
}
/* Brand strip: square logo files have white space, so the tiles are larger. */
.brandstrip .brand-tile { flex: 0 0 150px; height: 104px; }
.brandstrip .brand-tile img { max-width: 100%; max-height: 100%; }
/* Blog cards with the featured image on top. */
.post { overflow: hidden; }
.post__img { display: block; margin: -24px -24px 6px; aspect-ratio: 1 / 1; background: var(--cream); overflow: hidden; }
.post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post:hover .post__img img { transform: scale(1.03); }

/* Blog FAQ (old Elementor accordion saved as <details><summary>…<svg><svg></summary><p>): prototype FAQ look. */
.cp-article details { margin: 0 0 10px; padding: 0; border: 1px solid var(--sand); border-radius: 6px; background: var(--white); }
.cp-article details[open] { border-color: var(--ink); }
.cp-article summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; list-style: none; background: none !important; color: var(--black) !important; font-size: 17px; font-weight: 700; line-height: 1.4; cursor: pointer; }
.cp-article summary::-webkit-details-marker { display: none; }
.cp-article summary::marker { content: ""; }
.cp-article summary svg { display: none !important; }
.cp-article summary::after { content: "+"; flex-shrink: 0; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--cream); color: var(--accent-ink); font-size: 20px; font-weight: 700; line-height: 1; }
.cp-article details[open] > summary::after { content: "−"; }
.cp-article summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.cp-article details > :not(summary) { margin: 0; padding: 0 20px 16px; }
.cp-article details > :not(summary) + :not(summary) { padding-top: 0; }

/* Search suggestions while typing (header and phone menu). */
.cp-theme .suggest { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; min-width: min(420px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow-y: auto; padding: 6px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--black); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18); text-align: left; line-height: 1.35; }
.cp-theme .suggest[hidden] { display: none; }
.cp-theme .suggest a { display: flex; align-items: center; gap: 12px; padding: 8px 14px; color: var(--black); text-decoration: none; }
.cp-theme .suggest a:hover, .cp-theme .suggest a[aria-selected="true"] { background: var(--cream); }
.cp-theme .suggest__head { padding: 8px 14px 4px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cp-theme .suggest__cat { justify-content: space-between; min-height: 40px; font-weight: 700; }
.cp-theme .suggest__cat span { color: var(--muted); font-size: 13px; font-weight: 400; }
.cp-theme .suggest__item img { flex: 0 0 48px; width: 48px; height: 48px; object-fit: contain; border-radius: 4px; background: var(--white); }
.cp-theme .suggest__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cp-theme .suggest__brand { color: var(--muted); font-size: 12px; }
.cp-theme .suggest__name { font-size: 14px; font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cp-theme .suggest__price { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; font-size: 14px; font-weight: 700; white-space: nowrap; }
.cp-theme .suggest__price .was { color: var(--muted); font-size: 12px; font-weight: 400; text-decoration: line-through; }
.cp-theme .suggest__price small { color: var(--error); font-size: 12px; font-weight: 700; }
.cp-theme .suggest__item.is-out img { opacity: .55; }
.cp-theme .suggest__all { justify-content: center; min-height: 44px; margin-top: 4px; border-top: 1px solid var(--line); color: var(--accent-ink) !important; font-weight: 700; }
.cp-theme .suggest__none { padding: 12px 14px; color: var(--muted); font-size: 14px; }
.cp-theme .mmenu .suggest { position: static; min-width: 0; max-height: none; margin-top: 8px; }

/* Basket badge: orange while the basket has items, a soft pulse ring as a reminder, a pop when something is added. */
.cp-theme .hdr__bag.has-items .hdr__count { background: var(--cta); isolation: isolate; }
.cp-theme .hdr__bag.is-pulsing .hdr__count::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--cta); z-index: -1; animation: cp-badge-pulse 2.4s ease-out infinite; }
.cp-theme .hdr__bag.is-bumped .hdr__count { animation: cp-badge-pop .7s ease-out; }
.cp-theme .hdr__bag.is-bumped { animation: cp-bag-shake .6s ease-in-out; }
@keyframes cp-badge-pulse { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(2.3); opacity: 0; } }
@keyframes cp-badge-pop { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }
@keyframes cp-bag-shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(3deg); } }
/* Reduce motion (system setting): nothing moves or grows; the ring only fades in and out around the badge. */
@keyframes cp-badge-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(217, 52, 15, 0); } 50% { box-shadow: 0 0 0 5px rgba(217, 52, 15, .35); } }
@media (prefers-reduced-motion: reduce) {
  .cp-theme .hdr__bag.is-pulsing .hdr__count::after, .cp-theme .hdr__bag.is-bumped, .cp-theme .hdr__bag.is-bumped .hdr__count { animation: none; }
  .cp-theme .hdr__bag.is-pulsing .hdr__count::after { display: none; }
  .cp-theme .hdr__bag.is-pulsing .hdr__count { animation: cp-badge-glow 2.4s ease-in-out infinite; }
}

/* Visual audit 2 (23 Oct): contrast fixes. */
/* Orange links on the cream trust box: #D9340F is 4.23:1 there, the strong ink is 4.9:1. */
.cp-theme .assure a.link { color: var(--accent-ink-strong); }
/* Blocksy sale badges (product gallery, any Blocksy loop): white on #FF4521 is 3.43:1; the CTA orange is 4.7:1. */
.cp-theme { --badge-background-color: var(--cta); }
.cp-theme .onsale { background-color: var(--cta); color: var(--white); }
/* Off-palette colours from Blocksy and plugins, mapped to tokens. */
.cp-theme .out-of-stock-badge { background-color: var(--ink); color: var(--white); }
.cp-theme .required, .cp-theme abbr.required, .cp-theme .ninja-forms-req-symbol { color: var(--error); }
.cp-theme .prose hr, .cp-theme .wrap > hr { border: 0; border-top: 1px solid var(--line); }
/* Old product descriptions (inline colours in the description, accordions and short description) become theme colours. */
.cp-theme :is(.woocommerce-Tabs-panel, .woocommerce-product-details__short-description) :is([style*="ff4724" i], [style*="255, 71, 36"]) { background-color: var(--cta) !important; }
.cp-theme :is(.woocommerce-Tabs-panel, .woocommerce-product-details__short-description) :is([style*="color: #333" i], [style*="color:#333" i], [style*="color: #444" i], [style*="color:#444" i], [style*="color: #555" i], [style*="color:#555" i], [style*="color: #777" i], [style*="color:#777" i], [style*="color: #999" i], [style*="color:#999" i]) { color: var(--muted) !important; }
.cp-theme :is(.woocommerce-Tabs-panel, .woocommerce-product-details__short-description) [style*="fff5f3" i] { background-color: var(--tint-accent) !important; }
/* Old page content uses h4/h5/h6 as section titles; Blocksy draws them larger than the theme's h3. */
.cp-theme .prose :is(h4, h5, h6) { margin: 24px 0 8px; color: var(--ink); font: 700 17px/1.4 var(--body); letter-spacing: 0; text-transform: none; }
.cp-theme .prose h4 { font-size: 18px; }
/* 404 page */
.cp-404 .wrap { max-width: 760px; text-align: center; }
.cp-404__search { max-width: 560px; margin: 0 auto 24px; text-align: left; }
.cp-404__more { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
/* Home "Brands we stock": greyscale logos at 55% opacity were barely visible (light logos almost vanished). */
.cp-theme .brandstrip .brand-tile img { opacity: .9; filter: grayscale(1) contrast(1.25) brightness(.85); }
.cp-theme .brandstrip .brand-tile:is(:hover, :focus-visible) img { opacity: 1; filter: none; }
.cp-theme .prose :is(h2, h3, h4, h5, h6) [style*="font-size"] { font-size: inherit !important; }
/* Tables in text pages (Delivery options and prices). Phones: each row becomes a small card. */
.cp-theme .prose table { width: 100%; margin: 12px 0 20px; border-collapse: collapse; font-size: 15px; }
.cp-theme .prose th, .cp-theme .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cp-theme .prose thead th { border-bottom: 2px solid var(--sand); color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
@media (max-width: 767px) {
  .cp-theme .prose .delivery-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cp-theme .prose .delivery-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .cp-theme .prose .delivery-table td { padding: 0; border: 0; }
  .cp-theme .prose .delivery-table td:nth-child(1) { grid-column: 1 / -1; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
  .cp-theme .prose .delivery-table td:nth-child(2) { font-weight: 700; }
  .cp-theme .prose .delivery-table td:nth-child(3) { text-align: right; font-weight: 700; }
  .cp-theme .prose .delivery-table td:nth-child(4) { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
}
