/* Mobile / tablet header (< 992px): centred logo row + full-width search row.
   The Categories <details> summary doubles as the hamburger and opens as a drawer. */

.header-account .dropdown-menu .ie-mh-only {
  display: none;
}

@media (max-width: 991px) {
  header .full-header > .container {
    align-items: center;
    column-gap: 4px;
    display: grid !important;
    grid-template-columns: 44px 44px minmax(0, 1fr) 44px 44px;
    grid-template-rows: 52px auto;
    padding: 4px 10px 10px !important;
    position: relative;
    row-gap: 0;
  }

  header .full-header > .container::before,
  header .full-header > .container::after {
    display: none !important;
  }

  /* Row 1 — logo (true centre: both side columns are 2 × 44px) */
  header .full-header .header-left {
    float: none !important;
    grid-column: 3;
    grid-row: 1;
    justify-self: center;
    margin: 0 !important;
    max-width: 100%;
    min-width: 0;
    padding: 0 !important;
    width: auto !important;
  }

  header .full-header #logo {
    float: none !important;
    margin: 0 !important;
    max-width: 100%;
    text-align: center;
    width: auto !important;
  }

  header .full-header #logo a {
    display: block;
    line-height: 0;
    padding: 6px 2px;
    -webkit-tap-highlight-color: transparent;
  }

  header .full-header #logo picture {
    display: block;
  }

  header .full-header #logo img,
  header .header-left img.img-responsive {
    aspect-ratio: 251 / 48;
    display: block;
    height: auto !important;
    margin: 0 auto;
    max-height: none !important;
    max-width: 100% !important;
    width: clamp(118px, 44vw, 200px) !important;
  }

  header .full-header .header-actions {
    display: contents !important;
  }

  header .full-header .header-actions .ie-header-action.ie-header-studio,
  header .full-header .header-actions .ie-header-action.ie-header-compare {
    display: none !important;
  }

  header .full-header .header-actions .ie-header-wishlist {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }

  header .full-header .header-account {
    grid-column: 4;
    grid-row: 1;
    justify-self: center;
    margin: 0 !important;
    position: relative;
  }

  header .full-header .header-right {
    float: none !important;
    grid-column: 5;
    grid-row: 1;
    justify-self: center;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
  }

  header .full-header .header-actions .ie-header-action,
  header .full-header .header-account .dropdown-toggle,
  header .full-header .header-right #cart .ie-header-cart-btn {
    align-items: center;
    border-radius: 10px;
    display: flex !important;
    height: 44px !important;
    justify-content: center;
    min-width: 44px !important;
    padding: 0 !important;
    width: 44px !important;
  }

  header .full-header .header-actions .ie-header-action .fa,
  header .full-header .header-account .dropdown-toggle .fa-user,
  header .full-header .header-account .dropdown-toggle .fa-sign-in,
  header .full-header .header-right #cart .ie-header-cart-btn .fa-shopping-cart {
    font-size: 20px !important;
  }

  header .full-header .header-account .dropdown-menu {
    left: auto;
    margin-top: 4px;
    right: -48px;
  }

  .header-account .dropdown-menu .ie-mh-only {
    display: block;
  }

  /* Row 2 — full-width search */
  header .full-header .header-middle {
    float: none !important;
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    width: auto !important;
  }

  header #header-search.input-group {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
    display: flex !important;
    height: 44px;
    overflow: hidden;
    width: 100%;
  }

  header #header-search > input.form-control {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex: 1 1 auto;
    font-size: 16px !important;
    height: 44px !important;
    margin: 0 !important;
    min-width: 0;
    padding: 0 14px !important;
    width: auto !important;
  }

  header #header-search select.innner-search,
  header #header-search .select-wrapper {
    display: none !important;
  }

  header #header-search .input-group-btn {
    display: flex;
    width: auto;
  }

  header .header-middle #header-search .btn-default.header-search-btn {
    background: #17171c !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #fff !important;
    flex: 0 0 52px;
    font-size: 0;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 52px !important;
  }

  header #header-search .header-search-btn .fa.fa-search {
    display: block;
    font-size: 18px;
    line-height: 44px;
  }

  /* Hamburger = the existing Categories <summary>; old red bar removed */
  header .full-header .ie-header-smart-menu-slot {
    grid-column: 1 / -1;
    grid-row: 3;
    height: 0;
    margin: 0 !important;
    min-height: 0;
    position: static !important;
    z-index: auto;
  }

  header .ie-header-smart-menu-slot .main-category-list.left-main-menu {
    background: none !important;
    border: 0 !important;
    float: none !important;
    margin: 0 !important;
    position: static !important;
  }

  header .ie-header-smart-menu-slot .ie-mobile-cat-details:not([open]) > summary.TT-panel-heading {
    background: transparent !important;
    border-radius: 10px !important;
    color: transparent !important;
    font-size: 0 !important;
    height: 44px;
    left: 10px;
    min-height: 44px !important;
    overflow: hidden;
    padding: 0 !important;
    position: absolute !important;
    top: 8px;
    width: 44px !important;
    z-index: 5;
  }

  header .ie-header-smart-menu-slot .ie-mobile-cat-details:not([open]) > summary.TT-panel-heading::after {
    content: "\f0c9";
    font-size: 22px;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
  }

  header .ie-header-smart-menu-slot .ie-mobile-cat-details:not([open]) > summary.TT-panel-heading:active,
  header .full-header .header-actions .ie-header-action:active,
  header .full-header .header-account .dropdown-toggle:active,
  header .full-header .header-right #cart .ie-header-cart-btn:active {
    background: rgba(255, 255, 255, 0.16) !important;
  }

  /* Open: slide-in drawer from the left */
  html.ie-mnav-open .ie-header-smart-menu-slot,
  .ie-header-smart-menu-slot:has(.ie-mobile-cat-details[open]) {
    position: relative !important;
    z-index: 1000000 !important;
  }

  html.ie-mnav-open,
  html.ie-mnav-open body {
    overflow: hidden !important;
  }

  html.ie-mnav-open #ie-chat-root {
    display: none !important;
  }

  header .ie-header-smart-menu-slot .main-category-list .ie-mobile-cat-details[open] {
    animation: ie-mnav-in 0.22s ease-out;
    background: #fff;
    bottom: 0;
    box-shadow: 0 0 0 100vmax rgba(17, 17, 24, 0.55);
    left: 0;
    max-width: none !important;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    position: fixed !important;
    top: 0;
    width: min(86vw, 380px) !important;
    -webkit-overflow-scrolling: touch;
    z-index: 1000001;
  }

  header .ie-header-smart-menu-slot .ie-mobile-cat-details[open] > summary.TT-panel-heading {
    align-items: center;
    background: #da263c !important;
    border-radius: 0 !important;
    color: #fff !important;
    display: flex !important;
    font-size: 17px !important;
    min-height: 56px !important;
    padding: 0 56px 0 18px !important;
    position: sticky !important;
    top: 0;
    z-index: 5;
  }

  header .ie-header-smart-menu-slot .ie-mobile-cat-details[open] > summary.TT-panel-heading::after {
    content: "\f00d";
    font-size: 20px;
    height: 44px;
    left: auto;
    line-height: 44px;
    right: 8px;
    text-align: center;
    width: 44px;
  }

  header .ie-header-smart-menu-slot .ie-mobile-cat-details[open] .menu-category {
    border-radius: 0 !important;
  }
}

@media (max-width: 991px) and (prefers-reduced-motion: reduce) {
  header .ie-header-smart-menu-slot .main-category-list .ie-mobile-cat-details[open] {
    animation: none;
  }
}

@keyframes ie-mnav-in {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: none;
  }
}

@media (max-width: 359px) {
  header .full-header > .container {
    column-gap: 2px;
    grid-template-columns: 40px 40px minmax(0, 1fr) 40px 40px;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  header .full-header .header-actions .ie-header-action,
  header .full-header .header-account .dropdown-toggle,
  header .full-header .header-right #cart .ie-header-cart-btn {
    min-width: 40px !important;
    width: 40px !important;
  }

  header .ie-header-smart-menu-slot .ie-mobile-cat-details:not([open]) > summary.TT-panel-heading {
    left: 6px;
    width: 40px !important;
  }
}

/* Promo strip: currency + contact share the "Unlock now" line instead of their own row */
@media (max-width: 767px) {
  #top .container {
    padding-bottom: 2px !important;
    padding-top: 2px !important;
    position: relative;
  }

  #top #ttcmsheader .ttheader-service {
    padding-bottom: 4px;
  }

  #top .header-top-right {
    bottom: 4px;
    padding: 0 !important;
    position: absolute !important;
    right: 8px;
    width: auto !important;
  }
}
