/*
Theme Name: DSA
Theme URI: https://digitalsignage.co.za
Description: A custom WordPress theme for Digital Signage Arena
Version: 1.9.4
Author: Christi Dormehl
Author URI: https://digitalsignage.co.za
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dsa
Domain Path: /languages
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Requires Plugins: woocommerce
Tags: e-commerce, custom-logo, custom-menu, featured-images, translation-ready
*/


/* ==========================================================================
   01. CSS Custom Properties
   ========================================================================== */

:root {
    /* Brand */
    --dsa-accent:           #06AABB;
    --dsa-accent-hover:     #059DAD;
    --dsa-accent-light:     rgba(6, 170, 187, 0.08);
    --dsa-accent-border:    rgba(6, 170, 187, 0.25);

    /* Neutrals */
    --dsa-white:            #ffffff;
    --dsa-gray-50:          #f8f9fa;
    --dsa-gray-100:         #f1f3f5;
    --dsa-gray-200:         #e9ecef;
    --dsa-gray-300:         #dee2e6;
    --dsa-gray-400:         #ced4da;
    --dsa-gray-500:         #adb5bd;
    --dsa-gray-600:         #868e96;
    --dsa-gray-700:         #495057;
    --dsa-gray-800:         #343a40;
    --dsa-gray-900:         #212529;

    /* Typography */
    --dsa-font-family:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                            Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    --dsa-font-size:        16px;
    --dsa-line-height:      1.6;

    /* Layout */
    --dsa-container-width:  1200px;
    --dsa-container-pad:    20px;
    --dsa-radius:           8px;
    --dsa-radius-sm:        4px;

    /* Shadows */
    --dsa-shadow-sm:        0 1px 3px rgba(0, 0, 0, 0.06);
    --dsa-shadow:           0 4px 16px rgba(0, 0, 0, 0.08);
    --dsa-shadow-lg:        0 8px 24px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --dsa-transition:       0.2s ease;
    --dsa-transition-slow:  0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}


/* ==========================================================================
   02. Reset & Base
   ========================================================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    max-width: 100%;
    overflow-x: clip;
    font-family: var(--dsa-font-family);
    font-size: var(--dsa-font-size);
    line-height: var(--dsa-line-height);
    color: var(--dsa-gray-900);
    background-color: var(--dsa-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}


/* ==========================================================================
   03. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--dsa-gray-900);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--dsa-accent);
    text-decoration: none;
    transition: color var(--dsa-transition);
}

a:hover {
    color: var(--dsa-accent-hover);
    text-decoration: underline;
}


/* ==========================================================================
   04. Layout
   ========================================================================== */

.container {
    max-width: var(--dsa-container-width);
    margin: 0 auto;
    padding: 0 var(--dsa-container-pad);
}

.site-content {
    min-height: 60vh;
}

main {
    padding: 48px 0;
}


/* ==========================================================================
   05. Header
   ========================================================================== */

.site-header {
    background: var(--dsa-white);
    border-top: 3px solid var(--dsa-accent);
    box-shadow: 0 1px 0 var(--dsa-gray-200), 0 2px 8px rgba(0,0,0,.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.admin-bar .site-header {
    top: 32px;
    margin-bottom: 50px;
}

.header-inner {
    max-width: var(--dsa-container-width);
    margin: 0 auto;
    padding: 10px var(--dsa-container-pad);
    display: flex;
    align-items: center;
    gap: 24px;
}

/* — Left column: logo stacked above nav — */
.header-left {
    display: flex;
    align-self: end;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

/* — Logo — */
.site-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    line-height: 1;
}

.site-logo img,
.site-logo .custom-logo {
    max-height: 46px;
    width: auto;
    display: block;
    transition: opacity var(--dsa-transition);
}

.site-logo .custom-logo-link:hover img {
    opacity: 0.85;
}

.site-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dsa-accent);
    text-decoration: none;
    letter-spacing: -0.3px;
}

.site-logo-text:hover {
    text-decoration: none;
    color: var(--dsa-accent-hover);
}

/* — Navigation — */
.primary-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}

.primary-navigation .nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 5px;
    padding: 0;
    flex-wrap: wrap;
}

.primary-navigation .nav-menu li {
    list-style: none;
    position: relative;
}

.primary-navigation .nav-menu li a {
    display: block;
    padding: 7px 13px;
    text-decoration: none;
    color: var(--dsa-gray-700);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--dsa-radius-sm);
    white-space: nowrap;
    transition: color var(--dsa-transition), background var(--dsa-transition);
}

.primary-navigation .nav-menu li a:hover {
    color: var(--dsa-accent);
    background: var(--dsa-accent-light);
    text-decoration: none;
}

.primary-navigation .nav-menu li.current-menu-item > a {
    color: var(--dsa-accent);
    font-weight: 600;
    background: var(--dsa-accent-light);
}

/* — Dropdown sub-menus — */

/* CSS chevron on parent links (desktop only — button hidden) */
.primary-navigation .nav-menu .menu-item-has-children > a {
    padding-right: 20px;
}

.primary-navigation .nav-menu .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    margin-left: 6px;
    opacity: 0.55;
    vertical-align: middle;
    transition: transform var(--dsa-transition), opacity var(--dsa-transition);
}

.primary-navigation .nav-menu li:hover > a::after {
    transform: rotate(-135deg) translateY(2px);
    opacity: 0.85;
}

/* Toggle button — hidden on desktop, shown on mobile via media query */
.sub-menu-toggle {
    display: none;
}

/* Dropdown panel */
.primary-navigation .nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: var(--dsa-white);
    border: 1px solid var(--dsa-gray-200);
    border-radius: var(--dsa-radius);
    box-shadow: var(--dsa-shadow);
    list-style: none;
    padding: 6px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition:
        opacity var(--dsa-transition),
        transform var(--dsa-transition),
        visibility var(--dsa-transition);
    z-index: 1001;
    pointer-events: none;
}

/* Show on hover (mouse) or .is-open (keyboard / JS toggle) */
.primary-navigation .nav-menu li:hover > .sub-menu,
.primary-navigation .nav-menu li.is-open > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.primary-navigation .nav-menu .sub-menu li {
    width: 100%;
    display: block;
    position: static;
}

.primary-navigation .nav-menu .sub-menu li a {
    padding: 9px 16px;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--dsa-gray-700);
    border-radius: 0;
    white-space: nowrap;
}

.primary-navigation .nav-menu .sub-menu li a:hover {
    color: var(--dsa-accent);
    background: var(--dsa-accent-light);
}

.primary-navigation .nav-menu .sub-menu li.current-menu-item > a {
    color: var(--dsa-accent);
    font-weight: 500;
    background: var(--dsa-accent-light);
}
.header-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin-left: auto;
}

/* Social icons + search bar sit side-by-side in one row */
.header-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Mobile nav footer (quote + social) — hidden on desktop */
.mobile-nav-footer {
    display: none;
}

/* — Request Quote button — */
.dsa-quote-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    background: var(--dsa-gray-900);
    color: var(--dsa-white);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--dsa-radius-sm);
    white-space: nowrap;
    transition: background var(--dsa-transition), transform var(--dsa-transition), box-shadow var(--dsa-transition);
}

.dsa-quote-btn:hover {
    background: var(--dsa-accent);
    color: var(--dsa-white);
    text-decoration: none;
    /* transform: translateY(-2px); */
    /* box-shadow: 0 6px 18px rgba(6, 170, 187, 0.32); */
}

.dsa-quote-btn i {
    font-size: 13px;
    flex-shrink: 0;
}

/* — Header social icons — */
.header-social {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.dsa-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    max-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 100px;
    color: var(--dsa-gray-600);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    transition:
        max-width 0.3s ease,
        gap 0.3s ease,
        color var(--dsa-transition),
        background var(--dsa-transition);
}

.dsa-social-link:hover {
    max-width: 240px;
    gap: 6px;
    color: var(--dsa-accent);
    background: var(--dsa-accent-light);
}

.dsa-social-link i {
    font-size: 15px;
    flex-shrink: 0;
}

.dsa-social-label {
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    transition:
        max-width 0.3s ease,
        opacity 0.2s ease;
}

.dsa-social-link:hover .dsa-social-label {
    max-width: 180px;
    opacity: 1;
}

/* — Mobile nav toggle — */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1.5px solid var(--dsa-gray-300);
    border-radius: var(--dsa-radius-sm);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: border-color var(--dsa-transition), background var(--dsa-transition);
}

.nav-toggle:hover {
    border-color: var(--dsa-accent);
    background: var(--dsa-accent-light);
}

.nav-toggle-bar {
    display: block;
    width: 17px;
    height: 2px;
    background: var(--dsa-gray-700);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease, background var(--dsa-transition);
}

.nav-toggle:hover .nav-toggle-bar {
    background: var(--dsa-accent);
}

/* FA icon version (replaces bars when JS is active) */
.nav-toggle i {
    font-size: 16px;
    color: var(--dsa-gray-700);
    display: block;
    transition: color var(--dsa-transition);
}

.nav-toggle:hover i,
.nav-toggle.is-active i {
    color: var(--dsa-accent);
}

/* — Responsive — */
@media (max-width: 960px) {
    .header-inner { gap: 16px; }

    .primary-navigation .nav-menu li a {
        padding: 7px 10px;
        font-size: 0.8125rem;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .primary-navigation {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--dsa-white);
        border-bottom: 3px solid var(--dsa-accent);
        box-shadow: var(--dsa-shadow);
        z-index: 999;
    }

    .primary-navigation.is-open {
        display: block;
    }

    .primary-navigation .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 8px 0;
    }

    .primary-navigation .nav-menu li {
        width: 100%;
    }

    .primary-navigation .nav-menu li a {
        padding: 12px 20px;
        border-radius: 0;
        font-size: 0.9375rem;
        border-bottom: 1px solid var(--dsa-gray-100);
    }

    .primary-navigation .nav-menu li:last-child a {
        border-bottom: none;
    }

    /* Sub-menus — flat expand on mobile, no floating panel */
    .primary-navigation .nav-menu .menu-item-has-children > a {
        padding-right: 52px;
    }

    /* Hide CSS chevron on mobile — the toggle button handles that */
    .primary-navigation .nav-menu .menu-item-has-children > a::after {
        display: none;
    }

    .sub-menu-toggle {
        display: flex;
        position: absolute;
        top: 0;
        right: 0;
        transform: none;
        width: 52px;
        height: 50px;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        border-left: 1px solid var(--dsa-gray-200);
        cursor: pointer;
        color: var(--dsa-gray-500);
        font-size: 13px;
        border-radius: 0;
        transition: color var(--dsa-transition), background var(--dsa-transition);
        z-index: 1;
    }

    .sub-menu-toggle:hover {
        color: var(--dsa-accent);
        background: var(--dsa-accent-light);
    }

    .sub-menu-toggle .fa-chevron-down {
        display: block;
        transition: transform var(--dsa-transition);
    }

    .primary-navigation .nav-menu li.is-open > .sub-menu-toggle .fa-chevron-down {
        transform: rotate(180deg);
    }

    .primary-navigation .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        min-width: 0;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--dsa-gray-100);
        border-radius: 0;
        background: var(--dsa-gray-50);
        transition: none;
        pointer-events: auto;
        padding: 4px 0;
    }

    .primary-navigation .nav-menu li.is-open > .sub-menu {
        display: block;
    }

    .primary-navigation .nav-menu .sub-menu li a {
        padding: 10px 20px 10px 36px;
        font-size: 0.875rem;
        border-bottom: 1px solid var(--dsa-gray-100);
    }

    .header-actions {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .dsa-quote-btn {
        display: none;
    }

    .header-search-row .header-social {
        display: none;
    }

    /* Mobile nav footer */
    .mobile-nav-footer {
        display: flex;
        flex-direction: column;
        gap: 0;
        border-top: 1px solid var(--dsa-gray-200);
        padding: 12px 16px 20px;
        background: var(--dsa-white);
    }

    .mobile-quote-btn {
        display: flex !important;
        justify-content: center;
        width: 100%;
        padding: 13px 20px;
        font-size: 0.9375rem;
        border-radius: var(--dsa-radius-sm);
        text-align: center;
    }

    .mobile-nav-social {
        display: flex;
        justify-content: center;
        gap: 6px;
        flex-wrap: wrap;
        padding-top: 14px;
    }

    /* Icons only — no label expand on mobile */
    .mobile-nav-social .dsa-social-link {
        max-width: 40px;
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        background: var(--dsa-gray-100);
        border: 1px solid var(--dsa-gray-200);
    }

    .mobile-nav-social .dsa-social-link:hover {
        max-width: 40px;
        gap: 0;
        background: var(--dsa-accent-light);
        border-color: var(--dsa-accent);
    }

    .mobile-nav-social .dsa-social-label {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-inner { gap: 10px; }

    .dsa-search-wrap,
    .dsa-search-wrap:focus-within {
        width: auto !important;
        flex: 1;
    }
}


/* ==========================================================================
   06. AJAX Search Bar
   ========================================================================== */

.dsa-search-wrap {
    position: relative;
    width: 248px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dsa-search-wrap:focus-within {
    width: 360px;
}

.dsa-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.dsa-search-icon {
    position: absolute;
    left: 14px;
    z-index: 1;
    color: var(--dsa-gray-400);
    font-size: 13px;
    pointer-events: none;
    transition: color var(--dsa-transition);
}

.dsa-search-form:focus-within .dsa-search-icon {
    color: var(--dsa-accent);
}

.dsa-search-input {
    width: 100%;
    padding: 9px 80px 9px 38px;
    border: 1.5px solid var(--dsa-gray-200);
    border-radius: 100px;
    font-size: 0.875rem;
    font-family: var(--dsa-font-family);
    background: var(--dsa-gray-50);
    color: var(--dsa-gray-900);
    outline: none;
    transition:
        border-color var(--dsa-transition),
        background var(--dsa-transition),
        box-shadow var(--dsa-transition);
    min-width: 0;
}

.dsa-search-input::placeholder {
    color: var(--dsa-gray-400);
    font-size: 0.8125rem;
}

.dsa-search-input:focus {
    background: var(--dsa-white);
    border-color: var(--dsa-accent);
    box-shadow: 0 0 0 3px rgba(6, 170, 187, 0.12), var(--dsa-shadow-sm);
}

/* Search input clear (X) button */
.dsa-search-input::-webkit-search-cancel-button {
    cursor: pointer;
    filter: grayscale(1) brightness(0);
    opacity: 0.75;
}

.dsa-search-input::-webkit-search-cancel-button:hover {
    filter: grayscale(1) brightness(0);
    opacity: 1;
}

/* Keyboard shortcut badge */
.dsa-search-shortcut {
    position: absolute;
    right: 12px;
    display: inline-flex;
    align-items: center;
    font-family: var(--dsa-font-family);
    font-size: 11px;
    font-weight: 500;
    color: var(--dsa-gray-400);
    background: var(--dsa-gray-100);
    border: 1px solid var(--dsa-gray-200);
    border-radius: var(--dsa-radius-sm);
    padding: 2px 6px;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.15s;
    white-space: nowrap;
    letter-spacing: 0;
}

.dsa-search-form:focus-within .dsa-search-shortcut {
    opacity: 0;
}

.dsa-search-spinner {
    position: absolute;
    right: 14px;
    z-index: 2;
    color: var(--dsa-accent);
    font-size: 13px;
    opacity: 0;
    transition: opacity var(--dsa-transition);
    pointer-events: none;
    background: transparent;
}

.dsa-search-spinner.visible {
    opacity: 1;
}


/* ==========================================================================
   07. AJAX Search Results Dropdown
   ========================================================================== */

.dsa-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--dsa-white);
    border: 1px solid var(--dsa-gray-200);
    border-radius: var(--dsa-radius);
    box-shadow: var(--dsa-shadow-lg);
    max-height: 420px;
    overflow-y: auto;
    z-index: 9999;
}

.dsa-search-results.visible {
    display: block;
}

/* — Section heading — */
.dsa-result-section {
    padding: 0;
}

.dsa-result-section + .dsa-result-section {
    border-top: 1px solid var(--dsa-gray-200);
}

.dsa-result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--dsa-gray-50);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dsa-gray-600);
}

.dsa-result-heading i {
    margin-right: 6px;
    color: var(--dsa-accent);
}

.dsa-result-count {
    font-weight: 400;
    font-size: 11px;
    color: var(--dsa-gray-500);
    text-transform: none;
    letter-spacing: 0;
}

/* — Result item — */
.dsa-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--dsa-gray-900);
    text-decoration: none;
    transition: background var(--dsa-transition);
}

.dsa-result-item:hover {
    background: var(--dsa-accent-light);
    text-decoration: none;
    color: var(--dsa-gray-900);
}

.dsa-result-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--dsa-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--dsa-gray-100);
}

.dsa-no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dsa-gray-400);
    font-size: 18px;
}

.dsa-result-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dsa-result-title {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dsa-result-meta {
    font-size: 12px;
    color: var(--dsa-gray-600);
    margin-top: 2px;
}

/* — No results — */
.dsa-no-results {
    padding: 24px 16px;
    text-align: center;
    color: var(--dsa-gray-600);
    font-size: 14px;
}

.dsa-no-results i {
    margin-right: 6px;
    color: var(--dsa-accent);
}


/* ==========================================================================
   08. Search Results Page
   ========================================================================== */

.search-section {
    margin-bottom: 48px;
}

.search-section h2 {
    font-size: 1.25rem;
    border-bottom: 2px solid var(--dsa-gray-200);
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-section h2 i {
    color: var(--dsa-accent);
    font-size: 1rem;
}

.search-section-count {
    font-weight: 400;
    color: var(--dsa-gray-500);
    font-size: 0.875rem;
    margin-left: 4px;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.search-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--dsa-gray-200);
    border-radius: var(--dsa-radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--dsa-gray-900);
    background: var(--dsa-white);
    transition: box-shadow var(--dsa-transition), transform var(--dsa-transition);
}

.search-card:hover {
    box-shadow: var(--dsa-shadow);
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--dsa-gray-900);
}

.search-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--dsa-gray-100);
}

.search-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--dsa-gray-400);
}

.search-card-title {
    padding: 12px 14px 4px;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-card-meta {
    padding: 0 14px 12px;
    font-size: 13px;
    color: var(--dsa-gray-600);
}

.search-no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--dsa-gray-600);
}

.search-no-results i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    color: var(--dsa-accent);
}

.search-no-results p {
    font-size: 1rem;
    margin-bottom: 20px;
}


/* ==========================================================================
   09. Content — Entries (single, page, archive, index)
   ========================================================================== */

/* — Page & section headers — */
.page-header {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--dsa-gray-200);
}

.page-title {
    font-size: 1.75rem;
    margin-bottom: 0;
}

.archive-description {
    margin-top: 8px;
    color: var(--dsa-gray-600);
    font-size: 0.95rem;
}

/* — Articles — */
article.post,
article.page,
article.type-product {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--dsa-gray-200);
}

article:last-of-type {
    border-bottom: none;
}

/* — Blog listing horizontal cards — */
.dsa-post-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
}

.dsa-post-card__thumb {
    display: block;
    border-radius: var(--dsa-radius);
    overflow: hidden;
    flex-shrink: 0;
}

.dsa-post-card__thumb img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    transition: transform var(--dsa-transition-slow);
}

.dsa-post-card__thumb:hover img {
    transform: scale(1.04);
}

.dsa-post-card__body .entry-header {
    margin-bottom: 8px;
}

.dsa-post-card .entry-title {
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.dsa-post-card .entry-meta {
    margin-bottom: 8px;
}

.dsa-post-card .entry-summary {
    font-size: 0.9375rem;
    color: var(--dsa-gray-700);
}

.dsa-post-card .entry-summary p {
    margin: 0;
}

@media (max-width: 600px) {
    .dsa-post-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dsa-post-card__thumb img {
        height: 200px;
    }
}

.entry-header {
    margin-bottom: 16px;
}

.entry-title {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.entry-title a {
    color: var(--dsa-gray-900);
}

.entry-title a:hover {
    color: var(--dsa-accent);
    text-decoration: none;
}

/* — Meta (date, author) — */
.entry-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--dsa-gray-600);
}

.entry-meta .posted-on::before {
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    content: "\f073";
    margin-right: 6px;
    color: var(--dsa-accent);
}

.entry-meta .byline::before {
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    content: "\f007";
    margin-right: 6px;
    color: var(--dsa-accent);
}

/* — Thumbnail — */
.post-thumbnail {
    display: block;
    margin-bottom: 24px;
    border-radius: var(--dsa-radius);
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* — Content — */
.entry-content,
.entry-summary {
    font-size: 1rem;
    line-height: var(--dsa-line-height);
    color: var(--dsa-gray-800);
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

/* — Footer (categories, tags) — */
.entry-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--dsa-gray-200);
    font-size: 0.875rem;
    color: var(--dsa-gray-600);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.cat-links::before {
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    content: "\f07b";
    margin-right: 6px;
    color: var(--dsa-accent);
}

.tags-links::before {
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    content: "\f02c";
    margin-right: 6px;
    color: var(--dsa-accent);
}

/* — Post navigation — */
.post-navigation {
    margin-top: 32px;
    padding: 24px 0;
    border-top: 1px solid var(--dsa-gray-200);
    border-bottom: 1px solid var(--dsa-gray-200);
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.post-navigation .nav-subtitle {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dsa-gray-500);
    margin-bottom: 4px;
}

.post-navigation .nav-title {
    font-weight: 500;
}

/* — Posts list (archive) — */
.posts-list {
    margin-top: 8px;
}

/* — Pagination — */
.pagination,
nav.navigation.pagination {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--dsa-gray-200);
}

.pagination .nav-links {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.pagination .page-numbers,
a.page-numbers,
span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--dsa-gray-300);
    border-radius: var(--dsa-radius-sm);
    background: var(--dsa-white);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dsa-gray-700);
    text-decoration: none;
    transition: all var(--dsa-transition);
}

a.page-numbers:hover {
    background: var(--dsa-accent-light);
    border-color: var(--dsa-accent);
    color: var(--dsa-accent);
    text-decoration: none;
}

span.page-numbers.current {
    background: var(--dsa-accent);
    border-color: var(--dsa-accent);
    color: var(--dsa-white);
    font-weight: 600;
}


/* ==========================================================================
   10. 404 & No Results
   ========================================================================== */

.error-404,
.no-results {
    text-align: center;
    padding: 60px 0;
}

.error-404 .page-header,
.no-results .page-header {
    border-bottom: none;
    margin-bottom: 16px;
}

.error-404 .page-content,
.no-results .page-content {
    max-width: 480px;
    margin: 0 auto;
}

.error-404 .page-content p,
.no-results .page-content p {
    color: var(--dsa-gray-600);
    margin-bottom: 24px;
}


/* ==========================================================================
   11. WooCommerce Overrides
   ========================================================================== */

/*
 * Philosophy: let WooCommerce's own float-based layout handle positioning
 * (gallery, summary, product grid). We only add visual polish here —
 * colours, typography, shadows, border-radius, hover effects.
 */

/* — Breadcrumbs — */
.woocommerce-breadcrumb {
    font-size: 0.8125rem;
    color: var(--dsa-gray-500);
    margin-bottom: 24px;
}

.woocommerce-breadcrumb a {
    color: var(--dsa-accent);
}

.woocommerce-breadcrumb a:hover {
    text-decoration: underline;
}

/* — Single Product — clearfix for WC float layout — */
div.product::after {
    content: "";
    display: table;
    clear: both;
}

/* Gallery — visual polish only, WC floats handle positioning */
div.product .woocommerce-product-gallery img {
    border-radius: var(--dsa-radius-sm);
}

div.product .woocommerce-product-gallery .flex-control-thumbs {
    margin-top: 10px;
}

div.product .woocommerce-product-gallery .flex-control-thumbs li {
    border: 2px solid transparent;
    border-radius: var(--dsa-radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--dsa-transition);
}

div.product .woocommerce-product-gallery .flex-control-thumbs li:hover,
div.product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
    border-color: var(--dsa-accent);
}

/* Gallery trigger (fullscreen icon) */
div.product .woocommerce-product-gallery .woocommerce-product-gallery__trigger {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.5);
    color: var(--dsa-white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background var(--dsa-transition);
}

div.product .woocommerce-product-gallery .woocommerce-product-gallery__trigger:hover {
    background: rgba(0, 0, 0, 0.75);
}

/* Zoom lens */
div.product .woocommerce-product-gallery .zoomImg {
    border-radius: var(--dsa-radius-sm);
}

/* — Summary — */
div.product .product_title {
    font-size: 1.75rem;
    margin: 0 0 12px;
}

div.product .price {
    font-size: 1.35rem;
    color: var(--dsa-accent);
    font-weight: 700;
    margin-bottom: 16px;
}

div.product .price del {
    color: var(--dsa-gray-400);
    font-weight: 400;
    margin-right: 8px;
}

div.product .price ins {
    text-decoration: none;
}

div.product .woocommerce-product-details__short-description {
    color: var(--dsa-gray-600);
    line-height: 1.7;
    margin-bottom: 20px;
}

div.product .product_meta {
    font-size: 0.8125rem;
    color: var(--dsa-gray-500);
    margin-top: 24px;
    line-height: 2;
}

div.product .product_meta > span {
    display: block;
}

div.product .product_meta a {
    color: var(--dsa-accent);
}

/* — Quantity & Add-to-cart — */
div.product form.cart {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

div.product form.cart .quantity input.qty {
    width: 64px;
    text-align: center;
    padding: 10px 8px;
    border: 2px solid var(--dsa-gray-300);
    border-radius: var(--dsa-radius-sm);
}

.single_add_to_cart_button,
.woocommerce a.button,
.woocommerce button.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--dsa-radius-sm);
    background: var(--dsa-gray-900);
    color: var(--dsa-white);
    font-family: var(--dsa-font-family);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--dsa-transition), transform var(--dsa-transition);
}

.single_add_to_cart_button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
    background: var(--dsa-accent);
    color: var(--dsa-white);
    transform: translateY(-2px);
    text-decoration: none;
}

/* — Tabs — */
.woocommerce-tabs {
    clear: both;
    margin-top: 24px;
}

.wc-tabs {
    list-style: none;
    display: flex;
    gap: 0;
    padding: 0;
    margin: 0;
    /* border-bottom: 2px solid var(--dsa-gray-200); */
}

.wc-tabs li {
    list-style: none;
}

.wc-tabs li a {
    display: block;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--dsa-gray-500);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color var(--dsa-transition), border-color var(--dsa-transition);
    text-decoration: none;
}

.wc-tabs li.active a,
.wc-tabs li a:hover {
    color: var(--dsa-accent);
    border-bottom-color: var(--dsa-accent);
}

.woocommerce-Tabs-panel {
    padding: 24px 0;
    line-height: 1.7;
    color: var(--dsa-gray-700);
}

.woocommerce-Tabs-panel h2 {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

/* Attribute table */
.shop_attributes {
    width: 100%;
    border-collapse: collapse;
}

.shop_attributes th,
.shop_attributes td {
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid var(--dsa-gray-200);
    font-size: 0.9375rem;
}

.shop_attributes th {
    font-weight: 600;
    color: var(--dsa-gray-700);
    width: 35%;
}

.shop_attributes td p {
    margin: 0;
}

/* — Related Products — */
section.related.products {
    clear: both;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--dsa-gray-200);
}

section.related.products > h2 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

/* Clearfix for WC float grid */
section.related.products ul.products::after,
ul.products::after {
    content: "";
    display: table;
    clear: both;
}

/* — Product Card polish (archive + related) — WC handles float & width — */
ul.products li.product {
    background: var(--dsa-white);
    border-radius: var(--dsa-radius-md);
    overflow: hidden;
    box-shadow: var(--dsa-shadow-sm);
    transition: transform var(--dsa-transition), box-shadow var(--dsa-transition);
}

ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: var(--dsa-shadow-md);
}

ul.products li.product a.woocommerce-LoopProduct-link {
    text-decoration: none;
    color: inherit;
}

ul.products li.product img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 12px 16px 4px;
    margin: 0;
    color: var(--dsa-gray-900);
}

ul.products li.product .price {
    padding: 0 16px 12px;
    font-size: 0.875rem;
    color: var(--dsa-accent);
    font-weight: 700;
}

ul.products li.product a.button {
    display: block;
    margin: 0 16px 16px;
    text-align: center;
    font-size: 0.8125rem;
    padding: 8px 16px;
}

/* — Notices — */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info {
    background: var(--dsa-accent-light);
    border-left: 4px solid var(--dsa-accent);
    padding: 12px 20px;
    border-radius: var(--dsa-radius-sm);
    margin-bottom: 24px;
    color: var(--dsa-gray-800);
}

.woocommerce-notices-wrapper .woocommerce-error {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 12px 20px;
    border-radius: var(--dsa-radius-sm);
    margin-bottom: 24px;
    color: var(--dsa-gray-800);
}

/* — Hide unwanted default sidebar if it leaks through — */
.woocommerce #sidebar,
.woocommerce-page #sidebar {
    display: none;
}

/* — Hide prices site-wide (backup for remove_action in functions.php) — */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    display: none !important;
}

/* — Hide author / byline everywhere — */
.byline,
.entry-meta .author,
.entry-meta .byline,
.post-author {
    display: none !important;
}

/* ==========================================================================
   11b. WooCommerce — Shop / Archive Page
   ========================================================================== */

/*
 * The shop page outputs <div class="products"> (not <ul>).
 * Body class "woocommerce-shop" scopes these rules.
 */

/* Clean grid — override WC floats for the archive page only */
.dsa-shop-content .products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    list-style: none;
    padding: 0;
}

/* WooCommerce clearfix pseudo-elements become grid items and leave an empty
   first/last slot. The DSA archive grid does not need float clearing. */
.dsa-shop-content ul.products::before,
.dsa-shop-content ul.products::after {
    content: none;
    display: none;
}

/* — Shop Layout — sidebar + content — */
.dsa-shop-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 32px;
    align-items: start;
}

/* — Sidebar — */
.dsa-shop-sidebar {
    position: sticky;
    top: 20px;
    background: var(--dsa-gray-50);
    border: 1px solid var(--dsa-gray-200);
    border-radius: var(--dsa-radius);
    padding: 24px 20px;
}

.dsa-sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--dsa-accent);
    color: var(--dsa-gray-900);
}

.dsa-filter-group {
    border-bottom: 1px solid var(--dsa-gray-200);
    padding: 12px 0;
}

.dsa-filter-group:first-of-type {
    padding-top: 0;
}

.dsa-filter-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dsa-filter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dsa-gray-600);
    background: none;
    border: none;
    border-radius: 0;
    padding: 4px 0;
    margin: 0;
    cursor: pointer;
    text-align: left;
    transition: color var(--dsa-transition);
}

.dsa-filter-heading:hover {
    color: var(--dsa-accent);
    transform: none;
}

.dsa-filter-heading i {
    font-size: 0.65rem;
    flex-shrink: 0;
    transition: transform var(--dsa-transition);
}

.dsa-filter-group.is-open .dsa-filter-heading i {
    transform: rotate(180deg);
}

.dsa-filter-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease;
}

.dsa-filter-group.is-open .dsa-filter-body {
    max-height: 1080px;
    opacity: 1;
}

.dsa-filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.875rem;
    color: var(--dsa-gray-800);
    cursor: pointer;
    transition: color var(--dsa-transition);
}

.dsa-filter-label:hover {
    color: var(--dsa-accent);
}

.dsa-filter-label:has(.dsa-filter-cb:checked) {
    color: var(--dsa-accent);
    font-weight: 500;
}

/* Custom checkbox — native box replaced with an accent-coloured control. */
.dsa-filter-cb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 2px solid var(--dsa-gray-300);
    border-radius: var(--dsa-radius-sm);
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--dsa-transition), background var(--dsa-transition);
}
.dsa-filter-cb:hover { border-color: var(--dsa-accent); }
.dsa-filter-cb:checked {
    border-color: var(--dsa-accent);
    background: var(--dsa-accent);
}
.dsa-filter-cb:checked::after {
    content: "";
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}
.dsa-filter-cb:focus-visible {
    outline: 2px solid var(--dsa-accent);
    outline-offset: 2px;
}

/* ==========================================================================
   Product Cards — Shop, Category & Brand Archives
   ========================================================================== */

/*
 * One consistent layout across Shop, Category and Brand archives.
 *
 * Normal state:
 *   235px product image
 *   125px centred title area
 *
 * Hover/focus state:
 *   A 50px black "Read more" bar slides up from the bottom.
 *   The title area gains extra bottom padding, which moves the text upward
 *   without placing the CTA over the product name.
 */
.dsa-shop-content .products li.product {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;

    height: 360px !important;
    min-height: 360px;

    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;

    background: var(--dsa-white);
    border: 1px solid var(--dsa-gray-200);
    border-radius: var(--dsa-radius);
    box-shadow: var(--dsa-shadow-sm);

    transition:
        transform var(--dsa-transition),
        box-shadow var(--dsa-transition),
        border-color var(--dsa-transition);
}

.dsa-shop-content .products li.product:hover {
    transform: translateY(-4px);
    border-color: var(--dsa-accent-border);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
}

/* The image/title link fills the entire card. */
.dsa-shop-content .products li.product > a.woocommerce-LoopProduct-link {
    position: relative !important;

    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto;

    width: 100%;
    height: 100%;
    min-width: 0;

    overflow: hidden;

    color: inherit;
    text-decoration: none;
}

/* Product image area. */
.dsa-shop-content .products li.product > a.woocommerce-LoopProduct-link > img {
    flex: 0 0 235px;

    width: 100%;
    height: 235px;

    margin: 0;
    padding: 16px;

    object-fit: contain;
    object-position: center;

    background: var(--dsa-gray-50);

    display: block;
    box-sizing: border-box;

    transition: transform 0.35s ease;
}

.dsa-shop-content .products li.product:hover > a.woocommerce-LoopProduct-link > img {
    transform: scale(1.035);
}

/*
 * Product title area.
 *
 * The title remains centred normally. On hover/focus, the extra bottom
 * padding creates a dedicated visual gap for the CTA instead of letting the
 * CTA cover the text.
 */
.dsa-shop-content .products li.product .woocommerce-loop-product__title,
.dsa-shop-content .products li.product .woocommerce-loop-category__title {
    flex: 0 0 125px;

    width: 100%;
    height: 125px !important;
    min-height: 125px;

    margin: 0;
    padding: 14px 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-top: 1px solid var(--dsa-gray-100);

    color: var(--dsa-gray-900);

    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;

    box-sizing: border-box;

    transition:
        padding 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        color var(--dsa-transition);
}

/*
 * Reserve the lower 50px for the CTA while keeping enough room for a
 * two-line product name.
 */
.dsa-shop-content .products li.product:hover .woocommerce-loop-product__title,
.dsa-shop-content .products li.product:hover .woocommerce-loop-category__title,
.dsa-shop-content .products li.product:focus-within .woocommerce-loop-product__title,
.dsa-shop-content .products li.product:focus-within .woocommerce-loop-category__title {
    padding-top: 10px;
    padding-bottom: 58px;
}

/* Black "Read more" CTA, hidden just below the card until hover/focus. */
.dsa-shop-content .products li.product > a.woocommerce-LoopProduct-link::after {
    content: "Read more";

    position: absolute;
    z-index: 4;

    left: 0;
    right: 0;
    bottom: 0;

    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 16px;

    background: var(--dsa-gray-900);
    color: var(--dsa-white);

    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    text-align: center;

    transform: translateY(100%);

    transition:
        transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        background var(--dsa-transition);
}

.dsa-shop-content .products li.product:hover > a.woocommerce-LoopProduct-link::after,
.dsa-shop-content .products li.product:focus-within > a.woocommerce-LoopProduct-link::after {
    transform: translateY(0);
}

/* Keyboard users get the same interaction plus a visible focus state. */
.dsa-shop-content .products li.product:focus-within {
    border-color: var(--dsa-accent);

    box-shadow:
        0 0 0 3px var(--dsa-accent-light),
        var(--dsa-shadow);
}

.dsa-shop-content .products li.product:focus-within > a.woocommerce-LoopProduct-link::after {
    background: var(--dsa-accent);
}

/* Catalogue mode: the card itself is the link, so hide WC's separate button. */
.dsa-shop-content .products li.product a.button,
.woocommerce .products li.product a.add_to_cart_button {
    display: none !important;
}

/* Mobile keeps the same proportions at a slightly shorter height. */
@media (max-width: 600px) {
    .dsa-shop-content .products li.product {
        height: 330px !important;
        min-height: 330px;
    }

    .dsa-shop-content .products li.product > a.woocommerce-LoopProduct-link > img {
        flex-basis: 210px;
        height: 210px;
        padding: 14px;
    }

    .dsa-shop-content .products li.product .woocommerce-loop-product__title,
    .dsa-shop-content .products li.product .woocommerce-loop-category__title {
        flex-basis: 120px;
        height: 120px !important;
        min-height: 120px;
        padding: 12px 16px;
    }

    .dsa-shop-content .products li.product:hover .woocommerce-loop-product__title,
    .dsa-shop-content .products li.product:hover .woocommerce-loop-category__title,
    .dsa-shop-content .products li.product:focus-within .woocommerce-loop-product__title,
    .dsa-shop-content .products li.product:focus-within .woocommerce-loop-category__title {
        padding-top: 8px;
        padding-bottom: 56px;
    }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
    .dsa-shop-content .products li.product,
    .dsa-shop-content .products li.product > a.woocommerce-LoopProduct-link > img,
    .dsa-shop-content .products li.product .woocommerce-loop-product__title,
    .dsa-shop-content .products li.product .woocommerce-loop-category__title,
    .dsa-shop-content .products li.product > a.woocommerce-LoopProduct-link::after {
        transition: none !important;
    }
}

/* — Load More button — */
.dsa-load-more {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 36px auto 0;
    padding: 14px 24px;
    border: 2px solid var(--dsa-accent);
    border-radius: var(--dsa-radius-sm);
    background: transparent;
    color: var(--dsa-accent);
    font-family: var(--dsa-font-family);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--dsa-transition), color var(--dsa-transition);
}

.dsa-load-more:hover {
    background: var(--dsa-accent);
    color: var(--dsa-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 170, 187, 0.32);
}

/* Shop responsive */
@media (max-width: 1024px) {
    .dsa-shop-layout {
        grid-template-columns: 220px 1fr;
        gap: 24px;
    }

    .dsa-shop-content .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .dsa-shop-layout {
        grid-template-columns: 1fr;
    }

    .dsa-shop-sidebar {
        position: static;
    }

    .dsa-shop-content .products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dsa-shop-content .products {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .dsa-shop-content .products li.product img {
        height: 200px;
        padding: 14px;
    }
}

/* — WooCommerce Responsive — */
@media (max-width: 768px) {
    div.product .product_title {
        font-size: 1.35rem;
    }

    .wc-tabs {
        flex-wrap: wrap;
    }

    .wc-tabs li a {
        padding: 10px 16px;
        font-size: 0.875rem;
    }

    section.related.products {
        margin-top: 32px;
    }
}


/* ==========================================================================
   11c. Single Product — Vertical Thumbnail Gallery & Lightbox
   ========================================================================== */

/* Gallery container: flex row so thumbnail column sits left of main image */
.single-product div.product .woocommerce-product-gallery {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

/* Thumbnail strip — vertical column, forced before the viewport */
.single-product div.product .woocommerce-product-gallery ol.flex-control-thumbs {
    order: -1;
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    width: 78px;
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0;
    overflow: visible;
    list-style: none;
}

.single-product div.product .woocommerce-product-gallery ol.flex-control-thumbs li {
    width: 74px !important;
    height: 74px;
    float: none !important;
    margin: 0 !important;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    border-radius: var(--dsa-radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color var(--dsa-transition);
    box-sizing: border-box;
}

.single-product div.product .woocommerce-product-gallery ol.flex-control-thumbs li img {
    width: 100% !important;
    height: 100%;
    object-fit: cover;
    display: block;
}

.single-product div.product .woocommerce-product-gallery ol.flex-control-thumbs li:hover,
.single-product div.product .woocommerce-product-gallery ol.flex-control-thumbs li img.flex-active {
    border-color: var(--dsa-accent);
}

/* Hide thumbnails 5 and beyond */
.single-product div.product .woocommerce-product-gallery ol.flex-control-thumbs li:nth-child(n+5) {
    display: none !important;
}

/* +X overflow badge, injected by JS onto the 4th thumbnail */
.dsa-thumb-more {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    pointer-events: none;
    border-radius: calc(var(--dsa-radius-sm) - 2px);
}

/* Main image viewport fills remaining space */
.single-product div.product .woocommerce-product-gallery .flex-viewport {
    flex: 1;
    min-width: 0;
}

/* Visual hint that the main image is clickable */
.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__image a {
    cursor: zoom-in;
}

/* — Lightbox — */
#dsa-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 20px; /* keeps popup inset so the site shows at the corners */
}

#dsa-lightbox.is-open {
    display: flex;
}

.dsa-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    cursor: pointer;
}

/* Popup card */
.dsa-lb-content {
    position: relative;
    z-index: 1;
    background: #111;
    border-radius: var(--dsa-radius);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 52px 24px 20px;
    width: 100%;
    max-width: min(940px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    overflow: hidden;
}

/* Close button — top-right of the popup card */
.dsa-lb-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, color 0.2s;
}

.dsa-lb-close:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    transform: none;
}

/* Stage: image area with arrows overlaid at each side */
.dsa-lb-stage {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dsa-lb-img-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 56px; /* clearance for the arrow buttons */
}

.dsa-lb-img {
    max-width: 100%;
    max-height: 56vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--dsa-radius-sm);
    display: block;
    transition: opacity 0.15s ease;
}

.dsa-lb-prev,
.dsa-lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s;
    z-index: 1;
}

.dsa-lb-prev { left: 0; }
.dsa-lb-next { right: 0; }

.dsa-lb-prev:hover,
.dsa-lb-next:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    transform: translateY(-50%); /* keep vertical centering on hover */
}

.dsa-lb-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.dsa-lb-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--dsa-accent) rgba(255, 255, 255, 0.08);
}

.dsa-lb-thumbs::-webkit-scrollbar { height: 4px; }
.dsa-lb-thumbs::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.08); border-radius: 2px; }
.dsa-lb-thumbs::-webkit-scrollbar-thumb { background: var(--dsa-accent); border-radius: 2px; }

.dsa-lb-thumb {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: var(--dsa-radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.55;
    background: none;
    padding: 0;
    transition: opacity 0.2s, border-color 0.2s;
}

.dsa-lb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dsa-lb-thumb.is-active,
.dsa-lb-thumb:hover {
    opacity: 1;
    border-color: var(--dsa-accent);
    transform: none;
}

.dsa-lb-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
}

body.dsa-lb-open { overflow: hidden; }

/* Mobile: stack thumbnails below the main image in a scrollable row */
@media (max-width: 600px) {
    .single-product div.product .woocommerce-product-gallery {
        flex-direction: column;
    }

    .single-product div.product .woocommerce-product-gallery ol.flex-control-thumbs {
        order: 0;
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .single-product div.product .woocommerce-product-gallery ol.flex-control-thumbs li {
        width: 60px !important;
        height: 60px;
    }

    /* Show all thumbs on mobile since they scroll horizontally */
    .single-product div.product .woocommerce-product-gallery ol.flex-control-thumbs li:nth-child(n+5) {
        display: flex !important;
    }

    #dsa-lightbox { padding: 12px; }

    .dsa-lb-content { padding: 48px 16px 16px; }

    .dsa-lb-img-wrap { padding: 0 48px; }

    .dsa-lb-img { max-height: 48vh; }

    .dsa-lb-prev,
    .dsa-lb-next {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   12. Forms
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea,
select {
    font-family: var(--dsa-font-family);
    font-size: 0.9375rem;
    /* padding: 10px 14px; */
    border: 2px solid var(--dsa-gray-300);
    border-radius: var(--dsa-radius-sm);
    background: var(--dsa-white);
    color: var(--dsa-gray-900);
    outline: none;
    transition: border-color var(--dsa-transition), box-shadow var(--dsa-transition);
    width: 100%;
    max-width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--dsa-accent);
    box-shadow: 0 0 0 3px var(--dsa-accent-light);
}

button,
input[type="submit"],
.wp-block-button__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--dsa-radius-sm);
    background: var(--dsa-accent);
    color: var(--dsa-white);
    font-family: var(--dsa-font-family);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--dsa-transition), transform var(--dsa-transition);
}

button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
    /* background: var(--dsa-accent-hover); */
    transform: translateY(-1px);
    color: var(--dsa-white);
    text-decoration: none;
}

/* — Search form (get_search_form) — */
.search-form {
    display: flex;
    gap: 8px;
    max-width: 480px;
}

.search-form .search-field {
    flex: 1;
}

.search-form .search-submit {
    flex-shrink: 0;
}


/* ==========================================================================
   13. Footer
   ========================================================================== */

.site-footer {
    background: var(--dsa-gray-900);
    color: var(--dsa-gray-400);
    margin-top: 64px;
    border-top: 3px solid var(--dsa-accent);
}

/* — Inner wrapper — */
.footer-inner {
    max-width: var(--dsa-container-width);
    margin: 0 auto;
    padding: 56px var(--dsa-container-pad) 40px;
}

/* — Columns grid — auto-fits to however many columns are rendered — */
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px 48px;
    align-items: start;
}

/* — Column headings — */
.footer-col-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--dsa-white);
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--dsa-gray-700);
}

/* — Brand column — */
.footer-logo {
    margin-bottom: 14px;
}

.footer-logo img {
    max-height: 44px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dsa-white);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color var(--dsa-transition);
}

.footer-logo-text:hover {
    color: var(--dsa-accent);
    text-decoration: none;
}

.footer-tagline {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--dsa-gray-500);
    margin: 0;
}

/* — Quick Links column — */
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-menu li {
    list-style: none;
}

.footer-menu a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--dsa-gray-400);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color var(--dsa-transition), gap var(--dsa-transition);
    padding: 3px 0;
}

.footer-menu a::before {
    content: '›';
    color: var(--dsa-accent);
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

.footer-menu a:hover {
    color: var(--dsa-white);
    gap: 10px;
    text-decoration: none;
}

/* — Contact column — */
.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--dsa-gray-400);
}

.footer-contact-item i {
    color: var(--dsa-accent);
    font-size: 13px;
    width: 16px;
    flex-shrink: 0;
    margin-top: 3px;
    text-align: center;
}

.footer-contact-item a {
    color: var(--dsa-gray-400);
    text-decoration: none;
    transition: color var(--dsa-transition);
}

.footer-contact-item a:hover {
    color: var(--dsa-accent);
}

.footer-contact-item--address address {
    font-style: normal;
    line-height: 1.6;
}

/* — Social column — */
.footer-social-icons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-social-icon-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--dsa-gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--dsa-transition);
}

.footer-social-icon-link i {
    width: 34px;
    height: 34px;
    border: 1px solid var(--dsa-gray-700);
    border-radius: var(--dsa-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    transition: background var(--dsa-transition), border-color var(--dsa-transition), color var(--dsa-transition);
}

.footer-social-icon-link:hover {
    color: var(--dsa-white);
    text-decoration: none;
}

.footer-social-icon-link:hover i {
    background: var(--dsa-accent);
    border-color: var(--dsa-accent);
    color: var(--dsa-white);
}

/* — Bottom bar — */
.footer-bottom {
    border-top: 1px solid var(--dsa-gray-800);
}

.footer-bottom-inner {
    max-width: var(--dsa-container-width);
    margin: 0 auto;
    padding: 20px var(--dsa-container-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copyright {
    font-size: 0.8125rem;
    color: var(--dsa-gray-600);
}

.footer-copyright-link {
    color: var(--dsa-gray-500);
    text-decoration: none;
    transition: color var(--dsa-transition);
}

.footer-copyright-link:hover {
    color: var(--dsa-accent);
    text-decoration: none;
}

/* — Policy links (footer bottom bar) — */
.footer-policy-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.footer-policy-link {
    font-size: 0.8125rem;
    color: var(--dsa-gray-600);
    text-decoration: none;
    transition: color var(--dsa-transition);
}

.footer-policy-link:hover {
    color: var(--dsa-accent);
    text-decoration: none;
}

/* — When used as an Elementor widget — */
.dsa-footer-widget {
    margin-top: 0;
    width: 100%;
    display: block;
}

/* Full-bleed — two-part fix:
 *
 * Part 1: Remove overflow clipping from every Elementor ancestor that wraps
 * our footer widget. If any ancestor has overflow:hidden (set by Elementor or
 * the user for scroll animations), it will clip the negative-margin left bleed
 * and the footer will appear to start where the body content starts rather than
 * at the left viewport edge. Covers both the classic section/column layout and
 * the newer Elementor Flexbox Container (.e-con) layout.
 *
 * Part 2: Pull the widget-container to the left viewport edge. The !important
 * is needed because Elementor generates per-element CSS (using the element's
 * unique ID as selector, e.g. .elementor-element-abc123) that resets margin
 * to 0, which overrides a plain class rule. */
.elementor-section:has(.elementor-widget-dsa_complete_footer),
.elementor-column:has(.elementor-widget-dsa_complete_footer),
.elementor-widget-wrap:has(.elementor-widget-dsa_complete_footer),
.e-con:has(.elementor-widget-dsa_complete_footer),
.elementor-widget-dsa_complete_footer {
    overflow: visible !important;
}

.elementor-widget-dsa_complete_footer > .elementor-widget-container {
    width: 100vw;
    margin-left: calc(50% - 50vw) !important;
    padding-left: 0;
    padding-right: 0;
}

/* Logo inside the footer widget — match header behaviour:
 * block-level, constrained height, NO invert filter. */
.dsa-footer-widget .footer-logo .custom-logo-link {
    display: block;
    line-height: 0;
}

.dsa-footer-widget .footer-logo .custom-logo-link img,
.dsa-footer-widget .footer-logo img {
    display: block;
    max-height: 44px;
    width: auto;
    max-width: 100%;
    filter: none;
    opacity: 1;
}

/* — Footer responsive — */
@media (max-width: 860px) {
    .footer-cols {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 32px;
    }
}

@media (max-width: 540px) {
    .footer-inner {
        padding-top: 40px;
        padding-bottom: 28px;
    }

    .footer-cols {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}


/* ==========================================================================
   14. Utility Classes
   ========================================================================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--dsa-gray-50);
    clip: auto !important;
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}


/* ==========================================================================
   15. Responsive — Tablet & Mobile
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --dsa-font-size: 15px;
        --dsa-container-pad: 16px;
    }

    /* Search results height cap on mobile */
    .dsa-search-results {
        max-height: 60vh;
    }

    /* Content */
    main {
        padding: 32px 0;
    }

    .search-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }

    .search-card-img {
        height: 120px;
    }

    /* Footer */
    .footer-navigation .footer-menu {
        flex-direction: column;
        gap: 12px;
    }

    .site-footer {
        margin-top: 40px;
    }

    /* Post nav */
    .post-navigation .nav-links {
        flex-direction: column;
    }
}


/* ==========================================================================
   15b. Elementor Compatibility
   ========================================================================== */

/*
 * Full Width template — remove <main> padding so Elementor sections
 * can reach the viewport edges. Elementor handles section stretching
 * via its own JS (inline left/width), so we do not override it here.
 */
.elementor-full-width #main,
.elementor-full-width .site-main {
    padding: 0;
    margin: 0;
    max-width: 100%;
}

/*
 * Elementor edit mode — remove the extra heading the theme would normally
 * output above the content (page.php hides it in PHP, but this is a CSS
 * fallback for edge cases).
 */
.elementor-editor-active .entry-header,
body.elementor-page .entry-header {
    display: none;
}

/*
 * Hide the theme <footer> on canvas pages — but NOT the footer widget,
 * which needs to render in the Elementor editor preview (also canvas).
 */
body.elementor-template-canvas .site-footer:not(.dsa-footer-widget) {
    display: none;
}

/* ==========================================================================
   16. Product Page Animations
   ========================================================================== */

/* — Keyframes — */
@keyframes dsa-fade-up {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes dsa-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes dsa-scale-in {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

/* — Single product: staggered entrance on page load — */
.single-product .woocommerce-breadcrumb {
    animation: dsa-fade-in 0.4s ease both;
}

.single-product div.product .woocommerce-product-gallery {
    animation: dsa-fade-up 0.5s ease both;
}

.single-product div.product .summary {
    animation: dsa-fade-up 0.5s 0.12s ease both;
}

.single-product div.product .single_add_to_cart_button {
    animation: dsa-scale-in 0.35s 0.28s ease both;
}

.single-product .woocommerce-tabs {
    animation: dsa-fade-up 0.5s 0.2s ease both;
}

/* — Tab panel: fade when WooCommerce JS swaps panels — */
.woocommerce-Tabs-panel {
    animation: dsa-fade-in 0.25s ease both;
}

/* — Product cards: JS-driven staggered entrance (archive + related) — */
li.product.dsa-entering {
    animation: dsa-fade-up 0.42s ease both;
}

/* — Card image zoom on hover (archive grid + related) — */
ul.products li.product .woocommerce-LoopProduct-link,
.products li.product .woocommerce-LoopProduct-link {
    overflow: hidden;
}

/*
 * Do not change display here. DSA archive cards use display:flex on the
 * product link so the image and title keep their reserved vertical areas.
 */

ul.products li.product .woocommerce-LoopProduct-link img,
.products li.product .woocommerce-LoopProduct-link img {
    transition: transform 0.4s ease;
}

ul.products li.product:hover .woocommerce-LoopProduct-link img,
.products li.product:hover .woocommerce-LoopProduct-link img {
    transform: scale(1.06);
}

/* — Button: micro-press on click — */
.single_add_to_cart_button:not(.loading):active,
.woocommerce a.button:active,
.woocommerce button.button:active {
    transform: translateY(1px) scale(0.98);
}

/* — Shop page: entrance & interaction animations — */
.woocommerce-shop .dsa-shop-sidebar {
    animation: dsa-fade-up 0.4s ease both;
}

.woocommerce-shop .woocommerce-result-count,
.woocommerce-shop .woocommerce-ordering {
    animation: dsa-fade-in 0.35s ease both;
}

.dsa-load-more {
    transition: background var(--dsa-transition), color var(--dsa-transition),
                transform var(--dsa-transition), box-shadow var(--dsa-transition);
}

/* Filter labels cascade in when accordion group opens */
.dsa-filter-group.is-open .dsa-filter-label {
    animation: dsa-fade-up 0.22s ease both;
}

.dsa-filter-group.is-open .dsa-filter-body .dsa-filter-label:nth-child(2) { animation-delay: 0.04s; }
.dsa-filter-group.is-open .dsa-filter-body .dsa-filter-label:nth-child(3) { animation-delay: 0.08s; }
.dsa-filter-group.is-open .dsa-filter-body .dsa-filter-label:nth-child(4) { animation-delay: 0.11s; }
.dsa-filter-group.is-open .dsa-filter-body .dsa-filter-label:nth-child(5) { animation-delay: 0.14s; }
.dsa-filter-group.is-open .dsa-filter-body .dsa-filter-label:nth-child(n+6) { animation-delay: 0.17s; }

/* — Respect reduced-motion preference — */
@media (prefers-reduced-motion: reduce) {
    .single-product .woocommerce-breadcrumb,
    .single-product div.product .woocommerce-product-gallery,
    .single-product div.product .summary,
    .single-product div.product .single_add_to_cart_button,
    .single-product .woocommerce-tabs,
    .woocommerce-Tabs-panel,
    li.product.dsa-entering,
    .woocommerce-shop .dsa-shop-sidebar,
    .woocommerce-shop .woocommerce-result-count,
    .woocommerce-shop .woocommerce-ordering,
    .dsa-filter-group.is-open .dsa-filter-label {
        animation: none;
    }

    ul.products li.product .woocommerce-LoopProduct-link img,
    .products li.product .woocommerce-LoopProduct-link img {
        transition: none;
    }

    .dsa-filter-body {
        transition: max-height 0.3s ease;
    }
}

/* =============================================================================
   17. Request Quote Form Widget
   ============================================================================= */

/* ---- Spinner keyframe ---- */
@keyframes dsa-spin {
    to { transform: rotate( 360deg ); }
}

/* ---- Outer wrapper ---- */
.dsa-quote-form-wrap {
    max-width: 680px;
}

/* ---- Headings ---- */
.dsa-qf-heading {
    font-size: clamp( 1.5rem, 3vw, 2rem );
    font-weight: 700;
    color: var( --dsa-gray-900 );
    line-height: 1.25;
    margin: 0 0 0.5rem;
}

.dsa-qf-subheading {
    font-size: 1rem;
    color: var( --dsa-gray-600 );
    line-height: 1.6;
    margin: 0 0 1.75rem;
}

/* ---- Honeypot (visually hidden) ---- */
.dsa-qf-hp {
    position: absolute;
    left: -9999px;
    visibility: hidden;
    pointer-events: none;
}

/* ---- Form rows ---- */
.dsa-qf-row {
    margin-bottom: 1.125rem;
}

.dsa-qf-row--two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.dsa-qf-row--submit {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

/* ---- Field container ---- */
.dsa-qf-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

/* ---- Labels ---- */
.dsa-qf-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var( --dsa-gray-700 );
    line-height: 1.4;
}

.dsa-qf-req {
    color: var( --dsa-accent );
    margin-left: 2px;
}

/* ---- Inputs, select, textarea ---- */
.dsa-qf-input,
.dsa-qf-select,
.dsa-qf-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var( --dsa-font-family );
    font-size: 0.9375rem;
    color: var( --dsa-gray-900 );
    background: var( --dsa-white );
    border: 1.5px solid var( --dsa-gray-300 );
    border-radius: var( --dsa-radius );
    outline: none;
    transition: border-color var( --dsa-transition ), box-shadow var( --dsa-transition );
    -webkit-appearance: none;
    appearance: none;
}

.dsa-qf-input::placeholder,
.dsa-qf-textarea::placeholder {
    color: var( --dsa-gray-400 );
}

.dsa-qf-input:focus,
.dsa-qf-select:focus,
.dsa-qf-textarea:focus {
    border-color: var( --dsa-accent );
    box-shadow: 0 0 0 3px rgba( 6, 170, 187, 0.15 );
}

/* Error state — set by JS */
.dsa-qf-input.is-error,
.dsa-qf-select.is-error,
.dsa-qf-textarea.is-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba( 220, 38, 38, 0.12 );
}

/* Select arrow */
.dsa-qf-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.25rem;
}

.dsa-qf-textarea {
    resize: vertical;
    min-height: 130px;
}

/* ---- Submit button ---- */
.dsa-qf-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    font-family: var( --dsa-font-family );
    font-size: 0.9375rem;
    font-weight: 600;
    color: var( --dsa-white );
    background: var( --dsa-accent );
    border: none;
    border-radius: var( --dsa-radius );
    cursor: pointer;
    line-height: 1;
    text-decoration: none;
    transition: background var( --dsa-transition ), transform var( --dsa-transition );
    white-space: nowrap;
}

.dsa-qf-submit:hover:not( :disabled ) {
    background: var( --dsa-accent-hover );
    transform: translateY( -1px );
}

.dsa-qf-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Spinner icon — hidden by default, shown during loading */
.dsa-qf-spinner {
    display: none;
    font-size: 0.875rem;
}

.dsa-qf.is-loading .dsa-qf-spinner {
    display: inline-block;
    animation: dsa-spin 0.8s linear infinite;
}

/* Arrow icon — hidden during loading */
.dsa-qf.is-loading .dsa-qf-arrow {
    display: none;
}

/* ---- Required note ---- */
.dsa-qf-required-note {
    font-size: 0.8125rem;
    color: var( --dsa-gray-500 );
    margin: 0;
    line-height: 1.4;
}

/* ---- Status message ---- */
.dsa-qf-status {
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    border-radius: var( --dsa-radius );
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    display: none; /* hidden until JS sets text */
}

.dsa-qf-status:not( :empty ) {
    display: block;
}

.dsa-qf-status--success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.dsa-qf-status--error {
    color: #991b1b;
    background: #fff1f2;
    border: 1px solid #fecdd3;
}

/* ---- Responsive ---- */
@media ( max-width: 560px ) {
    .dsa-qf-row--two {
        grid-template-columns: 1fr;
    }

    .dsa-qf-row--submit {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .dsa-qf-submit {
        width: 100%;
        justify-content: center;
    }
}

/* ---- Single product page quote button ---- */
/* Matches the header Request Quote button: solid black, accent on hover. */
.dsa-product-quote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 50%;
    margin-top: 12px;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var( --dsa-white );
    background: var( --dsa-gray-900 );
    border: 2px solid var( --dsa-gray-900 );
    border-radius: var( --dsa-radius-sm );
    text-decoration: none;
    transition: background var( --dsa-transition ), border-color var( --dsa-transition ), color var( --dsa-transition );
    box-sizing: border-box;
}

.dsa-product-quote-btn:hover {
    background: var( --dsa-accent );
    border-color: var( --dsa-accent );
    color: var( --dsa-white );
    text-decoration: none;
}

/* Respect reduced-motion preference */
@media ( prefers-reduced-motion: reduce ) {
    .dsa-qf-spinner {
        animation: none;
    }

    .dsa-qf-submit {
        transition: none;
    }

    .dsa-qf-input,
    .dsa-qf-select,
    .dsa-qf-textarea {
        transition: none;
    }
}

/* =============================================================================
   18. Filtered archives, term grids, brand pages
   ============================================================================= */

/* — Archive toolbar — */
.dsa-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.dsa-result-count { font-size: 0.9375rem; font-weight: 600; color: var(--dsa-gray-600); }
.dsa-filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--dsa-gray-900);
    color: #fff;
    border: 0;
    border-radius: var(--dsa-radius-sm);
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
}

/* — Filter facet extras — */
.dsa-filter-name { flex: 1; }
.dsa-filter-count { font-size: 0.75rem; color: var(--dsa-gray-500); }
/* Unavailable options: rendered in flat greys so it's obvious they can't be used. */
.dsa-filter-label.is-unavailable { cursor: not-allowed; color: var(--dsa-gray-400); }
.dsa-filter-label.is-unavailable:hover { color: var(--dsa-gray-400); }
.dsa-filter-label.is-unavailable .dsa-filter-name,
.dsa-filter-label.is-unavailable .dsa-filter-count { color: var(--dsa-gray-400); }
.dsa-filter-label.is-unavailable .dsa-filter-cb {
    border-color: var(--dsa-gray-200);
    background: var(--dsa-gray-100);
    cursor: not-allowed;
}
.dsa-filter-label.is-unavailable .dsa-filter-cb:hover { border-color: var(--dsa-gray-200); }
.dsa-filter-cb:disabled { cursor: not-allowed; }
.dsa-filter-clear {
    margin-top: 16px;
    width: 100%;
    background: none;
    border: 1px solid var(--dsa-gray-300);
    border-radius: var(--dsa-radius-sm);
    padding: 9px 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--dsa-gray-700);
    cursor: pointer;
    transition: border-color var(--dsa-transition), color var(--dsa-transition);
}
.dsa-filter-clear:hover { border-color: var(--dsa-accent); color: var(--dsa-accent); }

/* — Loading state during AJAX refresh — */
.dsa-shop-layout.is-loading .dsa-products-wrap { pointer-events: none; }

/* — Pagination — */
.dsa-filter-pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 36px; }
.dsa-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--dsa-gray-300);
    background: var(--dsa-white);
    border-radius: var(--dsa-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dsa-gray-700);
    cursor: pointer;
    transition: all var(--dsa-transition);
}
.dsa-page:hover { background: var(--dsa-accent-light); border-color: var(--dsa-accent); color: var(--dsa-accent); }
.dsa-page.is-current { background: var(--dsa-accent); border-color: var(--dsa-accent); color: var(--dsa-white); }

/* — Search results pagination (matches archive pager styling) — */
.search-pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 28px 0 8px; }
.search-pagination .page-numbers {
    min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
    padding: 0 12px; border: 1px solid var(--dsa-gray-300); background: var(--dsa-white);
    border-radius: var(--dsa-radius-sm); font-size: 0.875rem; font-weight: 600; color: var(--dsa-gray-700);
    text-decoration: none; transition: all var(--dsa-transition);
}
.search-pagination a.page-numbers:hover { background: var(--dsa-accent-light); border-color: var(--dsa-accent); color: var(--dsa-accent); }
.search-pagination .page-numbers.current { background: var(--dsa-accent); border-color: var(--dsa-accent); color: var(--dsa-white); }

/* — Back-to-top button — */
.dsa-back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--dsa-gray-900);
    color: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--dsa-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity var(--dsa-transition), transform var(--dsa-transition), background var(--dsa-transition);
}
.dsa-back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.dsa-back-to-top:hover { background: var(--dsa-accent); }
.dsa-back-to-top:focus-visible { outline: 2px solid var(--dsa-accent); outline-offset: 2px; }

.dsa-no-products { padding: 40px 0; text-align: center; color: var(--dsa-gray-600); font-size: 1rem; }

/* Product-card rendering is defined in section 11b above.
   Keep WooCommerce's separate catalogue button hidden. */
.dsa-shop-content .products li.product a.button,
.woocommerce .products li.product a.add_to_cart_button {
    display: none !important;
}

/* — Archive + term headers — */
.dsa-archive-header { margin-bottom: 28px; }
.dsa-archive-title { font-size: 1.875rem; font-weight: 700; color: var(--dsa-gray-900); margin: 0 0 8px; }
.dsa-archive-description { color: var(--dsa-gray-600); max-width: 70ch; }
.dsa-term-header { display: flex; gap: 24px; align-items: center; margin-bottom: 28px; flex-wrap: wrap; }
.dsa-term-header__media img {
    width: 120px; height: 120px; object-fit: contain;
    border-radius: var(--dsa-radius); border: 1px solid var(--dsa-gray-200); background: var(--dsa-gray-50); padding: 8px;
}
.dsa-term-header__eyebrow {
    display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--dsa-accent); margin-bottom: 4px;
}
.dsa-term-header__count { color: var(--dsa-gray-500); font-size: 0.875rem; margin-top: 6px; }

/* — Brand page header — */
.dsa-brand-header {
    margin-bottom: 32px; border-radius: var(--dsa-radius); overflow: hidden;
    background: var(--dsa-gray-50); border: 1px solid var(--dsa-gray-200);
}
.dsa-brand-header.has-banner { background-image: var(--dsa-brand-banner); background-size: cover; background-position: center; }
.dsa-brand-header.has-banner .dsa-brand-header__inner { background: rgba(255,255,255,0.92); }
.dsa-brand-header__inner { display: flex; gap: 28px; align-items: center; padding: 32px; flex-wrap: wrap; }
.dsa-brand-header__logo img { width: 150px; height: auto; max-height: 110px; object-fit: contain; }
.dsa-brand-header__title { font-size: 2rem; font-weight: 800; margin: 2px 0 10px; color: var(--dsa-gray-900); }
.dsa-brand-header__desc { color: var(--dsa-gray-700); max-width: 70ch; margin-bottom: 12px; }
.dsa-brand-features { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.dsa-brand-features__item { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--dsa-gray-800); }
.dsa-brand-features__item i { color: var(--dsa-accent); }

/* — Term grids (Categories / Brands index + widgets) — */
.dsa-index-header { margin-bottom: 8px; }
.dsa-index-heading { font-size: 1.5rem; font-weight: 700; margin: 0 0 16px; }
.dsa-term-grid { display: grid; grid-template-columns: repeat(var(--dsa-term-cols, 4), 1fr); gap: 24px; margin: 24px 0; }
.dsa-term-card {
    display: flex; flex-direction: column; background: #fff;
    border: 1px solid var(--dsa-gray-200); border-radius: var(--dsa-radius);
    overflow: hidden; text-decoration: none; color: inherit;
    transition: transform var(--dsa-transition), box-shadow var(--dsa-transition);
}
.dsa-term-card:hover { transform: translateY(-4px); box-shadow: var(--dsa-shadow); }
.dsa-term-card__media { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: var(--dsa-gray-50); overflow: hidden; }
.dsa-term-card__media img { width: 100%; height: 100%; object-fit: cover; }
.dsa-term-grid--brands .dsa-term-card__media img { object-fit: contain; padding: 20px; }
.dsa-term-card__placeholder { font-size: 2rem; color: var(--dsa-gray-400); }
.dsa-term-card__body { padding: 16px; text-align: center; }
.dsa-term-card__name { display: block; font-weight: 700; color: var(--dsa-gray-900); }
.dsa-term-card__count { display: block; font-size: 0.8125rem; color: var(--dsa-gray-500); margin-top: 4px; }

/* — Single product: brand/category links + view-all button — */
.dsa-product-meta-links { margin: 18px 0; display: flex; flex-direction: column; gap: 8px; }
.dsa-product-meta-row { font-size: 0.9rem; color: var(--dsa-gray-700); }
.dsa-product-meta-label { font-weight: 700; color: var(--dsa-gray-900); margin-right: 6px; }
.dsa-product-meta-values a { color: var(--dsa-accent); text-decoration: none; }
.dsa-product-meta-values a:hover { text-decoration: underline; }
.dsa-view-brand-btn {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 6px;
    padding: 10px 18px; border: 2px solid var(--dsa-accent); border-radius: var(--dsa-radius-sm);
    color: var(--dsa-accent); font-weight: 600; text-decoration: none;
    transition: background var(--dsa-transition), color var(--dsa-transition);
}
.dsa-view-brand-btn:hover { background: var(--dsa-accent); color: #fff; }

/* — Responsive — */
@media (max-width: 1024px) {
    .dsa-term-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .dsa-filter-toggle {
        display: inline-flex;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 50;
        box-shadow: var(--dsa-shadow);
    }
    .dsa-shop-sidebar { display: none; }
    .dsa-shop-sidebar.is-open { display: block; }
    .dsa-term-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .dsa-term-grid { grid-template-columns: 1fr; }
    .dsa-brand-header__inner { padding: 20px; }
}

/* =============================================================================
   19. Brand landing page + archive refinements
   ============================================================================= */

.dsa-brand-landing { margin: 0 0 8px; }

.dsa-brand-hero {
    border-radius: var(--dsa-radius);
    overflow: hidden;
    background: var(--dsa-gray-50);
    border: 1px solid var(--dsa-gray-200);
}
.dsa-brand-hero.has-banner {
    background-image: var(--dsa-brand-banner);
    background-size: cover;
    background-position: center;
    border: 0;
}
.dsa-brand-hero__inner {
    display: flex;
    gap: 32px;
    align-items: center;
    padding: 44px 40px;
    flex-wrap: wrap;
}
.dsa-brand-hero.has-banner .dsa-brand-hero__inner {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(2px);
}
.dsa-brand-hero__logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 130px;
    background: #fff;
    border: 1px solid var(--dsa-gray-200);
    border-radius: var(--dsa-radius);
    padding: 18px;
}
.dsa-brand-hero__logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.dsa-brand-hero__body { flex: 1 1 340px; min-width: 260px; }
.dsa-brand-hero__title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; margin: 4px 0 12px; color: var(--dsa-gray-900); line-height: 1.15; }
.dsa-brand-hero__desc { color: var(--dsa-gray-700); font-size: 1.0625rem; line-height: 1.6; max-width: 65ch; margin-bottom: 18px; }

.dsa-brand-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 14px 26px;
    background: var(--dsa-gray-900);
    color: var(--dsa-white);
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--dsa-radius-sm);
    text-decoration: none;
    box-shadow: var(--dsa-shadow);
    transition: transform var(--dsa-transition), box-shadow var(--dsa-transition), background var(--dsa-transition);
}
.dsa-brand-cta:hover { background: var(--dsa-accent); transform: translateY(-2px); box-shadow: var(--dsa-shadow-lg); }
.dsa-brand-cta__count {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Feature list spacing on the landing hero */
.dsa-brand-hero .dsa-brand-features { gap: 10px 24px; margin-top: 4px; }
.dsa-brand-hero .dsa-brand-features__item { font-size: 0.95rem; }

/* Archive spacing polish */
.dsa-shop-layout { margin-top: 4px; }
.dsa-archive-header { padding-bottom: 4px; }
.dsa-term-header { padding: 8px 0 4px; }

@media (max-width: 768px) {
    .dsa-brand-hero__inner { padding: 28px 22px; gap: 22px; }
    .dsa-brand-hero__logo { width: 140px; height: 100px; }
}

/* =============================================================================
   20. Unified buttons (black primary / white-outline secondary)
   ============================================================================= */

/* Reusable button classes. Primary = black, turns accent on hover (matches the
   header "Request Quote" button). Outline = white with a black border, turns
   black on hover. Text always contrasts. */
.dsa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--dsa-radius-sm);
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background var(--dsa-transition), color var(--dsa-transition),
                border-color var(--dsa-transition), transform var(--dsa-transition);
}
.dsa-btn--primary {
    background: var(--dsa-gray-900);
    color: var(--dsa-white);
    border-color: var(--dsa-gray-900);
}
.dsa-btn--primary:hover {
    background: var(--dsa-accent);
    border-color: var(--dsa-accent);
    color: var(--dsa-white);
    transform: translateY(-2px);
}
.dsa-btn--outline {
    background: var(--dsa-white);
    color: var(--dsa-gray-900);
    border-color: var(--dsa-gray-900);
}
.dsa-btn--outline:hover {
    background: var(--dsa-gray-900);
    color: var(--dsa-white);
    border-color: var(--dsa-gray-900);
}

.dsa-view-all-wrap { text-align: center; margin: 40px 0 8px; }

/* Single-product "View all {brand} products" → primary black */
.dsa-view-brand-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--dsa-radius-sm);
    background: var(--dsa-gray-900);
    color: var(--dsa-white);
    border: 2px solid var(--dsa-gray-900);
    font-weight: 600;
    text-decoration: none;
    transition: background var(--dsa-transition), color var(--dsa-transition),
                border-color var(--dsa-transition), transform var(--dsa-transition);
}
.dsa-view-brand-btn:hover {
    background: var(--dsa-accent);
    border-color: var(--dsa-accent);
    color: var(--dsa-white);
    transform: translateY(-2px);
}

/* Filter "Clear all" → outline secondary */
.dsa-filter-clear {
    background: var(--dsa-white);
    color: var(--dsa-gray-900);
    border: 2px solid var(--dsa-gray-900);
}
.dsa-filter-clear:hover {
    background: var(--dsa-gray-900);
    color: var(--dsa-white);
    border-color: var(--dsa-gray-900);
}

/* Mobile filter toggle keeps its black look; hover → accent */
.dsa-filter-toggle:hover { background: var(--dsa-accent); }

/* Shop AJAX pagination shares the unified accent pager styling defined earlier. */

/* Category / brand archive pagination (paginate_links list) */
.dsa-archive-pagination ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 0;
    margin: 40px 0 0;
}
.dsa-archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--dsa-white);
    border: 1px solid var(--dsa-gray-300);
    border-radius: var(--dsa-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dsa-gray-700);
    text-decoration: none;
    transition: all var(--dsa-transition);
}
.dsa-archive-pagination a.page-numbers:hover {
    background: var(--dsa-accent-light);
    border-color: var(--dsa-accent);
    color: var(--dsa-accent);
}
.dsa-archive-pagination .page-numbers.current {
    background: var(--dsa-accent);
    border-color: var(--dsa-accent);
    color: var(--dsa-white);
}

/* Full-width product grid (category / brand archives — no sidebar) */
.dsa-shop-content--full { width: 100%; }

/* =============================================================================
   20. Hierarchical Product Taxonomy Filters
   ============================================================================= */

/*
 * The main Categories facet is still the existing DSA accordion. Inside it,
 * parent product categories now become their own small accordions so the
 * sidebar reflects the WooCommerce category hierarchy instead of one flat list.
 */
.dsa-filter-body--taxonomy-tree {
    overflow: hidden;
}

.dsa-filter-group.is-open .dsa-filter-body--taxonomy-tree {
    max-height: 4000px;
}

.dsa-taxonomy-tree {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 4px;
}

.dsa-taxonomy-node {
    min-width: 0;
}

.dsa-taxonomy-row {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.dsa-taxonomy-row > .dsa-filter-label {
    flex: 1 1 auto;
    min-width: 0;
}

/* Parent-category disclosure button. Scoped tightly so the theme's generic
 * button styles cannot turn it into a large filled CTA. */
.dsa-taxonomy-toggle {
    flex: 0 0 28px !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    margin: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;

    color: var(--dsa-gray-500) !important;
    font-size: 0.7rem !important;
    line-height: 1 !important;
    cursor: pointer;

    transform: none !important;
    transition:
        color var(--dsa-transition),
        background var(--dsa-transition) !important;
}

.dsa-taxonomy-toggle:hover,
.dsa-taxonomy-toggle:focus-visible {
    color: var(--dsa-accent) !important;
    background: var(--dsa-accent-light) !important;
    transform: none !important;
}

.dsa-taxonomy-toggle:focus-visible {
    outline: 2px solid var(--dsa-accent);
    outline-offset: 1px;
}

.dsa-taxonomy-toggle i {
    transition: transform 0.22s ease;
}

.dsa-taxonomy-node.is-open > .dsa-taxonomy-row .dsa-taxonomy-toggle i {
    transform: rotate(180deg);
}

/* Children stay compact until their parent is expanded. */
.dsa-taxonomy-children {
    max-height: 0;
    opacity: 0;
    overflow: hidden;

    margin-left: 13px;
    padding-left: 13px;
    border-left: 1px solid var(--dsa-gray-200);

    transition:
        max-height 0.28s ease,
        opacity 0.2s ease,
        padding-top 0.28s ease,
        padding-bottom 0.28s ease;
}

.dsa-taxonomy-node.is-open > .dsa-taxonomy-children {
    max-height: 1200px;
    opacity: 1;
    padding-top: 2px;
    padding-bottom: 5px;
}

.dsa-taxonomy-children .dsa-filter-label {
    padding-top: 5px;
    padding-bottom: 5px;
    font-size: 0.84rem;
}

.dsa-taxonomy-children .dsa-filter-count {
    font-size: 0.72rem;
}

/* Give hierarchical labels predictable columns: checkbox, name, count. */
.dsa-taxonomy-tree .dsa-filter-label {
    min-width: 0;
}

.dsa-taxonomy-tree .dsa-filter-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.dsa-taxonomy-tree .dsa-filter-count {
    flex: 0 0 auto;
    margin-left: auto;
    padding-left: 6px;
}

/* The enhancer hides groups that have no genuinely non-empty public terms. */
.dsa-filter-group[hidden] {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .dsa-taxonomy-toggle i,
    .dsa-taxonomy-children {
        transition: none !important;
    }
}

