/* tribalgammes — pages E-liquides (cat. 4) et 8 gammes. Chargé après themes/tribe/css/style.css. */

/* --- Logo de la gamme : boîte à hauteur fixe (pas de saut quand le logo change au survol) --- */
body#category .logo.tfg-logo-wrap > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 125px;
  width: min(92vw, 440px);
}
body#category .logo.tfg-logo-wrap > a > img#tfg-logo {
  display: block;
  height: auto;
  width: auto;
  max-height: 125px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
  transition: opacity 0.18s ease, transform 0.18s ease;
  transform-origin: center center;
}
body#category .logo.tfg-logo-wrap > a > img#tfg-logo.is-swapping {
  opacity: 0;
}
@media screen and (min-width: 320px) and (max-width: 568px) {
  body#category .logo.tfg-logo-wrap > a {
    height: 83px;
  }
  body#category .logo.tfg-logo-wrap > a > img#tfg-logo {
    max-height: 83px;
  }
}

/* --- Sous-titre (nom de la gamme) --- */
body#category h1.tfg-title {
  margin-top: 4px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

/* --- Boutons des gammes : blanc translucide, actif = blanc plein --- */
body#category #subcatmenu.tfg-menu li.tfg-item {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 14px;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
body#category #subcatmenu.tfg-menu li.tfg-item:hover,
body#category #subcatmenu.tfg-menu li.tfg-item:focus-within {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
body#category #subcatmenu.tfg-menu li.tfg-item.active {
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
body#category #subcatmenu.tfg-menu li.tfg-item a.tfg-btn {
  color: #000;
  outline: none;
}
body#category #subcatmenu.tfg-menu li.tfg-item.active a.tfg-btn {
  color: #000;
}

/* --- Mobile : 2 colonnes, tout lisible --- */
@media screen and (max-width: 600px) {
  body#category #subcatmenu.tfg-menu {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center;
    column-gap: 10px !important;
    row-gap: 10px !important;
    width: 100%;
    margin: 0 auto 16px;
    padding: 0;
    box-sizing: border-box;
  }
  body#category #subcatmenu.tfg-menu li.tfg-item {
    flex: 0 0 calc(50% - 5px) !important;
    width: calc(50% - 5px) !important;
    max-width: calc(50% - 5px);
    margin: 0 !important;
    height: auto !important;
    min-height: 60px;
    padding: 10px 8px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 12px;
  }
  body#category #subcatmenu.tfg-menu li.tfg-item a.tfg-btn {
    display: block;
    width: 100%;
    font-size: 16px !important;
    line-height: 20px !important;
    text-align: center;
    word-break: normal;
    overflow-wrap: anywhere;
  }
}

/* --- Retour Jimmy 09/11 : Maison Gourmet et Street Flavors (logos plus « carrés ») agrandis.
   transform = la boîte garde sa taille, rien ne bouge autour. Page de la gamme (classe body, rendu
   serveur, sans attendre le JS) + survol (data-gamme posé par le JS). --- */
body#category.category-id-29 .tfg-logo-wrap img#tfg-logo:not([data-gamme]),
body#category .tfg-logo-wrap img#tfg-logo[data-gamme="29"] {
  transform: scale(1.35);
}
body#category.category-id-27 .tfg-logo-wrap img#tfg-logo:not([data-gamme]),
body#category .tfg-logo-wrap img#tfg-logo[data-gamme="27"] {
  transform: scale(1.4);
}

/* --- Retour Jimmy 09/11 (2) : plus de nom de gamme en texte sous le logo, logos descendus.
   Le h1 reste dans la page (SEO + lecteurs d'écran) : texte transparent, sa hauteur est gardée,
   donc les boutons et les cartes ne bougent pas. Le logo descend dans l'espace libéré. --- */
body#category h1.tfg-title {
  text-shadow: none;
}
body#category h1.tfg-title a#tfg-title {
  color: transparent !important;
  text-shadow: none !important;
  pointer-events: none;
  user-select: none;
  cursor: default;
}
body#category .logo.tfg-logo-wrap > a {
  position: relative;
  top: 30px;
}
@media screen and (min-width: 320px) and (max-width: 568px) {
  body#category .logo.tfg-logo-wrap > a {
    top: 24px;
  }
}
