/* Meliran mobile bottom navigation — scoped to the Elementor footer template. */
/* Fail-safe for a drawer left portalled during a responsive breakpoint change.
   JavaScript normally restores it to the widget; keeping it hidden here avoids
   a permanently open overlay if Elementor changes the viewport mid-render. */
@media (min-width: 768px) {
  body > .elementor-menu-cart__container.mbn-cart-drawer {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

@media (max-width: 767px) {
  .elementor-14239 .B-footer {
    --mbn-green: var(--e-global-color-b34b75b, #245248);
    --mbn-green-bright: var(--e-global-color-accent, #2f9b5a);
    isolation: isolate;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    /* Match the header's neutral white glass, transparency and blur. */
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06) !important;
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
  }

  .elementor-14239 .B-footer.mbn-enhanced > .e-con {
    flex: 1 1 0 !important;
    min-width: 0;
    min-height: 47px;
    position: relative;
    z-index: 2;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .elementor-14239 .B-footer .mbn-glass-indicator {
    position: absolute;
    z-index: 1;
    top: var(--mbn-y, 5px);
    left: 0;
    width: var(--mbn-w, 52px);
    height: var(--mbn-h, 47px);
    opacity: 0;
    pointer-events: none;
    border-radius: 19px;
    transform: translate3d(var(--mbn-x, 0), 0, 0) scale(0.92);
    transform-origin: center;
    background:
      radial-gradient(circle at 25% 8%, rgba(255, 255, 255, 0.88), transparent 46%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow:
      0 8px 20px rgba(0, 0, 0, 0.08),
      inset 0 1px 1px rgba(255, 255, 255, 0.78),
      inset 0 -1px 0 rgba(0, 0, 0, 0.04);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    backdrop-filter: blur(14px) saturate(180%);
    transition:
      transform 560ms cubic-bezier(0.22, 1, 0.36, 1),
      width 560ms cubic-bezier(0.22, 1, 0.36, 1),
      height 420ms cubic-bezier(0.22, 1, 0.36, 1),
      top 420ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 220ms ease;
    will-change: transform, width;
  }

  .elementor-14239 .B-footer.mbn-ready .mbn-glass-indicator {
    opacity: 1;
    transform: translate3d(var(--mbn-x, 0), 0, 0) scale(1);
  }

  .elementor-14239 .B-footer.mbn-no-motion .mbn-glass-indicator {
    transition: none !important;
  }

  .elementor-14239 .B-footer > .e-con .elementor-icon,
  .elementor-14239 .B-footer > .e-con .elementor-heading-title,
  .elementor-14239 .B-footer > .e-con .elementor-icon-box-title,
  .elementor-14239 .B-footer > .e-con .elementor-icon-box-title a {
    transition:
      color 320ms ease,
      transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 320ms ease;
  }

  .elementor-14239 .B-footer > .e-con svg path {
    transition: stroke 320ms ease, fill 320ms ease;
  }

  .elementor-14239 .B-footer > .e-con.mbn-item-active .elementor-icon,
  .elementor-14239 .B-footer > .e-con.mbn-item-active .elementor-icon-box-icon,
  .elementor-14239 .B-footer > .e-con.mbn-item-active .elementor-menu-cart__toggle,
  .elementor-14239 .B-footer > .e-con.mbn-item-active > .elementor-widget-heading {
    transform: translateY(-1px);
  }

  .elementor-14239 .B-footer > .e-con.mbn-item-active .elementor-heading-title,
  .elementor-14239 .B-footer > .e-con.mbn-item-active .elementor-icon-box-title,
  .elementor-14239 .B-footer > .e-con.mbn-item-active .elementor-icon-box-title a {
    color: var(--mbn-green) !important;
    font-weight: 700 !important;
  }

  .elementor-14239 .B-footer > .e-con.mbn-item-active svg path {
    stroke: var(--mbn-green) !important;
  }

  .elementor-14239 .B-footer > .e-con:active {
    transform: scale(0.97);
  }

  .elementor-14239 .elementor-element.elementor-element-fbba77f {
    padding-bottom: max(5px, env(safe-area-inset-bottom));
    pointer-events: none;
  }

  .elementor-14239 .elementor-element.elementor-element-fbba77f .B-footer,
  .elementor-14239 .elementor-element.elementor-element-fbba77f .B-footer * {
    pointer-events: auto;
  }
}

@media (max-width: 360px) {
  .elementor-14239 .B-footer {
    --padding-left: 6px !important;
    --padding-right: 6px !important;
    --column-gap: 0px !important;
  }

  .elementor-14239 .B-footer.mbn-enhanced > .e-con {
    min-height: 45px;
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .elementor-14239 .B-footer .mbn-glass-indicator,
  .elementor-14239 .B-footer > .e-con,
  .elementor-14239 .B-footer > .e-con * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}


/* Elementor's sticky RTL offsets can survive a desktop-to-mobile resize. */
@media (max-width: 767px) {
  .elementor-14239 .elementor-element.elementor-element-fbba77f:not(.elementor-sticky__spacer) {
    inset-inline: 0 !important;
    width: 100% !important;
  }

  /*
   * Elementor nests the side-cart overlay in the bottom bar. JavaScript moves
   * this overlay to body so position:fixed is relative to the viewport instead
   * of the bar's backdrop-filter containing block.
   */
  body > .elementor-menu-cart__container.mbn-cart-drawer {
    --cart-background-color: rgba(255, 255, 255, 0.48);
    --cart-border-style: solid;
    --cart-border-color: rgba(255, 255, 255, 0.5);
    --cart-border-radius: 22px 0 0 22px;
    --cart-padding: 18px;
    --cart-close-icon-size: 18px;
    --cart-close-button-color: var(--e-global-color-7882b0a, #27372f);
    --remove-item-button-size: 24px;
    --remove-item-button-color: var(--e-global-color-7882b0a, #27372f);
    --menu-cart-subtotal-color: var(--e-global-color-1d138c6, #245248);
    --product-price-color: var(--e-global-color-1d138c6, #245248);
    --cart-footer-layout: 1fr 1fr;
    --products-max-height-sidecart: calc(100dvh - 240px);
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    z-index: 100000 !important;
    overflow: hidden !important;
    background: rgba(19, 39, 32, 0.22) !important;
    -webkit-backdrop-filter: blur(5px) saturate(120%);
    backdrop-filter: blur(5px) saturate(120%);
  }

  /* The original hidden-state selector depends on the cart widget being the
     drawer's ancestor. The drawer is portalled to body on mobile, so mirror
     that state directly from Elementor's aria-hidden attribute. */
  body > .elementor-menu-cart__container.mbn-cart-drawer[aria-hidden="true"] {
    pointer-events: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    background: transparent !important;
    transform: scale(0) !important;
    transition:
      opacity 180ms ease,
      visibility 0s linear 320ms,
      transform 0s linear 320ms !important;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer[aria-hidden="false"] {
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: scale(1) !important;
    transition: opacity 220ms ease !important;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__main {
    position: absolute !important;
    inset-block: 0 !important;
    left: 0 !important;
    right: auto !important;
    width: min(82vw, 330px) !important;
    max-width: 330px !important;
    height: 100dvh !important;
    box-sizing: border-box;
    /* Compatible fallback: some Android WebViews reject a shorthand that
       combines max() and env(), which would leave the panel with no padding. */
    padding: 20px !important;
    padding-top: max(20px, env(safe-area-inset-top)) !important;
    padding-bottom: max(20px, env(safe-area-inset-bottom)) !important;
    overflow: auto;
    color: #27372f;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 252, 250, 0.72)) !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    border-block: 0 !important;
    border-left: 0 !important;
    border-radius: 0 22px 22px 0 !important;
    box-shadow:
      14px 0 38px rgba(25, 58, 43, 0.16),
      inset -1px 0 0 rgba(255, 255, 255, 0.28) !important;
    -webkit-backdrop-filter: blur(22px) saturate(150%) !important;
    backdrop-filter: blur(22px) saturate(150%) !important;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__main[aria-hidden="true"] {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateX(-105%) !important;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__main[aria-hidden="false"] {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateX(0) !important;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__product-name a {
    color: var(--e-global-color-44d2bb2, #27372f);
    font-family: "IRANYekanX", sans-serif;
    font-size: 14px;
    font-weight: 600;
  }

  body.mbn-cart-is-open {
    overflow: hidden;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__close-button {
    width: 22px;
    height: 22px;
    margin-bottom: 16px;
    color: var(--mbn-green, #245248);
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__close-button::before,
  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__close-button::after {
    height: 2px;
    background: #245248 !important;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__products {
    scrollbar-width: thin;
    scrollbar-color: rgba(36, 82, 72, 0.45) transparent;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__product {
    margin-bottom: 10px;
    padding: 10px 0 12px 44px;
    border: 1px solid rgba(36, 82, 72, 0.12) !important;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__product-remove {
    top: 50% !important;
    bottom: auto !important;
    inset-inline-end: 11px !important;
    transform: translateY(-50%) !important;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__product-image img {
    border-radius: 10px;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__product-price,
  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__subtotal {
    color: #245248 !important;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__subtotal {
    margin-top: auto;
    padding: 14px 2px 10px;
    border-color: rgba(36, 82, 72, 0.18) !important;
    font-size: 15px;
    font-weight: 800;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .woocommerce-mini-cart__empty-message {
    padding: 22px 14px;
    border: 1px solid rgba(36, 82, 72, 0.14);
    border-radius: 14px;
    color: #245248;
    background: rgba(255, 255, 255, 0.32);
    text-align: center;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__footer-buttons .elementor-button {
    border-radius: 12px;
    font-family: "IRANYekanX", sans-serif;
    font-size: 13px;
    font-weight: 600;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .widget_shopping_cart_content {
    min-height: 100%;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__footer-buttons {
    margin-top: 0 !important;
    padding-top: 14px;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__footer-buttons .elementor-button--view-cart {
    color: #245248 !important;
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(36, 82, 72, 0.24);
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__footer-buttons .elementor-button--checkout {
    color: #fff !important;
    background: #247443 !important;
    box-shadow: 0 7px 18px rgba(36, 116, 67, 0.2);
  }
}

@media (max-width: 767px) and (prefers-reduced-transparency: reduce) {
  body > .elementor-menu-cart__container.mbn-cart-drawer,
  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__main {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  body > .elementor-menu-cart__container.mbn-cart-drawer .elementor-menu-cart__main {
    background: rgba(250, 253, 251, 0.98) !important;
  }
}

/* Keep every mobile navigation icon and label on the same two rows. */
@media (max-width: 767px) {
  .elementor-14239 .B-footer > .e-con {
    justify-content: center !important;
    align-items: center !important;
    gap: 5px !important;
  }
  .elementor-14239 .B-footer > .e-con > .elementor-widget {
    margin: 0 !important;
  }
  .elementor-14239 .B-footer > .e-con > .elementor-widget-icon-box .elementor-icon-box-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }
  .elementor-14239 .B-footer > .e-con > .elementor-widget-icon-box .elementor-icon-box-icon {
    margin: 0 !important;
    height: 20px;
    line-height: 0;
  }
  .elementor-14239 .B-footer > .e-con > .elementor-widget-icon-box .elementor-icon,
  .elementor-14239 .B-footer > .e-con > .elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle_button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    padding-block: 0;
    line-height: 1;
  }
  .elementor-14239 .B-footer > .e-con > .elementor-widget-icon-box .elementor-icon svg,
  .elementor-14239 .B-footer > .e-con > .elementor-widget-woocommerce-menu-cart .elementor-button-icon svg,
  .elementor-14239 .B-footer .meliran-mobile-search-trigger > svg {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
  .elementor-14239 .B-footer > .e-con > .elementor-widget-icon-box .elementor-icon-box-content,
  .elementor-14239 .B-footer > .e-con > .elementor-widget-heading {
    line-height: 14px;
    text-align: center;
  }
  .elementor-14239 .B-footer > .e-con > .elementor-widget-icon-box .elementor-icon-box-title,
  .elementor-14239 .B-footer > .e-con > .elementor-widget-heading .elementor-heading-title,
  .elementor-14239 .B-footer .meliran-mobile-search-trigger > span {
    display: block;
    margin: 0;
    font-size: 9px;
    line-height: 14px;
    white-space: nowrap;
  }
  .elementor-14239 .B-footer .meliran-mobile-search-trigger {
    gap: 5px;
    min-height: 0;
    height: 39px;
  }
  /* Active state uses color and glass, without shifting either row. */
  .elementor-14239 .B-footer > .e-con.mbn-item-active .elementor-icon,
  .elementor-14239 .B-footer > .e-con.mbn-item-active .elementor-icon-box-icon,
  .elementor-14239 .B-footer > .e-con.mbn-item-active .elementor-menu-cart__toggle,
  .elementor-14239 .B-footer > .e-con.mbn-item-active > .elementor-widget-heading {
    transform: none;
  }
}
@media (max-width: 767px) {
  .elementor-14239 .B-footer > .e-con > .elementor-widget-woocommerce-menu-cart,
  .elementor-14239 .B-footer > .e-con > .elementor-widget-woocommerce-menu-cart .elementor-menu-cart__wrapper,
  .elementor-14239 .B-footer > .e-con > .elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle_wrapper,
  .elementor-14239 .B-footer > .e-con > .elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    line-height: 0;
  }
}
