/*
  Gites product-page header.
  The desktop header measurements below are the same values used by
  /GitesPC/css/styles.css. The mobile header measurements are the same values
  used by /GitesMobil/css/mobile.css. Only the outer "header-only" crop is new;
  it prevents the homepage hero canvas from taking space on the product page.
*/

.gites-header-only,
.gites-header-only * {
  box-sizing: border-box;
}

.gites-header-only {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: 132px;
  z-index: 180;
  overflow: visible;
  pointer-events: none;
  font-family: 'Inter', sans-serif;
}

/* Exact homepage outer scale context. */
.gites-header-only .page-scale {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  transform: scale(0.9);
  transform-origin: top center;
  pointer-events: none;
}

.gites-header-only .grid-hero {
  --canvas-w: 1920;
  --scale: min(1, 100vw / var(--canvas-w));
  height: 132px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  overflow: visible;
  margin: 0 auto;
  pointer-events: none;
}

.gites-header-only .grid-hero .canvas {
  width: calc(var(--canvas-w) * 1px);
  height: 132px;
  position: relative;
  transform: scale(var(--scale));
  transform-origin: top center;
  overflow: visible;
  pointer-events: none;
}

/* ===== DESKTOP HEADER: copied from the homepage values ===== */
.gites-header-only .header-inner {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  width: 1356px;
  height: 76px;
  background-color: #ffffff;
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 55px;
  margin: 0 auto;
  box-sizing: border-box;
}

.gites-header-only .logo {
  margin-top: 0;
  margin-bottom: 21px;
  margin-right: 33px;
  height: 40px;
}

.gites-header-only .logo img {
  width: 202px;
  height: 66px;
  max-width: none;
  display: block;
}

.gites-header-only .nav-menu {
  display: flex;
  align-items: center;
  gap: 37px;
  height: 100%;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: #000000;
}

.gites-header-only .nav-menu a {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #000;
  text-decoration: none;
  height: 70px;
  line-height: 76px;
  margin-left: 20px;
  margin-right: 20px;
  white-space: nowrap;
}

.gites-header-only .grid-hero .main-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 3;
  display: flex;
  justify-content: center;
  margin: 0;
  padding-top: 40px;
  pointer-events: auto;
}

.gites-header-only .burger {
  display: none;
}

.gites-header-only .mobile-drawer {
  display: none;
}

.gites-header-only a:focus-visible,
.gites-header-only button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Keep the country-of-origin line clear of the desktop header. */
@media (min-width: 769px) {
  .products .origin-signature { top: 126px; }
}

/* ===== MOBILE HEADER: same layout/measurements as GitesMobil ===== */
@media (max-width: 768px) {
  .gites-header-only {
    height: 80px;
  }

  .gites-header-only .page-scale {
    transform: none !important;
    transform-origin: 0 0 !important;
    max-width: none;
  }

  .gites-header-only .grid-hero,
  .gites-header-only .grid-hero .canvas {
    width: 100% !important;
    max-width: 100% !important;
    height: 80px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  .gites-header-only .grid-hero .main-header {
    padding-top: 12px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .gites-header-only .header-inner {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-items: center;
    width: 100% !important;
    height: 56px !important;
    border-radius: 16px !important;
    padding: 0 12px !important;
    gap: 8px !important;
    background: #fff;
    position: relative;
  }

  .gites-header-only .logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    /* Keep the homepage logo box exactly: 40px high with its existing margins. */
    height: 40px;
  }

  .gites-header-only .logo img {
    width: 140px !important;
    height: auto !important;
    max-width: 140px;
    display: block;
  }

  .gites-header-only .nav-menu {
    display: none !important;
    grid-column: 1;
    justify-self: start;
  }

  .gites-header-only .burger {
    display: inline-flex;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
    border: 0;
    background: transparent;
    cursor: pointer;
    margin-left: auto;
    grid-column: 3;
    justify-self: end;
    padding: 0;
  }

  .gites-header-only .burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #000;
    border-radius: 2px;
  }

  .gites-header-only .mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    display: block;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
  }

  .gites-header-only .mobile-drawer[hidden] {
    display: none;
  }

  .gites-header-only .mobile-drawer.open {
    opacity: 1;
    pointer-events: auto;
  }

  .gites-header-only .mobile-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(2px);
  }

  .gites-header-only .mobile-panel {
    position: relative;
    z-index: 1;
    width: 45vw;
    max-width: none;
    height: 50dvh;
    background: #111;
    border-left: 1px solid #222;
    padding: 20px 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transform: translateX(100%);
    transition: transform .25s ease;
    margin-left: auto;
    overflow-y: auto;
  }

  .gites-header-only .mobile-drawer.open .mobile-panel {
    transform: translateX(0);
  }

  .gites-header-only .mobile-panel a {
    color: #fff;
    text-decoration: none;
    font: 600 16px/1.2 'Inter', system-ui, -apple-system, sans-serif;
    padding: 14px 10px;
    border-radius: 10px;
  }

  .gites-header-only .mobile-panel a:active {
    background: #1d1d1d;
  }

  .gites-header-only .mobile-close {
    align-self: flex-end;
    border: 0;
    background: #222;
    color: #fff;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 8px;
    font-size: 1.6rem;
    line-height: 1;
  }

  .products .origin-signature { top: 86px; }
}

@media (max-width: 380px), (max-height: 700px) {
  .gites-header-only .mobile-panel { height: 70dvh; }
}

@media (prefers-reduced-motion: reduce) {
  .gites-header-only .mobile-drawer,
  .gites-header-only .mobile-panel { transition: none; }
}

body.no-scroll { overflow: hidden; }
