
header .afs-flooring-menu { position:relative; }
header .afs-flooring-menu > summary { cursor:pointer; list-style:none; padding:.65rem .45rem; white-space:nowrap; }
header .afs-flooring-menu > summary::-webkit-details-marker { display:none; }
header .afs-flooring-menu > summary::after { content:" ▾"; font-size:.8em; }
header .afs-flooring-menu > nav { position:absolute; display:grid; z-index:50; background:#fff; min-width:245px; max-height:65vh; overflow:auto; border:1px solid #d7c8b7; }
header .afs-flooring-menu:not([open]) > nav { display:none; }
header .afs-flooring-menu > nav > a { display:block; padding:.55rem .8rem; }
header .afs-flooring-menu > nav > a:hover { background:#f1e7dc; }
.afs-product-directory :is(h2,h2 > a,h3,.afs-directory-all) { font-size:16px !important; font-weight:700 !important; }
#catalog:not(:has(#catalog-type option:checked:is([value="flooring"],[value="carpet"],[value="broadloom"],[value="carpet-tile"],[value="resilient"]))) :is(details[data-family="Flooring"],.catalog-category-tabs a[href*="group=flooring"]) { display:none !important; }
@media (max-width:999px) {
  header .afs-flooring-menu > nav { position:static; min-width:0; max-height:none; }
  header .afs-flooring-menu > nav > a { min-height:44px; }
}

/* The Flooring dropdown is anchored to its own heading. */
header details.afs-flooring-menu.afs-flooring-menu { position:relative !important; }
header details.afs-flooring-menu.afs-flooring-menu > nav {
  inset:100% auto auto 0 !important;
  width:238px !important;
  min-width:0 !important;
  max-width:calc(100vw - 24px) !important;
  grid-template-columns:minmax(0,1fr) !important;
  gap:0 !important;
  padding:4px !important;
  margin:0 !important;
}
header details.afs-flooring-menu.afs-flooring-menu > nav > a {
  min-height:0;
  padding:6px 9px !important;
  font-size:14px;
  line-height:1.3;
}
@media (max-width:999px) {
  header details.afs-flooring-menu.afs-flooring-menu > nav { position:static !important; width:auto !important; }
  header details.afs-flooring-menu.afs-flooring-menu > nav > a { min-height:40px; }
}
#catalog:has(#catalog-type option:checked:is([value="flooring"],[value="carpet"],[value="broadloom"],[value="carpet-tile"],[value="resilient"]))
  :is(#browse-by-space,.catalog-category-tabs,.hc-choices > details[data-family]:not([data-family="Flooring"])) { display:none !important; }

/* Match the homepage Furniture panel on compact desktop headers. */
@media (min-width: 1000px) {
  body.afs-inside-compact header.afs-unified-header.afs-catalog-directory-header details.afs-products-menu.afs-products-menu[open] > nav.afs-product-directory {
    inset: 100% auto auto 0 !important;
    width: 100% !important;
    max-width: none !important;
    transform: none !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    align-items: start;
    column-gap: clamp(.75rem, 1.5vw, 1.5rem);
    padding-inline: clamp(1.25rem, 4vw, 4rem);
    border-radius: 0 !important;
    box-sizing: border-box;
  }
}

body header.afs-unified-header.afs-catalog-directory-header nav.afs-unified-nav details.afs-products-menu[open] nav.afs-product-directory .afs-directory-subgroup > a {padding-left:.4rem !important}
@media (min-width:1000px) {
  body header.afs-unified-header.afs-catalog-directory-header nav.afs-unified-nav details.afs-products-menu.afs-products-menu[open] > nav.afs-product-directory {
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
    padding-inline:47px !important;
  }
  body header.afs-unified-header.afs-catalog-directory-header nav.afs-unified-nav .afs-product-directory > a.afs-directory-all {
    padding-inline-start:0 !important;
  }
}

header .afs-flooring-menu > summary[aria-current="true"] { color:#963c15; font-weight:700; box-shadow:inset 0 -2px #963c15; }

header nav[aria-label="Flooring navigation"] > a[href="/flooring/"] { color:#963c15; font-weight:700; box-shadow:inset 0 -2px #963c15; }
