/* Ace UI fixes v3 — quote cart, contact mega menu, sidebar, buttons, sticky header. */

/* ============ 1. REMOVE Quote Cart from main menu (already in topbar) ============ */
.ace-nav .ace-menu a[href*="quote"],
.ace-nav .ace-menu a[href*="request-quote"],
.ace-header-nav .ace-menu a[href*="quote"],
.ace-header-nav .ace-menu a[href*="request-quote"],
li.ace-quote-menu-item,
.ace-top-item.ace-quote-menu-item,
#menu-primary a[href*="request-quote"] {
    display: none !important;
}
#menu-primary li:has(a[href*="request-quote"]) {
    display: none !important;
}
/* Mobile drawer too */
.ace-drawer-nav a[href*="request-quote"],
.ace-drawer-nav li:has(a[href*="request-quote"]) {
    display: none !important;
}

/* ============ 6. HIDE theme cart icon (keep Ace custom one) ============ */
a.wcmenucart,
.wcmenucart-toggle-drop_down,
li.wcmenucart-toggle-drop_down,
.woo-menu-icon.wcmenucart-toggle-drop_down {
    display: none !important;
}

/* ============ 2. CONTACT MEGA MENU — beautiful layout, no image ============ */
.ace-mega-panel[data-panel="contact"] .ace-mega-figure,
.ace-mega-contact .ace-mega-figure {
    display: none !important;
}
.ace-mega-panel[data-panel="contact"] {
    max-width: 640px;
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
}
.ace-mega-contact-blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}
.ace-mega-contact-block {
    padding: 26px 24px;
    border-right: 1px solid #eef0f2;
    position: relative;
    transition: background .25s;
}
.ace-mega-contact-block:last-child {
    border-right: 0;
}
.ace-mega-contact-block:hover {
    background: #fafbfc;
}
.ace-mega-contact-block h5 {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #9f1722;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ace-mega-contact-block h5::before {
    content: "";
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: linear-gradient(135deg, #9f1722, #c22432);
    flex: none;
}
.ace-mega-contact-block ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ace-mega-contact-block li {
    font-size: 13px;
    color: #4a4f56;
    line-height: 1.7;
    margin-bottom: 4px;
}
.ace-mega-contact-block a {
    color: #23262b;
    text-decoration: none;
    font-weight: 600;
}
.ace-mega-contact-block a:hover {
    color: #9f1722;
}
@media (max-width: 640px) {
    .ace-mega-contact-blocks {
        grid-template-columns: 1fr;
    }
    .ace-mega-contact-block {
        border-right: 0;
        border-bottom: 1px solid #eef0f2;
    }
    .ace-mega-contact-block:last-child {
        border-bottom: 0;
    }
}

/* ============ 3. STORE SIDEBAR — correct selectors (.ace-filter-widget) ============ */
.ace-filter-widget {
    background: #fff;
    border: 1px solid #e8ebee;
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: 0 3px 16px rgba(22,24,29,.05);
}
.ace-widget-title {
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #16181d;
    margin: 0 0 16px !important;
    padding-bottom: 12px;
    border-bottom: 2px solid #9f1722;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ace-widget-title::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9f1722;
    flex: none;
}
/* Category list */
.ace-filter-widget .product-categories {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 420px;
    overflow-y: auto;
}
.ace-filter-widget .product-categories::-webkit-scrollbar {
    width: 5px;
}
.ace-filter-widget .product-categories::-webkit-scrollbar-thumb {
    background: #dfe3e8;
    border-radius: 3px;
}
.ace-filter-widget .product-categories li {
    margin: 0;
    border-bottom: 1px solid #f4f6f7;
}
.ace-filter-widget .product-categories li:last-child {
    border-bottom: 0;
}
.ace-filter-widget .product-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: #3a3f45;
    text-decoration: none;
    border-radius: 8px;
    transition: all .2s;
}
.ace-filter-widget .product-categories a:hover {
    color: #9f1722;
    background: #faf0f1;
    padding-left: 12px;
}
.ace-filter-widget .product-categories .count {
    font-size: 11px;
    font-weight: 700;
    color: #9f1722;
    background: #faf0f1;
    padding: 3px 9px;
    border-radius: 12px;
    flex: none;
}
.ace-filter-widget .product-categories .children {
    margin: 0 0 6px 12px;
    padding-left: 12px;
    border-left: 2px solid #f1f3f5;
}
.ace-filter-widget .product-categories .children a {
    font-size: 12.5px;
    padding: 7px 6px;
}
/* Price filter */
.ace-filter-widget.widget_price_filter .price_slider_wrapper {
    padding: 8px 4px 0;
}
.ace-filter-widget.widget_price_filter .ui-slider-horizontal {
    height: 5px;
    background: #e8ebee;
    border-radius: 3px;
    margin-bottom: 18px;
}
.ace-filter-widget.widget_price_filter .ui-slider-range {
    background: linear-gradient(90deg, #9f1722, #c22432);
}
.ace-filter-widget.widget_price_filter .ui-slider-handle {
    width: 17px;
    height: 17px;
    top: -6px;
    background: #fff;
    border: 2.5px solid #9f1722;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(159,23,34,.3);
    cursor: grab;
}
.ace-filter-widget.widget_price_filter .price_slider_amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.ace-filter-widget.widget_price_filter .button {
    background: #9f1722;
    color: #fff;
    border: 0;
    border-radius: 9px;
    padding: 9px 20px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    cursor: pointer;
    transition: background .2s, transform .2s;
    order: 2;
}
.ace-filter-widget.widget_price_filter .button:hover {
    background: #83111b;
    transform: translateY(-1px);
}
.ace-filter-widget.widget_price_filter .price_label {
    font-size: 13px;
    font-weight: 700;
    color: #23262b;
    order: 1;
}

/* ============ 4. PRODUCT BUTTONS — single line, proper spacing ============ */
ul.products li.product .ace-button,
.ace-product-card .ace-button {
    white-space: nowrap;
    font-size: 12px;
    padding: 10px 16px;
    letter-spacing: .02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Give product cards more breathing room */
ul.products {
    gap: 22px;
}
ul.products li.product {
    padding: 18px;
}

/* ============ 5. STICKY ANIMATED HEADER ============ */
.ace-site-header,
header.ace-header {
    position: sticky;
    top: 0;
    z-index: 999;
    animation: ace-header-slide .35s ease;
}
@keyframes ace-header-slide {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
/* Hide topbar on scroll for a slimmer sticky header */
.ace-site-header.ace-scrolled .ace-topbar,
header.ace-header.ace-scrolled .ace-topbar {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .3s ease, opacity .3s ease;
}
.ace-topbar {
    max-height: 60px;
    transition: max-height .3s ease, opacity .3s ease;
}
/* Shadow when stuck */
.ace-site-header.ace-stuck,
header.ace-header.ace-stuck {
    box-shadow: 0 4px 24px rgba(22,24,29,.1);
}
