.foodord-order-page {
  --foodord-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --foodord-sidebar-width: 360px;
}

.foodord-order-page .wr-card,
.foodord-order-page .foodord-scroll-nav,
.foodord-order-page .foodord-products-shortcode,
.foodord-order-page .foodord-order-toggle {
  font-family: var(--foodord-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}

.foodord-pac-container {
  transform: translateZ(0);
  background: #ffffff;
  border: none;
  box-shadow: none;
  border-radius: 14px;
  padding: 4px 0;
  overflow: hidden;
  font-family: inherit;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-sizing: border-box;
}

.foodord-pac-container .pac-item {
  padding: 10px 16px 10px 46px;
  border: none;
  line-height: 1.4;
  font-size: 14px;
  color: rgba(37, 40, 43, 0.86);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  position: relative;
}

.foodord-pac-container .pac-item a,
.foodord-pac-container .pac-item a:link,
.foodord-pac-container .pac-item a:visited,
.foodord-pac-container .pac-item a:hover,
.foodord-pac-container .pac-item a:focus,
.foodord-pac-container .pac-item a:active {
  color: rgba(33, 35, 38, 0.94);
  text-decoration: none;
}

.foodord-pac-container .pac-item+.pac-item {
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.foodord-pac-container .pac-item:hover,
.foodord-pac-container .pac-item.pac-item-selected {
  background-color: #f7f7f7;
  color: rgba(33, 35, 38, 0.95);
}

.foodord-pac-container .pac-item::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  background-color: rgba(36, 38, 41, 0.78);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.25c-2.9 0-5.25 2.35-5.25 5.25 0 3.85 5.25 8.25 5.25 8.25s5.25-4.4 5.25-8.25c0-2.9-2.35-5.25-5.25-5.25zm0 7.5a2.25 2.25 0 1 1 0-4.5 2.25 2.25 0 0 1 0 4.5z'/%3E%3Ccircle cx='8' cy='6.5' r='1'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-size: contain;
}

.foodord-pac-container .pac-item::after {
  display: none;
}

.foodord-pac-container .pac-item .pac-icon {
  display: none;
}

.foodord-pac-container .pac-item .pac-item-query {
  font-weight: 600;
  color: rgba(33, 35, 38, 0.94);
  display: inline;
  margin-right: 4px;
}

.foodord-pac-container .pac-item .pac-item-query+span {
  font-size: 0.85rem;
  color: rgba(95, 98, 102, 0.9);
  display: inline;
  margin-left: 2px;
}

.foodord-pac-container .pac-logo {
  display: block;
  width: 100%;
  padding: 6px 16px 0;
  opacity: 0.75;
  position: relative;
  background: none;

  .foodord-sidebar {
    width: 100%;
    max-width: 420px;
    margin: 40px auto;
    padding: 0 1.25rem;
    box-sizing: border-box;
  }

  .foodord-sidebar .wr-card {
    position: static;
    width: 100%;
  }

  @media (min-width: 1024px) {
    .foodord-sidebar {
      max-width: 360px;
      margin: 40px auto 60px;
    }
  }

  text-align: left;
}

/* Frontend scope root (wrap your public components with this class) */
:root {
  --background-color: #f7f7f7;
  --primary-color: #c9386f;
  --primary-hover: #b92a61;
  --text-color: #323232;
  --text-hover: #313131;
  --secondary-text: #6b6b6b;
  --button-bg: #c9386f;
  --button-text-color: #ffffff;
  --button-on-hover: #b92a61;
  --border-color: #e3e3e3;
}

/* Checkout area highlight for attention */
.wr-checkout-highlight {
  outline: 2px solid #ff6b6b;
  transition: outline 0.3s ease;
}

/* =============================
   FoodOrd Scroll Categories Nav
   ============================= */
.foodord-scroll-nav {
  margin-bottom: 1rem;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  width: 100%;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Independent positioning: stop at sidebar width on large screens */
@media (min-width: 1025px) {
  .has-foodord-sidebar .foodord-scroll-nav {
    width: calc(100% - var(--foodord-sidebar-w, var(--foodord-sidebar-width, 360px)));
    margin: 0;
  }
}

.foodord-scroll-nav__inner {
  margin: 0;
  padding: 10px 52px 10px 104px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: none;
}

/* Menu wrapper for background */
.foodord-scroll-nav__menu-wrapper {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 60px;
  background: #ffffff;
  z-index: 10;
}

/* Menu button */
.foodord-scroll-nav__menu-btn {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-in-out;
  z-index: 11;
}

.foodord-scroll-nav__menu-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  transform: translateY(-50%) scale(1.02);
}

.foodord-scroll-nav__menu-btn:active {
  background: #f3f4f6;
  transform: translateY(-50%) scale(0.97);
}

.foodord-scroll-nav__menu-icon {
  width: 18px;
  height: 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.foodord-scroll-nav__menu-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: #374151;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effects for a bit of life */
.foodord-scroll-nav__menu-btn:hover .foodord-scroll-nav__menu-icon span:nth-child(1) {
  transform: translateY(-1px);
}

.foodord-scroll-nav__menu-btn:hover .foodord-scroll-nav__menu-icon span:nth-child(3) {
  transform: translateY(1px);
}

.foodord-scroll-nav__menu-btn.is-active {
  background: #1f2937;
  border-color: #1f2937;
}

.foodord-scroll-nav__menu-btn.is-active .foodord-scroll-nav__menu-icon span {
  background: #ffffff;
  width: 100%;
}

.foodord-scroll-nav__menu-btn.is-active .foodord-scroll-nav__menu-icon span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.foodord-scroll-nav__menu-btn.is-active .foodord-scroll-nav__menu-icon span:nth-child(2) {
  opacity: 0;
}

.foodord-scroll-nav__menu-btn.is-active .foodord-scroll-nav__menu-icon span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* Dropdown menu */
.foodord-scroll-nav__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 16px;
  background: #ffffff;
  border: 1px solid rgba(229, 229, 229, 0.8);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
  min-width: 260px;
  max-width: 320px;
  z-index: 1000;
  padding: 12px;
  max-height: 420px;
  overflow-y: auto;
  animation: dropdownOpen 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownOpen {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.foodord-scroll-nav__dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.foodord-scroll-nav__dropdown-item {
  margin: 0;
}

.foodord-scroll-nav__dropdown-link {
  display: block;
  padding: 12px 24px 12px 28px;
  margin: 0 -12px;
  width: calc(100% + 24px);
  background: transparent;
  border: none;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  font-size: 15px;
}

/* Pseudo element for bold text without layout shift */
.foodord-scroll-nav__dropdown-link::after {
  content: attr(data-text);
  position: absolute;
  left: 28px;
  top: 12px;
  pointer-events: none;
  visibility: hidden;
  width: auto;
  height: auto;
}

.foodord-scroll-nav__dropdown-link:hover {
  background: rgba(201, 56, 111, 0.08);
  transform: translateX(2px);
}

/* First and last item border radius */
.foodord-scroll-nav__dropdown-item:first-child .foodord-scroll-nav__dropdown-link {
  border-radius: 10px 10px 10px 10px;
}

.foodord-scroll-nav__dropdown-item:first-child .foodord-scroll-nav__dropdown-link.is-active::before {
  border-radius: 10px 0 0 10px;
}

.foodord-scroll-nav__dropdown-item:last-child .foodord-scroll-nav__dropdown-link {
  border-radius: 10px 10px 10px 10px;
}

.foodord-scroll-nav__dropdown-item:last-child .foodord-scroll-nav__dropdown-link.is-active::before {
  border-radius: 0 10px 10px 0;
}

.foodord-scroll-nav__dropdown-link:active {
  transform: scale(0.98);
}

/* Active dropdown item indicator */
.foodord-scroll-nav__dropdown-link.is-active {
  background: rgba(0, 0, 0, 0.05);
}

.foodord-scroll-nav__dropdown-link.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  height: 100%;
  background: #000;
  border-radius: 0;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.foodord-scroll-nav__list {
  list-style: none;
  margin: 0;
  padding: 0 5px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  flex: 1;
  max-width: min(660px, calc(100% - 310px));
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  position: relative;
  z-index: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
  mask-image: linear-gradient(90deg,
      transparent 0%,
      rgba(0, 0, 0, 1) 15px,
      rgba(0, 0, 0, 1) calc(100% - 15px),
      transparent 100%);
}

/* WebKit (Chrome, Safari) */
.foodord-scroll-nav__list::-webkit-scrollbar {
  width: 0;
  height: 0;
  background: transparent;
}

.foodord-scroll-nav__item {
  flex: 0 0 auto;
}


/* Arrow buttons for scrolling */
.foodord-scroll-nav__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  z-index: 11;
  /* Above wrapper */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.foodord-scroll-nav__arrow svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease;
}

.foodord-scroll-nav__arrow:hover {
  background: #f7f7f7;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.foodord-scroll-nav__arrow:hover svg {
  transform: scale(1.1);
}

.foodord-scroll-nav__arrow:active {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.foodord-scroll-nav__arrow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.foodord-scroll-nav__arrow--left {
  left: 60px;
}

.foodord-scroll-nav__arrow--left:hover svg {
  transform: translateX(-2px) scale(1.1);
}

.foodord-scroll-nav__arrow--right {
  position: absolute;
}

.foodord-scroll-nav__arrow--right:hover svg {
  transform: translateX(2px) scale(1.1);
}

.foodord-scroll-nav__link {
  display: inline-block;
  padding: 10px 12px 12px;
  border-radius: 6px;
  background: transparent;
  text-decoration: none;
  border: none;
  position: relative;
  /* allow bold overlay without affecting layout */
  font-weight: 400;
  /* non-active links are not bold */
  transition: color 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
  appearance: none;
}

.foodord-scroll-nav__link:hover,
.foodord-scroll-nav__link:focus {
  background-color: transparent;
  /* background handled by active-bg on hover */
  outline: none;
}

.foodord-scroll-nav__link.is-active {
  background-color: transparent;
}

/* Bold overlay technique: keeps width constant while showing bold on hover/active */
.foodord-scroll-nav__label {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  z-index: 1;
}

.foodord-scroll-nav__link .foodord-scroll-nav__text {
  font-size: 14px;
  font-weight: 600;
  color: #323232;
  transition: opacity 160ms ease;
}

.foodord-scroll-nav__link .foodord-scroll-nav__text--bold {
  position: absolute;
  left: 0;
  /* relative to label, not the padded link */
  top: 50%;
  font-size: 14px;
  font-weight: 600;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 160ms ease;
  color: #323232;
}

.foodord-scroll-nav__link:hover .foodord-scroll-nav__text,
.foodord-scroll-nav__link.is-active .foodord-scroll-nav__text {
  opacity: 0;
}

.foodord-scroll-nav__link:hover .foodord-scroll-nav__text--bold,
.foodord-scroll-nav__link.is-active .foodord-scroll-nav__text--bold {
  opacity: 1;
}

/* Center text horizontally in active state */
.foodord-scroll-nav__link.is-active .foodord-scroll-nav__text--bold {
  left: 50%;
  transform: translate(-50%, -50%);
}

@media (max-width: 768px) {
  .foodord-scroll-nav__dropdown {
    display: none;
  }

  .foodord-scroll-nav__menu-wrapper {
    pointer-events: auto;
  }

  .foodord-scroll-nav__menu-btn.is-active {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.12);
  }

  .foodord-sheet-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    z-index: 10000;
  }

  .foodord-sheet-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .foodord-sheet {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(30px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: min(75vh, 560px);
    overflow: hidden;
  }

  .foodord-sheet-backdrop.is-visible .foodord-sheet {
    transform: translateY(0);
  }

  .foodord-sheet__handle {
    width: 48px;
    height: 4px;
    background: rgba(15, 23, 42, 0.08);
    border-radius: 2px;
    margin: 12px auto 16px;
    display: block;
  }

  .foodord-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.75);
  }

  .foodord-sheet__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
  }

  .foodord-sheet__close {
    border: none;
    background: transparent;
    color: #0f172a;
    width: 36px;
    height: 36px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
  }

  .foodord-sheet__close::before,
  .foodord-sheet__close::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transform-origin: center;
    transition: opacity 0.2s ease;
  }

  .foodord-sheet__close::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .foodord-sheet__close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .foodord-sheet__close:hover,
  .foodord-sheet__close:focus-visible {
    color: rgba(15, 23, 42, 0.6);
    outline: none;
    background: transparent;
  }

  .foodord-sheet__body {
    overflow-y: auto;
    padding: 12px 0 18px;
    overscroll-behavior: contain;
  }

  .foodord-sheet__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
  }

  .foodord-sheet__item {
    margin: 0;
  }

  .foodord-sheet__link {
    width: 100%;
    position: relative;
    text-align: left;
    border: none;
    background: transparent;
    padding: 16px 24px 16px 16px;
    border-radius: 0;
    font-size: 16px;
    color: #0f172a;
    display: block;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .foodord-sheet__link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 999px;
    background: transparent;
    transition: background 0.2s ease;
  }

  .foodord-sheet__link:hover,
  .foodord-sheet__link:focus-visible {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    outline: none;
  }

  .foodord-sheet__link.is-active {
    background: rgb(177 177 177 / 12%);
    font-weight: 600;
  }

  .foodord-sheet__link.is-active::before {
    background: #000;
  }

  body.foodord-sheet-open {
    overflow: hidden;
    touch-action: none;
  }
}


/* Active background segment */
.foodord-scroll-nav__active-bg {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 0;
  background: #f7f7f7;
  /* lighter */
  /* depth removed */
  /* no border, no shadow */
  transform: translateX(0);
  transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1), width 380ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, width;
  pointer-events: none;
  z-index: 0;
  /* Lowest layer */
}

/* Active indicator */
.foodord-scroll-nav__indicator {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 4px;
  border-radius: 10px;
  background: #000;
  transform: translateX(0);
  transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1), width 380ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, width;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .foodord-scroll-nav__indicator {
    transition: none;
  }

  .foodord-scroll-nav__link {
    transition: none;
  }
}

/* =============================
   Mobile mode toggle row + address bar layout (<=1024px)
   ============================= */
@media (max-width: 1024px) {
  .foodord-mode-toggle-mobile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px 16px;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    align-items: stretch;
  }

  .foodord-mode-toggle-mobile .wr-card__address-bar {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .foodord-mode-toggle-mobile .wr-card__address-bar--mobile-slot {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
  }

  .foodord-mode-toggle-mobile .wr-card__address-bar--mobile-slot:active {
    background-color: #f8fafc;
  }

  .foodord-mode-toggle-mobile .wr-card__address-bar--mobile-slot .wr-card__address-left {
    gap: 10px;
    flex: 1;
    min-width: 0;
  }

  .foodord-mode-toggle-mobile .wr-card__address-bar--mobile-slot .wr-card__address-left svg {
    width: 16px;
    height: 16px;
    color: #64748b;
    flex-shrink: 0;
  }

  .foodord-mode-toggle-mobile .wr-card__address-bar--mobile-slot .wr-card__address-value {
    font-weight: 500;
    font-size: 13px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .foodord-mode-toggle-mobile .wr-card__address-bar--mobile-slot .wr-card__address-change {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    height: 24px;
    padding: 0 10px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: all 0.2s ease;
  }

  .foodord-mode-toggle-mobile .wr-card__address-bar--mobile-slot .wr-card__address-change:hover {
    background: #e2e8f0;
  }

  .foodord-mode-toggle-mobile .wr-card__mode-toggle--mobile {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
  }

  .wr-card__address-bar--hidden-mobile {
    display: none;
  }
}

@media (min-width: 1025px) {
  .wr-card__address-bar--hidden-mobile {
    display: flex;
  }
}

/* Hide the mobile toggle row on desktop */
@media (min-width: 1025px) {
  .foodord-mode-toggle-mobile {
    display: none;
  }
}

/* Search bar (right aligned) */
.foodord-scroll-nav__search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-60%);
  height: 36px;
  width: 290px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f7f7f7;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  padding: 0 10px 0 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  z-index: 11;
}

/* Ensure overlay is hidden by default (desktop and general) */
.foodord-scroll-nav__search-overlay {
  display: none;
}

.foodord-scroll-nav__search-input {
  font-family: inherit;
  font-size: 13px;
  flex: 1;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
}

.foodord-scroll-nav__search-btn,
.foodord-scroll-nav__clear-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.foodord-scroll-nav__clear-btn {
  position: relative;
  font-size: 0;
  color: #323232;
}

.foodord-scroll-nav__clear-btn::before,
.foodord-scroll-nav__clear-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.foodord-scroll-nav__clear-btn::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.foodord-scroll-nav__clear-btn::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Enforce hidden attribute behavior for clear button */
.foodord-scroll-nav__clear-btn[hidden] {
  display: none;
}

.foodord-scroll-nav__search:focus-within {
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  background: #fff;
}

/* Move right arrow left enough to avoid overlap with search */
@media (max-width: 1024px) {
  .foodord-scroll-nav__search {
    width: 290px;
  }

  .foodord-scroll-nav__list {
    max-width: calc(100% - 310px);
  }
}


@media (max-width: 768px) {
  .foodord-scroll-nav__inner {
    padding: 10px 52px 10px 58px;
  }

  .foodord-scroll-nav__list {
    margin-right: 10px;
    max-width: calc(100% - 60px);
    mask-image: none;
  }

  .foodord-scroll-nav__search {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background: #f7f7f7;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .foodord-scroll-nav__search-input,
  .foodord-scroll-nav__clear-btn {
    display: none;
  }

  .foodord-scroll-nav__search-btn {
    position: static;
    margin: 0;
    padding: 0;
    background: transparent;
    color: #323232;
  }

  /* Remove arrow gradient hover effects on mobile */
  .foodord-scroll-nav__arrow:hover {
    background: #f7f7f7;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  }

  /* Search overlay - positioned over scroll nav with popover-like animation */
  .foodord-scroll-nav__search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 1000;
    display: none;
  }

  .foodord-scroll-nav__search-overlay.is-open,
  .foodord-scroll-nav__search-overlay.is-closing {
    display: flex;
    align-items: center;
  }

  .foodord-scroll-nav__search-overlay-content {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateX(24px) scale(0.94);
    transform-origin: right center;
  }

  .foodord-scroll-nav__search-overlay.is-open .foodord-scroll-nav__search-overlay-content {
    animation: searchOverlayIn 0.26s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  }

  .foodord-scroll-nav__search-overlay.is-closing .foodord-scroll-nav__search-overlay-content {
    animation: searchOverlayOut 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  .foodord-scroll-nav__search-overlay-header {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 100%;
  }

  .foodord-scroll-nav__search-overlay-input {
    font-size: 14px;
    font-family: inherit;
    flex: 1;
    height: 32px;
    border: 0;
    background: transparent;
    padding: 0 12px;
    outline: none;
  }

  .foodord-scroll-nav__search-overlay-close {
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    color: inherit;
  }

  .foodord-scroll-nav__search-overlay-close svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
  }

  .foodord-scroll-nav__search-overlay-clear {
    border: 0;
    background: transparent;
    color: rgba(0, 0, 0, 0.7);
    font-size: 13px;
    font-family: inherit;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: auto;
    text-decoration: none;
  }

  .foodord-scroll-nav__search-overlay-clear:hover,
  .foodord-scroll-nav__search-overlay-clear:focus {
    color: rgba(0, 0, 0, 0.9);
    text-decoration: underline;
  }

  /* Ensure overlay clear button respects hidden attribute */
  .foodord-scroll-nav__search-overlay-clear[hidden] {
    display: none;
  }

  /* Make scroll nav relative for absolute positioning of overlay */
  .foodord-scroll-nav {
    position: relative;
  }

  /* Search width responsive classes */
  .foodord-scroll-nav.search-width-small .foodord-scroll-nav__arrow--right {
    right: 260px;
  }

  .foodord-scroll-nav.search-width-medium .foodord-scroll-nav__arrow--right {
    right: 330px;
  }

  .foodord-scroll-nav.search-width-large .foodord-scroll-nav__arrow--right {
    right: 400px;
  }

  @keyframes searchOverlayIn {
    0% {
      opacity: 0;
      transform: translateX(30px) scale(0.88);
    }

    100% {
      opacity: 1;
      transform: translateX(0) scale(1);
    }
  }

  @keyframes searchOverlayOut {
    0% {
      opacity: 1;
      transform: translateX(0) scale(1);
    }

    100% {
      opacity: 0;
      transform: translateX(24px) scale(0.9);
    }
  }
}

/* Ensure category sections stop below any fixed headers during smooth scroll */
.foodord-category-section {
  scroll-margin-top: 90px;
}

@media (max-width: 768px) {
  .foodord-scroll-nav__inner {
    padding: 8px 42px 8px 78px;
    gap: 6px;
  }

  .foodord-scroll-nav__list {
    max-width: 100%;
  }

  .foodord-scroll-nav__search-overlay-close:hover,
  .foodord-scroll-nav__search-overlay-close:focus,
  .foodord-scroll-nav__search-overlay-close:focus-visible,
  .foodord-scroll-nav__search-overlay-close:active {
    background: transparent;
    box-shadow: none;
  }

  .foodord-scroll-nav__link {
    font-size: 13px;
    padding: 8px 10px 10px;
  }

  .foodord-scroll-nav__arrow {
    width: 30px;
    height: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .foodord-scroll-nav__arrow svg {
    width: 26px;
    height: 26px;
  }

  .foodord-scroll-nav__arrow--left {
    left: 56px;
  }

  .foodord-scroll-nav__arrow--right {
    left: auto;
    right: 6px;
  }

  .foodord-scroll-nav__menu-btn {
    width: 36px;
    height: 36px;
    left: 14px;
    border-radius: 10px;
  }

  .foodord-scroll-nav__menu-icon {
    width: 16px;
    height: 12px;
  }

  .foodord-scroll-nav__dropdown {
    left: 12px;
    min-width: 200px;
    max-width: calc(100vw - 40px);
  }

  .foodord-scroll-nav__dropdown-link {
    padding: 8px 16px 8px 20px;
  }

  .foodord-scroll-nav__dropdown-link::after {
    left: 20px;
    top: 8px;
  }

  .foodord-scroll-nav__dropdown-link.is-active::before {
    height: 100%;
    width: 3px;
    left: 0;
    top: 0;
    bottom: 0;
  }

  .foodord-category-section {
    scroll-margin-top: 72px;
  }
}

/* Empty state for no search results */
.foodord-search-empty {
  display: none;
  min-height: 380px;
  background: transparent;
  align-items: center;
  justify-content: center;
}

.foodord-search-empty__card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 64px 32px;
  text-align: center;
  width: 100%;
  max-width: 640px;
  margin: 32px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.foodord-search-empty__icon {
  width: 80px;
  height: 80px;
  background: #f8fafc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: #94a3b8;
  position: relative;
}

.foodord-search-empty__icon::after {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px dashed #e2e8f0;
  border-radius: 50%;
  opacity: 0.5;
}

.foodord-search-empty__icon svg {
  width: 36px;
  height: 36px;
  stroke-width: 1.5;
}

.foodord-search-empty__title {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
}

.foodord-search-empty__desc {
  font-size: 16px;
  color: #64748b;
  margin: 0 0 32px 0;
  line-height: 1.6;
  max-width: 320px;
}

.foodord-search-empty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 32px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.01em;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.foodord-search-empty__btn:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  color: var(--primary-color, #c9386f);
}

/* Smoothen spacer height growth when sticky engages */
.foodord-scroll-nav-spacer {
  height: 0;
  transition: none;
}

/* Sticky behavior: when nav becomes sticky, fix to top and stretch full width */
.foodord-scroll-nav.is-sticky {
  position: fixed;
  top: var(--foodord-scroll-nav-top, 0);
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9990;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

/* Ensure full width on layouts with sidebar */
@media (min-width: 1025px) {
  .has-foodord-sidebar .foodord-scroll-nav.is-sticky {
    width: 100%;
  }
}

/* Keep inner padding stable to avoid jank when sticky */
.foodord-scroll-nav.is-sticky .foodord-scroll-nav__inner {
  padding-top: inherit;
  padding-bottom: inherit;
  min-height: 56px;
}

.foodord-scroll-nav.is-sticky .foodord-scroll-nav__arrow--left {
  left: 20px;
}

.foodord-scroll-nav.is-sticky .foodord-scroll-nav__arrow--right {
  right: 20px;
  left: auto;
}

/* Fix cart header overlapping when scroll nav is sticky */
@media (min-width: 1025px) {
  .wr-card__header {
    transition: top 0.3s ease;
  }

  .foodord-scroll-nav.is-sticky~.site-main .wr-card__header,
  body.woocommerce-cart .foodord-scroll-nav.is-sticky~.site-main .wr-card__header {
    top: 60px;
  }
}

@media (max-width: 782px) {
  body.admin-bar .foodord-scroll-nav.is-sticky~* .wr-card__items {
    padding-top: 106px;
    /* 60px + 46px mobile admin bar */
  }
}

/* Mobile mode toggle slot */

.foodord-mode-toggle-mobile {
  display: none;
}

.foodord-order-toggle {
  display: none;
  width: 100%;
  max-width: 480px;
  margin: 0 auto 16px;
  padding: 0 1rem;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .foodord-order-toggle {
    display: block;
  }
}

.foodord-order-toggle+.foodord-scroll-nav {
  margin-top: 0;
}

.foodord-sidebar .foodord-mode-toggle-mobile {
  margin: 0 0 16px;
}

@media (max-width: 1024px) {
  .foodord-mode-toggle-mobile {
    display: block;
    padding: 0 1rem;
    background: #ffffff;
  }

  .foodord-mode-toggle-mobile::after {
    content: "";
    display: table;
    clear: both;
  }

  .foodord-mode-toggle-mobile .wr-card__mode-toggle {
    position: static;
    display: flex;
    justify-content: flex-start;
    width: 100%;
    padding: 0;
    background: transparent;
    margin-bottom: 12px;
    float: left;
  }

  .foodord-mode-toggle-mobile .wr-card__mode-group {
    display: flex;
    width: 100%;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 3px;
    gap: 0;
    position: relative;
    z-index: 0;
    isolation: isolate;
  }

  /* Elastic Slider (Mobile) */
  .foodord-mode-toggle-mobile .wr-card__mode-slider {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    background: var(--button-bg, #c9386f);
    border-radius: 9px;
    z-index: 1;
    pointer-events: none;
    transform: translateX(0);
    transform-origin: left center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  .foodord-mode-toggle-mobile .wr-card__mode-toggle.is-pickup-active .wr-card__mode-slider {
    transform: translateX(100%);
  }

  .foodord-mode-toggle-mobile .wr-card__mode-toggle.is-delivery-active .wr-card__mode-slider {
    transform: translateX(0);
  }

  .foodord-mode-toggle-mobile .wr-card__mode-btn {
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
  }

  .foodord-mode-toggle-mobile .wr-card__mode-btn .pickup-icon,
  .foodord-mode-toggle-mobile .wr-card__mode-btn .delivery-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
  }

  .foodord-mode-toggle-mobile .wr-card__mode-btn.is-active {
    background: transparent;
    color: #ffffff;
  }

  .foodord-mode-toggle-mobile .wr-card__mode-btn.is-active * {
    color: #ffffff;
  }

  .foodord-mode-toggle-mobile .wr-card__mode-btn.is-closed,
  .foodord-mode-toggle-mobile .wr-card__mode-btn[disabled] {
    background: transparent;
    color: var(--text-color);
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
    text-decoration: line-through;
  }

  .foodord-mode-toggle-mobile .wr-card__mode-btn.is-closed *,
  .foodord-mode-toggle-mobile .wr-card__mode-btn[disabled] * {
    color: inherit;
  }

  /* Address bar in mobile toggle container */
  .foodord-mode-toggle-mobile .wr-card__address-bar {
    width: 100%;
    margin-bottom: 10px;
    clear: both;
    background: transparent;
    justify-content: flex-end;
    gap: 1rem;
  }

  .foodord-mode-toggle-mobile .wr-card__address-left {
    gap: 6px;
  }

  .foodord-mode-toggle-mobile .wr-card__address-left svg {
    width: 14px;
    height: 14px;
    color: var(--text-color);
  }

  .foodord-mode-toggle-mobile .wr-card__address-change {
    height: 24px;
    padding: 0 8px;
    display: none;
  }

}

/* Delivery/Pickup toggle above cart header (desktop only) */
@media (min-width: 1025px) {
  .wr-card.has-mode-toggle .wr-card__mode-toggle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    border-radius: 12px 12px 0 0;
    z-index: 11;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: top 0.3s ease;
  }

  .wr-card.has-mode-toggle .wr-card__mode-group {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: #fbfbfb;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 4px;
    position: relative;
    z-index: 0;
    isolation: isolate;
  }

  /* Elastic Slider (Desktop) */
  .wr-card.has-mode-toggle .wr-card__mode-slider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    background: var(--button-bg, #c9386f);
    border-radius: 8px;
    z-index: 1;
    pointer-events: none;
    transform: translateX(0);
    transform-origin: left center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  .wr-card.has-mode-toggle .wr-card__mode-toggle.is-pickup-active .wr-card__mode-slider {
    transform: translateX(100%);
  }

  .wr-card.has-mode-toggle .wr-card__mode-toggle.is-delivery-active .wr-card__mode-slider {
    transform: translateX(0);
  }

  .wr-card.has-mode-toggle .wr-card__mode-btn {
    flex: 1;
    min-width: 140px;
    height: 32px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    background-color: transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 2;
  }

  .wr-card.has-mode-toggle .wr-card__mode-btn .pickup-icon,
  .wr-card.has-mode-toggle .wr-card__mode-btn .delivery-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
  }

  .wr-card.has-mode-toggle .wr-card__mode-btn.is-active {
    background: transparent;
    color: #ffffff;
    transform: scale(1.05);
  }

  .wr-card.has-mode-toggle .wr-card__mode-btn.is-active * {
    color: #ffffff;
  }

  .wr-card.has-mode-toggle .wr-card__mode-btn.is-closed,
  .wr-card.has-mode-toggle .wr-card__mode-btn[disabled] {
    background: transparent;
    color: var(--text-color);
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
    text-decoration: line-through;
  }

  .wr-card.has-mode-toggle .wr-card__mode-btn.is-closed *,
  .wr-card.has-mode-toggle .wr-card__mode-btn[disabled] * {
    color: inherit;
  }
}

/* Mode Button Icon Animations - Premier Selection */
@keyframes delivery-wheel-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes delivery-frame-ride {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  25% {
    transform: translateY(-0.5px) rotate(-1deg);
  }

  50% {
    transform: translateY(0.2px) rotate(0deg);
  }

  75% {
    transform: translateY(-0.5px) rotate(1deg);
  }
}

@keyframes pickup-head-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-0.8px);
  }
}

@keyframes pickup-leg-stride {

  0%,
  100% {
    transform: rotate(0deg) translateY(0);
  }

  25% {
    transform: rotate(-15deg) translateY(-0.5px);
  }

  50% {
    transform: rotate(0deg) translateY(0);
  }

  75% {
    transform: rotate(15deg) translateY(-0.5px);
  }
}

@keyframes motion-ground-slide {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: 8;
  }
}

/* Base states for icons to ensure smooth transition */
.delivery-icon,
.pickup-icon {
  overflow: visible;
}

.delivery-wheel,
.delivery-frame,
.pickup-head,
.pickup-body,
.pickup-leg,
.motion-ground {
  transform-origin: center;
  transform-box: fill-box;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.motion-ground {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Action: Delivery Ride */
.delivery-icon.is-animating .delivery-wheel {
  animation: delivery-wheel-spin 0.6s linear infinite;
}

.delivery-icon.is-animating .delivery-frame {
  animation: delivery-frame-ride 0.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.delivery-icon.is-animating .motion-ground {
  opacity: 0.6;
  animation: motion-ground-slide 0.3s linear infinite;
}

/* Action: Pickup Stride */
.pickup-icon.is-animating .pickup-head,
.pickup-icon.is-animating .pickup-body {
  animation: pickup-head-bounce 0.4s ease-in-out infinite;
}

.pickup-icon.is-animating .pickup-leg-1 {
  animation: pickup-leg-stride 0.8s ease-in-out infinite;
  transform-origin: top center;
}

.pickup-icon.is-animating .pickup-leg-2 {
  animation: pickup-leg-stride 0.8s ease-in-out infinite;
  animation-delay: -0.4s;
  transform-origin: top center;
}

.pickup-icon.is-animating .motion-ground {
  opacity: 0.4;
  animation: motion-ground-slide 0.6s linear infinite;
}




/* Push the original header below the toggle */
body:not(.wp-admin) .wr-card.has-mode-toggle .wr-card__header {
  top: 70px;
  /* keep in sync with toggle height */
}

/* Increase body top spacing to account for the extra bar */
body:not(.wp-admin) .wr-card.has-mode-toggle .wr-card__body {
  margin-top: calc(4rem + 16px);
}


/* Hide delivery fee line on card when Pickup is selected via toggle */
.wr-card.is-pickup .wr-card__delivery-fee {
  display: none;
}

/* Sticky scroll nav + mode toggle compound offset */
@media (min-width: 1025px) {

  .foodord-scroll-nav.is-sticky~.site-main .wr-card.has-mode-toggle .wr-card__header,
  body.woocommerce-cart .foodord-scroll-nav.is-sticky~.site-main .wr-card.has-mode-toggle .wr-card__header {
    top: 126px;
    /* 60px sticky offset + 56px toggle height */
  }

  /* Ensure the toggle bar also moves below sticky nav */
  .foodord-scroll-nav.is-sticky~.site-main .wr-card.has-mode-toggle .wr-card__mode-toggle,
  body.woocommerce-cart .foodord-scroll-nav.is-sticky~.site-main .wr-card.has-mode-toggle .wr-card__mode-toggle {
    top: 56px;
  }
}

/* When address bar exists under the toggle, header no longer needs extra offset */
@media (min-width: 1025px) {
  body:not(.wp-admin) .wr-card.has-mode-toggle.has-address-bar:not(.is-pickup) .wr-card__header {
    top: 0;
  }

  /* Push the address bar below the absolute toggle height */
  body:not(.wp-admin) .wr-card.has-mode-toggle .wr-card__address-bar {
    margin-top: 70px;
    /* keep in sync with header offset used previously */
  }
}

/* Hide address bar entirely on pickup as a safety net */
body:not(.wp-admin) .wr-card.is-pickup .wr-card__address-bar {
  display: none;
}

/* Pickup mode: fix layout when address bar is hidden */
@media (min-width: 1025px) {

  /* Reset header position on pickup mode */
  body:not(.wp-admin) .wr-card.has-mode-toggle.is-pickup .wr-card__header {
    top: 70px;
    /* back to toggle offset only */
  }

  /* Reset body spacing on pickup mode */
  body:not(.wp-admin) .wr-card.has-mode-toggle.is-pickup .wr-card__body {
    margin-top: calc(4rem + 16px);
    /* back to original with toggle offset */
  }

  /* Pickup mode + sticky navigation: adjust for sticky bar */
  .foodord-scroll-nav.is-sticky~.site-main .wr-card.has-mode-toggle.is-pickup .wr-card__header,
  body.woocommerce-cart .foodord-scroll-nav.is-sticky~.site-main .wr-card.has-mode-toggle.is-pickup .wr-card__header {
    top: 126px;
    /* 60px sticky + 70px toggle - no address bar offset */
  }

  /* Pickup mode + sticky navigation: mode toggle positioning */
  .foodord-scroll-nav.is-sticky~.site-main .wr-card.has-mode-toggle.is-pickup .wr-card__mode-toggle,
  body.woocommerce-cart .foodord-scroll-nav.is-sticky~.site-main .wr-card.has-mode-toggle.is-pickup .wr-card__mode-toggle {
    top: 56px;
    /* same as delivery but no address bar complications */
  }
}

/* Sticky scroll nav + address bar compound offset (delivery only) */
@media (min-width: 1025px) {

  .foodord-scroll-nav.is-sticky~.site-main .wr-card.has-mode-toggle .wr-card__address-bar,
  body.woocommerce-cart .foodord-scroll-nav.is-sticky~.site-main .wr-card.has-mode-toggle .wr-card__address-bar {
    margin-top: 126px;
    /* 60px sticky offset + 56px toggle height + original spacing */
  }
}

/* When sticky, also reset header top offset in delivery + address bar */
@media (min-width: 1025px) {

  .foodord-scroll-nav.is-sticky~.site-main .wr-card.has-mode-toggle.has-address-bar:not(.is-pickup) .wr-card__header,
  body.woocommerce-cart .foodord-scroll-nav.is-sticky~.site-main .wr-card.has-mode-toggle.has-address-bar:not(.is-pickup) .wr-card__header {
    top: 0;
  }
}

/* Reduce extra body spacing when address bar is present (delivery only) */
@media (min-width: 1025px) {
  body:not(.wp-admin) .wr-card.has-mode-toggle.has-address-bar:not(.is-pickup) .wr-card__body {
    margin-top: 0;
    /* remove extra space below header when address bar is visible */
    padding-top: 0;
    /* ensure no top padding contributes */
  }

  body:not(.wp-admin) .wr-card.has-mode-toggle.has-address-bar:not(.is-pickup) .wr-card__header {
    margin-bottom: 0;
    /* tighten gap under header */
  }

  .foodord-scroll-nav.is-sticky~.site-main .wr-card.has-mode-toggle.has-address-bar:not(.is-pickup) .wr-card__body,
  body.woocommerce-cart .foodord-scroll-nav.is-sticky~.site-main .wr-card.has-mode-toggle.has-address-bar:not(.is-pickup) .wr-card__body {
    margin-top: 0;
    padding-top: 0;
  }
}

@media (min-width: 1025px) {
  .wr-card.wr-card--stable .wr-card__top {
    display: flex;
    flex-direction: column;
    transition: margin-top 0.24s ease;
  }

  .wr-card.wr-card--stable.has-mode-toggle .wr-card__mode-toggle {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    padding: 14px 16px;
    border-bottom: 1px solid #f4f4f4;
    background: #ffffff;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: auto;
  }

  /* Force header/body to align right under toggle for stable variant */
  body:not(.wp-admin) .wr-card.wr-card--stable.has-mode-toggle .wr-card__header {
    top: 0;
  }

  body:not(.wp-admin) .wr-card.wr-card--stable.has-mode-toggle .wr-card__body {
    margin-top: 0;
  }

  /* Pickup: hard-hide address bar with no residual spacing */
  .wr-card.wr-card--stable.is-pickup .wr-card__address-bar {
    display: none;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }

  /* Sticky: header stays at top, only top container shifts below nav */
  .foodord-scroll-nav.is-sticky~.site-main .wr-card.wr-card--stable.has-mode-toggle .wr-card__header,
  body.woocommerce-cart .foodord-scroll-nav.is-sticky~.site-main .wr-card.wr-card--stable.has-mode-toggle .wr-card__header {
    top: 0;
  }

  .foodord-scroll-nav.is-sticky~.site-main .wr-card.wr-card--stable.has-mode-toggle .wr-card__body,
  body.woocommerce-cart .foodord-scroll-nav.is-sticky~.site-main .wr-card.wr-card--stable.has-mode-toggle .wr-card__body {
    margin-top: 0;
  }

  /* Ensure no gap between toggle and address bar when sticky */
  .foodord-scroll-nav.is-sticky~.site-main .wr-card.wr-card--stable.has-mode-toggle .wr-card__address-bar,
  body.woocommerce-cart .foodord-scroll-nav.is-sticky~.site-main .wr-card.wr-card--stable.has-mode-toggle .wr-card__address-bar {
    margin-top: 0;
  }

  /* Push the top container below sticky nav with eased motion */
  .foodord-scroll-nav.is-sticky~.site-main .wr-card.wr-card--stable .wr-card__top,
  body.woocommerce-cart .foodord-scroll-nav.is-sticky~.site-main .wr-card.wr-card--stable .wr-card__top {
    margin-top: 56px;
  }

  /* Remove legacy address-bar push under absolute toggle for stable layout */
  body:not(.wp-admin) .wr-card.wr-card--stable.has-mode-toggle .wr-card__address-bar {
    margin-top: 0;
  }
}

/* Closed store toast */
.foodord-store-toast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  transform: translateY(-120%);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #e7f8ff;
  padding: 0.9rem 1.25rem;
  letter-spacing: 0.01em;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
  box-sizing: border-box;
}

.foodord-store-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.foodord-store-toast__message {
  flex: 1;
  font-size: 14px;
  font-weight: 400;
}

.foodord-store-toast__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.foodord-store-toast__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.foodord-store-toast__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.admin-bar .foodord-store-toast {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .foodord-store-toast {
    top: 46px;
  }
}

/* =============================
   Location Modal (frontend)
   ============================= */
#foodord-location-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 9999;
}

#foodord-location-modal.is-open {
  display: flex;
}

#foodord-location-modal .foodord-modal__content {
  width: 94%;
  max-width: 580px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(226, 232, 240, 0.6);
  border-radius: 16px;
  overflow: hidden;
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  animation: wrcModalIn 240ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
  backdrop-filter: blur(10px);
}

#foodord-location-modal .foodord-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.4);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

#foodord-location-modal .foodord-modal__title {
  margin: 0;
  font-weight: 600;
  font-size: 18px;
  color: #0f172a;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

#foodord-location-modal .foodord-modal__close {
  appearance: none;
  background: transparent;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#foodord-location-modal .foodord-modal__close:hover {
  background: rgba(0, 0, 0, 0.08);
  transform: scale(1.05);
}

#foodord-location-modal .foodord-modal__close:active {
  transform: scale(0.95);
}

#foodord-location-modal .foodord-modal__close-icon {
  position: relative;
  width: 24px;
  height: 24px;
  color: #4b5563;
}

#foodord-location-modal .foodord-modal__close-icon::before,
#foodord-location-modal .foodord-modal__close-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: currentColor;
  transform-origin: center;
}

#foodord-location-modal .foodord-modal__close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

#foodord-location-modal .foodord-modal__close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

#foodord-location-modal .foodord-modal__body {
  padding: 22px 24px;
  background: #ffffff;
}

#foodord-location-modal .foodord-modal__desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: #64748b;
  margin: 0 0 20px 0;
}

#foodord-location-modal .foodord-radius-hint {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

#foodord-radius-feedback {
  margin-top: 8px;
}

#foodord-location-modal .foodord-form-row {
  margin-bottom: 18px;
}

#foodord-location-modal .foodord-form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  line-height: 1.5;
}

#foodord-location-modal .foodord-input-with-clear {
  position: relative;
}

#foodord-location-modal .foodord-input-with-clear .foodord-form-input {
  padding-right: 48px;
}

#foodord-location-modal .foodord-input-clear {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: #475569;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

#foodord-location-modal .foodord-input-clear span {
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  pointer-events: none;
}

#foodord-location-modal .foodord-input-clear.is-hidden {
  display: none;
}

#foodord-location-modal .foodord-form-input {
  font-size: 14px;
  width: 100%;
  height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  border-radius: 10px;
  background: #ffffff;
  color: #323232;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.5;
}

#foodord-location-choice.foodord-form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23323333' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 14px 14px;
  background-position: right 18px center;
  padding-right: 46px;
  appearance: none;
  cursor: pointer;
}

#foodord-location-modal .foodord-form-feedback.is-success {
  color: #059669;
}

#foodord-location-modal .foodord-form-feedback.is-error {
  color: #dc2626;
  font-size: 14px;
  font-weight: 400;
}

#foodord-location-modal .foodord-modal__actions {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 18px 24px;
  border-top: 1px solid rgba(226, 232, 240, 0.4);
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  box-sizing: border-box;
}

#foodord-location-modal .foodord-modal__button {
  appearance: none;
  border: 0;
  border-radius: 10px;
  height: 44px;
  padding: 0 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.01em;
  flex: 1;
}

#foodord-location-modal .foodord-modal__button--cancel {
  background: #f9fafb;
  color: #374151;
  border: 1px solid #e2e8f0;
}

#foodord-location-modal .foodord-modal__button--cancel:hover {
  background: rgba(226, 232, 240, 0.9);
  color: #475569;
  transform: translateY(-1px);
}

#foodord-location-modal .foodord-modal__button--confirm {
  background: linear-gradient(135deg, #c9386f 0%, #b92a61 100%);
  color: #ffffff;
  border: 1px solid rgba(201, 56, 111, 0.2);
}

#foodord-location-modal .foodord-modal__button--confirm:hover {
  background: linear-gradient(135deg, #b92a61 0%, #a02756 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 56, 111, 0.15);
}

@keyframes wrcModalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* FoodOrd: Checkout lock styling for City/Postcode (merged) */
.foodord-locked-field label,
.foodord-locked-input,
.wc-block-components-address-form__city .foodord-locked-input,
.wc-block-components-address-form__postcode .foodord-locked-input {
  opacity: 0.6;
  cursor: not-allowed;
}

.foodord-locked-input {
  background-color: #f5f5f5;
  border-color: #e0e0e0;
  pointer-events: none;
}

/* Dim container rows and position relative for icon */
.foodord-locked-container {
  opacity: 0.6;
  position: relative;
  overflow: visible;
}

.woocommerce .form-row,
.woocommerce form .form-row,
.wc-block-components-address-form,
.wc-block-components-form,
.wc-block-checkout__form {
  overflow: visible;
}

/* Leave room for the icon inside inputs */
.foodord-locked-container input[type="text"],
.foodord-locked-container input[type="tel"],
.foodord-locked-container input[type="search"],
.foodord-locked-container .wc-block-components-text-input input,
.foodord-locked-container .wc-block-components-address-form input {
  padding-right: 2rem;
}

/* Input wrapper for icon positioning */
.foodord-input-wrap {
  position: relative;
  overflow: visible;
}

.foodord-lock-shell {
  display: block;
  width: 100%;
}

/* Lock icon inside input wrapper */
.foodord-input-wrap>.foodord-lockmark {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  z-index: 1000;
  /* above input and form elements */
}

/* Tooltip styling (anchored to icon via ::after) */
.foodord-input-wrap>.foodord-lockmark::after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  left: auto;
  bottom: calc(100% + 8px);
  top: auto;
  font-size: 12px;
  line-height: 1.4;
  color: #ffffff;
  background: #000000;
  padding: 8px 10px;
  border-radius: 4px;
  display: block;
  width: 260px;
  max-width: min(90vw, 320px);
  white-space: normal;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease-in-out;
  z-index: 9999;
}

.foodord-input-wrap>.foodord-lockmark:hover::after,
.foodord-input-wrap>.foodord-lockmark:focus-visible::after {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1024px) {

  /* Disable lockmark tooltip on WooCommerce Blocks checkout for tablet/mobile. */
  body.woocommerce-checkout .wc-block-checkout__form .foodord-input-wrap>.foodord-lockmark {
    cursor: default;
  }

  body.woocommerce-checkout .wc-block-checkout__form .foodord-input-wrap>.foodord-lockmark::after {
    display: none;
  }
}

body.foodord-pickup-mode #billing_address_1_field,
body.foodord-pickup-mode #billing_address_2_field,
body.foodord-pickup-mode #billing_city_field,
body.foodord-pickup-mode #billing_postcode_field,
body.foodord-pickup-mode #shipping_address_1_field,
body.foodord-pickup-mode #shipping_address_2_field,
body.foodord-pickup-mode #shipping_city_field,
body.foodord-pickup-mode #shipping_postcode_field,
body.foodord-pickup-mode .wc-block-components-address-form [data-field="address_1"],
body.foodord-pickup-mode .wc-block-components-address-form [data-field="address_2"],
body.foodord-pickup-mode .wc-block-components-address-form [data-field="city"],
body.foodord-pickup-mode .wc-block-components-address-form [data-field="postcode"] {
  display: none;
}

/* Hide product description under cart/checkout line items (Blocks + Classic) */
/* WooCommerce Blocks (Cart/Checkout) */
/* Defensive: hide any description-like element within product details/metadata (Blocks) */
body.woocommerce-checkout .wc-block-components-product-details [class*="description"],
body.woocommerce-checkout .wc-block-components-product-metadata [class*="description"],
body.woocommerce-cart .wc-block-components-product-details [class*="description"],
body.woocommerce-cart .wc-block-components-product-metadata [class*="description"],
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-product-details [class*="description"],
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-product-metadata [class*="description"] {
  display: none;
}

/* Classic (shortcode) checkout/cart tables */
/* Fallback for themes injecting plain <p> under product-name (avoid wc-item-meta) */
.woocommerce-checkout table.shop_table td.product-name>p:not(.wc-item-meta),
.woocommerce-cart table.shop_table td.product-name>p:not(.wc-item-meta) {
  display: none;
}

/* FoodOrd confirmation status */
.foodord-confirm-status {
  margin: 16px 0;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  font-weight: 600;
  color: var(--text-color, #111827);
  line-height: 1.4;
}

/* =============================
   Time To Deliver (Frontend)
   ============================= */
.foodord-ttd {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 1rem 0;
  padding: 16px;
  background: rgb(245 245 245 / 46%);
  border: 1px solid rgb(226 226 226);
  border-radius: 4px;
}

.foodord-ttd__label {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
  display: block;
}

.foodord-ttd__label-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.foodord-ttd__select {
  appearance: none;
  width: 100%;
  height: 48px;
  padding: 0 16px 0 14px;
  background-color: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%230f172a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  cursor: pointer;
}

.foodord-ttd__select:hover {
  border-color: #cbd5e1;
  background-color: rgb(245 245 245);
}

.foodord-ttd__select:focus {
  outline: none;
  border-color: var(--primary-color, #c9386f);
  background-color: #ffffff;
}

.foodord-ttd__select:disabled {
  background-color: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.7;
}

.foodord-ttd__date {
  appearance: none;
  width: 100%;
  height: 48px;
  padding: 0 16px 0 14px;
  background-color: #ffffff;
  color: #0f172a;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%230f172a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  cursor: pointer;
}

.foodord-ttd__date:hover {
  border-color: #cbd5e1;
  background-color: rgb(245 245 245);
}

.foodord-ttd__date:focus {
  outline: none;
  border-color: var(--primary-color, #c9386f);
  background-color: #ffffff;
}

.foodord-ttd__date:disabled {
  background-color: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.7;
}

@media (min-width: 640px) {
  .foodord-ttd {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
  }

  .foodord-ttd__label-group {
    flex: 1;
    min-width: 0;
  }
}

/* Lazy image animation */
.foodord-lazy-image {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.35s ease, transform 0.35s ease;
  will-change: opacity, transform;
}

.foodord-lazy-image.foodord-lazy-loaded {
  opacity: 1;
  transform: none;
}

body .wr-card .wr-card__mode-group .wr-card__mode-btn:focus,
body .wr-card .wr-card__mode-group .wr-card__mode-btn:focus-visible,
body .wr-card .wr-card__mode-group .wr-card__mode-btn:active,
body .foodord-mode-toggle-mobile .wr-card__mode-group .wr-card__mode-btn:focus,
body .foodord-mode-toggle-mobile .wr-card__mode-group .wr-card__mode-btn:focus-visible,
body .foodord-mode-toggle-mobile .wr-card__mode-group .wr-card__mode-btn:active {
  outline: none;
  box-shadow: none;
}