/* Ace Communication custom header — keeps the site's red/dark palette. */
:root {
  --ace-red: #9f1722;
  --ace-red-dark: #791019;
  --ace-ink: #111315;
  --ace-muted: #626970;
  --ace-line: #dfe3e6;
  --ace-surface: #ffffff;
  --ace-radius: 8px;
  --ace-shadow: 0 18px 45px rgba(17, 19, 21, .14);
}
.ace-container { width: min(1320px, calc(100% - 48px)); margin-inline: auto; }

/* ---------- Topbar ---------- */
.ace-topbar { background: var(--ace-ink); color: #cfd4d8; font-size: 13px; }
.ace-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 8px; }
.ace-topbar-left, .ace-topbar-right { display: flex; align-items: center; gap: 20px; }
.ace-topbar-link { display: inline-flex; align-items: center; gap: 7px; color: #cfd4d8; text-decoration: none; }
.ace-topbar-link:hover { color: #fff; }
.ace-topbar-link svg { flex: none; }

/* ---------- Main header ---------- */
.ace-site-header { position: sticky; top: 0; z-index: 900; background: var(--ace-surface); border-bottom: 1px solid var(--ace-line); transition: box-shadow .25s ease; }
.ace-site-header.is-stuck { box-shadow: 0 10px 30px rgba(17, 19, 21, .10); }
.ace-header-inner { display: flex; align-items: center; gap: 28px; padding-block: 12px; }
.ace-logo { flex: none; }
.ace-logo img, .ace-logo .custom-logo { width: auto; max-height: 58px; }
.ace-logo-text { text-decoration: none; line-height: 1; display: flex; flex-direction: column; }
.ace-logo-text strong { color: var(--ace-red); font-size: 30px; letter-spacing: .04em; }
.ace-logo-text span { color: var(--ace-ink); font-size: 11px; letter-spacing: .34em; font-weight: 700; }

/* ---------- Nav + mega menu ---------- */
.ace-nav { flex: 1; }
.ace-menu { display: flex; align-items: stretch; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ace-top-item { position: static; }
.ace-menu-link { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 14px 13px; color: var(--ace-ink); text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap; }
.ace-menu-link:hover, .ace-top-item.is-active > .ace-menu-link { color: var(--ace-red); }
.ace-menu-link::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 8px; height: 2px; background: var(--ace-red); transform: scaleX(0); transform-origin: left; transition: transform .22s ease; }
.ace-top-item:hover > .ace-menu-link::after, .ace-top-item.is-active > .ace-menu-link::after { transform: scaleX(1); }
.ace-caret { transition: transform .2s ease; }
.ace-has-mega:hover .ace-caret { transform: rotate(180deg); }
.ace-mega-toggle { display: none; }

/* Mega panel */
.ace-mega-panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 899; background: var(--ace-surface); border-top: 3px solid var(--ace-red); box-shadow: var(--ace-shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .22s ease, transform .22s ease, visibility .22s; }
.ace-has-mega:hover > .ace-mega-panel, .ace-has-mega:focus-within > .ace-mega-panel, .ace-has-mega.is-open > .ace-mega-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.ace-mega-inner { display: grid; grid-template-columns: 300px 1fr; gap: 36px; padding-block: 30px; }
.ace-mega-promo { position: relative; overflow: hidden; min-height: 300px; border-radius: var(--ace-radius); background: linear-gradient(135deg, #1c1f22 0%, var(--ace-red-dark) 130%); color: #fff; display: flex; align-items: flex-end; background-size: cover; background-position: center; }
.ace-mega-promo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 10, 10, .82) 20%, rgba(10, 10, 10, .15) 70%); }
.ace-mega-promo-body { position: relative; padding: 24px; }
.ace-mega-promo-body h3 { margin: 0 0 8px; color: #fff; font-size: 22px; line-height: 1.25; }
.ace-mega-promo-body p { margin: 0 0 16px; color: #d7dbde; font-size: 14px; }
.ace-mega-promo-btn { display: inline-block; padding: 10px 20px; background: var(--ace-red); color: #fff !important; border-radius: 6px; text-decoration: none; font-weight: 800; font-size: 14px; }
.ace-mega-promo-btn:hover { background: var(--ace-red-dark); }
.ace-mega-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 28px; margin: 0; padding: 0; list-style: none; align-content: start; }
.ace-mega-cols > .ace-sub-item > .ace-menu-link { padding: 8px 0; font-size: 15px; font-weight: 800; color: var(--ace-ink); }
.ace-mega-cols > .ace-sub-item > .ace-menu-link:hover { color: var(--ace-red); }
.ace-sub { margin: 2px 0 14px; padding: 0; list-style: none; }
.ace-sub .ace-menu-link { padding: 5px 0; font-size: 14px; font-weight: 500; color: var(--ace-muted); }
.ace-sub .ace-menu-link:hover { color: var(--ace-red); }

/* ---------- Header actions ---------- */
.ace-header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.ace-hbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--ace-ink); cursor: pointer; text-decoration: none; }
.ace-hbtn:hover { border-color: var(--ace-line); background: #f5f6f7; color: var(--ace-red); }
.ace-count-bubble { position: absolute; top: 2px; right: 0; min-width: 19px; height: 19px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; background: var(--ace-red); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 800; line-height: 1; }
.ace-count-bubble.is-empty { display: none; }
.ace-header-quote { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ace-ink); text-decoration: none; }
.ace-header-quote:hover { background: #f5f6f7; color: var(--ace-red); }
.ace-header-cta { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; padding: 11px 20px; background: var(--ace-red); color: #fff !important; border-radius: 6px; text-decoration: none; font-weight: 800; font-size: 14px; white-space: nowrap; }
.ace-header-cta:hover { background: var(--ace-red-dark); }
.ace-menu-toggle { display: none; flex-direction: column; gap: 5px; }
.ace-menu-toggle span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }

/* Mini cart */
.ace-cart-wrap { position: relative; }
.ace-mini-cart { position: absolute; right: 0; top: calc(100% + 12px); width: 340px; max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--ace-line); border-radius: var(--ace-radius); box-shadow: var(--ace-shadow); padding: 18px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s ease; z-index: 950; }
.ace-cart-wrap:hover .ace-mini-cart, .ace-cart-wrap:focus-within .ace-mini-cart { opacity: 1; visibility: visible; transform: translateY(0); }

/* Search panel */
.ace-search-panel { border-top: 1px solid var(--ace-line); background: #fafbfb; padding-block: 18px; }
.ace-search-panel form { display: flex; gap: 10px; max-width: 640px; margin-inline: auto; }
.ace-search-panel input[type="search"] { flex: 1; min-height: 48px; padding: 0 16px; border: 1px solid var(--ace-line); border-radius: 6px; font-size: 16px; }
.ace-search-panel button[type="submit"] { min-height: 48px; padding: 0 26px; border: 0; border-radius: 6px; background: var(--ace-red); color: #fff; font-weight: 800; cursor: pointer; }

/* ---------- Mobile drawer ---------- */
.ace-drawer-backdrop { position: fixed; inset: 0; z-index: 990; background: rgba(17, 19, 21, .6); }
.ace-mobile-drawer { position: fixed; z-index: 991; top: 0; bottom: 0; right: 0; width: min(92vw, 380px); background: #fff; display: flex; flex-direction: column; transform: translateX(105%); transition: transform .25s ease; box-shadow: -20px 0 60px rgba(0, 0, 0, .25); }
.ace-mobile-drawer.is-open { transform: translateX(0); }
.ace-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--ace-line); }
.ace-drawer-title { font-weight: 800; font-size: 18px; }
.ace-drawer-close { width: 40px; height: 40px; border: 0; background: #f0f2f3; border-radius: 50%; font-size: 24px; cursor: pointer; line-height: 1; }
.ace-drawer-nav { flex: 1; overflow-y: auto; padding: 10px 20px; }
.ace-drawer-menu, .ace-drawer-menu ul { margin: 0; padding: 0; list-style: none; }
.ace-drawer-menu .ace-menu-link { display: flex; width: 100%; padding: 12px 0; font-size: 16px; }
.ace-drawer-menu ul { display: none; padding-left: 14px; border-left: 2px solid var(--ace-line); margin: 4px 0 8px; }
.ace-drawer-menu li.is-open > ul { display: block; }
.ace-drawer-menu li.menu-item-has-children > .ace-menu-link { justify-content: space-between; }
.ace-drawer-foot { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-top: 1px solid var(--ace-line); }

/* Quote buttons (AJAX) */
.ace-add-to-quote.is-added { border-color: var(--ace-red); color: var(--ace-red) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ace-nav { display: none; }
  .ace-menu-toggle { display: inline-flex; }
  .ace-header-cta span { display: none; }
  .ace-header-cta { padding: 11px 13px; }
}
@media (max-width: 640px) {
  .ace-topbar-left .ace-topbar-link:last-child { display: none; }
  .ace-topbar { font-size: 12px; }
  .ace-header-inner { gap: 12px; }
  .ace-header-cta { display: none; }
  .ace-mega-inner { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ace-mega-panel, .ace-mobile-drawer, .ace-mini-cart { transition: none !important; }
}

/* ---------- Hand-coded panels: dropdown, info, media ---------- */
.ace-top-item.ace-has-drop { position: relative; }
.ace-mega-panel.ace-mega-drop { left: 0; right: auto; min-width: 260px; }
.ace-drop-list { margin: 0; padding: 12px 6px; list-style: none; }
.ace-drop-list .ace-menu-link { display: flex; padding: 9px 18px; font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.ace-drop-list .ace-menu-link::after { display: none; }

.ace-mega-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 30px; align-content: start; }
.ace-info-block h4 { margin: 0 0 10px; font-size: 14px; font-weight: 800; letter-spacing: .08em; color: var(--ace-ink); }
.ace-info-block p { margin: 0 0 7px; font-size: 14px; color: var(--ace-muted); }
.ace-mega-figure { overflow: hidden; border-radius: var(--ace-radius); min-height: 300px; background: #eceff1; }
.ace-mega-figure img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; display: block; }

/* ---------- Mobile drawer: hardcoded sections ---------- */
.ace-drawer-row { display: flex; align-items: center; }
.ace-drawer-row .ace-menu-link { flex: 1; }
.ace-drawer-toggle { flex: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ace-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ace-drawer-toggle svg { transition: transform .2s ease; }
.ace-drawer-item.is-open > .ace-drawer-row .ace-drawer-toggle svg { transform: rotate(180deg); }
.ace-drawer-sub { display: none; padding: 2px 0 10px 14px; border-left: 2px solid var(--ace-line); margin: 0 0 6px; }
.ace-drawer-item.is-open > .ace-drawer-sub { display: block; }
.ace-drawer-sec { margin-bottom: 12px; }
.ace-drawer-sec h5 { margin: 10px 0 4px; font-size: 13px; font-weight: 800; letter-spacing: .06em; color: var(--ace-ink); }
.ace-drawer-sec h5 a { color: inherit; text-decoration: none; }
.ace-drawer-sec ul { display: block; margin: 0; padding: 0; list-style: none; border: 0; }
.ace-drawer-sec li a { display: block; padding: 7px 0; font-size: 14.5px; color: var(--ace-muted); text-decoration: none; }
.ace-drawer-sec li a:hover { color: var(--ace-red); }
.ace-drawer-sec p { margin: 0 0 5px; font-size: 14px; color: var(--ace-muted); }
