/* GIFTOS: the approved lime torn-paper header, without a white upper fringe.
   Depends only on the existing gf-header/gf-head structure. */
html.gfr-active .gf.gf-header {
  background: #fff !important;
  overflow: visible;
}

/* Full-width black service strip, deliberately shorter in height.
   Icons and labels stay vertically centered with equal top/bottom breathing room. */
html.gfr-active .gf.gf-header .gf-notice {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-height: 50px;
  margin-inline: 0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1.2;
}
html.gfr-active .gf.gf-header .gf-notice > span {
  min-height: 28px;
  gap: 9px;
  padding-inline: clamp(10px, 1.5vw, 22px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
html.gfr-active .gf.gf-header .gf-notice svg {
  width: 24px;
  height: 24px;
}
html.gfr-active .gf.gf-header .gf-notice b {
  font-size: 11px;
  line-height: 1.2;
}

html.gfr-active .gf.gf-header .gf-head {
  position: relative;
  z-index: 25;
  isolation: isolate;
  overflow: visible;
  background: transparent !important;
  background-image: none !important;
}

html.gfr-active .gf.gf-header .gf-head::before {
  content: '';
  position: absolute;
  z-index: 0;
  /* The source has a transparent upper margin (~30px of 269px). Align the
     VISIBLE torn edge with the bottom of the benefits bar, so the three
     benefits have balanced black breathing room above and below. */
  top: -14px;
  right: 0;
  bottom: -8px;
  left: 0;
  pointer-events: none;
  background: url('header-paper-layer-v2-1.webp') center center / 110% 100% no-repeat;
}

/* The decorative paper is behind the real interactive header content. */
html.gfr-active .gf.gf-header .gf-head > .gf-logo,
html.gfr-active .gf.gf-header .gf-head > .gf-search,
html.gfr-active .gf.gf-header .gf-head > .gf-actions {
  position: relative;
  z-index: 1;
}

@media (max-width: 700px) {
  html.gfr-active .gf.gf-header .gf-notice {
    width: 100%;
    max-width: none;
    min-height: 71px;
    padding: 8px 4px;
    display: grid;
  }
  html.gfr-active .gf.gf-header .gf-notice > span {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-inline: 5px;
  }
  html.gfr-active .gf.gf-header .gf-notice svg {
    width: 22px;
    height: 22px;
  }
  html.gfr-active .gf.gf-header .gf-notice b {
    font-size: clamp(8px, 1.8vw, 10px);
  }
  html.gfr-active .gf.gf-header .gf-head::before {
    top: -17px;
    bottom: -7px;
    background-size: 115% 100%;
  }
}

/* The same fully functional header can also be inserted independently with
   [giftos_header_complet]. Artwork and logo remain separate source assets. */
.gfh-header,
.gfh-header * { box-sizing: border-box; }
.gfh-header {
  --gfh-lime: #dfff00;
  --gfh-ink: #10100f;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  overflow: visible;
  background: #fff;
  color: var(--gfh-ink);
  font-family: Outfit, Poppins, Arial, sans-serif;
}
.gfh-header a { color: inherit; text-decoration: none; }
.gfh-header button, .gfh-header input { font: inherit; }
.gfh-header svg { display: block; width: 27px; height: 27px; flex: none; }
.gfh-benefits {
  position: relative;
  width: 100%;
  max-width: none;
  min-height: 50px;
  margin-inline: 0;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gfh-ink);
  color: #fff;
  gap: 0;
}
.gfh-benefits > span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 clamp(10px, 1.5vw, 22px);
  white-space: nowrap;
}
.gfh-benefits > span + span { border-left: 1px solid var(--gfh-lime); }
.gfh-benefits svg { stroke: var(--gfh-lime); width: 24px; height: 24px; }
.gfh-benefits b { font-size: 11px; font-weight: 650; line-height: 1.2; }

.gfh-main {
  position: relative;
  z-index: 25;
  isolation: isolate;
  width: 100%;
  min-height: 98px;
  padding: 18px clamp(16px, 2.8vw, 33px);
  display: flex;
  align-items: center;
  gap: clamp(15px, 2.2vw, 32px);
  background: transparent;
}
.gfh-main::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: -14px;
  right: 0;
  bottom: -8px;
  left: 0;
  pointer-events: none;
  background: url('header-paper-layer-v2-1.webp') center center / 110% 100% no-repeat;
}
.gfh-main > .gfh-logo,
.gfh-main > .gfh-search,
.gfh-main > .gfh-actions { position: relative; z-index: 1; }
.gfh-logo { flex: 0 0 auto; display: block; line-height: 0; }
.gfh-logo img { width: clamp(133px, 13vw, 174px); height: auto; display: block; max-width: none; }
.gfh-search {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 58px;
  padding: 6px;
  display: flex;
  align-items: center;
  border: 2px solid var(--gfh-ink);
  border-radius: 100px;
  background: #fbfbfb;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.gfh-search:focus-within { border-color: #6fac00; box-shadow: 0 0 0 3px rgba(223,255,0,.45); }
.gfh-search input[type="search"] {
  width: 100%; min-width: 0; flex: 1 1 auto;
  padding: 10px 14px; margin: 0;
  outline: 0 !important; border: 0 !important; box-shadow: none !important;
  background: transparent !important; color: var(--gfh-ink);
  font-size: 15px; font-weight: 550;
}
.gfh-search input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
.gfh-search > button {
  width: 44px; height: 44px; flex: 0 0 44px;
  border: 0; border-radius: 50%; background: var(--gfh-lime);
  color: #111; display: grid; place-items: center; padding: 0;
  cursor: pointer; transition: transform .15s ease;
}
.gfh-search > button:hover { transform: scale(1.06); }
.gfh-search > button svg { width: 22px; height: 22px; }
.gfh-actions { flex: 0 0 auto; display: flex; align-items: center; gap: clamp(8px, 1.6vw, 21px); }
.gfh-action {
  position: relative; flex: 0 0 auto; min-width: 57px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 3px 0; border: 0; background: transparent;
  color: #111; font-size: 11px; font-weight: 550; line-height: 1.2;
  text-align: center; cursor: pointer;
}
.gfh-action:hover { color: #64206c; }
.gfh-action span { display: block; }
.gfh-cart-count {
  position: absolute; top: -5px; left: calc(50% + 5px);
  min-width: 19px; height: 19px; padding: 0 4px;
  display: grid; place-items: center; border-radius: 20px;
  background: #ed5c8e; color: #fff; font-size: 11px; font-weight: 800; font-style: normal;
}
.gfh-visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.gfh-header :is(a,button,input):focus-visible { outline: 3px solid #7aa917; outline-offset: 3px; }

/* The reminder button works locally, without collecting personal data. */
.gfh-reminder-panel[hidden] { display: none !important; }
.gfh-reminder-panel {
  position: absolute; z-index: 30; top: calc(100% - 4px); right: 15px;
  width: min(370px, calc(100vw - 28px)); padding: 20px;
  border: 2px solid #171717; border-radius: 16px; background: #fff;
  box-shadow: 0 15px 45px rgba(0,0,0,.18); color: #111;
}
.gfh-reminder-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.gfh-reminder-title strong { font-size: 18px; }
.gfh-reminder-close { border: 0; background: transparent; cursor: pointer; padding: 3px; }
.gfh-reminder-close svg { width: 20px; height: 20px; }
.gfh-reminder-panel p { font-size: 12px; line-height: 1.5; color: #555; }
.gfh-reminder-form { display: grid; gap: 10px; }
.gfh-reminder-form label { display: grid; gap: 5px; font-size: 12px; font-weight: 650; }
.gfh-reminder-form input { border: 1px solid #b7b7b7; border-radius: 8px; padding: 9px; font-size: 14px; }
.gfh-reminder-form button { border: 0; background: #dfff00; padding: 11px; border-radius: 8px; font-weight: 800; cursor: pointer; }
.gfh-reminder-list { list-style: none; padding: 0; margin: 13px 0 0; max-height: 200px; overflow: auto; }
.gfh-reminder-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid #eee; padding: 8px 0; font-size: 12px; }
.gfh-reminder-list li button { border: 0; background: #eee; border-radius: 5px; padding: 5px 7px; cursor: pointer; }

@media (max-width: 900px) {
  .gfh-main { gap: 12px; }
  .gfh-logo img { width: 125px; }
  .gfh-actions { gap: 7px; }
  .gfh-action { min-width: 48px; font-size: 10px; }
  .gfh-search { min-height: 52px; }
  .gfh-search > button { width: 40px; height: 40px; flex-basis: 40px; }
  .gfh-benefits > span { padding-inline: 12px; }
}

@media (max-width: 650px) {
  .gfh-benefits { width: 100%; min-height: 65px; padding: 7px 4px; }
  .gfh-benefits > span { flex: 1 1 0; min-width: 0; gap: 4px; padding: 0 5px; flex-direction: column; text-align: center; white-space: normal; }
  .gfh-benefits b { font-size: clamp(8px, 1.9vw, 10px); }
  .gfh-benefits svg { width: 22px; height: 22px; }
  .gfh-main { flex-wrap: wrap; gap: 10px 8px; min-height: 0; padding: 12px 13px 16px; }
  .gfh-main::before { top: -17px; bottom: -7px; background-size: 120% 100%; }
  .gfh-logo img { width: 120px; }
  .gfh-actions { margin-left: auto; gap: 5px; }
  .gfh-action { min-width: 43px; gap: 3px; }
  .gfh-action span { font-size: 9px; }
  .gfh-action svg { width: 21px; height: 21px; }
  .gfh-search { order: 3; flex-basis: 100%; min-height: 48px; }
  .gfh-search > button { width: 37px; height: 37px; flex-basis: 37px; }
}
