/* Integration mobile du champ avec le header du theme, sans override PrestaShop. */
@media screen and (max-width: 767.98px) {
  /* Adaptation du champ natif du thème classic/child_classic. */
  .header-top .header-top-right {
    width: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .header-top #search_widget {
    width: calc(100% - 16px) !important;
    height: 52px !important;
    padding: 0 !important;
    margin: 0 8px 0 !important;
    box-sizing: border-box !important;
  }

  .header-top,
  .header-top .container,
  .header-top .row {
    border: 0 !important;
    box-shadow: none !important;
  }

  .header-nav {
    border-bottom: 0 !important;
    box-shadow: none !important;
  }

  #header .header-nav {
    border-bottom: 0 !important;
    box-shadow: none !important;
  }

  .header-top #search_widget form {
    position: relative !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .header-top #search_widget input[type="text"] {
    width: 100% !important;
    height: 52px !important;
    padding: 0 4.2rem 0 1.15rem !important;
    box-sizing: border-box !important;
    border-radius: 16px !important;
    border: 1px solid #e5e1da !important;
    background: #faf9f7 !important;
    box-shadow: 0 3px 12px rgba(42, 27, 66, .10) !important;
    color: #3b3542 !important;
    font-size: 1.05rem !important;
    font-family: Georgia, "Times New Roman", serif !important;
    letter-spacing: .01em !important;
  }

  .header-top #search_widget input[type="text"]::placeholder {
    color: #8d8790 !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-style: italic !important;
    letter-spacing: .01em !important;
  }

  .header-top #search_widget .search {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    display: grid !important;
    place-items: center !important;
    width: 58px !important;
    height: 52px !important;
    margin: 0 !important;
    border-radius: 0 16px 16px 0 !important;
    background: #2a1b42 !important;
    color: #fff !important;
    font-size: 25px !important;
    line-height: 1 !important;
    transform: none !important;
  }

  .header-bottom {
    height: 79px !important;
    min-height: 79px !important;
    border-bottom: 0 !important;
  }

  .header-bottom__row {
    height: 76px !important;
    min-height: 76px !important;
  }

  .header-bottom .logo {
    left: 46% !important;
    top: 0 !important;
    width: 205px !important;
    max-width: 205px !important;
    height: 0 !important;
    transform: translateX(-50%) !important;
  }

  .header-bottom .logo img.logo,
  .header-bottom .navbar-brand .logo {
    position: absolute !important;
    top: 20px !important;
    left: 0 !important;
    width: 205px !important;
    max-width: 205px !important;
    height: auto !important;
    max-height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  .header-bottom .main-menu,
  #_mobile_user_info,
  #_mobile_cart {
    top: calc(50% - 8px) !important;
  }

  #searchCanvas {
    padding-bottom: 0 !important;
    border-top: 0 !important;
  }

}

.gkis__results h3 {
  font-size: 1rem !important;
  letter-spacing: .06em !important;
}

.gkis__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.gkis__section-head h3 { margin-bottom: .65rem !important; }

.gkis__category--parent { font-weight: 700 !important; }
.gkis__category--parent span { display: inline-block; margin-right: .25rem; color: #7c8798; }

.gkis__all {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin: 1.15rem 0 .35rem !important;
  padding: .9rem 1rem !important;
  border: 1px solid #d7defb !important;
  border-radius: 12px !important;
  background: #f2f5ff !important;
  color: #2945bd !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.gkis__all span { font-size: 1.25rem; }

/* Cartes recommandées desktop : grille régulière et contenu aligné. */
.gkis__popular-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.gkis__popular-product {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .55rem;
  padding: .75rem;
  overflow: hidden;
  border: 1px solid #e1e5ec;
  border-radius: 14px;
  background: #fff;
  color: #263248;
  text-decoration: none;
  box-shadow: 0 3px 12px rgba(18, 25, 38, .06);
  transition: transform .15s ease, box-shadow .15s ease;
}

.gkis__popular-product:hover,
.gkis__popular-product:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(18, 25, 38, .12);
  outline: 2px solid #b8c4ff;
}

.gkis__popular-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  height: 190px;
  overflow: hidden;
  border-radius: 10px;
  background: #f7f7f8;
}

.gkis__popular-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gkis__popular-product strong {
  display: -webkit-box;
  min-height: 2.5em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: .98rem;
  line-height: 1.25;
}

.gkis__popular-price {
  margin-top: auto;
  color: #2945bd;
  font-size: 1.02rem;
  font-weight: 700;
}

.gkis__popular-price s {
  margin-right: .25rem;
  color: #7c8492;
  font-size: .86rem;
  font-weight: 400;
}

.gkis__clear-recent {
  border: 0;
  background: transparent;
  color: #276fd3;
  font-size: .88rem;
  cursor: pointer;
}

.gkis__to-top {
  position: absolute;
  right: .8rem;
  bottom: .8rem;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #1769e8;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: 0 5px 16px rgba(23, 105, 232, .3);
  cursor: pointer;
}

.gkis__to-top[hidden] { display: none; }

@media screen and (max-width: 600px) {
  .gkis__results h3 {
    font-size: 1.05rem !important;
    margin-top: 1.35rem !important;
  }

  .gkis__panel {
    padding-top: 8px !important;
  }

  .gkis__dialog {
    height: calc(100dvh - 8px) !important;
    border-radius: 18px 18px 0 0 !important;
  }

  .gkis__bar {
    min-height: 72px !important;
    position: relative !important;
    width: calc(100% - 58px) !important;
    margin: 10px 50px 0 8px !important;
    padding: .55rem 0 !important;
    gap: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .gkis__bar > span {
    display: grid !important;
    place-items: center !important;
    position: absolute !important;
    right: 14px !important;
    z-index: 2 !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 2.5rem !important;
    line-height: 1 !important;
    pointer-events: none !important;
  }

  .gkis__input {
    width: 100% !important;
    height: 60px !important;
    min-height: 60px !important;
    padding: .5rem 3.8rem .5rem 1.1rem !important;
    border: 2px solid #dfe3eb !important;
    border-radius: 18px !important;
    background: #f7f8fa !important;
    font-size: 1.16rem !important;
    box-shadow: 0 4px 14px rgba(18, 25, 38, .08) !important;
  }

  .gkis__close {
    position: absolute !important;
    right: -50px !important;
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    font-size: 2.2rem !important;
  }

  .gkis__popular .gkis__tags {
    display: flex !important;
    flex-wrap: wrap !important;
    max-height: 5.6rem !important;
    overflow: hidden !important;
    gap: .35rem !important;
  }

  .gkis__popular .gkis__tags button {
    width: auto !important;
    max-width: 100% !important;
    padding: .38rem .65rem !important;
    border-radius: 999px !important;
    font-size: .84rem !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }

  .gkis__popular-products {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .65rem !important;
    margin: 0 -.15rem !important;
    padding: .1rem .15rem .85rem !important;
  }

  .gkis__popular-product {
    display: flex !important;
    min-width: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: .35rem !important;
    padding: .55rem !important;
    border: 1px solid #e7e9ee !important;
    border-radius: 14px !important;
    background: #fff !important;
    color: inherit !important;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(18, 25, 38, .04) !important;
  }

  .gkis__popular-thumb {
    display: grid !important;
    place-items: center !important;
    height: 132px !important;
    overflow: hidden !important;
    border-radius: 10px !important;
    background: #f6f6f7 !important;
  }

  .gkis__popular-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  .gkis__popular-product strong {
    display: -webkit-box !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    font-size: .82rem !important;
    line-height: 1.2 !important;
  }

  .gkis__popular-price {
    color: #3346b8 !important;
    font-size: .86rem !important;
    font-weight: 700 !important;
  }

  .gkis__product strong { font-size: 1.04rem !important; line-height: 1.25 !important; }
  .gkis__product small { font-size: .91rem !important; }
  .gkis__category--parent { font-size: 1rem !important; }
  .gkis__all { font-size: .96rem !important; padding: 1rem !important; }

  .gkis__tags button b {
    margin-left: .45rem;
    color: #697386;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1;
  }
}
