/* Atlantic Firearms Mega Menu (ACS-923) — FO styles.
 * ID-scoped selectors (#af-megamenu ...) so they override the theme's
 * #main-nav rules (e.g. `#main-nav a{color:#fff}`) without !important wars. */

#af-megamenu { --af-blue:#0b4da2; --af-red:#d0021b; --af-ink:#1a1a2e;
  display:block !important; width:100% !important; background:#fff; border-top:1px solid #e5e5e5;
  border-bottom:none; position:sticky !important; top:0 !important; z-index:1000 !important; }

.af-megamenu-slot { padding:0 !important; }
#af-megamenu .af-mm__bar { display:flex; flex-wrap:nowrap; align-items:stretch;
  justify-content:space-between; width:100%; height:48px; gap:0;
  list-style:none; margin:0; padding:0; position:relative !important; }
header #af-megamenu .af-mm__bar > li,
header #af-megamenu .af-mm__bar .af-mm__item,
header #af-megamenu .af-mm__item--more,
#af-megamenu .af-mm__bar > li,
#af-megamenu .af-mm__bar .af-mm__item,
#af-megamenu .af-mm__item--more { position:static !important; list-style:none; display:flex; }
#af-megamenu .af-mm__toplink { display:flex; align-items:center; height:48px;
  padding:0 .85rem; font-weight:700; font-size:1.05rem; line-height:1;
  color:var(--af-ink); text-decoration:none; white-space:nowrap;
  border-bottom:3px solid transparent; }
#af-megamenu .af-mm__item:hover > .af-mm__toplink,
#af-megamenu .af-mm__item:focus-within > .af-mm__toplink {
  color:var(--af-blue); border-bottom-color:var(--af-blue); background:#f5f7fb; }

/* Full-width panel anchored to the bar, hidden until hover/focus */
header #af-megamenu .af-mm__panel,
#af-megamenu .af-mm__panel,
#af-megamenu .af-mm__item--more > .af-mm__panel { display:none; position:absolute !important; left:0 !important; right:0 !important; top:100% !important;
  width:100% !important; max-width:100% !important; min-width:100% !important; max-height:calc(92vh - 50px) !important; overflow-y:auto !important; box-sizing:border-box !important; z-index:1000 !important; background:#f7f8fa !important; border-top:1px solid #e5e5e5 !important;
  box-shadow:0 14px 30px rgba(0,0,0,.14) !important; padding:1rem 1.5rem !important; }
#af-megamenu .af-mm__panel::-webkit-scrollbar { width:6px; }
#af-megamenu .af-mm__panel::-webkit-scrollbar-track { background:#f1f3f7; border-radius:4px; }
#af-megamenu .af-mm__panel::-webkit-scrollbar-thumb { background:#c5cbd5; border-radius:4px; }
#af-megamenu .af-mm__panel::-webkit-scrollbar-thumb:hover { background:var(--af-blue); }
#af-megamenu .af-mm__item:hover > .af-mm__panel,
#af-megamenu .af-mm__item:focus-within > .af-mm__panel,
#af-megamenu .af-mm__item.is-open > .af-mm__panel { display:block !important; }

#af-megamenu .af-mm__cta { display:inline-block; border:1px solid var(--af-red);
  color:var(--af-red); font-weight:700; text-align:center; padding:.45rem 1rem;
  border-radius:6px; text-decoration:none; font-size:.88rem; }
#af-megamenu .af-mm__cta--top { display:block; width:100%; margin-bottom:.6rem; }
#af-megamenu .af-mm__cta--sidebar { background:var(--af-red); color:#fff; width:100%; margin-top:1rem; }
#af-megamenu .af-mm__cta:hover { background:var(--af-red); color:#fff; }

#af-megamenu .af-mm__inner { display:grid; grid-template-columns:260px 1fr; gap:2rem; align-items:start; max-width:1400px; margin:0 auto; }
#af-megamenu .af-mm__col-left { border-right:1px solid #e5e7ec; padding-right:1.5rem; }
#af-megamenu .af-mm__col-right { display:block; }
#af-megamenu .af-mm__subs { list-style:none; margin:0; padding:0; }

/* Image tiles — Most Popular Category (Figma: up to 5 per row) */
#af-megamenu .af-mm__tiles { display:grid; grid-template-columns:repeat(5,1fr); gap:1rem; margin-bottom:1.25rem; }
#af-megamenu .af-mm__tile { display:flex; flex-direction:column; text-decoration:none; color:var(--af-ink);
  border:1px solid #e5e7ec; border-radius:8px; overflow:hidden; background:#fff; height:100%; transition:box-shadow .15s,border-color .15s; }
#af-megamenu .af-mm__tile:hover { border-color:var(--af-blue); box-shadow:0 6px 16px rgba(0,0,0,.1); }
#af-megamenu .af-mm__tile-img { display:flex; align-items:center; justify-content:center; aspect-ratio:16/10; background:#fff; padding:8px; overflow:hidden; border-bottom:1px solid #f0f2f5; position:relative; flex-shrink:0; }
#af-megamenu .af-mm__tile-img img { max-width:100%; max-height:100%; object-fit:contain; display:block; transition:transform .2s ease; }
#af-megamenu .af-mm__tile:hover .af-mm__tile-img img { transform:scale(1.05); }
#af-megamenu .af-mm__tile-img--fallback { background:linear-gradient(135deg, #1e293b 0%, #0f172a 100%); border-bottom-color:#334155; user-select:none; transition:background .2s ease; }
#af-megamenu .af-mm__tile:hover .af-mm__tile-img--fallback { background:linear-gradient(135deg, #2563eb 0%, #1e40af 100%); }
#af-megamenu .af-mm__tile-initials { font-size:1.25rem; font-weight:700; color:#f8fafc; letter-spacing:0; text-transform:uppercase; font-family:inherit; display:flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:50%; background:rgba(255,255,255,0.12); border:1px solid rgba(255,255,255,0.25); box-shadow:inset 0 1px 2px rgba(255,255,255,0.2); transition:all .2s ease; margin: 0 auto; line-height:1; }
#af-megamenu .af-mm__tile:hover .af-mm__tile-initials { background:rgba(255,255,255,0.25); border-color:rgba(255,255,255,0.4); transform:scale(1.08); }
#af-megamenu .af-mm__tile-info { display:flex; flex-direction:column; justify-content:center; align-items:center; padding:.6rem .5rem; flex-grow:1; text-align:center; min-height:52px; }
#af-megamenu .af-mm__tile-name { font-weight:600; font-size:.82rem; padding:0; margin:0; line-height:1.25; color:#1a1a2e; text-align:center; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; text-overflow:ellipsis; word-break:break-word; }
#af-megamenu .af-mm__tile-count { color:#2f6fd0; font-size:.72rem; padding-top:.2rem; font-weight:500; text-align:center; }
@media (max-width:1200px){ #af-megamenu .af-mm__tiles { grid-template-columns:repeat(4,1fr); } }
#af-megamenu .af-mm__sub { margin:0; }
#af-megamenu .af-mm__sublink { display:flex; justify-content:space-between; align-items:center;
  gap:.75rem; padding:.35rem 0; color:var(--af-ink); text-decoration:none; border-bottom:1px solid #ececf0; font-size:.85rem; }
#af-megamenu .af-mm__sublink:hover { color:var(--af-red); }
#af-megamenu .af-mm__sub.is-active > .af-mm__sublink { color:var(--af-red); font-weight:700; }
#af-megamenu .af-mm__sub-nested-item a:hover,
#af-megamenu .af-mm__sub.is-active .af-mm__sub-nested-item a:hover { color:var(--af-red) !important; font-weight:600; }
#af-megamenu .af-mm__count { color:#9098a5; font-size:.82em; }
#af-megamenu .af-mm__sub--disabled .af-mm__sublink { color:#b3b3bb; pointer-events:none; }
#af-megamenu .af-mm__badge { background:#c0392b; color:#fff; font-size:.68em; font-weight:700;
  text-transform:uppercase; padding:.15em .55em; border-radius:3px; margin-left:.5rem; }

#af-megamenu .af-mm__label { display:block; text-transform:uppercase; color:#8a91a0;
  font-size:.7rem; letter-spacing:.05em; font-weight:700; margin:0 0 .4rem; }
#af-megamenu .af-mm__quicklinks { margin-bottom:.6rem; font-size:.84rem; }
#af-megamenu .af-mm__quicklinks a { color:var(--af-blue); text-decoration:none; margin-right:1rem; font-weight:600; transition: all 0.2s ease; }
#af-megamenu .af-mm__quicklinks a:hover { color:var(--af-blue); text-shadow: 0 0 8px rgba(11, 77, 162, 0.4); background:transparent; }
#af-megamenu .af-mm__chips { display:flex; flex-wrap:wrap; gap:.4rem; }
#af-megamenu .af-mm__chip { border:1px solid #d5d9e0; border-radius:20px; padding:.25rem .75rem;
  text-decoration:none; color:var(--af-ink); font-size:.82rem; background:#fff; transition:all .15s ease; }
#af-megamenu .af-mm__chip:hover { border-color:var(--af-blue); color:var(--af-blue); }
#af-megamenu .af-mm__chip--all { border-color:var(--af-red) !important; color:var(--af-red) !important; font-weight:600; }
#af-megamenu .af-mm__chip--all:hover { background:var(--af-red) !important; color:#fff !important; }

/* Mobile Header & Off-canvas Drawer (ACS-870 Figma 1-to-1 match) */
.af-header-mobile { background:#ffffff !important; padding:10px 16px !important; width:100% !important; box-sizing:border-box !important; border-bottom:1px solid #e5e7eb !important; box-shadow:0 2px 6px rgba(0,0,0,.04) !important; }
.af-header-mobile__l1 { display:flex !important; align-items:center !important; justify-content:space-between !important; width:100% !important; gap:8px !important; margin-bottom:10px !important; padding:0 !important; min-height:52px !important; height:auto !important; }
.af-header__mobile-burger { background:transparent !important; border:none !important; color:#1a1a2e !important; cursor:pointer !important; padding:0 !important; margin:0 !important; display:flex !important; align-items:center !important; justify-content:center !important; width:36px !important; height:36px !important; line-height:1 !important; }
.af-header__mobile-burger i { font-size:26px !important; color:#1a1a2e !important; margin:0 !important; padding:0 !important; line-height:1 !important; }
.af-header-mobile__logo img { height:64px !important; width:auto !important; display:block !important; object-fit:contain !important; }

/* Mobile topbar right action — Cart ONLY (Sign In is inside the mobile drawer) */
.af-header-mobile__actions { display:flex !important; align-items:center !important; justify-content:flex-end !important; margin:0 !important; padding:0 !important; width:36px !important; height:36px !important; }
.af-header-mobile__actions .af-header__action,
.af-header-mobile__actions .blockcart,
.af-header-mobile__actions #_desktop_cart,
.af-header-mobile__actions .header { display:flex !important; align-items:center !important; justify-content:center !important; position:relative !important; margin:0 !important; padding:0 !important; border:none !important; background:transparent !important; box-shadow:none !important; float:none !important; width:36px !important; height:36px !important; line-height:1 !important; }
.af-header-mobile__actions .af-header__action--cart,
.af-header-mobile__actions .af-header__action--cart .blockcart,
.af-header-mobile__actions .af-header__action--cart a.header { margin-top:6px !important; transform:translateY(2px) !important; }
.af-header-mobile__actions i,
.af-header-mobile__actions .material-icons { color:#1a1a2e !important; font-size:26px !important; margin:0 !important; padding:0 !important; line-height:1 !important; }
.af-header-mobile__actions span, .af-header-mobile__actions a { color:#1a1a2e !important; text-decoration:none !important; margin:0 !important; padding:0 !important; }

/* Remove ugly shadow on cart products count badge */
.af-header-mobile__actions .cart-products-count,
.blockcart .cart-products-count {
  box-shadow:none !important;
  background:#d0021b !important;
  color:#ffffff !important;
  font-size:11px !important;
  font-weight:700 !important;
  width:18px !important;
  height:18px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  line-height:1.5 !important;
  border-radius:50% !important;
  position:absolute !important;
  top:-2px !important;
  right:-4px !important;
  margin:0 !important;
  padding:0 !important;
}

/* Hide user info icon on mobile topbar (Sign In is in drawer per Figma) */
@media (max-width:991px) {
  #_desktop_user_info,
  .user-info,
  .af-header__action--user { display:none !important; }
}

/* Mobile Search Bar (white input box + red search square on right, NO text label) */
.af-header-mobile__l2 .search-widgets,
.af-header-mobile__l2 #search_widget { width:100% !important; margin:0 !important; }
.af-header-mobile__l2 form { display:flex !important; flex-direction:row !important; width:100% !important; align-items:stretch !important; background:#f8f9fa !important; border:1px solid #e0e0e0 !important; border-radius:6px !important; overflow:hidden !important; height:42px !important; margin:0 !important; }
.af-header-mobile__l2 input[type="text"],
.af-header-mobile__l2 input[name="s"] { flex:1 1 auto !important; width:100% !important; min-width:0 !important; height:40px !important; line-height:38px !important; border:none !important; padding:0 12px 2px 12px !important; margin-top:-2px !important; font-size:.9rem !important; background:transparent !important; color:#1a1a2e !important; text-overflow:ellipsis !important; white-space:nowrap !important; overflow:hidden !important; box-sizing:border-box !important; }
.af-header-mobile__l2 form button[type="submit"] { flex:0 0 46px !important; width:46px !important; height:40px !important; background:#d0021b !important; color:#ffffff !important; border:none !important; display:flex !important; align-items:center !important; justify-content:center !important; cursor:pointer !important; padding:0 !important; margin:0 !important; border-radius:0 5px 5px 0 !important; box-sizing:border-box !important; }
.af-header-mobile__l2 form button i { color:#ffffff !important; font-size:22px !important; position:static !important; float:none !important; margin:0 !important; padding:0 !important; display:flex !important; align-items:center !important; justify-content:center !important; line-height:1 !important; height:100% !important; }
.af-header-mobile__l2 .search-btn-text,
#search_widget .search-btn-text { display:none !important; }

.af-mobile-drawer { position:fixed !important; top:0 !important; left:0 !important; width:100% !important; height:100% !important; z-index:99999 !important; display:none; }
.af-mobile-drawer.is-open { display:block !important; }
.af-mobile-drawer__overlay { position:absolute !important; top:0 !important; left:0 !important; width:100% !important; height:100% !important; background:rgba(0,0,0,.5) !important; }
.af-mobile-drawer__content { position:absolute !important; top:0 !important; left:0 !important; width:85% !important; max-width:340px !important; height:100% !important; background:#ffffff !important; display:flex !important; flex-direction:column !important; z-index:10 !important; box-shadow:4px 0 20px rgba(0,0,0,.25) !important; }
.af-mobile-drawer__header { display:flex !important; align-items:center !important; justify-content:space-between !important; padding:14px 18px !important; background:#0b4da2 !important; color:#ffffff !important; font-weight:700 !important; font-size:1.05rem !important; letter-spacing:.03em !important; }
.af-mobile-drawer__title { color:#ffffff !important; font-weight:700 !important; font-size:1.05rem !important; }
.af-mobile-drawer__close { background:transparent !important; border:none !important; color:#ffffff !important; font-size:24px !important; cursor:pointer !important; line-height:1 !important; }
.af-mobile-drawer__body { flex:1 1 auto !important; overflow-y:auto !important; padding:0 !important; background:#ffffff !important; }

/* Top action buttons: Sign In + FFL Finder */
.af-mobile-drawer__top-actions { display:grid !important; grid-template-columns:1fr 1fr !important; gap:10px !important; padding:16px !important; border-bottom:1px solid #ececf0 !important; background:#ffffff !important; }
.af-mb-btn { display:inline-flex !important; align-items:center !important; justify-content:center !important; gap:6px !important; height:42px !important; border-radius:6px !important; font-size:.88rem !important; font-weight:600 !important; text-decoration:none !important; box-sizing:border-box !important; }
.af-mb-btn--signin { background:#0b4da2 !important; color:#ffffff !important; border:1px solid #0b4da2 !important; }
.af-mb-btn--signin i, .af-mb-btn--signin span { color:#ffffff !important; }
.af-mb-btn--ffl { background:#ffffff !important; color:#0b4da2 !important; border:1px solid #0b4da2 !important; }
.af-mb-btn--ffl i, .af-mb-btn--ffl span { color:#0b4da2 !important; }
.af-mb-btn i { font-size:18px !important; }

/* Mobile category list */
.af-mm__bar-mobile { list-style:none !important; margin:0 !important; padding:0 !important; background:#ffffff !important; }
.af-mm__item-mobile { border-bottom:1px solid #ececf0 !important; background:#ffffff !important; }
.af-mm__toprow-mobile { display:flex !important; align-items:center !important; justify-content:space-between !important; padding:12px 18px !important; min-height:48px !important; box-sizing:border-box !important; }
.af-mm__link-mobile { color:#1a1a2e !important; font-weight:700 !important; text-decoration:none !important; font-size:1.05rem !important; flex:1 1 auto !important; opacity:1 !important; visibility:visible !important; display:block !important; }
.af-mm__toggle-mobile { background:transparent !important; border:none !important; cursor:pointer !important; padding:4px 8px !important; color:#666666 !important; transition:transform .2s ease !important; }
.af-mm__item-mobile.is-open .af-mm__toggle-mobile { transform:rotate(180deg) !important; }

/* Mobile subcategory level 2 & circle thumbnails */
.af-mm__sublist-mobile { display:none; list-style:none !important; margin:0 !important; padding:0 !important; background:#fafbfc !important; border-top:1px solid #f0f2f5 !important; }
.af-mm__item-mobile.is-open .af-mm__sublist-mobile { display:block !important; }
.af-mm__subitem-mobile { border-bottom:1px solid #f0f2f5 !important; }
.af-mm__subitem-mobile > a, .af-mm__subitem-mobile .af-mm__subname { display:flex !important; justify-content:space-between !important; align-items:center !important; padding:4px 18px 4px 24px !important; color:#1a1a2e !important; text-decoration:none !important; font-size:1.05rem !important; font-weight:700 !important; min-height:48px !important; box-sizing:border-box !important; }
.af-mm__subright-mobile { display:flex !important; align-items:center !important; gap:8px !important; margin-left:auto !important; }
.af-mm__subthumb-mobile { width:64px !important; height:38px !important; border-radius:0 !important; overflow:hidden !important; display:inline-flex !important; align-items:center !important; justify-content:center !important; background:#ffffff !important; border:1px solid #dcdfe6 !important; flex-shrink:0 !important; margin-left:6px !important; box-shadow:0 1px 3px rgba(0,0,0,.08) !important; }
.af-mm__subthumb-mobile img { width:100% !important; height:100% !important; object-fit:cover !important; display:block !important; }
.af-mm__subthumb-mobile--fallback { background:linear-gradient(135deg, #0b4da2 0%, #1e40af 100%) !important; color:#ffffff !important; font-size:11px !important; font-weight:700 !important; border:none !important; }
.af-mm__subthumb-mobile--fallback span { color:#ffffff !important; font-weight:700 !important; line-height:1 !important; }

/* Level 3 nested sub-items (AK, AR, Tactical, Semi under Level 2 parent) */
.af-mm__sublist-mobile-nested { list-style:none !important; margin:2px 0 6px 0 !important; padding:0 !important; border-left:none !important; background:#ffffff !important; }
.af-mm__subitem-mobile-nested { margin-bottom:0 !important; border-bottom:1px solid #f8f9fa !important; }
.af-mm__subitem-mobile-nested > a { display:flex !important; justify-content:space-between !important; align-items:center !important; min-height:42px !important; padding:8px 18px 8px 68px !important; font-size:1.05rem !important; font-weight:700 !important; color:#1a1a2e !important; text-decoration:none !important; box-sizing:border-box !important; transition:background .15s ease, color .15s ease !important; }
.af-mm__subitem-mobile-nested > a:hover, .af-mm__subitem-mobile-nested > a:focus { color:#0b4da2 !important; background:#f0f4fa !important; }
.af-mm__subitem-name { flex:1 1 auto !important; font-weight:700 !important; color:#334155 !important; }

.af-mm__subitem-mobile.is-disabled { color:#b3b3bb !important; }
.af-mm__subcount { color:#9098a5 !important; font-size:.84rem !important; font-weight:600 !important; }
.af-mm__badge-soldout { background:#8a91a0 !important; color:#ffffff !important; font-size:.65rem !important; font-weight:700 !important; padding:2px 6px !important; border-radius:3px !important; }

/* Red CTA at bottom of expanded subcategory list */
.af-mm__cta-mobile { padding:14px 18px !important; }
.af-mm__cta-btn-mobile { display:flex !important; align-items:center !important; justify-content:center !important; width:100% !important; height:44px !important; background:#d0021b !important; color:#ffffff !important; font-weight:700 !important; font-size:.95rem !important; text-decoration:none !important; border-radius:6px !important; box-sizing:border-box !important; }

/* Visual section header separating catalog and L1 links */
.af-mobile-drawer__section-header { display:block !important; padding:10px 18px !important; background:#f0f3f8 !important; color:#5a6474 !important; font-size:.78rem !important; font-weight:700 !important; text-transform:uppercase !important; letter-spacing:.06em !important; border-top:2px solid #e2e8f0 !important; border-bottom:1px solid #e2e8f0 !important; margin-top:4px !important; }

/* Bottom CMS links (L1 top links) */
.af-mobile-drawer__links { padding:16px 18px !important; display:flex !important; flex-direction:column !important; gap:14px !important; background:#ffffff !important; }
.af-mobile-drawer__links a { color:#0b4da2 !important; text-decoration:none !important; font-size:1.05rem !important; font-weight:700 !important; display:flex !important; align-items:center !important; justify-content:space-between !important; }

/* Footer bar in drawer */
.af-mobile-drawer__footer { background:#eef4ff !important; color:#0b4da2 !important; text-align:center !important; padding:12px 14px !important; font-size:.78rem !important; font-weight:600 !important; border-top:1px solid #dbe6ff !important; }
.af-mobile-drawer__footer a { color:#0b4da2 !important; text-decoration:underline !important; }

/* Explicit 992px breakpoint utilities */
@media (min-width:992px) {
  .hidden-lg-up { display:none !important; }
  .af-header-mobile { display:none !important; }
}
@media (max-width:991px) {
  .hidden-md-down { display:none !important; }
  .af-header__l1, .af-header__l2, #af-megamenu .af-mm__bar { display:none !important; }
  .af-header__l3 { background:transparent !important; border:none !important; box-shadow:none !important; position:static !important; padding:0 !important; }
}

/* ============================================================= */
/* ACS-923 — 3-level header (desktop only, >=992px)              */
/* ============================================================= */
.af-header { display:block; width:100%; position:relative; z-index:500; font-family:inherit; }
.af-header__container { max-width:1400px; width:100%; margin:0 auto; padding:0 1.5rem; box-sizing:border-box; }

/* L1 — quick links */
.af-header__l1 { background:#0a2540; color:#fff; font-size:.95rem; width:100%; }
.af-header__l1 .af-header__container { display:flex; justify-content:space-between; align-items:center; min-height:38px; }
.af-header__l1-left, .af-header__l1-right { display:flex; align-items:center; flex-wrap:wrap; gap:.25rem; }
.af-header__l1 a { color:#cdd7e5 !important; text-decoration:none; padding:.35rem .75rem; display:inline-flex; align-items:center; transition:color .15s ease; font-weight:600; font-size:.95rem; }
.af-header__l1 a:hover { color:#fff !important; text-decoration:underline; }
/* Flatten ps_linklist's bootstrap/column markup into a single inline row */
.af-header__l1 .links,
.af-header__l1 .row,
.af-header__l1 .wrapper,
.af-header__l1 [class*="col-md"] { display:contents !important; }
.af-header__l1 .h3,
.af-header__l1 .title,
.af-header__l1 h3 { display:none !important; }
.af-header__l1 ul,
.af-header__l1 ul.collapse { display:flex !important; flex-wrap:wrap; align-items:center;
  list-style:none; margin:0; padding:0; height:auto; }
.af-header__l1 li { list-style:none; }

/* L2 — logo + search + actions */
.af-header__l2 { background:#0b4da2; width:100%; position:relative; overflow:hidden; }
.af-header__l2 .af-header__container { display:flex; align-items:center; justify-content:space-between; gap:2rem; min-height:96px; padding:0 1.5rem; position:relative; }
.af-header__logo { position:relative; flex:0 0 auto; display:flex; align-items:center; min-height:96px; margin-left:calc(-50vw + 50% - 1.5rem); padding-left:0.5rem; padding-right:3rem; background:#ffffff; -webkit-clip-path:polygon(0 0, calc(100% - 24px) 0, 100% 50%, calc(100% - 24px) 100%, 0 100%); clip-path:polygon(0 0, calc(100% - 24px) 0, 100% 50%, calc(100% - 24px) 100%, 0 100%); border-radius:0; text-decoration:none; z-index:2; }
.af-header__logo img { position:relative; z-index:1; height:68px; width:auto; max-width:none; display:block; object-fit:contain; margin-left:-4px; }
.af-header__search { flex:0 1 540px; max-width:540px; }
.af-header__search .search-widgets,
.af-header__search #search_widget,
#checkout #search_widget { width:100%; margin:0; display:block !important; }
.af-header__search form,
#search_widget form { display:flex !important; flex-direction:row !important; width:100%; align-items:stretch; background:#fff; border-radius:6px; overflow:hidden; height:46px; margin:0; }
.af-header__search input[type="text"],
.af-header__search input[name="s"],
.af-header__search .ui-autocomplete-input { flex:1 1 auto; width:100% !important; min-width:0;
  height:46px !important; border:0 !important; padding:0 1.25rem !important; font-size:1rem !important; box-shadow:none !important; background:#fff !important; color:#1a1a2e !important; display:block !important; }
#search_widget form button,
#search_widget form button[type="submit"],
.af-header__search form button,
.af-header__search form button[type="submit"] { flex:0 0 auto !important; background:#d0021b !important; color:#ffffff !important;
  height:46px !important; width:auto !important; padding:0 24px !important; display:inline-flex !important; align-items:center !important; justify-content:center !important; gap:8px !important;
  cursor:pointer !important; border:none !important; margin:0 !important; border-radius:0 6px 6px 0 !important; transition:background .15s ease !important; box-shadow:none !important; }
#search_widget form button:hover,
#search_widget form button[type="submit"]:hover,
.af-header__search form button:hover,
.af-header__search form button[type="submit"]:hover { background:#b00217 !important; }

#search_widget form i,
#search_widget form .material-icons.search,
.af-header__search form button i,
.af-header__search form .material-icons.search { background:transparent !important; border-radius:0 !important; height:auto !important; width:auto !important; padding:0 !important; margin:0 !important; color:#ffffff !important; font-size:20px !important; line-height:1 !important; position:static !important; float:none !important; display:inline-block !important; vertical-align:middle !important; }

@media (min-width:992px) {
  .af-header__search .search-btn-text,
  #search_widget form .search-btn-text { color:#ffffff !important; font-weight:600 !important; font-size:.95rem !important; line-height:1 !important; display:inline-block !important; position:static !important; float:none !important; margin:0 !important; padding:0 !important; vertical-align:middle !important; }
}
.af-header__search .material-icons.clear,
.af-header__search .ui-helper-hidden-accessible { display:none !important; }

/* Action icons (FFL, Account, Cart) — Vertical layout matching Figma */
.af-header__actions { flex:0 0 auto; display:flex; align-items:center; gap:2rem; margin-left:auto; }

.af-header__action,
.af-header__actions #_desktop_cart,
.af-header__actions #_desktop_user_info,
.af-header__actions .blockcart,
.af-header__actions .user-info {
  background:transparent !important;
  position:static !important;
  float:none !important;
  padding:0 !important;
  margin:0 !important;
  width:auto !important;
  height:auto !important;
  line-height:1 !important;
  box-shadow:none !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  cursor:pointer !important;
}

.af-header__actions .user-info.user-logggedin,
.af-header__actions #_desktop_user_info.user-logggedin .user-info {
  flex-direction: row !important;
  gap: 1.25rem !important;
}

.af-header__actions a,
.af-header__action,
.af-header__actions #_desktop_user_info a,
.af-header__actions #_desktop_cart a,
.af-header__actions .blockcart .header a {
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  color:#ffffff !important;
  text-decoration:none !important;
  font-size:.78rem !important;
  font-weight:600 !important;
  position:relative !important;
  background:transparent !important;
  padding:0 !important;
  margin:0 !important;
  text-align:center !important;
  cursor:pointer !important;
  transition:opacity .18s ease, transform .18s ease !important;
}

.af-header__actions a:hover,
.af-header__action:hover,
.af-header__actions #_desktop_user_info a:hover,
.af-header__actions #_desktop_cart a:hover,
.af-header__actions .blockcart .header a:hover {
  opacity:.88 !important;
  transform:translateY(-2px) !important;
  color:#ffffff !important;
  text-decoration:none !important;
}

.af-header__actions i.material-icons,
.af-header__actions #_desktop_user_info i.material-icons,
.af-header__actions #_desktop_cart i.material-icons,
.af-header__actions i.shopping-cart {
  font-size:26px !important;
  color:#ffffff !important;
  margin-bottom:2px !important;
  text-shadow:none !important;
  display:block !important;
  text-align:center !important;
  cursor:pointer !important;
  transition:transform .18s ease !important;
}

.af-header__actions a:hover i.material-icons,
.af-header__action:hover i.material-icons {
  transform:scale(1.1) !important;
}

.af-header__actions span,
.af-header__actions span.hidden-sm-down,
.af-header__actions .user-info span,
.af-header__actions .af-header__action span {
  display:block !important;
  color:#ffffff !important;
  font-size:.78rem !important;
  font-weight:600 !important;
  line-height:1.2 !important;
  text-shadow:none !important;
  text-align:center !important;
  margin:0 !important;
  padding:0 !important;
}

/* Cart badge - red circle badge at top right of cart icon */
.af-header__actions .blockcart {
  background:transparent !important;
  height:auto !important;
  padding:0 !important;
  margin:0 !important;
}

.af-header__actions .blockcart .header {
  position:relative !important;
  margin:0 !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
}

.af-header__actions .cart-products-count {
  position:absolute !important;
  top:-6px !important;
  right:-10px !important;
  background:#d0021b !important;
  color:#ffffff !important;
  font-size:.68rem !important;
  font-weight:700 !important;
  width:18px !important;
  height:18px !important;
  border-radius:50% !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 !important;
  line-height:1.5 !important;
  box-shadow:none !important;
  z-index:10 !important;
}

/* L3 — mega menu bar (100% full-width white bar, desktop only) */
@media (min-width:992px) {
  .af-header__l3 { background:#ffffff; width:100%; border-bottom:none; box-shadow:0 2px 8px rgba(0,0,0,.05); position:relative; }
  .af-header__l3 .af-header__container { padding:0 0.5rem; }

  #af-megamenu { display:block; width:100%; background:transparent; border:none; position:relative; }
  #af-megamenu .af-mm__bar { display:flex; flex-wrap:nowrap; align-items:stretch; justify-content:space-between; width:100%; height:48px; gap:0; list-style:none; margin:0; padding:0; }
  #af-megamenu .af-mm__item { position:static; list-style:none; display:flex; }
  #af-megamenu .af-mm__toplink { display:flex; align-items:center; height:48px; padding:0 0.45rem; font-weight:600; font-size:1.00rem; line-height:1; color:#1a1a2e; text-decoration:none; white-space:nowrap; border-bottom:3px solid transparent; transition:all .15s ease; }
  #af-megamenu .af-mm__item:hover > .af-mm__toplink,
  #af-megamenu .af-mm__item:focus-within > .af-mm__toplink { color:#0b4da2; border-bottom-color:#0b4da2; background:#f4f6fa; }

  #af-megamenu .af-mm__item--more { position:static !important; margin-left:auto !important; display:none; }
  #af-megamenu .af-mm__item--more > .af-mm__toplink { color:#0b4da2; font-weight:700; background:#f4f6fa; border-radius:4px 4px 0 0; }
  #af-megamenu .af-mm__item--more > .af-mm__panel { position:absolute !important; left:0 !important; right:0 !important; width:100% !important; max-width:100% !important; top:100% !important; box-sizing:border-box !important; }

  header #af-megamenu .af-mm__item:not(.af-mm__item--more) .af-mm__subs,
  #af-megamenu .af-mm__item:not(.af-mm__item--more) .af-mm__subs { max-height:none !important; overflow:visible !important; padding-right:0 !important; }

  header #af-megamenu .af-mm__more-subs,
  #af-megamenu .af-mm__more-subs,
  header #af-megamenu .af-mm__col-left--more .af-mm__subs,
  #af-megamenu .af-mm__col-left--more .af-mm__subs { max-height:calc(85vh - 140px) !important; max-height:480px !important; overflow-y:auto !important; padding-right:.4rem !important; }
  header #af-megamenu .af-mm__col-right,
  #af-megamenu .af-mm__col-right { overflow:visible !important; max-height:none !important; }

  #af-megamenu .af-mm__more-subs .af-mm__sublink { padding:.45rem .6rem; border-radius:4px; transition:all .15s ease; }
  #af-megamenu .af-mm__more-subs .af-mm__arrow-right { font-size:1.1rem; line-height:1; color:#9098a5; transition:transform .15s ease; margin-left:auto; }
  #af-megamenu .af-mm__more-subs .af-mm__sub.is-active > .af-mm__sublink,
  #af-megamenu .af-mm__more-subs .af-mm__sublink:hover { color:var(--af-blue); font-weight:700; background:#f4f6fa; }
  #af-megamenu .af-mm__more-subs .af-mm__sub.is-active > .af-mm__sublink .af-mm__arrow-right,
  #af-megamenu .af-mm__more-subs .af-mm__sublink:hover .af-mm__arrow-right { color:var(--af-blue); transform:translateX(3px); }

  #af-megamenu .af-mm__more-target { display:grid; grid-template-columns:240px 1fr; gap:2rem; align-items:start; }
  #af-megamenu .af-mm__more-target .af-mm__tiles { grid-template-columns:repeat(auto-fill, minmax(130px, 1fr)); }
}

@media (max-width:1100px) {
  .af-header__logo img { max-width:220px; }
  .af-header__l2 .af-header__container { gap:1rem; }
}

/* ACS-923 — 100% full-width site-wide (no left/right sidebar columns across all pages) */
#content-wrapper.af-content-fullwidth,
#content-wrapper { width:100% !important; max-width:100% !important; flex:0 0 100% !important; padding:0 !important; }
#left-column, #right-column { display:none !important; }

/* Mobile Homepage Category Tiles Grid Centering & Equal Minimal Margins */
@media (max-width:991px) {
  .trending-categories.ets_baw_display_banner,
  .belvg-trending-section .trending-categories {
    width:100% !important;
    max-width:100% !important;
    margin:1rem auto !important;
    padding:0 12px !important;
    box-sizing:border-box !important;
    float:none !important;
    left:0 !important;
    right:0 !important;
  }

  .ets_baw_display_banner .button-grid {
    display:grid !important;
    grid-template-columns:repeat(2, 1fr) !important;
    gap:10px !important;
    width:100% !important;
    max-width:100% !important;
    margin:0 auto !important;
    padding:0 !important;
    box-sizing:border-box !important;
  }

  .ets_baw_display_banner .grid-link {
    display:flex !important;
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  .ets_baw_display_banner .grid-button {
    width:100% !important;
    height:100% !important;
    min-height:52px !important;
    text-align:center !important;
    box-sizing:border-box !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
  }
}

/* ------------------------------------------------------------------ */
/* ACS-990 — SEO/GEO markup: routed <button> controls and lazy thumbs   */
/* Pixel parity with the legacy markup is the hard requirement here:    */
/* only the UA button defaults that the component classes do NOT set    */
/* are reset, so no declaration above is overridden.                    */
/* ------------------------------------------------------------------ */

#af-megamenu button.af-mm__tile,
#af-megamenu button.af-mm__chip,
#af-megamenu button.af-mm__cta,
button.af-mm__cta-btn-mobile {
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}
/* .af-mm__tile sets no font/padding of its own — the old <a> inherited them. */
#af-megamenu button.af-mm__tile { font-size: inherit; font-weight: inherit; padding: 0; width: 100%; }
/* .af-mm__chip / .af-mm__cta already declare border, background, padding,
   font-size and font-weight — left untouched on purpose. */
/* .af-mm__cta declares no background — the old <a> let the panel show through,
   so the button's UA `buttonface` fill has to be cleared (and only there). */
#af-megamenu button.af-mm__cta { background-color: transparent; }
#af-megamenu button.af-mm__cta:hover { background-color: var(--af-red); }
#af-megamenu button.af-mm__cta--sidebar { background-color: var(--af-red); }
#af-megamenu button.af-mm__cta--top,
#af-megamenu button.af-mm__cta--half,
#af-megamenu button.af-mm__cta--sidebar { width: 100%; }
button.af-mm__cta-btn-mobile { border: 0 !important; }

/* Overflow ("More") rows and mobile level-3 rows carry data-url instead of
   href; they reuse the exact same classes, so only the pointer changes. */
#af-megamenu .af-mm__sublink[data-url] { cursor: pointer; }
.af-mm__subitem-mobile-nested > [role="link"] {
  display: flex !important; justify-content: space-between !important; align-items: center !important;
  min-height: 42px !important; padding: 8px 18px 8px 68px !important; font-size: 1.05rem !important;
  font-weight: 700 !important; color: #1a1a2e !important; text-decoration: none !important;
  box-sizing: border-box !important; cursor: pointer !important;
  transition: background .15s ease, color .15s ease !important;
}
.af-mm__subitem-mobile-nested > [role="link"]:hover,
.af-mm__subitem-mobile-nested > [role="link"]:focus { color: #0b4da2 !important; background: #f0f4fa !important; }

/* Thumbnails: no <img> in the payload. The inner element reproduces exactly
   what the old <img> did — contain-fit inside the padding box, plus the same
   1.05 hover zoom. */
#af-megamenu .af-mm__tile-bg {
  width: 100%; height: 100%;
  background-size: contain; background-position: center; background-repeat: no-repeat;
  transition: transform .2s ease;
}
#af-megamenu .af-mm__tile:hover .af-mm__tile-bg { transform: scale(1.05); }
/* The image itself is set inline with priority (the base rule declares
   `background: #fff !important`); these only control how it is drawn. */
.af-mm__subthumb-mobile[style*="background-image"] {
  background-size: cover !important; background-position: center !important; background-repeat: no-repeat !important;
}

@media (prefers-reduced-motion: reduce) {
  #af-megamenu .af-mm__tile-bg,
  #af-megamenu .af-mm__tile,
  #af-megamenu .af-mm__chip { transition: none; }
  #af-megamenu .af-mm__tile:hover .af-mm__tile-bg { transform: none; }
}
