/* Ace UI fixes — header overlap, store sidebar, title sizes, homepage images. */

/* ============ 1. HEADER: prevent buttons hiding menu items ============ */
.ace-header-main {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: nowrap;
    min-width: 0;
}
.ace-header-nav {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}
.ace-header-nav .ace-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.ace-top-item > .ace-menu-link {
    padding: 10px 11px;
    font-size: 14px;
    white-space: nowrap;
}
.ace-header-actions {
    flex: 0 0 auto;
    gap: 8px;
    margin-left: 12px;
}
/* Compact CTA buttons so everything fits */
.ace-quote-cta {
    padding: 8px 14px;
    font-size: 12.5px;
    gap: 6px;
}
.ace-header-cta:not(.ace-quote-cta) {
    padding: 8px 12px;
    font-size: 12.5px;
}
.ace-header-cta:not(.ace-quote-cta) span {
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ace-hbtn {
    width: 34px;
    height: 34px;
}
/* At <1400px, hide Quote Cart text link (keep icon buttons) */
@media (max-width: 1400px) {
    .ace-top-item.ace-quote-menu-item > .ace-menu-link {
        padding: 10px 8px;
        font-size: 13px;
    }
}
@media (max-width: 1280px) {
    .ace-top-item.ace-quote-menu-item { display: none; }
    .ace-header-quote { display: inline-flex; }
}

/* ============ 2. STORE SIDEBAR: premium filter styling ============ */
.ace-shop-sidebar .widget,
.widget-area .widget {
    background: #fff;
    border: 1px solid #e8ebee;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(22,24,29,.04);
}
.ace-shop-sidebar .widget-title,
.widget-area .widget-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #16181d;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #9f1722;
}
/* Category tree */
.ace-shop-sidebar .product-categories,
.widget-area .product-categories {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ace-shop-sidebar .product-categories li,
.widget-area .product-categories li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #f1f3f5;
}
.ace-shop-sidebar .product-categories li:last-child,
.widget-area .product-categories li:last-child {
    border-bottom: 0;
}
.ace-shop-sidebar .product-categories a,
.widget-area .product-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 4px;
    font-size: 13.5px;
    font-weight: 500;
    color: #3a3f45;
    text-decoration: none;
    transition: color .2s, padding-left .2s;
}
.ace-shop-sidebar .product-categories a:hover,
.widget-area .product-categories a:hover {
    color: #9f1722;
    padding-left: 8px;
}
.ace-shop-sidebar .product-categories .count,
.widget-area .product-categories .count {
    font-size: 11.5px;
    font-weight: 700;
    color: #9f1722;
    background: #faf0f1;
    padding: 2px 8px;
    border-radius: 10px;
}
.ace-shop-sidebar .product-categories .children,
.widget-area .product-categories .children {
    margin: 0 0 4px 14px;
    padding: 0;
    border-left: 2px solid #f1f3f5;
    padding-left: 10px;
}
.ace-shop-sidebar .product-categories .children li,
.widget-area .product-categories .children li {
    border-bottom: 0;
}
.ace-shop-sidebar .product-categories .children a,
.widget-area .product-categories .children a {
    font-size: 12.5px;
    padding: 6px 4px;
}
/* Price filter */
.ace-shop-sidebar .widget_price_filter .price_slider_wrapper,
.widget-area .widget_price_filter .price_slider_wrapper {
    padding-top: 6px;
}
.ace-shop-sidebar .widget_price_filter .ui-slider-horizontal,
.widget-area .widget_price_filter .ui-slider-horizontal {
    height: 5px;
    background: #e8ebee;
    border-radius: 3px;
}
.ace-shop-sidebar .widget_price_filter .ui-slider-range,
.widget-area .widget_price_filter .ui-slider-range {
    background: #9f1722;
}
.ace-shop-sidebar .widget_price_filter .ui-slider-handle,
.widget-area .widget_price_filter .ui-slider-handle {
    width: 16px;
    height: 16px;
    top: -6px;
    background: #fff;
    border: 2px solid #9f1722;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(159,23,34,.25);
}
.ace-shop-sidebar .widget_price_filter .button,
.widget-area .widget_price_filter .button {
    background: #9f1722;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.ace-shop-sidebar .widget_price_filter .price_label,
.widget-area .widget_price_filter .price_label {
    font-size: 13px;
    font-weight: 600;
    color: #3a3f45;
}

/* ============ 3. STORE TITLES: reduce oversized fonts ============ */
.ace-store-hero h1,
.ace-shop-hero h1 {
    font-size: clamp(28px, 3.2vw, 44px) !important;
    line-height: 1.15 !important;
}
.ace-store-cats-title,
.ace-cats-title {
    font-size: clamp(22px, 2.4vw, 32px) !important;
}
.ace-store-section-title,
.ace-section-products-title {
    font-size: clamp(20px, 2vw, 28px) !important;
}
/* Generic: tames any huge uppercase store headings */
.ace-communication-store h2 {
    font-size: clamp(22px, 2.4vw, 32px);
}

/* ============ 4. HOMEPAGE SECTIONS: image styling ============ */
/* AI Servers cards — image treatment */
.ace-ai-card {
    overflow: hidden;
    position: relative;
}
.ace-ai-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 120px;
    background: linear-gradient(135deg, #1a1d24 0%, #2a1215 100%);
    opacity: .9;
}
.ace-ai-card > * {
    position: relative;
    z-index: 1;
}
/* HPE Partner images — refined */
.ace-hpe-photo img,
.ace-hpe img {
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(22,24,29,.14);
    transition: transform .35s ease, box-shadow .35s ease;
}
.ace-hpe-photo img:hover,
.ace-hpe img:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 55px rgba(22,24,29,.2);
}
/* Services cards — image/icon polish */
.ace-service-card {
    overflow: hidden;
}
.ace-service-card .ace-service-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #9f1722, #c22432);
    box-shadow: 0 8px 20px rgba(159,23,34,.25);
    margin-bottom: 16px;
}
/* Server builder — fix duplicated numbering (ol defaults + styled spans) */
.ace-config-steps,
ol.ace-config-steps {
    list-style: none !important;
    counter-reset: none;
}
.ace-config-steps li::marker {
    content: none;
    display: none;
}
/* Hide any hardcoded duplicate numbers inside step text */
.ace-builder-steps li > strong:first-child,
.ace-builder-steps li > b:first-child {
    display: none;
}
