/* Keep the existing Rey header and cart behavior; correct their mobile sizing. */
@media (max-width: 1024px) {
  .elementor-4152 .rey-mainNavigation-mobileBtn,
  .elementor-4152 .rey-headerCart,
  .elementor-4152 .rey-headerSearch-toggle,
  .elementor-4152 .rey-header-dropPanel-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 44px !important;
    min-width: 44px;
    height: 44px !important;
    min-height: 44px;
    padding: 10px !important;
    margin: 0 !important;
    box-sizing: border-box;
  }
  .elementor-4152 .rey-mainNavigation-mobileBtn .__bars { flex: 0 0 22px; }
  .elementor-4152 .rey-headerCart .rey-headerIcon-counter {
    position: absolute;
    top: 2px;
    right: 0;
    margin: 0;
  }
  .elementor-4152 .custom-logo-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .elementor-4152 .elementor-button { min-height: 44px; }
  .elementor-4152 a:focus-visible,
  .elementor-4152 button:focus-visible,
  .rey-cartPanel-wrapper a:focus-visible,
  .rey-cartPanel-wrapper button:focus-visible {
    outline: 3px solid #7ea45d;
    outline-offset: 2px;
  }
}

@media (max-width: 767px) {
  /* These are the current header's direct widgets; desktop layout stays native. */
  .elementor-4152 > .elementor-element-6c87476a {
    height: auto !important;
    min-height: 0 !important;
  }
  .elementor-4152 > .elementor-element-6c87476a > .e-con-inner {
    display: grid !important;
    grid-template-columns: clamp(68px, 22vw, 100px) minmax(0, 1fr) 44px 44px;
    grid-template-areas: 'logo cta cart menu';
    align-items: center;
    gap: 6px;
    height: auto !important;
    min-height: 0 !important;
    width: 100% !important;
    padding: 8px !important;
    box-sizing: border-box;
  }
  .elementor-4152 .elementor-element-686accf6 { grid-area: logo; justify-self: start; }
  .elementor-4152 .elementor-element-23a4db92 { grid-area: menu; }
  .elementor-4152 .elementor-element-3a58a88a { display: contents !important; }
  .elementor-4152 .elementor-element-54efdb6 { grid-area: cart; }
  .elementor-4152 .elementor-element-153e080 {
    grid-area: cta;
    justify-self: end;
    max-width: 124px;
  }
  .elementor-4152 .custom-logo-link { width: clamp(68px, 22vw, 100px); }
  .elementor-4152 .custom-logo-link img { width: 100%; height: auto; }
  .elementor-4152 .elementor-element-686accf6 > .elementor-widget-container,
  .elementor-4152 .elementor-element-23a4db92 > .elementor-widget-container,
  .elementor-4152 .elementor-element-54efdb6 > .elementor-widget-container,
  .elementor-4152 .elementor-element-153e080 > .elementor-widget-container {
    margin: 0 !important;
  }
  .elementor-4152 .elementor-element-686accf6,
  .elementor-4152 .elementor-element-23a4db92,
  .elementor-4152 .elementor-element-54efdb6,
  .elementor-4152 .elementor-element-153e080 {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    order: 0 !important;
  }
  .elementor-4152 .elementor-element-153e080 .elementor-button-wrapper,
  .elementor-4152 .elementor-element-153e080 .elementor-button {
    width: 100%;
  }
  .elementor-4152 .elementor-element-153e080 .elementor-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    min-height: 34px;
    padding: 8px !important;
    font-size: clamp(10px, 2.8vw, 11px) !important;
    white-space: nowrap;
    box-sizing: border-box;
  }

  /* The configured 470px drawer must shrink, including its inner panel. */
  .rey-cartPanel-wrapper {
    width: min(470px, 100vw) !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    right: 0 !important;
    left: auto !important;
    box-sizing: border-box;
  }
  .rey-cartPanel-wrapper > .rey-cartPanel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }
  .rey-cartPanel-wrapper .woocommerce-mini-cart,
  .rey-cartPanel-wrapper .woocommerce-mini-cart-inner,
  .rey-cartPanel-wrapper .mini_cart_item {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .rey-cartPanel-wrapper .woocommerce-mini-cart-thumbTitle { padding-right: 46px !important; }
  .rey-cartPanel-wrapper .woocommerce-mini-cart-item-title { overflow-wrap: anywhere; }
  .rey-cartPanel-wrapper .rey-cartPanel-header { min-height: 44px; padding-right: 48px; }
  .rey-cartPanel-wrapper .rey-cartPanel-header .rey-sidePanel-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    top: 0;
    width: 44px;
    height: 44px;
    padding: 14px;
    box-sizing: border-box;
  }
  .rey-cartPanel-wrapper .remove_from_cart_button {
    width: 44px !important;
    height: 44px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .rey-cartPanel-wrapper .woocommerce-mini-cart__buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px;
  }
  .rey-cartPanel-wrapper .woocommerce-mini-cart__buttons > a {
    width: 100% !important;
    flex: none !important;
    min-height: 44px;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  .rey-offcanvas-close { min-width: 44px; min-height: 44px; }
  body.--cart-active [role=button][data-pop="minimized:open"][data-maximized=false] {
    display: none !important;
    pointer-events: none !important;
  }
}

/* A wrapped WordPress account link otherwise sits over the mobile menu. */
@media (max-width: 767px) {
  #wpadminbar #wp-admin-bar-top-secondary {
    position: absolute !important;
    top: 0;
    right: 0;
    margin: 0 !important;
  }
}

@media (max-width: 767px) {
  /* Let original/discounted prices and line totals wrap beside the quantity. */
  .rey-cartPanel-wrapper .woocommerce-mini-cart-price {
    min-width: 0 !important;
    flex-wrap: wrap !important;
    gap: 4px 8px;
  }
}

.en-black-friday-badge,
.woocommerce span.onsale.en-black-friday-badge,
.woocommerce .price span.onsale.en-black-friday-badge {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  padding: .25rem .5rem;
  border-radius: .375rem;
  background: #24392d;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.35;
  vertical-align: middle;
}

.woocommerce span.onsale.en-black-friday-badge {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 0;
  white-space: nowrap;
  text-transform: none;
}

.en-bf-shop-cover {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  width: min(calc(100% - clamp(24px, 4vw, 72px)), 1486px);
  min-height: clamp(174px, 17vw, 230px);
  margin: clamp(10px, 1.5vw, 20px) auto 0;
  padding: clamp(16px, 2vw, 26px) clamp(18px, 3.5vw, 48px);
  overflow: hidden;
  border-radius: 16px;
  background: #101b14;
  color: #f6f8f3;
}

.en-bf-shop-cover .en-bf-shop-cover__art {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: min(54%, 740px);
  height: 100%;
  object-fit: cover;
  object-position: 54% 61%;
  mask-image: linear-gradient(90deg, transparent, #000 26%);
}

.en-bf-shop-cover__copy {
  width: min(100%, 38rem);
}

.en-bf-shop-cover .en-bf-shop-cover__campaign {
  margin: 0 0 .35rem;
  color: #d1f391;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.en-bf-shop-cover .en-bf-shop-cover__title {
  margin: 0;
  color: #f6f8f3;
  font-size: clamp(1.85rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.04em;
}

.en-bf-shop-cover__title strong {
  color: #d1f391;
  white-space: nowrap;
}

.en-bf-shop-cover .en-bf-shop-cover__description {
  max-width: 49ch;
  margin: .45rem 0 .75rem;
  color: #e2e9e0;
  font-size: .9375rem;
  line-height: 1.42;
}

.en-bf-shop-cover a.en-bf-shop-cover__cta {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  padding: .45rem .9rem;
  border-radius: 7px;
  background: #d1f391;
  color: #101b14;
  font-size: .875rem;
  font-weight: 700;
}

.en-bf-shop-cover a.en-bf-shop-cover__cta:hover {
  background: #e1f8b3;
  color: #101b14;
}

.en-bf-shop-cover a.en-bf-shop-cover__cta:focus-visible {
  outline: 2px solid #f6f8f3;
  outline-offset: 3px;
}

.rey-pageCover:has(> .en-bf-shop-cover) .elementor-358 .elementor-element-e23873f > .e-con-inner {
  gap: 12px;
  padding-block: 12px;
}

.rey-pageCover:has(> .en-bf-shop-cover) .elementor-358 .elementor-element-1fac4ad .elementor-heading-title {
  font-size: clamp(1.75rem, 3.2vw, 2.625rem);
  line-height: 1.12;
}

@media (max-width: 640px) {
  .en-bf-shop-cover .en-bf-shop-cover__art {
    width: 68%;
    opacity: .42;
    mask-image: linear-gradient(90deg, transparent 5%, #000 75%);
  }

  .en-bf-shop-cover .en-bf-shop-cover__title {
    font-size: clamp(1.65rem, 6.4vw, 2.25rem);
  }
}

/* Black Friday hero on the inquiry landing page. */
.eg-lp .eg-lp-hero--black-friday {
  --en-bf-inquiry-ink: #101b14;
  --en-bf-inquiry-accent: #d1f391;
  --en-bf-inquiry-hover: #c6e985;
  min-height: 0;
  background: var(--en-bf-inquiry-ink);
}

.eg-lp .eg-lp-hero--black-friday::before {
  content: none;
}

.eg-lp-hero--black-friday .eg-lp-header {
  border-bottom: 1px solid rgba(223, 240, 221, .18);
}

.eg-lp-hero--black-friday .eg-lp-header img {
  filter: brightness(0) invert(1);
}

.eg-lp .eg-lp-hero--black-friday .eg-lp-header .eg-lp-btn,
.eg-lp .eg-lp-hero--black-friday .eg-lp-form-slot .elementor-button {
  color: var(--en-bf-inquiry-ink) !important;
  background: var(--en-bf-inquiry-accent) !important;
}

.eg-lp .eg-lp-hero--black-friday .eg-lp-header .eg-lp-btn:hover,
.eg-lp .eg-lp-hero--black-friday .eg-lp-form-slot .elementor-button:hover {
  background: var(--en-bf-inquiry-hover) !important;
}

.eg-lp-hero--black-friday .eg-lp-hero-grid {
  align-items: end;
  gap: clamp(28px, 5vw, 70px);
  padding-block: clamp(26px, 3vw, 44px) clamp(28px, 4vw, 56px);
}

.eg-lp-hero--black-friday .eg-lp-hero-copy {
  min-width: 0;
  padding-top: 0;
  color: #f6f8f3;
}

.eg-lp-hero--black-friday .eg-lp-hero-copy .eg-lp-eyebrow {
  margin-bottom: 10px;
  color: var(--en-bf-inquiry-accent);
  font-size: .825rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eg-lp .eg-lp-hero--black-friday h1 {
  max-width: none;
  color: #f6f8f3;
  font-size: clamp(2.25rem, 4.3vw, 4rem);
  letter-spacing: -.045em;
}

.eg-lp .eg-lp-hero--black-friday h1 em {
  display: inline;
  color: var(--en-bf-inquiry-accent);
  white-space: nowrap;
}

.eg-lp-hero--black-friday .eg-lp-hero-copy .eg-lp-intro {
  max-width: none;
  margin-top: 10px !important;
  color: #e0e9de;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  font-weight: 500;
  line-height: 1.5;
}

.eg-lp-hero--black-friday .eg-lp-intro strong {
  color: #f6f8f3;
}

.eg-lp-hero--black-friday .en-bf-inquiry-art {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 12px;
  border-radius: 12px;
}

@media (max-width: 700px) {
  .eg-lp-hero--black-friday .eg-lp-hero-grid {
    gap: 18px;
    padding-block: 16px 28px;
  }

  .eg-lp .eg-lp-hero--black-friday h1 {
    font-size: clamp(1.875rem, 8vw, 2.75rem);
  }

  .eg-lp-hero--black-friday .en-bf-inquiry-art {
    margin-top: 10px;
  }
}

.eg-offer-popup.elementor-section {
  --en-offer-padding: clamp(12px, 3vw, 22px);
  width: min(calc(100% - 24px), 620px);
  max-width: 620px;
  border-radius: 20px !important;
  background: #f7f9f5 !important;
}

/* Keep the old design hidden if a previous Elementor revision is restored. */
.eg-offer-popup :is(.eg-offer-popup__visual, .eg-offer-popup__intro) {
  display: none;
}

.eg-offer-popup .eg-offer-popup__content {
  flex: 0 0 100% !important;
  width: 100% !important;
  max-width: 100% !important;
}

.reymodal:has(.eg-offer-popup) {
  overscroll-behavior-y: contain;
  scroll-padding-block: 12px;
}

.reymodal:has(.eg-offer-popup) .reymodal__wrap {
  padding-block: 12px;
}

/* Let Rey's outer dialog scroll the full form. */
.reymodal .eg-offer-popup.elementor-section {
  max-height: none !important;
  overflow: visible !important;
}

.reymodal .eg-offer-popup > .elementor-container {
  min-height: 0;
  overflow: visible !important;
}

.eg-offer-popup .eg-offer-popup__content > .elementor-widget-wrap {
  min-height: 0;
  padding: var(--en-offer-padding) !important;
  border-radius: 0 !important;
}

.eg-offer-popup .en-offer-heading {
  margin-bottom: 12px;
  padding: 14px 51px 14px 16px;
  border-radius: 12px;
  background: #e7eee3;
  color: #152119;
}

.eg-offer-popup .en-offer-heading--black-friday {
  background: #101b14;
  color: #edf4eb;
}

.eg-offer-popup .en-offer-heading h2 {
  margin: 0 0 5px;
  color: inherit;
  font-size: clamp(1.375rem, 4.5vw, 1.875rem);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.eg-offer-popup .en-offer-heading--black-friday h2 {
  color: #d1f391;
}

.eg-offer-popup .en-offer-heading p {
  margin: 0;
  color: inherit;
  font-size: .875rem;
  line-height: 1.42;
}

.reymodal .eg-offer-popup > .reymodal__close {
  top: calc(var(--en-offer-padding) + 6px);
  right: calc(var(--en-offer-padding) + 6px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  color: #385040 !important;
  clip-path: none;
  z-index: 2;
}

.reymodal .eg-offer-popup:has(.en-offer-heading--black-friday) > .reymodal__close {
  color: #edf4eb !important;
}

/* Rey adds a new close button when the same section is reopened. */
.reymodal .eg-offer-popup > .reymodal__close:has(~ .reymodal__close) {
  display: none;
}

.reymodal .eg-offer-popup > .reymodal__close::before,
.reymodal .eg-offer-popup > .reymodal__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.reymodal .eg-offer-popup > .reymodal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.reymodal .eg-offer-popup > .reymodal__close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -4px;
}

.eg-offer-popup .eg-offer-popup__form .elementor-widget-container {
  padding-bottom: 0;
}

.eg-offer-popup .energingai-form .en-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.eg-offer-popup .en-fields > .elementor-field-group {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
  margin: 0;
}

.eg-offer-popup .en-fields > :is(.elementor-field-group-name, .elementor-field-group-email, .elementor-field-group-Telefonas, .elementor-field-group-city) {
  grid-column: auto;
}

.eg-offer-popup.elementor-section .eg-offer-popup__form .energingai-form .elementor-field-textual {
  min-height: 44px;
  font-size: .875rem;
}

.eg-offer-popup .energingai-form textarea.elementor-field-textual {
  height: 64px;
  min-height: 64px;
  resize: vertical;
}

.eg-offer-popup .energingai-form .elementor-field-type-acceptance {
  font-size: .8125rem;
  line-height: 1.4;
}

.eg-offer-popup:has(.en-offer-heading--black-friday) .energingai-form .elementor-button {
  background: #d1f391;
  color: #101b14;
}

.eg-offer-popup:has(.en-offer-heading--black-friday) .energingai-form .elementor-button:hover {
  background: #bee878;
  color: #101b14;
}

@media (max-width: 767px) {
  .reymodal:has(.eg-offer-popup) {
    top: var(--en-offer-viewport-top, 0px);
    max-height: var(--en-offer-viewport-height, 100dvh);
  }

  .eg-offer-popup .en-fields > :is(.elementor-field-group-name, .elementor-field-group-email) {
    grid-column: 1 / -1;
  }

  .eg-offer-popup.elementor-section .eg-offer-popup__form .energingai-form .elementor-field-textual {
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  .eg-offer-popup .energingai-form .en-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}
