/* ═══ CardPlus UI Tweaks v1.5.0 ═══
   Shop redesign to match cardplus_v3 demo.
   Dark styles scoped to body:not(.cp-light); light mode inherits theme. */

:root{
	--cput-surface:#171C25;
	--cput-bg2:#10141B;
	--cput-border:rgba(255,255,255,.08);
	--cput-border2:rgba(255,255,255,.14);
	--cput-text:#EAECF0;
	--cput-muted:#8B93A1;
	--cput-accent:#D4AF5A;
	--cput-accent2:#E8C87A;
}

/* ─────────────────────────────────────────
   1. DECLUTTER: hide the giant category tree
   widget + "Edit Filter Set" link in sidebar
   ───────────────────────────────────────── */
.woocommerce-shop #secondary .widget_product_categories,
.tax-product_cat #secondary .widget_product_categories,
.woocommerce-shop #secondary .wc-block-product-categories,
.tax-product_cat #secondary .wc-block-product-categories{
	display:none !important;
}
/* "Edit Filter Set" admin link */
#secondary a[href*="filter"] .edit-filter-set,
#secondary .edit-filter-set,
#secondary a:where([href*="edit"]):where([href*="filter"]){
	display:none !important;
}

/* ─────────────────────────────────────────
   2. SIDEBAR SHELL — demo .shop-side look
   ───────────────────────────────────────── */
.woocommerce-shop #secondary .widget,
.tax-product_cat #secondary .widget{
	background:transparent;
	margin-bottom:24px;
	padding:0;
}
.woocommerce-shop #secondary .widget-title,
.woocommerce-shop #secondary .wp-block-heading,
.tax-product_cat #secondary .widget-title,
.tax-product_cat #secondary .wp-block-heading{
	font-family:'JetBrains Mono',ui-monospace,Menlo,monospace;
	font-size:10.5px !important;
	text-transform:uppercase;
	letter-spacing:.1em;
	font-weight:600;
	margin-bottom:10px;
}
body:not(.cp-light).woocommerce-shop #secondary .widget-title,
body:not(.cp-light).woocommerce-shop #secondary .wp-block-heading,
body:not(.cp-light).tax-product_cat #secondary .widget-title,
body:not(.cp-light).tax-product_cat #secondary .wp-block-heading{
	color:var(--cput-muted);
}

/* ─────────────────────────────────────────
   3. DARK MODE for WC block product filters
   (price slider, checkbox lists, dropdowns)
   ───────────────────────────────────────── */
body:not(.cp-light) #secondary .wc-block-product-filters,
body:not(.cp-light) #secondary .wp-block-woocommerce-product-filters,
body:not(.cp-light) #secondary [data-block-name*="product-filter"],
body:not(.cp-light) #secondary .wc-block-product-filter{
	color:var(--cput-text);
}
body:not(.cp-light) #secondary .wc-block-product-filter label,
body:not(.cp-light) #secondary .wc-block-product-filter-checkbox-list__label,
body:not(.cp-light) #secondary .wc-block-components-checkbox__label,
body:not(.cp-light) #secondary .wc-block-product-filter__label{
	color:var(--cput-muted) !important;
	font-size:13px;
}
body:not(.cp-light) #secondary .wc-block-product-filter select,
body:not(.cp-light) #secondary select,
body:not(.cp-light) #secondary input[type="text"],
body:not(.cp-light) #secondary input[type="number"],
body:not(.cp-light) #secondary .wc-block-product-filter-price__amount,
body:not(.cp-light) #secondary .wc-block-product-filter-price-slider__content input{
	background:var(--cput-bg2) !important;
	border:1px solid var(--cput-border2) !important;
	color:var(--cput-text) !important;
	border-radius:8px !important;
}
/* price slider track + handles */
body:not(.cp-light) #secondary .wc-block-product-filter-price-slider__track,
body:not(.cp-light) #secondary input[type="range"]::-webkit-slider-runnable-track{
	background:var(--cput-border2) !important;
}
body:not(.cp-light) #secondary .wc-block-product-filter-price-slider__range{
	background:var(--cput-accent) !important;
}
body:not(.cp-light) #secondary input[type="range"]::-webkit-slider-thumb{
	background:var(--cput-accent) !important;
	border-color:var(--cput-accent2) !important;
}
body:not(.cp-light) #secondary input[type="range"]::-moz-range-thumb{
	background:var(--cput-accent) !important;
	border-color:var(--cput-accent2) !important;
}
/* checkboxes */
body:not(.cp-light) #secondary input[type="checkbox"]{
	accent-color:var(--cput-accent);
}
/* filter chips / removable active tokens */
body:not(.cp-light) #secondary .wc-block-product-filter-active__item,
body:not(.cp-light) #secondary .wc-block-components-chip{
	background:var(--cput-surface) !important;
	border:1px solid var(--cput-border2) !important;
	color:var(--cput-text) !important;
	border-radius:100px !important;
}

/* ─────────────────────────────────────────
   4. RESET / APPLY buttons → gold
   ───────────────────────────────────────── */
#secondary .wc-block-product-filter-clear-button,
#secondary button[type="submit"],
#secondary .wp-block-button__link,
#secondary .wc-block-product-filters__apply,
#secondary input[type="submit"]{
	background:var(--cput-accent) !important;
	color:#14100a !important;
	border:none !important;
	border-radius:8px !important;
	font-weight:700 !important;
	font-size:12.5px !important;
	padding:8px 16px !important;
}
#secondary .wc-block-product-filter-clear-button{
	background:transparent !important;
	color:var(--cput-accent) !important;
	border:1px solid var(--cput-accent) !important;
}

/* ─────────────────────────────────────────
   5. CATEGORY TILES — real category images,
   clean flat card (change image per category:
   Products > Categories > Edit > Thumbnail)
   ───────────────────────────────────────── */
ul.products li.product-category{
	border-radius:14px !important;
	padding:14px 14px 20px !important;
	text-align:center !important;
	transition:all .15s ease !important;
	overflow:hidden;
}
body:not(.cp-light) ul.products li.product-category{
	background:var(--cput-surface) !important;
	border:1px solid var(--cput-border) !important;
}
body.cp-light ul.products li.product-category{
	background:#fff !important;
	border:1px solid rgba(0,0,0,.09) !important;
}
ul.products li.product-category:hover{
	border-color:var(--cput-accent) !important;
	transform:translateY(-2px);
}
ul.products li.product-category a{
	display:flex !important;
	flex-direction:column;
	align-items:center;
	gap:0;
	padding:0 !important;
	margin:0 !important;
	background:transparent !important;
	min-height:0 !important;
	height:auto !important;
}
/* the category thumbnail — clean, rounded, contained */
ul.products li.product-category img{
	display:block !important;
	width:100% !important;
	aspect-ratio:1/0.8;
	object-fit:cover !important;
	border-radius:10px !important;
	margin:0 0 12px !important;
}
ul.products li.product-category .astra-shop-thumbnail-wrap,
ul.products li.product-category .ast-loop-image-wrap{
	display:block !important;
	width:100%;
	background:transparent !important;
	padding:0 !important;
	margin:0 !important;
}
/* kill grey/white pill behind the title — nuke bg on every inner element except the img */
ul.products li.product-category *:not(img){
	background:transparent !important;
	box-shadow:none !important;
}
ul.products li.product-category .woocommerce-loop-category__title,
ul.products li.product-category h2{
	border:none !important;
	width:auto !important;
	text-transform:none !important;
	letter-spacing:0 !important;
	line-height:1.4 !important;
	font-size:14px !important;
	font-weight:700 !important;
	margin:0 !important;
	padding:0 !important;
}
body:not(.cp-light) ul.products li.product-category .woocommerce-loop-category__title,

body:not(.cp-light) ul.products li.product-category h2{
	color:var(--cput-text) !important;
}
ul.products li.product-category .count,
ul.products li.product-category mark{
	display:block;
	background:transparent !important;
	font-size:12px !important;
	font-weight:400 !important;
	margin-top:4px;
}
body:not(.cp-light) ul.products li.product-category .count,
body:not(.cp-light) ul.products li.product-category mark{
	color:var(--cput-muted) !important;
}

/* ─────────────────────────────────────────
   6. ARCHIVE BANNER ("Shop" title strip)
   ───────────────────────────────────────── */
body:not(.cp-light) .ast-archive-entry-banner{
	background:var(--cput-bg2) !important;
	border-bottom:1px solid var(--cput-border);
}
body:not(.cp-light) .ast-archive-entry-banner .ast-archive-title,
body:not(.cp-light) .ast-archive-entry-banner h1{
	color:var(--cput-text) !important;
	font-weight:800;
	letter-spacing:-.02em;
}

/* ─────────────────────────────────────────
   7. SHOP TOPBAR — result count + sort select
   ───────────────────────────────────────── */
body:not(.cp-light) .woocommerce-result-count{
	color:var(--cput-muted) !important;
	font-size:13px;
}
.woocommerce-ordering select,
select.orderby{
	-webkit-appearance:none;
	appearance:none;
	padding:8px 32px 8px 12px !important;
	font-size:13px !important;
	border-radius:8px !important;
	background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%238B93A1' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
	background-repeat:no-repeat !important;
	background-position:right 10px center !important;
}
body:not(.cp-light) .woocommerce-ordering select,
body:not(.cp-light) select.orderby{
	background-color:var(--cput-bg2) !important;
	border:1px solid var(--cput-border2) !important;
	color:var(--cput-text) !important;
}

/* ─────────────────────────────────────────
   8. LIGHT/DARK TOGGLE — restyled for header
   (JS moves #cp-mode-toggle next to cart)
   ───────────────────────────────────────── */
#cp-mode-toggle.cput-inline{
	position:static !important;
	width:36px !important;
	height:36px !important;
	border-radius:50% !important;
	display:inline-flex !important;
	align-items:center;
	justify-content:center;
	margin-left:10px;
	font-size:16px !important;
	line-height:1 !important;
	box-shadow:none !important;
	vertical-align:middle;
	cursor:pointer;
	border:1px solid var(--cput-border2) !important;
	background:var(--cput-surface) !important;
	padding:0 !important;
}
body.cp-light #cp-mode-toggle.cput-inline{
	background:#fff !important;
	border-color:rgba(0,0,0,.14) !important;
}
#cp-mode-toggle.cput-inline:hover{
	border-color:var(--cput-accent) !important;
}

/* ─────────────────────────────────────────
   9. WPC SMART FILTER — Reset/Apply card
   (.wpc-filters-section.wpc-filter-layout-submit-button)
   ───────────────────────────────────────── */
body:not(.cp-light) .wpc-filters-section.wpc-filter-layout-submit-button,
body:not(.cp-light) .wpc-sticky-buttons,
body:not(.cp-light) .wpc-pc-sticky-buttons{
	background:var(--cput-surface) !important;
	border:1px solid var(--cput-border) !important;
	border-radius:10px;
	box-shadow:none !important;
}
body.cp-light .wpc-filters-section.wpc-filter-layout-submit-button,
body.cp-light .wpc-sticky-buttons{
	background:#fff !important;
	border:1px solid rgba(0,0,0,.09) !important;
	border-radius:10px;
	box-shadow:none !important;
}
/* Apply button → gold */
.wpc-sticky-buttons .wpc-filters-submit-button,
.wpc-sticky-buttons button[type="submit"],
.wpc-sticky-buttons .button:not(.wpc-filters-reset-button),
.wpc-filters-section a.wpc-filters-submit-button{
	background:var(--cput-accent) !important;
	color:#14100a !important;
	border:none !important;
	border-radius:8px !important;
	font-weight:700 !important;
}
.wpc-sticky-buttons .wpc-filters-submit-button:hover,
.wpc-filters-section a.wpc-filters-submit-button:hover{
	background:var(--cput-accent2) !important;
}
/* Reset button → ghost gold */
.wpc-sticky-buttons .wpc-filters-reset-button,
.wpc-filters-section a.wpc-filters-reset-button{
	background:transparent !important;
	color:var(--cput-accent) !important;
	border:1px solid var(--cput-accent) !important;
	border-radius:8px !important;
	font-weight:600 !important;
}
/* wpc dropdowns + labels dark */
body:not(.cp-light) .wpc-filters-section select,
body:not(.cp-light) .wpc-filters-section input[type="text"],
body:not(.cp-light) .wpc-filters-section input[type="number"]{
	background:var(--cput-bg2) !important;
	border:1px solid var(--cput-border2) !important;
	color:var(--cput-text) !important;
	border-radius:8px !important;
}
body:not(.cp-light) .wpc-filters-section,
body:not(.cp-light) .wpc-filters-section label,
body:not(.cp-light) .wpc-filter-header,
body:not(.cp-light) .wpc-filters-section .wpc-filter-title{
	color:var(--cput-muted) !important;
}
body:not(.cp-light) .wpc-posts-found{
	color:var(--cput-muted) !important;
}

/* ─────────────────────────────────────────
   10. TILE TITLE — force below image, no pill
   (Astra overlays h2 on the thumbnail)
   ───────────────────────────────────────── */
body ul.products li.product-category h2.woocommerce-loop-category__title,
body ul.products li.product-category .woocommerce-loop-category__title{
	position:static !important;
	inset:auto !important;
	transform:none !important;
	background:none !important;
	background-color:transparent !important;
	padding:10px 4px 0 !important;
	margin:0 !important;
	display:block !important;
}
body ul.products li.product-category h2.woocommerce-loop-category__title mark,
body ul.products li.product-category .woocommerce-loop-category__title mark{
	background:none !important;
	background-color:transparent !important;
}

/* ─────────────────────────────────────────
   11. MOBILE MENU — dark mode drawer/dropdown
   ───────────────────────────────────────── */
body:not(.cp-light) .ast-mobile-header-content,
body:not(.cp-light) .ast-mobile-popup-drawer .ast-mobile-popup-content,
body:not(.cp-light) .ast-mobile-header-wrap .main-header-bar-navigation{
	background:var(--cput-bg2) !important;
}
body:not(.cp-light) .ast-mobile-header-content .main-header-menu,
body:not(.cp-light) .ast-mobile-header-content .menu-item,
body:not(.cp-light) .ast-mobile-popup-drawer .main-header-menu{
	background:var(--cput-bg2) !important;
}
body:not(.cp-light) .ast-mobile-header-content .menu-item .menu-link,
body:not(.cp-light) .ast-mobile-popup-drawer .menu-item .menu-link{
	color:var(--cput-text) !important;
	border-color:var(--cput-border) !important;
	background:transparent !important;
}
body:not(.cp-light) .ast-mobile-header-content .menu-item .menu-link:hover,
body:not(.cp-light) .ast-mobile-popup-drawer .menu-item .menu-link:hover{
	color:var(--cput-accent) !important;
}
body:not(.cp-light) .ast-header-break-point .main-header-bar-navigation .menu-toggle,
body:not(.cp-light) .ast-mobile-header-content .ast-header-navigation-arrow{
	color:var(--cput-text) !important;
}

/* ─────────────────────────────────────────
   12. PAGE TITLE BANNERS — readable everywhere
   (e.g. About Us banner w/ faded bg image)
   ───────────────────────────────────────── */
.ast-single-entry-banner[data-banner-background-type="custom"],
section.ast-single-entry-banner{
	position:relative;
}
.ast-single-entry-banner[data-banner-background-type="custom"]::before{
	content:"";
	position:absolute;
	inset:0;
	background:rgba(5,4,10,.62);
	pointer-events:none;
}
.ast-single-entry-banner[data-banner-background-type="custom"] > *{
	position:relative;
	z-index:1;
}
.ast-single-entry-banner[data-banner-background-type="custom"] .ast-entry-title,
.ast-single-entry-banner[data-banner-background-type="custom"] h1,
.ast-single-entry-banner[data-banner-background-type="custom"] p{
	color:#fff !important;
}

/* ─────────────────────────────────────────
   13. TILE TITLE PILL — nuclear override
   (Astra dynamic CSS was out-ranking us)
   ───────────────────────────────────────── */
html body ul.products li.product-category h2.woocommerce-loop-category__title,
html body ul.products li.product-category .woocommerce-loop-category__title,
html body .woocommerce ul.products li.product-category h2,
html body ul.products li.product-category a > h2{
	background:none !important;
	background-color:transparent !important;
	background-image:none !important;
	position:static !important;
	box-shadow:none !important;
	border:none !important;
	padding:10px 4px 0 !important;
	margin:0 !important;
}
html body ul.products li.product-category h2::before,
html body ul.products li.product-category h2::after,
html body ul.products li.product-category .woocommerce-loop-category__title::before,
html body ul.products li.product-category .woocommerce-loop-category__title::after{
	display:none !important;
	content:none !important;
}
html body ul.products li.product-category h2 mark,
html body ul.products li.product-category .woocommerce-loop-category__title mark{
	background:none !important;
	background-color:transparent !important;
	color:inherit !important;
	opacity:.65;
}
/* correct title colour per mode */
html body:not(.cp-light) ul.products li.product-category h2,
html body:not(.cp-light) ul.products li.product-category .woocommerce-loop-category__title{
	color:var(--cput-text) !important;
}
html body.cp-light ul.products li.product-category h2,
html body.cp-light ul.products li.product-category .woocommerce-loop-category__title{
	color:#17181C !important;
}

/* ─────────────────────────────────────────
   14. TILE TITLE + COUNT — ID-rank override
   (#main outranks Astra's inline class rules)
   ───────────────────────────────────────── */
body #main ul.products li.product-category{
	overflow:visible !important;
	padding-bottom:22px !important;
}
body #main ul.products li.product-category h2.woocommerce-loop-category__title,
body #main ul.products li.product-category .woocommerce-loop-category__title{
	background:none !important;
	background-color:transparent !important;
	background-image:none !important;
	box-shadow:none !important;
	border:none !important;
	border-radius:0 !important;
	position:static !important;
	width:auto !important;
	height:auto !important;
	max-height:none !important;
	overflow:visible !important;
	padding:10px 4px 0 !important;
	margin:0 !important;
	line-height:1.4 !important;
	font-size:14px !important;
	font-weight:700 !important;
}
body:not(.cp-light) #main ul.products li.product-category h2.woocommerce-loop-category__title{
	color:#EAECF0 !important;
}
body.cp-light #main ul.products li.product-category h2.woocommerce-loop-category__title{
	color:#17181C !important;
}
/* product count — visible in both modes, sits under the name */
body #main ul.products li.product-category h2 mark,
body #main ul.products li.product-category .woocommerce-loop-category__title mark,
body #main ul.products li.product-category mark.count{
	display:block !important;
	background:none !important;
	background-color:transparent !important;
	font-size:12px !important;
	font-weight:400 !important;
	margin-top:3px !important;
	opacity:1 !important;
}
body:not(.cp-light) #main ul.products li.product-category mark{
	color:#8B93A1 !important;
}
body.cp-light #main ul.products li.product-category mark{
	color:#5D6470 !important;
}

/* ─────────────────────────────────────────
   15. TOGGLE — full-surface clickable
   (inner nodes were swallowing centre clicks)
   ───────────────────────────────────────── */
#cp-mode-toggle,
#cp-mode-toggle.cput-inline{
	position:relative;
	z-index:9999 !important;
}
#cp-mode-toggle *{
	pointer-events:none !important;
}

/* ─────────────────────────────────────────
   16. HIDE WPC SMART FILTER (Pokemon-specific)
   Removed for now — the attribute filter set
   (Pokemon Type / Language / Rarity / Specialty
   + Reset/Apply + "Edit Filter Set") only makes
   sense for Pokemon. To bring it back later,
   delete this whole section 16.
   ───────────────────────────────────────── */
#secondary .wpc-filters-widget-wrapper,
#secondary .wpc-filters-outer-wrapper,
.ast-woocommerce-container > .wpc-custom-selected-terms,
#secondary .widget:has(.wpc-filters-widget-wrapper),
#secondary .widget:has(.wpc-filters-section){
	display:none !important;
}
