body.page-home:has(.nourea-tools) .dett-nav__link--left,
body.page-home:has(.nourea-tools) .dett-nav__right-mobile .lang-menu,
body.page-home:has(.nourea-tools) .dett-hero__bottom {
  display: none !important;
}

body.page-home:has(.nourea-tools) .dett-nav__prodotti-wrap {
  margin-left: auto;
}

body.page-home:has(.nourea-tools) .dett-nav__prodotti-wrap .prodotti-dropdown {
  left: auto;
  right: 0;
}

.nourea-tools {
  --tools-top: max(calc(var(--ui-padding, 24px) + 54px), calc(env(safe-area-inset-top) + 78px));
  --tools-right: max(12px, env(safe-area-inset-right));
  --tools-width: 54px;
  position: fixed;
  z-index: 100000;
  top: var(--tools-top);
  right: var(--tools-right);
  width: var(--tools-width);
  direction: ltr;
  color: #fff8e9;
  pointer-events: none;
}

body.page-home:has(.dett-nav__prodotti-wrap.is-open, #dett-burger[aria-expanded="true"]) .nourea-tools {
  z-index: 99998;
}

.nourea-tools__rail,
.nourea-tools__toggle {
  border: 1px solid #fff1d47d;
  background: #4d3a2f;
  box-shadow: inset 0 1px 0 #fff8e936, 0 5px 18px #22191032;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nourea-tools__rail,
  .nourea-tools__toggle {
    background: #382a22a3;
    -webkit-backdrop-filter: blur(16px) saturate(135%);
    backdrop-filter: blur(16px) saturate(135%);
  }
}

.nourea-tools__rail {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px;
  border-radius: 27px;
  pointer-events: auto;
  transform-origin: right top;
  transition: transform 200ms ease, opacity 200ms ease, visibility 200ms;
}

.nourea-tools__toggle {
  position: absolute;
  z-index: 1;
  top: 5px;
  right: calc(100% + 5px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  color: inherit;
  cursor: pointer;
  pointer-events: auto;
  transition: right 200ms ease;
}

.nourea-tools__toggle[hidden] {
  display: none;
}

.nourea-tools__toggle svg {
  pointer-events: none;
  transition: transform 200ms ease;
}

.nourea-tools[data-collapsed] .nourea-tools__rail {
  visibility: hidden;
  opacity: 0;
  transform: translateX(7px) scale(.94);
  pointer-events: none;
}

.nourea-tools[data-collapsed] .nourea-tools__toggle {
  right: 0;
}

.nourea-tools[data-collapsed] .nourea-tools__toggle svg {
  transform: rotate(180deg);
}

.nourea-tools__control {
  box-sizing: border-box;
  position: relative;
  display: inline-flex;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 99px;
  background: none;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  list-style: none;
}

.nourea-tools__control::-webkit-details-marker {
  display: none;
}

.nourea-tools__control svg,
.nourea-save-product svg {
  flex: none;
  pointer-events: none;
}

.nourea-tools__count {
  position: absolute;
  top: 3px;
  right: 1px;
  min-width: 15px;
  padding-inline: 2px;
  border-radius: 10px;
  background: #30251edd;
  color: #f8dfb1;
  font-size: 9px;
  letter-spacing: 0;
  line-height: 15px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.nourea-tools__control:hover,
.nourea-tools__disclosure[open] > summary {
  background: #f8dfb129;
  color: #fff;
}

.nourea-tools__panel {
  position: absolute;
  inset: 55px calc(100% + 9px) auto auto;
  box-sizing: border-box;
  width: min(290px, calc(100vw - var(--tools-right) - max(12px, env(safe-area-inset-left)) - var(--tools-width) - 9px));
  max-height: min(340px, calc(100svh - var(--tools-top) - 67px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px 17px;
  border: 1px solid #cdb98a;
  border-radius: 18px;
  background: #f9f5ed;
  color: #2d241b;
  box-shadow: 0 14px 36px #1e160d36;
  font-size: 14px;
  line-height: 1.45;
  pointer-events: auto;
}

.nourea-tools[dir="rtl"] .nourea-tools__panel {
  direction: rtl;
  text-align: right;
}

.nourea-tools__panel .nourea-tools__heading {
  margin: 0 0 7px;
  font-size: 16px;
  font-weight: 650;
}

.nourea-tools__panel p {
  margin: 0;
}

.nourea-tools__panel a {
  display: block;
  padding: 10px 0;
  border-top: 1px solid #d8cdbb;
  color: inherit;
  text-decoration: none;
}

.nourea-tools__panel a:hover,
.nourea-tools__panel a[aria-current="page"] {
  color: #694721;
  text-decoration: underline;
  text-underline-offset: 3px;
}

:is(.nourea-tools, .nourea-shop-mobile-header) :is(a, summary, button):focus-visible,
.nourea-save-product:focus-visible,
.nourea-favorite-notice a:focus-visible {
  outline: 2px solid #a78650;
  outline-offset: -2px;
}

.shop-product-visual:has(> .nourea-save-product) {
  position: relative;
}

.shop-product-visual > .nourea-save-product {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-end: 8px;
  z-index: 1;
}

.nourea-save-product {
  display: inline-grid;
  flex: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #bca989;
  border-radius: 50%;
  background: #f9f5ed;
  color: #3b2b20;
  cursor: pointer;
}

.nourea-save-product:hover,
.nourea-save-product[aria-pressed="true"] {
  color: #795125;
  background: #faedda;
}

.nourea-save-product[aria-pressed="true"] svg {
  fill: #ad7845;
}

.nourea-save-product:disabled {
  cursor: wait;
  opacity: .68;
}

.product-page .actions:has(> .nourea-save-product) {
  flex-wrap: wrap;
}

.nourea-favorite-notice {
  position: fixed;
  inset-inline-start: max(12px, env(safe-area-inset-left));
  inset-block-start: max(12px, env(safe-area-inset-top));
  z-index: 100002;
  max-width: min(300px, calc(100vw - 24px));
  padding: 11px 16px;
  border: 1px solid #cdb98a;
  border-radius: 14px;
  background: #f9f5ed;
  color: #2d241b;
  box-shadow: 0 6px 22px #1e160d24;
  font-size: 14px;
}

.nourea-favorite-notice a {
  display: block;
  margin-top: 4px;
  color: inherit;
  text-decoration: underline;
}

.nourea-shop-mobile-left,
.nourea-shop-mobile-header .shop-header-actions > :is(.nourea-tools__control, .nourea-tools__disclosure),
.nourea-shop-cart-icon {
  display: none;
}

@media (max-width: 680px) {
  .nourea-shop-mobile-header {
    --shop-icon-size: clamp(32px, 10.3vw, 44px);
    position: relative;
    z-index: 3;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 5px;
    padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
    direction: ltr;
  }

  .nourea-shop-mobile-header .shop-home,
  .nourea-shop-mobile-header .shop-languages,
  .nourea-shop-account-row {
    display: none;
  }

  .nourea-shop-mobile-header .shop-logo img {
    width: clamp(68px, 21vw, 88px);
  }

  .nourea-shop-mobile-left,
  .nourea-shop-mobile-header .shop-header-actions {
    display: flex;
    align-items: center;
    gap: 0;
  }

  .nourea-shop-mobile-header .shop-header-actions > .nourea-tools__disclosure {
    display: block;
  }

  .nourea-shop-mobile-header :is(.nourea-tools__control, .shop-cart-trigger) {
    position: relative;
    display: grid;
    place-items: center;
    width: var(--shop-icon-size);
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #2d241b;
  }

  .nourea-shop-mobile-header .shop-header-actions > .nourea-tools__control {
    display: grid;
  }

  .nourea-shop-mobile-header :is(.nourea-tools__control:hover, .shop-cart-trigger:hover),
  .nourea-shop-mobile-header .nourea-tools__disclosure[open] > summary {
    background: #f3eee5;
    color: #2d241b;
  }

  .nourea-shop-mobile-header .nourea-shop-cart-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
    clip-path: inset(50%);
  }

  .nourea-shop-mobile-header .nourea-shop-cart-icon {
    display: flex;
  }

  .nourea-shop-mobile-header :is(.shop-count, .nourea-tools__count) {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 13px;
    padding: 0 2px;
    border-radius: 10px;
    background: #382c21;
    color: #fff8ef;
    font-size: 9px;
    line-height: 13px;
  }

  .nourea-shop-mobile-header .nourea-tools__panel {
    inset: calc(100% + 2px) auto auto max(12px, env(safe-area-inset-left));
    width: min(275px, calc(100% - 24px));
    max-height: min(340px, 55svh);
  }

  .nourea-shop-mobile-header .shop-header-actions .nourea-tools__panel {
    left: auto;
    right: max(12px, env(safe-area-inset-right));
  }

  [dir="rtl"] .nourea-shop-mobile-header .nourea-tools__panel {
    direction: rtl;
    text-align: right;
  }

  .nourea-shop-mobile-header ~ .shop-main .shop-product-visual > .nourea-save-product {
    inset-block-start: 3px;
    inset-inline-end: 3px;
    border: 0;
    background: none;
  }

  .nourea-shop-mobile-header ~ .shop-main .nourea-save-product::before {
    position: absolute;
    inset: 6px;
    border: 1px solid #bca989;
    border-radius: 50%;
    background: #f9f5ed;
    content: '';
  }

  .nourea-shop-mobile-header ~ .shop-main .nourea-save-product svg {
    z-index: 1;
    width: 16px;
    height: 16px;
  }

  .nourea-shop-mobile-header ~ .shop-main .nourea-save-product[aria-pressed="true"]::before {
    background: #faedda;
  }
}

@media (max-width: 1024px) {
  body.page-home:has(.nourea-tools) .dett-nav__prodotti-wrap {
    position: absolute;
    top: max(24px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
  }

  body.page-home:has(.nourea-tools) .dett-nav__prodotti-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 26vw;
    padding-inline: 5px;
    letter-spacing: .09em;
    text-shadow: 0 1px 4px #211a13ab;
  }

  body.page-home:has(.nourea-tools) .dett-nav__prodotti-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
    border-radius: 6px;
  }

  body.page-home:has(.nourea-tools) .prodotti-dropdown {
    box-sizing: border-box;
    width: min(340px, calc(100vw - max(12px, env(safe-area-inset-right)) - 12px));
    min-width: 0;
    max-height: min(480px, 64svh);
    overflow: auto;
    overscroll-behavior: contain;
    background-color: #34281eeb;
  }

  .nourea-tools {
    --tools-top: calc(max(24px, env(safe-area-inset-top)) + 55px);
    --tools-right: max(7px, env(safe-area-inset-right));
  }
}

@media (prefers-reduced-motion: reduce) {
  .nourea-tools__rail,
  .nourea-tools__toggle,
  .nourea-tools__toggle svg {
    transition: none;
  }
}
