/* ==========================================================================
   ACS Nexus — Main Stylesheet
   All component imports in load order.
   ========================================================================== */

@import 'components/_variables.css';
@import 'components/_reset.css';
@import 'components/_typography.css';
@import 'components/_grid.css';
@import 'components/_buttons.css';
@import 'components/_header.css';
@import 'components/_navigation.css';
@import 'components/_breadcrumbs.css';
@import 'components/_footer.css';
@import 'components/_utilities.css';
@import 'components/_hero.css';
@import 'components/_trust-bar.css';
@import 'components/_brand-showcase.css';
@import 'components/_homepage.css';
@import 'components/_forms.css';
@import 'components/_wishlist.css';
@import 'components/_badges.css';
@import 'components/_product-card.css';
@import 'components/_product-archive.css';
@import 'components/_product-single.css';
@import 'components/_modal.css';
@import 'components/_cart.css';
@import 'components/_checkout.css';
@import 'components/_my-account.css';

/* ==========================================================================
   Page-level layout
   ========================================================================== */

.acs-site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.acs-main {
	flex: 1;
}

/* --- Skip link --- */

.acs-skip-link {
	position: absolute;
}

/* --- 404 --- */

.acs-404 {
	text-align: center;
	padding: var(--acs-space-10) 0;
}

.acs-404__code {
	font-size: 8rem;
	font-weight: var(--acs-weight-bold);
	color: var(--acs-grey-200);
	line-height: 1;
	letter-spacing: -0.05em;
}

.acs-404__title {
	margin-top: var(--acs-space-3);
	margin-bottom: var(--acs-space-4);
}

.acs-404__message {
	color: var(--acs-text-muted);
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: var(--acs-space-6);
}

.acs-404 .acs-search-form {
	max-width: 400px;
	margin: 0 auto var(--acs-space-5);
	border: 1px solid var(--acs-grey-200);
}

/* --- Posts list --- */

.acs-posts {
	display: grid;
	gap: var(--acs-space-5);
}

.acs-post-card {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: var(--acs-space-5);
	background: var(--acs-surface);
	border: 1px solid var(--acs-grey-200);
	border-radius: var(--acs-radius-md);
	overflow: hidden;
	transition: box-shadow var(--acs-transition);
}

.acs-post-card:hover {
	box-shadow: var(--acs-shadow-md);
}

.acs-post-card__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.acs-post-card__content {
	padding: var(--acs-space-5);
	display: flex;
	flex-direction: column;
	gap: var(--acs-space-3);
}

.acs-post-card__title a {
	color: var(--acs-text);
	transition: color var(--acs-transition-fast);
}

.acs-post-card__title a:hover {
	color: var(--acs-navy);
}

.acs-post-card__excerpt {
	color: var(--acs-text-muted);
	font-size: var(--acs-text-sm);
}

@media (max-width: 767px) {
	.acs-post-card {
		grid-template-columns: 1fr;
	}

	.acs-post-card__thumbnail {
		max-height: 200px;
		overflow: hidden;
	}
}

/* --- Page template --- */

.acs-page__header,
.acs-single__header {
	padding: var(--acs-space-6) 0 var(--acs-space-5);
}

.acs-page__content,
.acs-single__content {
	padding-bottom: var(--acs-space-9);
}

/* --- Search header --- */

.acs-search-header {
	padding: var(--acs-space-5) 0;
}

.acs-search-header__title span {
	color: var(--acs-navy);
}

/* --- No results --- */

.acs-no-results {
	text-align: center;
	padding: var(--acs-space-9) 0;
}

.acs-no-results p {
	color: var(--acs-text-muted);
	margin-bottom: var(--acs-space-5);
}

.acs-no-results .acs-search-form {
	max-width: 400px;
	margin: 0 auto var(--acs-space-5);
	border: 1px solid var(--acs-grey-200);
}

/* --- Posted on / meta --- */

.acs-posted-on {
	display: inline-flex;
	align-items: center;
	gap: var(--acs-space-2);
	font-size: var(--acs-text-sm);
	color: var(--acs-text-muted);
}

/* --- Sidebar --- */

.acs-sidebar {
	padding: var(--acs-space-4);
}

.acs-widget {
	margin-bottom: var(--acs-space-6);
}

.acs-widget__title {
	font-size: var(--acs-text-base);
	font-weight: var(--acs-weight-semibold);
	margin-bottom: var(--acs-space-3);
	padding-bottom: var(--acs-space-3);
	border-bottom: 2px solid var(--acs-grey-200);
}

/* --- SVG icons base --- */

.acs-icon {
	display: inline-block;
	vertical-align: middle;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
}

/* --- Single post footer --- */

.acs-single__footer {
	padding-top: var(--acs-space-5);
	border-top: 1px solid var(--acs-grey-200);
}

.acs-single__tags {
	display: flex;
	align-items: center;
	gap: var(--acs-space-2);
	font-size: var(--acs-text-sm);
	color: var(--acs-text-muted);
}

.acs-single__tags a {
	color: var(--acs-navy);
}

.acs-single__tags a:hover {
	color: var(--acs-red);
}

/* --- Post navigation --- */

.post-navigation {
	margin-top: var(--acs-space-6);
	padding: var(--acs-space-5) 0;
	border-top: 1px solid var(--acs-grey-200);
	display: flex;
	justify-content: space-between;
}

.acs-post-nav__label {
	display: block;
	font-size: var(--acs-text-xs);
	color: var(--acs-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: var(--acs-space-1);
}

.acs-post-nav__title {
	font-weight: var(--acs-weight-medium);
	color: var(--acs-text);
}

/* --- Pagination --- */

.pagination,
.nav-links,
.woocommerce-pagination .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--acs-space-2);
	padding: var(--acs-space-6) 0;
	list-style: none;
}

.woocommerce-pagination .page-numbers li {
	display: inline-flex;
}

.page-numbers,
.woocommerce-pagination .page-numbers li a,
.woocommerce-pagination .page-numbers li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 8px;
	font-size: var(--acs-text-sm);
	font-weight: var(--acs-weight-medium);
	color: var(--acs-text);
	border: 1px solid var(--acs-grey-200);
	border-radius: var(--acs-radius-sm);
	text-decoration: none;
	transition: all 0.2s;
}

.page-numbers:hover,
.woocommerce-pagination .page-numbers li a:hover {
	background: var(--acs-red);
	color: #fff;
	border-color: var(--acs-red);
}

.page-numbers.current,
.woocommerce-pagination .page-numbers li span.current {
	background: var(--acs-red);
	color: #fff;
	border-color: var(--acs-red);
}

.page-numbers.dots,
.woocommerce-pagination .page-numbers li span.dots {
	border: none;
	pointer-events: none;
}

/* --- Hide TurnKey Linux branding footer --- */

body > div:last-child:not(#page):not(.acs-site),
body > div:not(#page):not(.acs-site):not(script),
a[href*="turnkeylinux"],
a[href*="wordpress-appliance"],
#turnkey-credit,
.turnkey-credit {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	overflow: hidden !important;
}

/* --- WooCommerce product grid fallback ---
   Ensure ul.products always receives grid styling even
   if WooCommerce adds extra classes or wrappers. --- */

ul.products,
.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--acs-space-5);
	list-style: none;
	padding: 0;
	margin: 0;
}

ul.products li.product {
	margin: 0 !important;
	padding: 0;
	width: 100% !important;
	float: none !important;
	clear: none !important;
}

ul.products::before,
ul.products::after {
	display: none !important;
}

@media (max-width: 991px) {
	ul.products,
	.woocommerce ul.products {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 767px) {
	ul.products,
	.woocommerce ul.products {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--acs-space-3);
	}
}

@media (max-width: 479px) {
	ul.products,
	.woocommerce ul.products {
		grid-template-columns: 1fr;
	}
}

/* Fix admin bar spacing - theme handles its own header */
html { margin-top: 0 !important; }
#wpadminbar { position: fixed !important; }

/* Fix: Combine toolbar and filters into one row */
.acs-shop__toolbar {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid var(--acs-border, #e2e6ea) !important;
    margin-bottom: 20px !important;
    flex-wrap: wrap !important;
}
.acs-shop__result-count {
    flex-shrink: 0 !important;
}
.acs-shop__controls {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-left: auto !important;
}
/* Move filters inline */
.acs-shop__filters {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: none !important;
}
.acs-shop__filters-inner {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Filter pill dropdowns using native details/summary */
details.acs-filter-pill {
    position: relative;
    display: inline-block;
}
details.acs-filter-pill > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--acs-border, #e2e6ea);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--acs-text, #2c3e50);
    background: #fff;
    user-select: none;
}
details.acs-filter-pill > summary::-webkit-details-marker { display: none; }
details.acs-filter-pill > summary::after { content: '▾'; font-size: 10px; }
details.acs-filter-pill[open] > summary { border-color: var(--acs-red, #dd2400); color: var(--acs-red, #dd2400); }
details.acs-filter-pill[open] > summary::after { content: '▴'; }
.acs-filter-pill__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 100;
    min-width: 220px;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--acs-border, #e2e6ea);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 12px;
}
.acs-filter-pill__checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    cursor: pointer;
    font-size: 13px;
}
.acs-filter-pill__checkbox-option:hover { background: var(--acs-light, #f5f6f8); border-radius: 4px; }
.acs-filter-pill__count { color: var(--acs-muted, #6c757d); font-size: 12px; }
.acs-filter-pill__actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--acs-border, #e2e6ea);
}
.acs-filter-pill__apply {
    flex: 1;
    padding: 6px 12px;
    background: var(--acs-red, #dd2400);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.acs-filter-pill__clear {
    padding: 6px 12px;
    background: none;
    border: 1px solid var(--acs-border, #e2e6ea);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    color: var(--acs-muted, #6c757d);
}

/* ============================================
   CLEAN OVERRIDES — Product Grid & Toolbar
   Replaces all accumulated patches
   ============================================ */

/* Product grid — contained within acs-container */
.acs-shop { max-width: var(--container-max, 1200px); margin: 0 auto; padding: 0 20px; }
.acs-shop .acs-container { max-width: 100%; padding: 0; }
.acs-shop__content { width: 100%; }
.acs-shop__sidebar { display: none; }

/* WooCommerce product grid */
ul.products,
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}
ul.products li.product {
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
}
ul.products::before,
ul.products::after { display: none; }

@media (max-width: 992px) { ul.products, .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { ul.products, .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { ul.products, .woocommerce ul.products { grid-template-columns: 1fr; } }

/* Toolbar — single row: filters left, results center, sort+view right */
.acs-shop__toolbar {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #f5f6f8;
    border-radius: 6px;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}
.acs-shop__result-count {
    order: 2;
    flex: 1;
    text-align: center;
    color: #6c757d;
    font-size: 13px;
}
.acs-shop__result-count .woocommerce-result-count { margin: 0; }
.acs-shop__controls {
    order: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Filters — inside the toolbar, on the left */
.acs-shop__filters {
    order: 1;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
}
.acs-shop__filters-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Filter pill — details/summary */
details.acs-filter-pill {
    position: relative;
    display: inline-block;
}
details.acs-filter-pill > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #2c3e50;
    background: #fff;
    white-space: nowrap;
}
details.acs-filter-pill > summary::-webkit-details-marker { display: none; }
details.acs-filter-pill > summary::after { content: '▾'; font-size: 10px; margin-left: 2px; }
details.acs-filter-pill[open] > summary { border-color: #dd2400; color: #dd2400; }
details.acs-filter-pill[open] > summary::after { content: '▴'; }

.acs-filter-pill__dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 100;
    min-width: 240px;
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 12px;
}
.acs-filter-pill__checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 4px;
    cursor: pointer;
    font-size: 13px;
    border-radius: 4px;
}
.acs-filter-pill__checkbox-option:hover { background: #f5f6f8; }
.acs-filter-pill__count { color: #6c757d; font-size: 12px; margin-left: auto; }
.acs-filter-pill__actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e6ea;
}
.acs-filter-pill__apply {
    flex: 1;
    padding: 6px 12px;
    background: #dd2400;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.acs-filter-pill__clear {
    padding: 6px 12px;
    background: none;
    border: 1px solid #e2e6ea;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    color: #6c757d;
}

/* Stock toggle pill */
.acs-filter-pill--stock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #2c3e50;
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
}

/* Sort dropdown */
.acs-shop__controls .woocommerce-ordering select,
.acs-shop__controls select {
    padding: 5px 28px 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    appearance: auto;
}

/* View toggle */
.acs-shop__view-toggle {
    display: flex;
    gap: 2px;
}
.acs-shop__view-btn {
    padding: 5px 8px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.acs-shop__view-btn.is-active { background: #1c2833; border-color: #1c2833; }
.acs-shop__view-btn.is-active svg { stroke: #fff; fill: #fff; }

/* Pagination */
.woocommerce-pagination { margin-top: 30px; text-align: center; }
.woocommerce-pagination ul { list-style: none; padding: 0; display: inline-flex; gap: 4px; }
.woocommerce-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #e2e6ea;
    border-radius: 4px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
}
.woocommerce-pagination .page-numbers:hover { background: #dd2400; color: #fff; border-color: #dd2400; }
.woocommerce-pagination .page-numbers.current { background: #dd2400; color: #fff; border-color: #dd2400; }

/* Hide TurnKey */
body > div:not(#page):not(.acs-site) { display: none !important; }

/* Admin bar fix */
html { margin-top: 0 !important; }
#wpadminbar { position: fixed !important; }

/* Fix: Filter dropdown z-index and toolbar overflow */
.acs-shop__toolbar {
    overflow: visible !important;
    position: relative;
    z-index: 50;
}
.acs-shop__filters {
    position: relative;
    z-index: 60;
}
details.acs-filter-pill {
    z-index: 70;
}
.acs-filter-pill__dropdown {
    z-index: 99999 !important;
}

/* Fix: Show dropdown when details is open (native HTML) */
details.acs-filter-pill[open] > .acs-filter-pill__dropdown {
    display: block !important;
}
/* Also override any old display:none from component CSS */
details.acs-filter-pill .acs-filter-pill__dropdown {
    display: none;
}
details.acs-filter-pill[open] .acs-filter-pill__dropdown {
    display: block !important;
}

/* ===== CLEAN PAGINATION ===== */
.woocommerce-pagination,
nav.woocommerce-pagination {
    margin: 40px 0 20px;
    text-align: center;
}
.woocommerce-pagination ul.page-numbers {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
.woocommerce-pagination ul.page-numbers li {
    margin: 0;
    padding: 0;
}
.woocommerce-pagination .page-numbers,
.woocommerce-pagination ul.page-numbers li a,
.woocommerce-pagination ul.page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}
.woocommerce-pagination ul.page-numbers li a:hover {
    background: #f5f6f8;
    border-color: #aaa;
    color: #1c2833;
}
.woocommerce-pagination .page-numbers.current,
.woocommerce-pagination ul.page-numbers li span.current {
    background: #1c2833;
    color: #fff;
    border-color: #1c2833;
    cursor: default;
}
.woocommerce-pagination .page-numbers.dots {
    border: none;
    background: none;
    cursor: default;
    min-width: auto;
    padding: 0 4px;
    color: #999;
}
.woocommerce-pagination .page-numbers.prev,
.woocommerce-pagination .page-numbers.next {
    font-size: 18px;
    color: #666;
}
.woocommerce-pagination .page-numbers.prev:hover,
.woocommerce-pagination .page-numbers.next:hover {
    background: #f5f6f8;
    color: #1c2833;
}

/* ===== MY ACCOUNT — Full-width horizontal layout ===== */
/* Override WooCommerce default float layout */
.woocommerce-MyAccount-navigation {
    float: none !important;
    width: 100% !important;
    margin-bottom: 20px !important;
}
.woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
}
/* Hide duplicate page title — the template has its own header */
.woocommerce-account .acs-main > .acs-container > h1,
.woocommerce-account .page-title,
.woocommerce-account .entry-title {
    display: none !important;
}
/* Tab bar full width */
.acs-account-tabs {
    width: 100% !important;
    overflow-x: auto !important;
}
.acs-account-tabs ul {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    width: 100% !important;
}
.acs-account-tabs ul li {
    float: none !important;
    flex-shrink: 0 !important;
}
/* Stat cards full width */
.acs-account-stats {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
    width: 100% !important;
}
/* Quick actions grid */
.acs-account-actions {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
}
@media (max-width: 768px) {
    .acs-account-stats { grid-template-columns: repeat(2, 1fr) !important; }
    .acs-account-actions { grid-template-columns: 1fr !important; }
}

/* Hide page-level title on My Account — the template has its own header */
.woocommerce-account .acs-page__header {
    display: none !important;
}

/* Account nav bar — light instead of dark */
.acs-account-tabs {
    background: #f5f6f8 !important;
    border: 1px solid #e2e6ea !important;
    border-radius: 8px !important;
}
.acs-account-tabs ul li a {
    color: #2c3e50 !important;
}
.acs-account-tabs ul li a:hover {
    color: #dd2400 !important;
}
.acs-account-tabs ul li.is-active a,
.acs-account-tabs ul li a.is-active {
    color: #dd2400 !important;
    background: #fff !important;
    border-radius: 6px !important;
}
/* Override any dark bg from component CSS */
.acs-account-tabs,
.acs-account-tabs ul {
    background: #f5f6f8 !important;
}
.acs-account-tabs ul li a svg {
    color: #6c757d !important;
}
.acs-account-tabs ul li.is-active a svg,
.acs-account-tabs ul li a:hover svg {
    color: #dd2400 !important;
}

/* Hide the welcome header above the nav */
.acs-account__header {
    display: none !important;
}

/* Stat cards — make clickable */
.acs-account-stat {
    cursor: pointer !important;
    transition: transform 0.15s, box-shadow 0.15s !important;
}
.acs-account-stat:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* Fix: Hero search dropdown z-index */
.acs-hero {
    position: relative;
    z-index: 20;
}
.acs-hero .acs-search-results,
.acs-hero [data-acs-search-results] {
    z-index: 99999 !important;
    position: absolute !important;
}

/* Fix: Filter dropdown - don't cut off Apply button */
.acs-filter-pill__dropdown {
    max-height: none !important;
    overflow: visible !important;
}
.acs-filter-pill__dropdown .acs-filter-pill__form {
    max-height: 250px;
    overflow-y: auto;
}
.acs-filter-pill__actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-top: 8px !important;
}

/* DEFINITIVE PAGINATION — override all previous pagination CSS */
nav.woocommerce-pagination ul,
.woocommerce-pagination ul.page-numbers {
    list-style: none !important;
    padding: 0 !important;
    display: inline-flex !important;
    gap: 6px !important;
    justify-content: center !important;
    width: 100% !important;
}
nav.woocommerce-pagination ul li,
.woocommerce-pagination ul.page-numbers li {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}
nav.woocommerce-pagination ul li a,
nav.woocommerce-pagination ul li span,
.woocommerce-pagination ul.page-numbers li a,
.woocommerce-pagination ul.page-numbers li span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    height: 40px !important;
    padding: 0 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #2c3e50 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
}
nav.woocommerce-pagination ul li a:hover,
.woocommerce-pagination ul.page-numbers li a:hover {
    background: #f5f6f8 !important;
    border-color: #999 !important;
}
nav.woocommerce-pagination ul li span.current,
.woocommerce-pagination ul.page-numbers li span.current {
    background: #1c2833 !important;
    color: #fff !important;
    border-color: #1c2833 !important;
}
nav.woocommerce-pagination ul li span.dots {
    border: none !important;
    background: none !important;
    min-width: auto !important;
    padding: 0 4px !important;
    color: #999 !important;
}

/* ==========================================================================
   Filter Pills — Active State & Clear All (v2)
   ========================================================================== */

/* Active pill highlight */
details.acs-filter-pill.is-active > summary {
    border-color: #dd2400 !important;
    background: #fef2f0 !important;
    color: #dd2400 !important;
}

/* Clear All link */
.acs-filter-pill__clear-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #dd2400;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 20px;
    border: 1px solid #dd2400;
    background: #fef2f0;
    transition: all 0.15s ease;
}
.acs-filter-pill__clear-all:hover {
    background: #dd2400;
    color: #fff;
}

/* Price range dropdown — list layout */
.acs-filter-pill__dropdown--price {
    padding: 4px 0;
}
.acs-filter-pill__dropdown--price .acs-filter-pill__option {
    display: block;
    padding: 8px 16px;
    font-size: 13px;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 0;
    transition: background 0.1s;
}
.acs-filter-pill__dropdown--price .acs-filter-pill__option:hover {
    background: #f5f6f8;
}
.acs-filter-pill__dropdown--price .acs-filter-pill__option.is-active {
    background: #dd2400;
    color: #fff;
    font-weight: 600;
}
.acs-filter-pill__dropdown--price .acs-filter-pill__option.is-active:hover {
    background: #c42000;
}

/* Stock toggle active state (green) */
.acs-filter-pill__toggle.is-active {
    background: #27ae60 !important;
    color: #fff !important;
    border-color: #27ae60 !important;
}
.acs-filter-pill__toggle.is-active:hover {
    background: #219a52 !important;
}

/* ===== Filter Panel (replaces pill strip) ===== */
.acs-shop__toolbar { position: relative; }
.acs-filter-panel { position: relative; }
.acs-filter-panel__trigger {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}
.acs-filter-panel__trigger::-webkit-details-marker { display: none; }
.acs-filter-panel[open] .acs-filter-panel__trigger { border-color: #dd2400; color: #dd2400; }
.acs-filter-panel__badge {
    background: #dd2400;
    color: #fff;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 700;
}
.acs-filter-panel__body {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #e2e6ea;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    padding: 24px;
    z-index: 200;
}
.acs-filter-panel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px 24px;
}
.acs-filter-panel__group h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1c2833;
    margin: 0 0 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid #dd2400;
    display: inline-block;
}
.acs-filter-panel__group label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    font-size: 13px;
    cursor: pointer;
}
.acs-filter-panel__group label:hover { color: #dd2400; }
.acs-filter-panel__group .count { color: #999; font-size: 11px; }
.acs-filter-panel__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e2e6ea;
}
.acs-filter-panel__footer button {
    background: #dd2400;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.acs-filter-panel__footer button:hover { background: #c42000; }
.acs-filter-panel__footer a {
    color: #999;
    text-decoration: none;
    font-size: 13px;
}
.acs-filter-panel__footer a:hover { color: #dd2400; }

/* Mobile: full-width panel body */
@media (max-width: 768px) {
    .acs-filter-panel__body {
        position: fixed;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        max-height: 80vh;
        overflow-y: auto;
        border-radius: 10px 10px 0 0;
        margin-top: 0;
    }
    .acs-filter-panel__grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Fix: Filter panel full width */
.acs-filter-panel {
    position: static !important;
}
.acs-shop__toolbar {
    position: relative !important;
}
.acs-filter-panel__body {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    top: 100% !important;
    margin-top: 8px !important;
    background: #fff !important;
    border: 1px solid #e2e6ea !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12) !important;
    padding: 24px !important;
    z-index: 99999 !important;
    box-sizing: border-box !important;
}
.acs-filter-panel__grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important;
    gap: 20px 24px !important;
}

/* Search dropdown — wider for sidebar columns */
.acs-search-results {
	min-width: 750px;
	right: auto;
}

/* Hero search dropdown — stay above all sections */
.acs-hero {
	position: relative;
	z-index: 100;
}
.acs-hero .acs-search-form {
	position: relative;
	z-index: 99999;
}

/* Hero — allow search dropdown to overflow */
.acs-hero {
	overflow: visible !important;
}
