/* Loaded after Journal's generated and Lorenzo stylesheet rules. */
@media (min-width: 1025px) {
  .desktop-header-active .header-compact.header-sm .degerli-header-row .main-menu > .j-menu > .menu-item > a {
    font-size: 10px !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .main-menu > .j-menu > .mega-menu > .j-dropdown {
    width: min(720px, calc(100vw - 48px)) !important;
    top: 100% !important;
    left: 50% !important;
    right: auto !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    transform: translate3d(-50%, 0, 0) !important;
    background: #fff !important;
    border: 1px solid rgba(74, 43, 35, .14) !important;
    box-shadow: 0 18px 42px rgba(35, 24, 21, .16) !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu > .j-dropdown::before {
    display: none !important;
  }

  /* Journal's generated mega-menu rows add a separate 100vw white backdrop
     through ::before. It sits outside the restrained dropdown and is the
     source of the oversized detached panel. */
  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .grid-row::before {
    content: none !important;
    display: none !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .mega-menu-content {
    width: 100% !important;
    max-height: min(360px, calc(100vh - 138px));
    overflow: auto;
  }

  /* The existing menu-banner assets are currently rendering broken-image
     placeholders. Make the dynamic category links the complete menu instead. */
  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .grid-col:has(.module-banners) {
    display: none !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .grid-cols > .grid-col:not(:has(.module-banners)) {
    width: 100% !important;
    padding: 0 !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .links-menu {
    padding: 18px 26px !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .links-menu .menu-item,
  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .links-menu .menu-item:first-child {
    border: 0 !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .links-menu .menu-item > a {
    min-height: 36px;
    padding: 8px 0 !important;
    color: #5f514b !important;
    font-size: 10px !important;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .links-menu .menu-item > a:hover {
    color: #a70000 !important;
    transform: translateX(3px);
  }

  /* Modern, Journal-data-driven submenu drawer. The existing menu markup
     remains the source of every label and link; this only replaces the
     legacy full-width mega-menu presentation. */
  .desktop-header-active .header-compact.header-sm .degerli-header-row .main-menu > .j-menu > .mega-menu > .j-dropdown {
    position: fixed !important;
    top: var(--degerli-header-bottom, 106px) !important;
    left: 50vw !important;
    width: min(900px, calc(100vw - 48px)) !important;
    max-width: calc(100vw - 48px) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid rgba(55, 36, 30, .12) !important;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 22px 48px rgba(32, 22, 18, .18) !important;
    transform: translate3d(-50%, 0, 0) !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .mega-menu-content,
  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .grid-rows,
  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .grid-row,
  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .grid-cols {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .grid-col.grid-col-1 {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  /* The configured banner is presentation-only. Hide its empty/broken column
     and let the Journal-managed category links occupy the complete drawer. */
  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .grid-col:has(.module-banners) {
    display: none !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .links-menu {
    padding: 24px 30px !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .links-menu > .module-body {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 52px;
    row-gap: 0;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .links-menu .menu-item > a {
    min-height: 42px;
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(55, 36, 30, .09) !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .links-menu .menu-item:nth-last-child(-n + 2) > a {
    border-bottom-color: transparent !important;
  }

  /* A four-link menu reads better as one concise column than as two distant
     fragments across a wide panel. Larger Journal menus keep the two-column
     treatment above. */
  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu:has(.links-menu > .module-body > .menu-item:nth-child(4)):not(:has(.links-menu > .module-body > .menu-item:nth-child(5))) > .j-dropdown {
    width: min(520px, calc(100vw - 48px)) !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu:has(.links-menu > .module-body > .menu-item:nth-child(4)):not(:has(.links-menu > .module-body > .menu-item:nth-child(5))) .links-menu > .module-body {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu:has(.links-menu > .module-body > .menu-item:nth-child(4)):not(:has(.links-menu > .module-body > .menu-item:nth-child(5))) .links-menu .menu-item > a {
    border-bottom-color: rgba(55, 36, 30, .09) !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu:has(.links-menu > .module-body > .menu-item:nth-child(4)):not(:has(.links-menu > .module-body > .menu-item:nth-child(5))) .links-menu .menu-item:last-child > a {
    border-bottom-color: transparent !important;
  }

  /* Keep Journal's optional promotional banner as part of the drawer. It is
     still entirely data-driven: the category links, image and destination all
     come from the menu configured in Journal. */
  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu:has(.module-banners img:not([data-src*="placeholder"])) > .j-dropdown {
    width: min(1040px, calc(100vw - 48px)) !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu:has(.module-banners img:not([data-src*="placeholder"])) .grid-cols {
    display: flex !important;
    align-items: stretch;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu:has(.module-banners img:not([data-src*="placeholder"])) .grid-col.grid-col-1 {
    width: 56% !important;
    max-width: 56% !important;
    flex: 0 0 56%;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu:has(.module-banners img:not([data-src*="placeholder"])) .grid-col:has(.module-banners) {
    display: block !important;
    width: 44% !important;
    max-width: 44% !important;
    flex: 0 0 44%;
    align-self: flex-start;
    padding: 16px !important;
    border-left: 1px solid rgba(55, 36, 30, .12);
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu:has(.module-banners img:not([data-src*="placeholder"])) .module-banners,
  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu:has(.module-banners img:not([data-src*="placeholder"])) .module-banners .module-body,
  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu:has(.module-banners img:not([data-src*="placeholder"])) .module-banners .module-item,
  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu:has(.module-banners img:not([data-src*="placeholder"])) .module-banners .module-item > a:not(.banner-admin-edit) {
    display: block;
    width: 100%;
    height: 100%;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu:has(.module-banners img:not([data-src*="placeholder"])) .module-banners .module-item > a:not(.banner-admin-edit) {
    min-height: 232px;
    overflow: hidden;
    background: #f5f2f0;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu:has(.module-banners img:not([data-src*="placeholder"])) .module-banners img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform .35s ease;
  }

  /* Journal adds an admin-only Edit anchor before the actual banner link.
     It must remain a small overlay, never inherit the banner dimensions. */
  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu .module-banners .banner-admin-edit {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    display: inline-flex !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 6px 10px !important;
    line-height: 1 !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mega-menu:has(.module-banners img:not([data-src*="placeholder"])) .module-banners .module-item > a:hover img {
    transform: scale(1.035);
  }

  /* Signed-in customers receive Journal's notification bell after the cart.
     Its generated icon carries an inline top margin, unlike every other
     header icon. Give it the same 34px centering box and cancel that offset. */
  .desktop-header-active .header-compact.header-sm .degerli-header-row > .site-notification-bell {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row > .site-notification-bell .site-notification-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row > .site-notification-bell .site-notification-trigger > i {
    margin-top: 0 !important;
    line-height: 1 !important;
    transform: translateY(4px);
  }

  /* Journal uses three different icon renderers here: a pseudo-element for
     search, icon-font menu items, and Font Awesome for the cart/bell. Align
     their visible glyphs on the same baseline after the controls themselves
     have been centered. */
  .desktop-header-active .header-compact.header-sm .degerli-header-row .mini-search .search-trigger::before {
    transform: translateY(5px) !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .secondary-menu > .top-menu > .j-menu > .icon-only > a,
  .desktop-header-active .header-compact.header-sm .degerli-header-row .cart-heading {
    line-height: 1 !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .cart-heading > i {
    transform: translateY(1px);
  }

  /* Logged-in Journal menus keep the original text-width reservation after
     their labels are hidden (74px for account and 62px for wishlist). Treat
     every icon-only entry as one compact, consistently centered control. */
  .desktop-header-active .header-compact.header-sm .degerli-header-row .header-cart-group {
    gap: 6px !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .desktop-search-wrapper {
    margin: 0 !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .secondary-menu .top-menu > .j-menu {
    display: flex !important;
    align-items: center;
    gap: 6px;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .secondary-menu .top-menu > .j-menu > .icon-only {
    display: flex !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px;
    margin: 0 !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .secondary-menu .top-menu > .j-menu > .icon-only > a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px;
    padding: 0 !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .secondary-menu .top-menu > .j-menu > .icon-only > a::before {
    position: relative;
    top: 4px;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .secondary-menu .top-menu > .j-menu > .icon-only.drop-menu > a::before {
    top: 5px;
  }

  /* The account icon retains its Journal dropdown interaction; the compact
     34px control simply has no room for its separate downward caret. */
  .desktop-header-active .header-compact.header-sm .degerli-header-row .secondary-menu .top-menu > .j-menu > .icon-only.drop-menu > a::after {
    display: none !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .desktop-cart-wrapper,
  .desktop-header-active .header-compact.header-sm .degerli-header-row .desktop-cart-wrapper #cart,
  .desktop-header-active .header-compact.header-sm .degerli-header-row .desktop-cart-wrapper .cart-heading {
    width: 34px !important;
    min-width: 34px !important;
    margin: 0 !important;
  }

  /* Final desktop utility row. Journal still supplies the live search,
     account, wishlist, cart, and notification data. */
  .desktop-header-active .header-compact.header-sm .degerli-header-row .header-cart-group {
    gap: 24px !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .desktop-search-wrapper {
    position: relative;
    width: 129px;
    flex: 0 0 129px;
    height: 28px;
    border-bottom-color: #84736b;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .desktop-search-wrapper.degerli-search-open {
    width: min(240px, 22vw);
    flex-basis: min(240px, 22vw);
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .desktop-search-wrapper::after {
    content: none;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .degerli-search-label {
    position: absolute;
    top: 50%;
    left: 27px;
    z-index: 2;
    padding: 0;
    border: 0;
    background: transparent;
    color: #241c19;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .08em;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-43%);
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .desktop-search-wrapper.degerli-search-open .degerli-search-label {
    display: none;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .mini-search .search-trigger::before {
    margin-top: 0 !important;
    transform: none !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .secondary-menu .top-menu > .j-menu {
    gap: 24px;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .secondary-menu .top-menu > .j-menu > .top-menu-item:not(.top-menu-item-4):not(.top-menu-item-8) {
    display: none !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row > .site-notification-bell {
    display: flex !important;
    margin-left: 0 !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .secondary-menu .top-menu > .j-menu > .icon-only > a::before,
  .desktop-header-active .header-compact.header-sm .degerli-header-row .cart-heading > i {
    top: auto;
    transform: none;
    font-size: 17px !important;
    line-height: 1 !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .secondary-menu .top-menu > .j-menu > .top-menu-item-8 > a::before {
    margin-top: 5px;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .wishlist-badge {
    display: none !important;
  }
}

/* The text label is useful on roomy desktops but crowds the navigation before
   Journal switches to its tablet header. Keep the exact same search control,
   just reduce its resting state to the magnifying-glass button. */
@media (min-width: 1025px) and (max-width: 1450px) {
  .desktop-header-active .header-compact.header-sm .degerli-header-row .desktop-search-wrapper:not(.degerli-search-open) {
    width: 32px !important;
    flex-basis: 32px !important;
  }

  .desktop-header-active .header-compact.header-sm .degerli-header-row .desktop-search-wrapper:not(.degerli-search-open) .degerli-search-label {
    display: none !important;
  }
}

/* Journal's mobile notice module applies a padded content wrapper, which makes
   the promotion bar much taller than its desktop counterpart. Preserve its
   dynamic message/link but use the same compact red strip treatment. */
@media (max-width: 1024px) {
  .mobile-header-active .notice-module {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: 0 !important;
  }

  .mobile-header-active .notice-module .hn-body,
  .mobile-header-active .notice-module .module-body,
  .mobile-header-active .notice-module .hn-content,
  .mobile-header-active .notice-module .example2 {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
  }

  .mobile-header-active .notice-module .hn-body,
  .mobile-header-active .notice-module .module-body,
  .mobile-header-active .notice-module .hn-content,
  .mobile-header-active .notice-module .example2 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .mobile-header-active .notice-module .example2 > a {
    display: block !important;
    max-width: calc(100vw - 24px);
    overflow: hidden;
    color: #fff !important;
    font-size: 9px !important;
    line-height: 30px !important;
    letter-spacing: .08em;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
