/* Scardi v1.2: only the Scardi theme, reversible with this plugin. */
@media (max-width: 900px) {
  .boutique .b-header .b-header-inner { position: relative; }
  .boutique .b-header .b-logo,
  .boutique .b-header-compact .b-logo {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1;
  }
  .boutique .b-header .b-logo img {
    display: block !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 174% !important; /* Preserve approved optical dimensions. */
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    object-fit: contain;
    object-position: center;
    transform: translate(-50%, -44%) !important;
    mix-blend-mode: multiply;
  }
  .boutique .b-wp-mobile-menu,
  .boutique .b-header .b-header-actions { position: relative; z-index: 3; }
}

/* Social icons, preserved on mobile menu and footer. */
.boutique .scardi-direct-social { display: flex; align-items: center; gap: 12px; }
.boutique .scardi-direct-social a {
  box-sizing: border-box; min-width: 44px; min-height: 44px;
  display: inline-flex; justify-content: center; align-items: center;
  border-radius: 50%; border: 1px solid currentColor;
  text-decoration: none; color: inherit;
}
.boutique .scardi-direct-social svg { width: 19px; height: 19px; }
.boutique .scardi-direct-mobile-social { padding: 14px 8px 8px; color: #283328; }
.boutique .scardi-direct-footer-social { color: #e4e2d7; margin-top: 12px; }
.boutique .scardi-direct-footer-languages {
  color: #e4e2d7; display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 15px; padding: 22px 0 6px; font-size: 12px;
}
.boutique .scardi-direct-footer-languages a { color: inherit; }
@media (max-width: 640px) {
  .boutique .scardi-direct-footer-languages,
  .boutique .scardi-direct-footer-social { justify-content: center; }
}

/* Real GTranslate anchors stay in the live DOM; offscreen only until moved.
   Do not use display:none or a <template> while GTranslate binds handlers. */
.scardi-direct-language-source {
  position: fixed !important; width: 1px; height: 1px; opacity: 0;
  overflow: hidden; top: -9999px; left: -9999px; pointer-events: none;
}
.boutique .scardi-direct-language-list { display: flex; align-items: center; gap: 5px 12px; flex-wrap: wrap; }
.boutique .scardi-direct-language-list a {
  display: inline-flex; align-items: center; min-height: 40px;
  text-decoration: none; font-size: 13px; color: inherit;
}
.boutique .scardi-direct-language-list a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Desktop: intentional spacing among Search / IT / Cart. */
.boutique .b-header .b-header-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: clamp(10px, 1.4vw, 20px) !important;
  flex-wrap: nowrap; overflow: visible; white-space: nowrap;
}
.boutique .scardi-direct-header-language { position: relative; flex: 0 0 auto; z-index: 80; color: inherit; }
.boutique .scardi-direct-header-language > summary {
  display: inline-flex; justify-content: center; align-items: center;
  gap: 5px; min-width: 44px; min-height: 44px; padding: 0 5px;
  box-sizing: border-box; cursor: pointer; list-style: none;
  font-size: 12px; font-weight: 650; line-height: 1.2;
}
.boutique .scardi-direct-header-language > summary::-webkit-details-marker { display: none; }
.boutique .scardi-direct-header-language > summary::marker { content: ''; }
.boutique .scardi-direct-header-caret { font-size: 15px; line-height: 1; margin-top: -3px; }
.boutique .scardi-direct-header-language-list {
  display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap;
  position: absolute; right: 0; top: calc(100% + 7px); z-index: 1000;
  width: 178px; max-height: min(72vh, 360px); overflow-y: auto;
  gap: 0; padding: 7px; box-sizing: border-box;
  border: 1px solid #d8cbb8; background: #fffdf8; color: #283328;
  box-shadow: 0 10px 26px #0002;
}
.boutique .scardi-direct-header-language:not([open]) .scardi-direct-header-language-list { display: none; }
.boutique .scardi-direct-header-language-list .scardi-direct-language-choice { width: 100%; }
.boutique .scardi-direct-header-language-list a {
  display: flex; width: 100%; min-height: 42px; align-items: center;
  box-sizing: border-box; padding: 7px 10px; border-radius: 3px;
  text-decoration: none; font-size: 13px; font-weight: 500; color: #283328;
}
.boutique .scardi-direct-header-language-list a:hover,
.boutique .scardi-direct-header-language-list .scardi-direct-lang-active a { background: #eee7db; text-decoration: none; }
.boutique .scardi-direct-header-language summary:focus-visible,
.boutique .scardi-direct-header-language-list a:focus-visible,
.boutique .scardi-direct-mobile-search:focus-visible,
.boutique .scardi-direct-social a:focus-visible { outline: 2px solid #b59568; outline-offset: 2px; }
.boutique .scardi-direct-mobile-search { display: none; }

/* Mobile: SEARCH moves visually to the LEFT, by the menu icon.
   LOGO remains centered. IT / CART share the RIGHT side with space between. */
@media (max-width: 900px) {
  .boutique .b-header .b-header-actions {
    display: flex !important; align-items: center !important;
    justify-content: flex-end !important; gap: 9px !important;
    flex: 0 0 auto; min-width: 96px; margin-left: auto;
    padding-right: 4px; z-index: 95;
  }
  .boutique .b-header .scardi-direct-search-original { display: none !important; }
  .boutique .scardi-direct-mobile-search {
    display: inline-flex; justify-content: center; align-items: center;
    width: 44px; height: 44px; padding: 10px;
    position: absolute; left: 60px; top: 50%; transform: translateY(-50%);
    box-sizing: border-box; z-index: 95; cursor: pointer;
    background: transparent; border: 0; color: inherit;
    -webkit-tap-highlight-color: transparent;
  }
  .boutique .scardi-direct-mobile-search svg { width: 21px; height: 21px; flex: 0 0 auto; }
  .boutique .scardi-direct-header-language > summary { min-width: 44px; padding: 0 3px; }
}
@media (max-width: 360px) {
  .boutique .scardi-direct-mobile-search { left: 53px; }
  .boutique .b-header .b-header-actions { gap: 5px !important; min-width: 93px; padding-right: 0; }
}
