/* ─────────────────────────────────────────────
 *  MOBILE NAVBAR  (unchanged)
 * ──────────────────────────────────────────── */
.navbar-mobile-section {
  height: 80px;
  padding: 12px 20px;
  display: none;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1000; /* navbar above overlay */
  background-color: var(--beige-02);
  transition: gap 0.4s ease, padding-bottom 0.4s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}
.navbar-mobile-icons-container {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: 20px;
}
.icon-mobile.full {
  display: none;
}
.items-in-cart-counter-mobile {
  display: none;
  color: var(--brand-red-02);
  position: absolute;
  top: -4px;
  right: -4px;
}
.cart-container-mobile.active {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.cart-container-mobile.active .icon-mobile.full {
  display: flex;
}
.cart-container-mobile.active .icon-mobile.empty {
  display: none;
}
.cart-container-mobile.active .items-in-cart-counter-mobile {
  display: flex;
}

/* ─────────────────────────  POPUP MENU  ───────────────────── */
.mobile-nav-popup-section {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100%;
  background-color: var(--beige-02);
  z-index: 1001;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  transition: right 0.3s ease;
}
.mobile-nav-popup-section.open {
  right: 0;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 998; /* BELOW navbar */
}
.overlay.show {
  opacity: 1;
  visibility: visible;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  padding: 1rem;
  cursor: pointer;
}
.navbar-mobile-popup-top-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px;
}
.navbar-mobile-popup-content-container {
  width: 100%;
  padding: 0 24px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.navbar-link-popup-mobile {
  height: 40px;
  text-transform: uppercase;
  color: var(--secondary);
  display: flex;
  align-items: center;
  padding: 8px;
  align-self: flex-start; /* override the ‘stretch’ on this item only */
}
.navbar-link-popup-mobile:is(:hover, :focus-visible, :focus-within) {
  cursor: pointer;
  color: var(--primary);
}
.navbar-link-popup-mobile.promo {
  color: var(--brand-red-02);
}

.products-dropdown-container-mobile {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  cursor: pointer;
}
.products-dropdown-container-mobile-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.products-dropdown-main-container {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding-left: 16px;
  width: 100%;
}
.products-dropdown-mobile-arrow-icon {
  filter: var(--icons-primary-filter);
  margin-left: auto;
  transition: 0.3s;
}
.products-dropdown-container-mobile.active .products-dropdown-main-container {
  display: flex;
}
.products-dropdown-container-mobile.active
  .products-dropdown-mobile-arrow-icon {
  transform: rotate(180deg);
}
.navbar-link-popup-mobile.active {
  background: url("../images/Textures/texture-darkgrey-small.jpg") center/cover
    no-repeat;
  color: var(--white);
}
.navbar-link-popup-mobile.promo.active {
  background: url("../images/Textures/texture-red-small.jpg") center/cover
    no-repeat;
}

.navbar-mobile-popup-bottom-container {
  height: 92px;
  width: 100%;
  border-top: 2px solid var(--border-primary);
  margin-top: auto;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
}
.navbar-mobile-bottom-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.navbar-mobile-popup-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

@media (width < 1100px) {
  .navbar-mobile-section {
    display: flex;
  }
}
@media (width < 600px) {
  .mobile-nav-popup-section {
    right: -600px;
    width: 100%;
    box-shadow: none;
  }
}

/* ─────────────────────────────────────────────
   *  SEARCH (completely re-hidden via scaleY)
   * ──────────────────────────────────────────── */
.mobile-search-container {
  position: fixed;
  top: 80px; /* directly below navbar */
  left: 0;
  right: 0;
  width: 100%;
  background: var(--beige-02);
  padding: 0.75rem 0.8rem 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transform-origin: top;
  transform: scaleY(0); /* HIDDEN */
  transition: transform 0.25s ease;
  z-index: 1001; /* above navbar & overlay */
}
.mobile-search-container.open {
  transform: scaleY(1);
} /* VISIBLE */

.mobile-search-container .search-input-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}
.mobile-search-container .search-input {
  flex: 1 1 0;
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: none;
}

/*  Results panel  */
#mobile-search-popup {
  max-height: 65dvh;
  overflow-y: auto;
  /* margin-top: 0.5rem; */
  border: 1px solid var(--neutral-05, #ddd);
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  display: none;
  left: 12px;
  right: 12px;
  width: calc(100% - 24px);
}
#mobile-search-popup.active {
  display: block;
}

#mobile-search-popup .seacrh-popup-product-container {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
}
#mobile-search-popup .search-popup-separator-line {
  height: 1px;
  background: var(--neutral-05, #eee);
  margin: 0 0.7rem;
}

.search-product-main-image {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 4px;
}
