/* PrestaShop Classic: desktop header layout. Mobile unchanged. */
@media (min-width: 992px) {
  #header .header-top .row:has(> #_desktop_logo):has(> .position-static > #search_widget) {
    display: grid;
    grid-template-columns: minmax(150px, 16.6667%) minmax(0, 1fr);
    align-items: center;
    row-gap: 16px;
  }
  #header .header-top .row:has(> #_desktop_logo):has(> .position-static > #search_widget) > #_desktop_logo {
    grid-column: 1; grid-row: 1; width: auto; float: none;
  }
  #header .header-top .row:has(> #_desktop_logo) > .position-static:has(> #search_widget):has(> #_desktop_top_menu) { display: contents; }
  #header .header-top .position-static > #search_widget {
    grid-column: 2; grid-row: 1; float: none; width: calc(100% - 30px); min-width: 0; max-width: 600px; justify-self: end; margin: 0 15px 0 0;
  }
  #header .header-top .position-static > #_desktop_top_menu {
    grid-column: 1 / -1; grid-row: 2; float: none; width: auto; margin: 0 15px; padding-top: 2px; border-top: 1px solid #e5e5e5;
  }
  #header #_desktop_top_menu > ul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 0; }
  #header #search_widget form { position: relative; margin: 0; }
  #header #search_widget form input[type="text"] { width: 100%; min-height: 46px; padding-left: 42px; padding-right: 60px; box-sizing: border-box; }
  #header #search_widget form button[type="submit"] { position: absolute; left: auto; right: 0; top: 0; bottom: 0; width: 52px; border: 0; background: #0097B2; color: white; cursor: pointer; }
  #header #search_widget form > i.material-icons { left: 12px; top: 50%; transform: translateY(-50%); }
  #header #search_widget form button[type="submit"] i { color: white; }
}

/* Compact desktop header and homepage carousel spacing. */
@media (min-width: 992px) {
  #header .header-top { padding-bottom: 4px !important; }
  #header #_desktop_top_menu { margin-bottom: 0 !important; }
  #header #_desktop_top_menu > ul { margin-bottom: 0 !important; }
  body#index #wrapper { padding-top: 8px !important; }
  body#index #content > .carousel { margin-top: 0 !important; }
}

/* Reduce only the desktop navigation row; leave dropdown links intact. */
@media (min-width: 992px) {
  #header #_desktop_top_menu { padding-bottom: 0 !important; min-height: 0; }
  #header #_desktop_top_menu > ul { padding-top: 0; padding-bottom: 0; min-height: 0; }
  #header #_desktop_top_menu > ul > li { margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; }
  #header #_desktop_top_menu > ul > li > a { padding-top: 8px !important; padding-bottom: 8px !important; line-height: 20px; }
}

/* Balance vertical spacing in the desktop menu only. */
@media (min-width: 992px) {
  #header .header-top .position-static > #_desktop_top_menu { padding-top: 0 !important; padding-bottom: 0 !important; }
  #header #_desktop_top_menu > ul { margin: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; align-items: center; }
  #header #_desktop_top_menu > ul > li { margin-block: 0 !important; padding-block: 0 !important; }
  #header #_desktop_top_menu > ul > li > a { display: flex; align-items: center; min-height: 48px; box-sizing: border-box; margin-block: 0 !important; padding-block: 10px !important; line-height: 20px; }
  #header .header-top { padding-bottom: 0 !important; }
}

/* Remove residual desktop menu whitespace, including Classic clearfix grid items. */
@media (min-width: 992px) {
  #header .header-top .row:has(> #_desktop_logo):has(> .position-static > #search_widget)::before,
  #header .header-top .row:has(> #_desktop_logo):has(> .position-static > #search_widget)::after,
  #header .header-top .position-static:has(> #search_widget):has(> #_desktop_top_menu)::before,
  #header .header-top .position-static:has(> #search_widget):has(> #_desktop_top_menu)::after { display: none !important; content: none !important; }
  #header .header-top .position-static > #_desktop_top_menu { padding-block: 0 !important; margin-bottom: 0 !important; }
  #header #_desktop_top_menu > ul { padding-block: 0 !important; margin-block: 0 !important; }
  #header #_desktop_top_menu > ul > li > a { min-height: 0 !important; height: auto !important; padding-block: 12px !important; line-height: 20px !important; }
  #header .header-top .row:has(> #_desktop_logo):has(> .position-static > #search_widget) > .clearfix { display: none !important; }
}

/* Desktop service links; preserve existing layout on mobile. */
#k976-header-links { display: none; }
@media (min-width: 992px) {
  #header .header-top .row:has(> #_desktop_logo):has(> .position-static > #k976-header-links) {
    grid-template-columns: minmax(150px, 16.6667%) minmax(210px, 1fr) minmax(0, 600px);
  }
  #header .header-top .position-static:has(> #k976-header-links) > #search_widget { grid-column: 3; }
  #k976-header-links { display: flex; grid-column: 2; grid-row: 1; align-items: center; justify-content: space-evenly; gap: 12px; padding: 0 8px; min-width: 0; }
  #k976-header-links a { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-size: 13px; line-height: 16px; color: #333; text-decoration: none; }
  #k976-header-links a i { color: #0097B2; font-size: 26px; margin-bottom: 4px; }
  #k976-header-links a:hover, #k976-header-links a:focus-visible, #k976-header-links a:hover i { color: #F84807; }
}
