/*
 * Trikotium Custom Header + CloudJersey-inspired mega menu
 * (no Astra-specific selectors)
 */

:root{
  --cj-blue: #002041;
  --cj-grey: #f5f7fb;
  --cj-grey-border: #e3e7f2;
  --cj-light-blue-bg: rgba(0, 32, 65, 0.06);
  --cj-light-red-bg: #ffe8e8;
  --cj-red: #d02424;
}

/* -------------------------
 * Top strip
 * ------------------------- */
.trik-topstrip{
  background: #fff;
  border-bottom: 1px solid var(--cj-grey-border);
}
.trik-topstrip__inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.trik-topstrip__item{
  display: flex;
  gap: 2px;
}
.trik-topstrip__title{
  font-weight: 700;
  color: var(--cj-blue);
  font-size: 13px;
  line-height: 1.1;
}
.trik-topstrip__desc{
  font-size: 12px;
  color: #4b5563;
  line-height: 1.2;
}
@media (max-width: 900px){
  .trik-topstrip__inner{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px){
  .trik-topstrip__inner{
    grid-template-columns: 1fr;
    display: none;
  }
}

@media (min-width: 520px){
  .trik-headerbar__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 16px;
    display: grid;
    display: grid !important;
    gap: 20px !important;
    grid-template-columns: auto auto auto;
}

    .trik-headerbar__inner .trik-brand {
        margin: auto;
        margin-right: 10px;
        width: 100% !important;
        justify-content: end;
    }

.trik-searchbar {
    display: flex;
    align-items: center;
    width: 100%;
    /* margin-left: 5px; */
}.trik-searchbar__form {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}#trik-header-search {
    width: 100%;
    height: 35px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--cj-grey);
    padding: 0 36px 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--cj-blue);
    outline: none;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.trik-right {
    display: inline-flex;
    align-items: center;
    gap: 10px !important;
}


.trik-action {
    background: #00000008 !important;
}

}

/* -------------------------
 * Main header bar
 * ------------------------- */
.trik-site-header{
  position: relative; /* anchor for cj-mega absolute top:100% */
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--cj-grey-border);
}

.trik-headerbar__inner{
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 16px;
    display: grid;
    gap: 5px;
    align-items: center;
}

.trik-headerbar__inner .trik-brand{
    display: flex;
    width: 100px;
}

.trik-brand__link{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.trik-brand__text{
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--cj-blue);
  font-size: 18px;
}

/* Make WP custom logo behave */
.trik-brand .custom-logo-link{
  display: inline-flex;
  align-items: center;
}
.trik-brand img.custom-logo{
  max-height: 34px;
  width: auto;
  height: auto;
}

/* =========================
   HEADER SEARCH (TRIK)
   ========================= */

.trik-searchbar {
    display: flex;
    align-items: center;
    width: 100%;
    margin-left: 5px;
}

/* Form pill */
.trik-searchbar__form{
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

/* Input pill */
#trik-header-search{
    width: 100%;
    height: 35px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--cj-grey);
    padding: 0 36px 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--cj-blue);
    outline: none;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.trik-searchbar__input::placeholder{
  color: rgba(0, 32, 65, 0.55);
  font-weight: 600;
}

.trik-searchbar__input:hover{
  background: #eef2f8;
}

.trik-searchbar__input:focus{
  background: #ffffff;
  border-color: rgba(0, 32, 65, 0.25);
  box-shadow: 0 0 0 4px rgba(0, 32, 65, 0.08);
}

/* Button inside pill (right) */
.trik-searchbar__btn{
    position: absolute;
    right: 0px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 33px;
    border-radius: 0 15px 15px 0;
    border-left: 1px solid #ececec !important;
    background: #f5f7fb !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--cj-blue) !important;
    transition: background-color .15s ease, transform .12s ease;
    box-shadow: none;
    padding-right: 20px;
    padding-left: 18px;
}

.trik-searchbar__btn:hover{
  background: rgba(0, 32, 65, 0.06);
}

.trik-searchbar__btn:active{
  transform: translateY(-50%) scale(0.96);
}

/* SVG sizes + currentColor */
.trik-searchbar__btn svg{
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor !important;
  stroke: currentColor !important;
}

.trik-searchbar__btn svg *{
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* Responsive tweaks */
@media (max-width: 1023px){
  .trik-searchbar__form{
    max-width: 100%;
  }
  .trik-searchbar__input{
    height: 40px;
  }
}


/* Right side (nav + actions) */
.trik-right{
    display: inline-flex;
    align-items: center;
    gap: 0px;
}

/* Actions */
.trik-action{
    position: relative;
    border: none;
    background: #00000000;
    box-shadow: none !important;
    color: var(--cj-blue) !important;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 6px;
}

.trik-action svg{
  fill: currentColor;
}
.trik-action__label{
  display: none;
}
@media (min-width: 1024px){
  .trik-action__label{
    display: inline;
  }
}

/* Cart badge */
.trik-cart-badge{
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--cj-blue);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    font-weight: 800;
    display: none;
}
.trik-cart-badge.is-visible{
  display: inline-block;
}

/* Responsive header grid */
@media (max-width: 1023px){
  .trik-headerbar__inner{
    grid-template-columns: auto 1fr auto;
  }
  .trik-searchbar__form{
    max-width: 100%;
  }
}

/* -------------------------
 * CloudJersey-like nav buttons (desktop)
 * ------------------------- */

/* =========================
   NAV BUTTONS (DESKTOP)
   ========================= */

.cj-header-nav{
  display: flex;
  align-items: center;
  gap: 18px;
}

/* contenedor visible solo en desktop (ya lo haces con media) */
.cj-main-nav--desktop{
  display: none;
  gap: 8px;
}

@media (min-width: 1024px){
  .cj-main-nav--desktop{
    display: flex;
    align-items: center;
  }
}

/* Botón tipo “texto” con hit-area agradable */
.cj-nav-btn{
    appearance: none;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    background: transparent !important;
    gap: 5px;
    box-shadow: none !important;
    padding: 10px 8px;
    border-radius: 8px;
    color: var(--cj-blue) !important;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    transition: background-color .15s ease, transform .15s ease;
}

/* Flecha */
.cj-nav-arrow{
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: .7;
  transition: transform .2s ease, opacity .2s ease;
}

.cj-nav-btn:hover .cj-nav-arrow{
  opacity: 1;
}

.cj-nav-btn.is-active .cj-nav-arrow{
  transform: rotate(180deg);
  opacity: 1;
}

.cj-nav-arrow svg{
  width: 12px;
  height: 12px;
  display: block;
  fill: currentColor;
}


.cj-nav-btn.is-active .cj-nav-arrow{
  transform: rotate(180deg);
}

/* Mobile floating button */
.cj-nav-btn-mobile{
  border: none;
  background: #e7e5e5 !important;
  color: var(--cj-blue) !important;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  font-size: 26px;
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(0,0,0,.12);
}

@media (max-width: 1023px){
  .cj-nav-btn-mobile{
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 999999;
  }
}

/* show desktop menu on large screens */
@media (min-width: 1024px){
  .cj-main-nav--desktop{
    display: flex;
  }
  .cj-nav-btn-mobile{
    display: none;
  }
}

/* -------------------------
 * Backdrop (for mega menus)
 * ------------------------- */
.cj-menu-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.18);
  z-index: 900;
  opacity: 0;
  transition: opacity .15s ease;
}
.cj-menu-backdrop.is-visible{
  opacity: 1;
}

/* -------------------------
 * Mega menu (desktop)
 * ------------------------- */
.cj-mega{
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-top: 1px solid var(--cj-grey-border);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s ease, visibility .15s ease;
}

.cj-mega.is-open{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cj-mega-inner,
.cj-mega-inner--national,
.cj-mega-inner--players{
  max-width: 1200px;
  padding: 0;
}

.cj-mega--clubs .cj-mega-inner,
.cj-mega--players .cj-mega-inner--players{
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
}

.cj-mega--national .cj-mega-inner--national{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

/* Left column (leagues/countries) */
.cj-mega-leagues,
.cj-players-countries{
  background: var(--cj-grey);
}

.cj-league-item,
.cj-players-country-item{
    display: block;
    width: 100%;
    text-align: left;
    padding: 14px 18px;
    border-radius: 0;
    border: none;
    background: transparent;
    color: var(--cj-blue) !important;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid var(--cj-grey-border);
}

.cj-league-item:hover,
.cj-league-item:focus,
.cj-players-country-item:hover,
.cj-players-country-item:focus{
  background: var(--cj-light-blue-bg);
}

.cj-league-item.is-active,
.cj-players-country-item.is-active{
  background: #fff;
  font-weight: 800;
}

.cj-country-flag{
  width: auto;
  height: 16px;
  max-width: 28px;
  margin-right: 8px;
  border-radius: 2px;
  object-fit: contain;
  vertical-align: middle;
}

/* Grids */
@media (min-width: 769px){
  .cj-teams-grid,
  .cj-players-grid{
    display: none;
  }
  .cj-teams-grid.is-active,
  .cj-players-grid.is-active{
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
  }
}

/* Cards */
.cj-team-card,
.cj-player-card{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
  background: #fff;
  border: none;
  padding: 12px 8px;
  min-height: 110px;
}

.cj-team-card span,
.cj-player-card span{
  font-size: 13px;
  color: var(--cj-blue);
}

.cj-team-card img,
.cj-player-card img{
  width: auto;
  height: auto;
  max-width: 64px;
  max-height: 64px;
  margin-bottom: 6px;
  object-fit: contain;
}

.cj-team-card:hover,
.cj-player-card:hover{
  background: var(--cj-grey);
}

.cj-player-card img{
  border-radius: 50%;
}

.cj-empty{
  padding: 14px 18px;
  color: #6b7280;
  font-size: 13px;
}

/* Hide mega menus on mobile */
@media (max-width: 1023px){
  .cj-mega{
    display: none !important;
  }
}

/* -------------------------
 * Mobile menu overlay
 * ------------------------- */
.cj-mobile-menu-overlay{
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 90vw;
  height: 100vh;
  background: #fff;
  z-index: 1200;
  overflow: hidden;
  border-right: 1px solid var(--cj-grey-border);
}

.cj-mobile-menu-overlay.is-open{
  display: block;
}

body.cj-mobile-menu-open{
  overflow: hidden;
}

.cj-mobile-menu-panel{
  position: absolute;
  inset: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  transform: translateX(100%);
  transition: transform .25s ease;
}

/* state machine */
.cj-mobile-menu-overlay[data-state="root"] .cj-mobile-menu-panel--root{ transform: translateX(0); }

.cj-mobile-menu-overlay[data-state="leagues"] .cj-mobile-menu-panel--root{ transform: translateX(-100%); }
.cj-mobile-menu-overlay[data-state="leagues"] .cj-mobile-menu-panel--leagues{ transform: translateX(0); }

.cj-mobile-menu-overlay[data-state="teams"] .cj-mobile-menu-panel--root,
.cj-mobile-menu-overlay[data-state="teams"] .cj-mobile-menu-panel--leagues{ transform: translateX(-100%); }
.cj-mobile-menu-overlay[data-state="teams"] .cj-mobile-menu-panel--teams{ transform: translateX(0); }

.cj-mobile-menu-overlay[data-state="national"] .cj-mobile-menu-panel--root{ transform: translateX(-100%); }
.cj-mobile-menu-overlay[data-state="national"] .cj-mobile-menu-panel--national{ transform: translateX(0); }

.cj-mobile-menu-overlay[data-state="players-countries"] .cj-mobile-menu-panel--root{ transform: translateX(-100%); }
.cj-mobile-menu-overlay[data-state="players-countries"] .cj-mobile-menu-panel--players-countries{ transform: translateX(0); }

.cj-mobile-menu-overlay[data-state="players-list"] .cj-mobile-menu-panel--root,
.cj-mobile-menu-overlay[data-state="players-list"] .cj-mobile-menu-panel--players-countries{ transform: translateX(-100%); }
.cj-mobile-menu-overlay[data-state="players-list"] .cj-mobile-menu-panel--players-list{ transform: translateX(0); }

.cj-mobile-close{
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cj-light-red-bg);
  color: var(--cj-red);
  border-radius: 8px;
  border: none;
  padding: 0;
  font-size: 30px;
  line-height: 1;
}

.cj-mobile-back{
  position: relative;
  padding: 14px 16px;
  text-align: left;
  background: var(--cj-light-blue-bg);
  border: none;
  border-radius: 10px;
  color: var(--cj-blue);
  font-size: 14px;
  font-weight: 700;
}

.cj-mobile-main-btn,
.cj-mobile-league-item{
  position: relative;
  padding: 18px 16px;
  text-align: left;
  background: var(--cj-grey);
  border-radius: 10px;
  border: none;
  color: var(--cj-blue);
  font-size: 14px;
  font-weight: 800;
}

.cj-mobile-main-btn:hover,
.cj-mobile-league-item:hover{
  background: var(--cj-light-blue-bg);
}

.cj-mobile-teams-wrapper,
.cj-mobile-players-wrapper{
  flex: 1;
  overflow-y: auto;
}

.cj-mobile-national-grid{
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 0;
}

.cj-mobile-teams-grid,
.cj-mobile-players-grid{
  display: none;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 0;
}

.cj-mobile-teams-grid .cj-team-card,
.cj-mobile-national-grid .cj-team-card,
.cj-mobile-players-grid .cj-team-card{
  width: 100%;
  padding: 12px 8px;
}

/* =========================
   LAYERS (HEADER / MEGA / BACKDROP) - FINAL
   ========================= */

:root{
  --trik-header-h: 120px; /* fallback */
}

/* Header SIEMPRE arriba */
.trik-site-header{
  position: sticky;
  top: 0;
  z-index: 5000;
  background: #fff;
}

/* Wrapper de los overlays (donde cuelgan los .cj-mega) */
.cj-header{
  position: relative; /* ancla para .cj-mega absolute */
}

/* Mega menú: SIEMPRE absolute bajo el header */
.cj-mega{
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 5001; /* encima del backdrop */
}

/* Backdrop: empieza EXACTO cuando termina el header */
.cj-menu-backdrop{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  top: var(--trik-header-h);
  height: calc(100vh - var(--trik-header-h));

  background: rgba(0,0,0,.45);
  z-index: 4000; /* debajo del header y del mega */

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s ease, visibility .15s ease;
}

.cj-menu-backdrop.is-visible{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}


/* Icons inside header actions */
.trik-action__ico{
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
}

.trik-action__ico svg{
  width: 20px;
  height: 20px;
  display: block;

  /* Fuerza color por currentColor */
  fill: currentColor !important;
  stroke: currentColor !important;
}

.trik-action__ico svg *{
  fill: currentColor !important;
  stroke: currentColor !important;
}


/* Item = icono izquierda + copy derecha */
.trik-topstrip__item{
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Wrapper icono */
.trik-topstrip__icon{
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 2px;
  color: var(--cj-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.trik-topstrip__icon svg{
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor !important;
  stroke: currentColor !important;
}

.trik-topstrip__icon svg *{
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* Copy */
.trik-topstrip__copy{
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Separadores verticales entre items del topstrip */
.trik-topstrip__inner{
  align-items: center; /* opcional: centra visualmente */
}

.trik-topstrip__item{
  position: relative;
  padding-right: 16px;  /* espacio antes del separador */
}

.trik-topstrip__item:not(:last-child)::after{
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  right: 0;

  width: 1px;
  background: var(--cj-grey-border);
  opacity: 0.9;
}

/* En pantallas donde el topstrip pasa a 2 columnas o 1 columna,
   quitamos los separadores para que no queden raros */
@media (max-width: 900px){
  .trik-topstrip__item{
    padding-right: 0;
  }
  .trik-topstrip__item:not(:last-child)::after{
    display: none;
  }
}




.trik-searchbar__btn-ico{
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
}

.trik-searchbar__btn-ico svg{
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor !important;
  stroke: currentColor !important;
}

.trik-searchbar__btn-ico svg *{
  fill: currentColor !important;
  stroke: currentColor !important;
}












