/*************************************************
 * RELEVANT UX SHOP v2
 * Header + Browse / Help panels + Shop layout
 *************************************************/

/* ========== RESET & BASE ========= */

.ruxs-header,
.ruxs-overlay,
.ruxs-panel {
  box-sizing: border-box;
}

.ruxs-header *,
.ruxs-overlay *,
.ruxs-panel * {
  box-sizing: inherit;
}

/* Masquer le header du thème Gadgetfix uniquement
   quand notre UX est active. */
body.ruxs-ux-active #reactheme-header {
  display: none !important;
}

/* Donne de l’air au contenu Woo sous le nouveau header */
body.ruxs-ux-active .site-content,
body.ruxs-ux-active #content,
body.ruxs-ux-active .woocommerce-page #content,
body.ruxs-ux-active .woocommerce-products-header {
  padding-top: 90px !important;
  margin-top: 0 !important;
}

/* ========== THEME FIX : Remove unwanted mobile offsets ========== */

/* Désactive toutes les marges/paddings-top forcés du thème */
body.ruxs-ux-active #page,
body.ruxs-ux-active .site-content,
body.ruxs-ux-active #content,
body.ruxs-ux-active .main-content,
body.ruxs-ux-active .reactheme-main,
body.ruxs-ux-active .reactheme-container,
body.ruxs-ux-active .woocommerce-page #content,
body.ruxs-ux-active .woocommerce-products-header {
    margin-top: 0 !important;
    /*padding-top: 0 !important;*/
}
body.ruxs-ux-active.woocommerce-shop #content {
    padding-top: 90px !important;
}
/* Supprime le sticky offset du thème (il reste actif même masqué) */
body.ruxs-ux-active #reactheme-header,
body.ruxs-ux-active .sticky-header,
body.ruxs-ux-active .sticky-header-on {
    top: 0 !important;
}

/* Empêche le thème d'ajouter un padding-top via JS */
body.ruxs-ux-active {
    --header-height: 0 !important;
}

/* ========== HEADER STRIP ========= */

.ruxs-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.ruxs-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px 24px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

/* Logo */

.ruxs-left {
  display: flex;
  align-items: center;
}

.ruxs-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ruxs-logo {
    height: 50px !important;
    width: auto !important;
    max-height: 50px !important;
    object-fit: contain !important;
    display: block;
}

/* Centre : browse + search */

.ruxs-center {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

/* Pills génériques (Browse / Help / Account / Cart) */

.ruxs-pill {
  border-radius: 999px;
  border: 1px solid rgba(14,119,119,0.18);
  background: #ffffff;
  padding: 8px 18px;
  font-family: "Saira", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #0E7777;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(0,0,0,0.05);
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.18s ease, color 0.25s ease;
}

.ruxs-pill:hover {
  background: linear-gradient(90deg,#0E7777,#00BFA6);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.ruxs-pill span {
  display: inline-flex;
  align-items: center;
}

/* Browse button */

.ruxs-browse-trigger {
  padding-left: 16px;
  padding-right: 20px;
}

.ruxs-browse-icon {
  font-size: 17px;
  transform: translateY(-1px);
}

/* Search form */

.ruxs-search-form {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg,#ffffff,#f6fbfb);
  border: 1px solid rgba(14,119,119,0.16);
  padding: 3px;
  box-shadow:
    0 8px 18px rgba(0,0,0,0.06),
    0 0 24px rgba(0,191,166,0.16);
}

.ruxs-search-input {
  flex: 1 1 auto;
  border-radius: 999px;
  border: none;
  background: #ffffff;
  padding: 10px 16px;
  font-size: 14px;
  font-family: inherit;
  color: #033D3D;
  outline: none;
}

.ruxs-search-input::placeholder {
  color: rgba(3,61,61,0.55);
}

.ruxs-search-submit {
  border-radius: 999px;
  border: none;
  margin-left: 8px;
  padding: 0 18px;
  height: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg,#0E7777,#00BFA6);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ruxs-search-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.ruxs-search-icon {
  font-size: 18px;
  transform: translateY(1px);
}

/* Right block : Help / Account / Cart */

.ruxs-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Help pill */

.ruxs-help-trigger {
  padding-inline: 14px 18px;
}

.ruxs-help-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid #0E7777;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

/* Account pill */

.ruxs-account-link {
  text-decoration: none;
}

/* Cart pill avec badge */

.ruxs-cart-trigger {
  position: relative;
  padding-inline: 16px 18px;
}

.ruxs-cart-icon-wrap {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ruxs-cart-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.ruxs-cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #C9F220;
  color: #033D3D;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* ========== PANELS (Browse + Help) ========= */

.ruxs-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
}

.ruxs-overlay.is-open {
  display: block;
}

.ruxs-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2,27,27,0.52);
  backdrop-filter: blur(10px);
}

.ruxs-panel {
  position: relative;
  max-width: 1120px;
  margin: 90px auto 40px;
  background: #ffffff;
  border-radius: 26px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  padding: 50px 36px 30px;
}

.ruxs-panel-inner {
  position: relative;
  z-index: 2;
}

.ruxs-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: #ffffff;
  color: #0E7777;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.18s ease;
}

.ruxs-close-btn:hover {
  background: #0E7777;
  color: #ffffff;
  transform: translateY(-1px);
}

.ruxs-panel-title {
  margin: 0 0 18px;
  font-family: "Saira", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #033D3D;
}

/* Grid */

.ruxs-panel-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 32px;
}

.ruxs-panel-grid-2 {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.ruxs-panel-column h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: #0E7777;
}

/* Link list */

.ruxs-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ruxs-link-list li {
  margin: 4px 0;
}

.ruxs-link-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #033D3D;
  text-decoration: none;
  padding: 2px 0;
  transition: color 0.2s ease, transform 0.18s ease;
}

.ruxs-link-list a::before {
  content: '›';
  font-size: 14px;
  color: #0E7777;
  transform: translateY(1px);
}

.ruxs-link-list a:hover {
  color: #0E7777;
  transform: translateX(2px);
}

/* ========== SHOP FILTER BLOCK (Husky / sidebar) ========= */

/* Container global (desktop) */
.relevant-shop-grid{
  display:grid;
  grid-template-columns: 1fr !important;
  gap:32px;
  align-items:start;
  margin-top:10px;
}

.relevant-shop-products{
  width:100%;
  animation:ruxsFade .35s ease;
}

@keyframes ruxsFade{
  from{opacity:0;transform:translateY(6px)}
  to{opacity:1;transform:none}
}

/* Bloc filtres */
.relevant-shop-filters{
  background:#f8fbfb;
  border:1px solid rgba(14,119,119,.12);
  border-radius:16px;
  padding:18px 20px 24px;
  box-shadow:0 4px 12px rgba(0,0,0,.04);
  position:sticky;
  top:120px;
}


/* =========================================
   MOBILE HEADER V3 — Clean, stable, 2-rows
========================================= */
@media (max-width: 768px) {

    /* Reset previous grid conflicts */
    .ruxs-inner {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100%;
        padding: 12px 16px !important;
    }

    /* ----------- ROW 1 : Logo + Help + Account ----------- */

    .ruxs-row-top {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    /* Logo */
    .ruxs-left {
        width: auto !important;
    }

    .ruxs-logo {
        height: 40px !important;
        width: auto !important;
        max-height: 40px !important;
    }

    /* Help + Account group */
    .ruxs-top-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* ----------- ROW 2 : Browse + Search + Cart ----------- */

    .ruxs-row-bottom {
        width: 100%;
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 8px;
    }

    /* Browse button */
    .ruxs-browse-trigger {
        padding: 10px 16px !important;
        white-space: nowrap;
    }

    /* Search wrapper */
    .ruxs-search-form {
        width: 100% !important;
        margin: 0 !important;
    }

    .ruxs-search-input {
        width: 100% !important;
        font-size: 15px !important;
    }

    /* Cart pill */
    .ruxs-cart-trigger {
        padding: 10px 14px !important;
    }

    /* ----------- PANELS POSITION FIX ----------- */

    .ruxs-panel {
        margin-top: 140px !important;
        border-radius: 22px;
        max-height: calc(100vh - 160px) !important;
        overflow-y: auto !important;
    }

    .ruxs-close-btn {
        top: 14px !important;
        right: 14px !important;
    }
}

/* =========================================
   MOBILE PANEL FIX V4 — no overlap, perfect top
========================================= */
@media (max-width: 768px) {

    /* Le panel doit toujours commencer SOUS le header mobile */
    .ruxs-header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        z-index: 9999 !important;
    }


    /* On calcule automatiquement la hauteur du header */
    body.mobile-header-measured .ruxs-header {
        --ruxs-header-height: var(--measured-header-height);
    }

    /* Backdrop fix (ne passe plus au-dessus) */
    .ruxs-overlay-backdrop {
        top: var(--ruxs-header-height, 220px) !important;
        height: calc(100vh - var(--ruxs-header-height, 220px)) !important;
    }
}
/********************************************
 * MOBILE HEADER — FINAL FIX v4
 *******************************************/
@media (max-width: 768px) {

    /* ======== HEADER STRUCTURE ======== */

    .ruxs-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 12px 16px 16px !important;
        background: #fff;
        box-shadow: 0 2px 12px rgba(0,0,0,0.08);
        z-index: 9999 !important;
    }

    /* Logo centré */
    .ruxs-left {
        width: 100%;
        display: flex;
        justify-content: center !important;
        align-items: center;
        margin-bottom: 2px;
    }

    .ruxs-logo {
        height: 40px !important;
        width: auto !important;
    }

    /* Ligne 2 : Browse + Search */
    .ruxs-center {
        display: flex !important;
        flex-direction: row !important;
        width: 100%;
        gap: 10px !important;
    }

    .ruxs-browse-trigger {
        flex-shrink: 0;
        min-width: 120px;
    }

    .ruxs-search-form {
        flex-grow: 1;
        width: 100% !important;
    }

    /* Ligne 3 : Help + Account + Cart */
    .ruxs-right {
        width: 100%;
        display: flex;
        justify-content: center !important;
        gap: 12px !important;
        margin-top: 6px !important;
        margin-bottom: 4px !important;
    }

    /* ======== PANELS ======== */

    .ruxs-panel {
        margin-top: 160px !important; /* sous le header */
        width: calc(100% - 28px) !important;
        left: 14px !important;
        right: 14px !important;
        padding: 26px 20px !important;
    }

    .ruxs-panel-grid {
        grid-template-columns: 1fr !important;
        gap: 22px !important;
    }

    /* ======== PAGE CONTENT OFFSET ======== */

    body.ruxs-ux-active .site-content,
    body.ruxs-ux-active #content,
    body.ruxs-ux-active .woocommerce-page #content,
    body.ruxs-ux-active .woocommerce-products-header {
        padding-top: 200px !important; /* AVANT 120px */
    }

    /* ======== PRODUIT PAGE FIX ======== */
    .single-product .site-content,
    .single-product #content {
        padding-top: 220px !important;
    }
}
/* FINAL MOBILE PANEL FIX — DO NOT REMOVE */
@media (max-width: 768px) {
    .ruxs-panel {
        position: fixed !important;
        top: 220px !important;         /* header height + spacing */
        margin-top: 0 !important;
        width: calc(100% - 28px) !important;
        left: 14px !important;
        right: 14px !important;

        max-height: calc(100vh - 200px) !important; /* avoid overflow under address bar */
        overflow-y: auto !important;

        padding: 26px 20px !important;
        border-radius: 26px !important;
    }
}
/* =========================================
   PANEL OPEN ANIMATION — RELEVANT UX
========================================= */

.ruxs-panel {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
    transition:
        opacity 0.35s ease,
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* When panel opens */
.ruxs-overlay.is-open .ruxs-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Optional: smoother backdrop fade */
.ruxs-overlay-backdrop {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ruxs-overlay.is-open .ruxs-overlay-backdrop {
    opacity: 1;
}

.ruxs-panel-animating {
  will-change: transform, opacity;
}