/* LGK — Hub catégories accueil (grille premium, peu d’items) */

.shopify-section--lgk-home-collections-hub {
  --lgk-hub-min: 9.5rem;
  --lgk-hub-img-ratio: 1;
  --lgk-hub-card-gap: 0.55rem;
  --lgk-hub-label-fs: 0.7rem;
  --lgk-hub-label-lh: 1.2;
  --lgk-hub-card-pad: 0.4rem;
  --lgk-hub-accent: 167 139 250;
  --lgk-hub-gaming: 52 211 153;
}

.lgk-home-collections-hub__shell {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: max(var(--container-gutter), 1rem);
  box-sizing: border-box;
}

@media screen and (min-width: 1100px) {
  .shopify-section--lgk-home-collections-hub .lgk-home-collections-hub__shell {
    width: 100%;
    max-width: none;
    padding-inline: clamp(1.25rem, 2.5vw, 3.5rem);
  }
}

.lgk-home-collections-hub__header {
  max-width: 40rem;
  margin-inline: auto;
  padding-block-end: 0.5rem;
}

.lgk-home-collections-hub__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(var(--lgk-hub-gaming));
  background: rgb(var(--lgk-hub-gaming) / 0.12);
  border: 1px solid rgb(var(--lgk-hub-gaming) / 0.35);
}

.lgk-home-collections-hub__title {
  margin: 0.9rem 0 0;
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.lgk-home-collections-hub__intro {
  margin-block-start: 0.8rem;
  color: rgb(var(--text-color) / 0.72);
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  line-height: 1.55;
}

.lgk-home-collections-hub__hint {
  margin: 0.7rem 0 0;
  font-size: 0.78rem;
  color: rgb(var(--text-color) / 0.48);
}

.lgk-home-collections-hub__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-block-start: 1.85rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid rgb(var(--text-color) / 0.1);
}

/* Annuaire hub */
.shopify-section--lgk-home-collections-hub .lgk-collections-directory {
  width: 100%;
  gap: 1.5rem;
}

.shopify-section--lgk-home-collections-hub .lgk-collections-directory__featured {
  margin-block-end: 0;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-featured {
  margin-block-end: 0;
  padding: clamp(1.15rem, 2.4vw, 1.75rem);
  border-radius: 22px;
  border: 1px solid rgb(var(--lgk-hub-gaming) / 0.42);
  background:
    radial-gradient(ellipse 85% 70% at 100% 0%, rgb(var(--lgk-hub-gaming) / 0.2), transparent 58%),
    radial-gradient(ellipse 55% 45% at 0% 100%, rgb(var(--lgk-hub-accent) / 0.12), transparent 52%),
    rgb(6 78 59 / 0.32);
  box-shadow:
    0 18px 48px rgb(0 0 0 / 0.34),
    inset 0 1px 0 rgb(255 255 255 / 0.06);
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-featured__head {
  display: grid;
  gap: 0.4rem;
  margin-block-end: 1.15rem;
  text-align: center;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-featured__title {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-featured__desc {
  max-width: 42ch;
  margin-inline: auto;
  font-size: 0.92rem;
  color: rgb(var(--text-color) / 0.7);
}

/* Grille CSS — pleine largeur (écrase lgk-seo-boost inline-flex) */
.shopify-section--lgk-home-collections-hub .lgk-mesh-bubble-track-outer:has(> .lgk-mesh-bubble-track--hub-grid),
.shopify-section--lgk-home-collections-hub .lgk-mesh-featured .lgk-mesh-bubble-track-outer {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  justify-content: unset !important;
}

/* Aucun fondu / mask sur le hub — les dernières catégories restent nettes */
.shopify-section--lgk-home-collections-hub .lgk-mesh-bubble-track-outer,
.shopify-section--lgk-home-collections-hub .lgk-mesh-bubble-track,
.shopify-section--lgk-home-collections-hub .lgk-mesh-featured,
.shopify-section--lgk-home-collections-hub .lgk-mesh-accordion__panel {
  -webkit-mask-image: none !important;
  mask-image: none !important;
  mask: none !important;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-bubble-track--hub-grid,
.shopify-section--lgk-home-collections-hub .lgk-mesh-bubble-track-outer > .lgk-mesh-bubble-track--hub-grid {
  display: grid !important;
  /* Mobile-first : 4 colonnes (tuiles compactes) — pas 2/3 trop larges */
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: var(--lgk-hub-card-gap) !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  overflow-x: visible !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
  mask: none !important;
  scroll-snap-type: none !important;
  flex-flow: unset !important;
  flex-wrap: unset !important;
  justify-content: stretch !important;
  align-content: stretch !important;
  align-items: stretch !important;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-bubble-track--scrollable::after {
  display: none !important;
  content: none !important;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-bubble.lgk-mesh-bubble--hub-card {
  display: flex !important;
  flex: unset !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 !important;
}

@media screen and (min-width: 700px) {
  .shopify-section--lgk-home-collections-hub .lgk-mesh-bubble-track--hub-grid,
  .shopify-section--lgk-home-collections-hub .lgk-mesh-bubble-track-outer > .lgk-mesh-bubble-track--hub-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

@media screen and (min-width: 1100px) {
  .shopify-section--lgk-home-collections-hub .lgk-mesh-bubble-track--hub-grid,
  .shopify-section--lgk-home-collections-hub .lgk-mesh-bubble-track-outer > .lgk-mesh-bubble-track--hub-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  }

  .shopify-section--lgk-home-collections-hub .lgk-mesh-featured--geek .lgk-mesh-bubble-track--hub-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  }
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-featured--geek {
  margin-block-start: 1rem;
  border-color: rgb(var(--lgk-hub-accent) / 0.4);
  background:
    radial-gradient(ellipse 85% 70% at 0% 0%, rgb(var(--lgk-hub-accent) / 0.22), transparent 58%),
    radial-gradient(ellipse 55% 45% at 100% 100%, rgb(167 139 250 / 0.1), transparent 52%),
    rgb(30 20 55 / 0.35);
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-featured--geek .lgk-mesh-featured__badge {
  color: rgb(var(--lgk-hub-accent));
  background: rgb(var(--lgk-hub-accent) / 0.14);
  border-color: rgb(var(--lgk-hub-accent) / 0.35);
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-bubble--hub-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: none;
  min-width: 0;
  height: auto;
  min-height: 100%;
  gap: 0.55rem;
  padding: var(--lgk-hub-card-pad);
  border-radius: 16px;
  border: 1px solid rgb(var(--lgk-hub-accent) / 0.22);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.05), transparent 42%),
    rgb(0 0 0 / 0.38);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-bubble--hub-card:hover,
.shopify-section--lgk-home-collections-hub .lgk-mesh-bubble--hub-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgb(var(--lgk-hub-accent) / 0.55);
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.38);
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-featured .lgk-mesh-bubble--hub-card {
  border-color: rgb(var(--lgk-hub-gaming) / 0.28);
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-featured .lgk-mesh-bubble--hub-card:hover,
.shopify-section--lgk-home-collections-hub .lgk-mesh-featured .lgk-mesh-bubble--hub-card:focus-visible {
  border-color: rgb(var(--lgk-hub-gaming) / 0.7);
  box-shadow: 0 12px 30px rgb(var(--lgk-hub-gaming) / 0.14);
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-bubble--hub-card .lgk-mesh-bubble__visual,
.shopify-section--lgk-home-collections-hub .lgk-mesh-featured .lgk-mesh-bubble--hub-card .lgk-mesh-bubble__visual {
  flex: 0 0 auto;
  width: 100% !important;
  aspect-ratio: var(--lgk-hub-img-ratio) !important;
  height: auto !important;
  border-radius: 12px !important;
  border: 0 !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 40%, rgb(255 255 255 / 0.08), transparent 65%),
    rgb(0 0 0 / 0.5);
  box-shadow: none !important;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-bubble--hub-card .lgk-mesh-bubble__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  transition: transform 0.28s ease;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-bubble--hub-card:hover .lgk-mesh-bubble__photo {
  transform: scale(1.05);
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-bubble--hub-card .lgk-mesh-bubble__label {
  flex: 1 1 auto;
  width: 100%;
  margin: 0;
  padding: 0 0.15rem 0.15rem;
  font-size: var(--lgk-hub-label-fs) !important;
  font-weight: 650;
  line-height: var(--lgk-hub-label-lh);
  text-align: center;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
  word-break: break-word;
  color: rgb(255 255 255 / 0.94);
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-bubble--hub-card.is-height-equalized .lgk-mesh-bubble__label {
  display: -webkit-box !important;
  align-items: unset;
  justify-content: unset;
}

/* Accordéons */
.shopify-section--lgk-home-collections-hub .lgk-collections-directory__groups {
  display: grid;
  gap: 0.7rem;
  margin-block-start: 0.35rem;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-accordion {
  border-radius: 16px;
  border: 1px solid rgb(255 255 255 / 0.1);
  background: rgb(255 255 255 / 0.03);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-accordion[open] {
  border-color: rgb(var(--lgk-hub-accent) / 0.35);
  background: rgb(var(--lgk-hub-accent) / 0.06);
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-accordion__summary {
  padding: 1rem 1.15rem;
  cursor: pointer;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-accordion__title {
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  font-weight: 700;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-accordion__panel {
  padding: 0 1rem 1.15rem;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-accordion__panel .lgk-mesh-bubble-track--hub-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

@media screen and (min-width: 700px) {
  .shopify-section--lgk-home-collections-hub .lgk-mesh-accordion__panel .lgk-mesh-bubble-track--hub-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-accordion__panel-link {
  margin: 0 0 0.9rem;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-accordion__link {
  font-size: 0.75rem;
  font-weight: 650;
  color: rgb(var(--lgk-hub-accent));
  text-decoration: none;
  white-space: nowrap;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-accordion__link:hover {
  text-decoration: underline;
}

.shopify-section--lgk-home-collections-hub .lgk-mesh-bubble--hub-card.lgk-mesh-bubble {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
}

@media screen and (min-width: 700px) {
  .shopify-section--lgk-home-collections-hub {
    --lgk-hub-card-gap: 0.65rem;
    --lgk-hub-label-fs: 0.72rem;
    --lgk-hub-card-pad: 0.45rem;
  }
}

@media screen and (max-width: 699px) {
  .shopify-section--lgk-home-collections-hub {
    --lgk-hub-min: 4.5rem;
    --lgk-hub-card-gap: 0.35rem;
    --lgk-hub-label-fs: 0.58rem;
    --lgk-hub-label-lh: 1.15;
    --lgk-hub-card-pad: 0.28rem;
  }

  .shopify-section--lgk-home-collections-hub .lgk-home-collections-hub__shell {
    padding-inline: max(0.75rem, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  }

  .shopify-section--lgk-home-collections-hub .lgk-mesh-featured {
    padding: 0.85rem 0.7rem 0.95rem;
    border-radius: 14px;
  }

  .shopify-section--lgk-home-collections-hub .lgk-mesh-featured__head {
    margin-block-end: 0.75rem;
  }

  .shopify-section--lgk-home-collections-hub .lgk-mesh-bubble--hub-card {
    gap: 0.35rem;
    border-radius: 12px;
  }

  .shopify-section--lgk-home-collections-hub .lgk-mesh-bubble--hub-card .lgk-mesh-bubble__visual,
  .shopify-section--lgk-home-collections-hub .lgk-mesh-featured .lgk-mesh-bubble--hub-card .lgk-mesh-bubble__visual {
    border-radius: 9px !important;
  }

  .shopify-section--lgk-home-collections-hub .lgk-mesh-bubble-track--hub-grid,
  .shopify-section--lgk-home-collections-hub .lgk-mesh-bubble-track-outer > .lgk-mesh-bubble-track--hub-grid,
  .shopify-section--lgk-home-collections-hub .lgk-mesh-accordion__panel .lgk-mesh-bubble-track--hub-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* Très petit écran : 3 colonnes pour garder des labels lisibles */
@media screen and (max-width: 359px) {
  .shopify-section--lgk-home-collections-hub .lgk-mesh-bubble-track--hub-grid,
  .shopify-section--lgk-home-collections-hub .lgk-mesh-bubble-track-outer > .lgk-mesh-bubble-track--hub-grid,
  .shopify-section--lgk-home-collections-hub .lgk-mesh-accordion__panel .lgk-mesh-bubble-track--hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .shopify-section--lgk-home-collections-hub {
    --lgk-hub-label-fs: 0.62rem;
  }
}
