/* Layout reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background-color: #f4f6f5;
  padding-bottom: 98px;
}


div#deliveryToast {
    position: fixed;
    bottom: 9rem;
    right: 1rem;
    z-index: 9999;
    opacity: 1;
}

.delivery-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #e7ece8;
  background: #fff;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1008;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}
#catalogContent {
  padding-top: 58px;
}
.delivery-topbar__left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  cursor: pointer;
}
.delivery-topbar__left:focus-visible {
  outline: 2px solid #8ec69c;
  outline-offset: 2px;
  border-radius: 10px;
}
.delivery-topbar__avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #d4e5d8;
  background: #f4f7f5;
  flex: 0 0 auto;
}
.delivery-topbar__content {
  min-width: 0;
  flex: 1 1 auto;
}
.delivery-topbar__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
  color: #5f6f64;
  text-transform: uppercase;
}
.delivery-topbar__address {
  margin-top: 1px;
  color: #273730;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-hero-banner {
  display: none;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e7ece8;
  padding: 8px 12px 10px;
}
.mobile-hero-banner img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.pull-refresh-indicator {
  position: fixed;
  left: 50%;
  top: 58px;
  transform: translate(-50%, -120%);
  z-index: 1009;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #d9e4dd;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: #3e5347;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform .18s ease, opacity .18s ease;
  opacity: 0;
  pointer-events: none;
}
.pull-refresh-indicator.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}
.pull-refresh-indicator.is-ready {
  color: #0f9d58;
  border-color: #9bd0b2;
}

@media (max-width: 576px) {
  .mobile-hero-banner {
    display: block;
  }
  .container {
    padding-top: 0 !important; /* no manual offset needed */
  }

  .col-sm-6 {
    max-width: 50%;
  }
}

/* Prevent flex overflow of the search input (your addition) */
#qForm input { min-width: 0; }

/* Thumbs are clickable */
.thumb { cursor: zoom-in; }


/* Container spacing below top header */
.container { padding-top: 10px; }
#catalogContent .container {
  display: flex;
  flex-direction: column;
}
#searchSection {
  order: -1;
}

/* Action buttons (copy / add) on each row */
.row-actions { display: flex; gap: .5rem; align-items: center; }
.btn-icon-sm { padding: .25rem .5rem; line-height: 1; }

.text-left { text-align: left; }
.text-right { text-align: right; }

.user-details {
  padding-bottom: 15px;
}

small.text-sm {
    font-size: 11px;
    color: #c00000 !important;
    text-align: center !important;
    display: block;
    font-style: italic;
    letter-spacing: 1px;
    line-height: 18px;
    word-break: break-all;
}

/* Header cart trigger */
#cartTrigger {
  position: relative;
  background: #0f9d58;
  border: 1px solid #0a8248;
  border-radius: 999px;
  min-width: 124px;
  height: 38px;
  padding: 0 12px;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  color: #fff;
  box-shadow: 0 3px 9px rgba(15, 157, 88, .26);
  flex: 0 0 auto;
}
#cartTrigger .badge {
  position: absolute;
  top: -7px;
  right: -6px;
  background: #dc3545;   /* red */
  color: #fff;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1;
  min-width: 18px;
  text-align: center;
}
#cartTrigger .badge.hidden { display: none; }
.cart-trigger__text {
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: .01em;
}
#cartTrigger i {
  font-size: 17px;
  line-height: 1;
}

/* Hidden legacy trigger */
#ordersTrigger {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #555555;
  border-width: 0;
  color: #fff;
  display: none;
}

.mobile-dock {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  z-index: 1002;
  background: #fff;
  border: 1px solid #dfe3e7;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 8px 6px 6px;
  transition: transform .22s ease, opacity .22s ease;
  will-change: transform, opacity;
}
.mobile-dock.is-hidden {
  transform: translateY(calc(100% + 16px));
  opacity: 0;
  pointer-events: none;
}
.mobile-dock-island {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 32px);
  transform: translateX(-50%) translateY(18px) scale(.92);
  width: 124px;
  height: 28px;
  border: 1px solid #d4dbd6;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  opacity: 0;
  pointer-events: none;
  z-index: 1003;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .26s ease, transform .26s ease, background-color .2s ease;
}
.mobile-dock-island__bar {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #7a8a80;
}
.mobile-dock-island.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}
.mobile-dock-island:active {
  background: rgba(245, 250, 247, 0.98);
}
.mobile-dock__item {
  appearance: none;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #2d3436;
  text-align: center;
  min-height: 56px;
  border-radius: 12px;
  transition: background-color .15s ease, color .15s ease;
}
.mobile-dock__icon {
  font-size: 1.22rem;
  line-height: 1;
  color: #1d1d1f;
}
.mobile-dock__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.mobile-dock__item:active .mobile-dock__icon,
.mobile-dock__item:focus-visible .mobile-dock__icon {
  color: #198754;
}
.mobile-dock__item:active .mobile-dock__label,
.mobile-dock__item:focus-visible .mobile-dock__label {
  color: #198754;
}
.mobile-dock__item.is-active {
  background: #eef8f2;
}
.mobile-dock__item.is-active .mobile-dock__icon,
.mobile-dock__item.is-active .mobile-dock__label {
  color: #198754;
}

.dock-search-card,
.dock-panel-card {
  width: min(900px, 100%);
  margin: 8px auto 12px;
  background: linear-gradient(180deg, #f8fbf9 0%, #f3f7f4 100%);
  border: 1px solid #d6e6dc;
  border-radius: 18px;
  padding: 22px 16px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
}
.dock-search-title,
.dock-panel-title {
  margin: 0 0 14px;
  font-size: 1.5rem;
  color: #183127;
  text-align: center;
}
.dock-panel-subtitle {
  color: #4f6156;
  text-align: center;
}
.dock-panel-card--center {
  text-align: center;
}
.my-orders-panel {
  padding: 14px 0 0;
}
.my-orders-panel__header {
  padding: 0 16px 10px;
}
.my-orders-panel #orderHistoryEmptyInline {
  margin: 0 16px 10px;
}
.my-orders-list {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.my-orders-list .list-group-item {
  border-left: 0 !important;
  border-right: 0 !important;
  border-radius: 0 !important;
  padding: 16px !important;
}
.dock-search-form {
  display: flex;
  gap: 8px;
  max-width: 760px;
  margin: 0 auto;
}
.dock-search-input-wrap {
  position: relative;
  flex: 1 1 auto;
}
.dock-search-input {
  height: 54px;
  border-radius: 14px;
  border: 1px solid #cfdad3;
  background: #fff;
  font-size: 1rem;
  padding-right: 42px;
}
.dock-search-clear {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #e8efea;
  color: #375a49;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.dock-search-clear i {
  font-size: 12px;
  line-height: 1;
}
.dock-search-clear:hover,
.dock-search-clear:focus-visible {
  background: #dce8e1;
  color: #173527;
}
.dock-search-btn {
  height: 54px;
  border-radius: 14px;
  padding: 0 20px;
  font-weight: 700;
}

@media (max-width: 600px) {
  #cartTrigger {
    min-width: 108px;
    height: 36px;
    padding: 0 10px;
    gap: 6px;
  }
  .cart-trigger__text {
    font-size: 13px;
  }
  #cartTrigger i {
    font-size: 16px;
  }
  .dock-search-title,
  .dock-panel-title {
    font-size: 1.25rem;
  }
}

/* Results */
.results-wrapper { max-width: 900px; margin: 0 auto; }
h2 { margin-top: 30px; font-size: 1.35rem; margin-bottom: 10px; color: #1f2528; }
.results-loading {
  display: grid;
  gap: 16px;
}
.results-loading__group h2 {
  margin-top: 0;
}
.results-loading__title {
  width: 180px;
  height: 30px;
  border-radius: 10px;
  margin: 0 0 10px;
}
.results-loading__item {
  pointer-events: none;
}
.results-loading__thumb {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  flex: 0 0 auto;
}
.results-loading__line {
  height: 14px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.results-loading__line--name {
  width: 64%;
  height: 18px;
  margin-top: 3px;
}
.results-loading__line--price {
  width: 44%;
}
.results-loading__pill {
  width: 84px;
  height: 28px;
  border-radius: 999px;
}
.results-loading__button {
  width: 110px;
  height: 42px;
  border-radius: 8px;
  flex: 0 0 auto;
}
.skeleton-blur {
  position: relative;
  overflow: hidden;
  background: linear-gradient(100deg, #eaf0ec 5%, #f5f8f6 40%, #eaf0ec 80%);
  background-size: 220% 100%;
  filter: blur(.4px);
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

ul.list-group {
  list-style: none; padding: 0; margin: 0; border: 1px solid #dde4df; border-radius: 10px; background: #fff;
}
li.list-group-item { padding: 12px 12px; border-bottom: 1px solid #e6ece8; position: relative;}
li.list-group-item:last-child { border-bottom: none; }

.item-avail { font-size: .6em; vertical-align: top; }
.pnotes { font-size: .85em; text-align: center; margin: 10px 0; }
.porders { font-size: 1.1em; font-weight: 700; }

/* Stock bubble */
span.item_stock {
  float: right; font-size: .8em; background: transparent; color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
span.item_stock.red    { background: #f28b82; }
span.item_stock.yellow { background: #fff475; color: #000; }
span.item_stock.green  { background: #81c995; }

/* Out of stock opacity */
.outofstock .item_info { opacity: .3; }

/* Copy tooltip */
span.copy-item { float: right; padding-left: 5px; color: #5f5f5f; }
.copy-tooltip {
  display: none; position: absolute; background: #333; color: #fff; font-size: 12px;
  padding: 4px 6px; border-radius: 4px; margin-left: 10px; transform: translateY(-5px);
  pointer-events: none; white-space: nowrap; z-index: 1000; right: 48px; top: 10px;
}
li.show-tooltip .copy-tooltip { display: inline-block; }

/* Thumbs */
.thumb {
  width: 64px; height: 64px; border: 1px solid #ddd; border-radius: 6px; object-fit: cover;
}

/* Toggle button */
#toggleOutOfStock {
  position: fixed; bottom: 20px; right: 20px; background: #fff; border: 2px solid #333;
  border-radius: 50%; width: 50px; height: 50px; font-size: 24px; cursor: pointer; z-index: 9999;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.3);
  display: none;
}

/* Mobile tweaks */
@media (max-width: 600px) {
  h2 { font-size: 1.1rem; }
}


/* Z-order sanity (panel above backdrop above page) */
.cart-drawer { z-index: 1050; }
.cart-drawer__backdrop { z-index: 1055; }
.cart-drawer__panel { z-index: 1060; }

/* Base drawer container */
.cart-drawer {
  position: fixed;
  inset: 0;
  display: none;            /* toggled via .is-open */
}

/* Backdrop fades smoothly */
.cart-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  transition: opacity 380ms ease-out;
  pointer-events: none;     /* avoid blocking when closed */
}

/* The panel slides in with GPU-accelerated transform */
.cart-drawer__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(480px, 94%);
  height: 100dvh;
  background: #fff;
  border-left: 1px solid #e5e5e5;

  /* Smooth-as-butter slide */
  transform: translate3d(100%, 0, 0);
  transition:
    transform 420ms cubic-bezier(.22, .61, .36, 1),
    box-shadow 420ms ease; /* shadow ramps as it slides */
  will-change: transform;
  backface-visibility: hidden;

  display: flex;
  flex-direction: column;

  /* iOS momentum scroll inside */
  overflow: hidden;

  padding: 10px 15px 0;
}


/* Body area scrolls independently */
.cart-drawer__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.cart-drawer__footer {
  margin-top: auto;
  flex: 0 0 auto;
  background: #fff;
  border-top: 1px solid #e9edf2;
}

.checkout-stack {
  margin-top: 8px;
}

.checkout-stepper {
  display: none !important;
}

.checkout-cutoff-banner {
  border: 1px solid #f1c96a;
  border-left: 4px solid #d99b16;
  background: #fff8e6;
  color: #5f4100;
  border-radius: 10px;
  padding: 9px 10px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.checkout-cutoff-banner.is-closed {
  border-color: #efb4b4;
  border-left-color: #c93636;
  background: #fff1f1;
  color: #721d1d;
}

.running-order-banner {
  width: min(100%, 520px);
  max-width: calc(100vw - 24px);
  margin: 10px auto 14px;
  border-radius: 10px;
  line-height: 1.35;
}

.running-order-banner .small {
  max-width: 46ch;
}

.cart-step-footer > button {
  min-height: 40px;
}

.cart-step1-footer-note,
.cart-step2-footer-note {
  margin-top: 8px;
  font-size: 12px;
  color: #5f6672;
  text-align: center;
}

.checkout-section-box {
  border: 1px solid #cfd8e3;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
}

.checkout-section-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
  color: #18212c;
  margin-bottom: 10px;
  line-height: 1.15;
}

.checkout-address-row {
  padding: 2px;
}

.checkout-address-box {
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.checkout-address-box:hover {
  border-color: #9eb2cc;
  background: #f9fbfe;
}

.checkout-address-box:focus-visible {
  outline: 2px solid #88a5cf;
  outline-offset: 1px;
}

.address-pin-icon, 
.address-chevron {
  width: 20px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #2153a3;
  flex-shrink: 0;
}

#addressModal .modal-content {
  border: 1px solid #cad7e5;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(2, 8, 20, 0.2);
  overflow: hidden;
}

#addressModal .modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid #e5ebf2;
}

#addressModal .modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
}

#addressModal .modal-body {
  padding: 14px 16px 16px;
}

#addressModal .btn-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #ced9e6;
  background-color: #fff;
  opacity: 1;
}

.address-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.address-modal-item {
  position: relative;
  display: block;
  min-height: 118px;
  padding: 10px 46px 10px 12px;
  border: 1px solid #d8e1ea;
  border-radius: 14px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.address-modal-item:hover {
  border-color: #6ea1d8;
  background: #f7fbff;
}

.address-modal-item.is-active,
.address-modal-item:has(.address-choice-input:checked) {
  border-color: #4a7eb7;
  background: #f3f8ff;
  box-shadow: inset 0 0 0 1px rgba(74, 126, 183, 0.2);
}

.address-modal-item__label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #1f2a37;
  font-weight: 800;
}

.address-modal-item__label span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-modal-item__meta {
  margin-top: 6px;
  color: #5d6877;
  font-size: 12px;
  line-height: 1.35;
}

.address-modal-item__edit {
  position: absolute;
  top: 9px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #cad5e2;
  border-radius: 999px;
  background: #fff;
  color: #294160;
  text-decoration: none;
}

.address-modal-item__edit:hover {
  border-color: #9fb5ce;
  background: #f4f8fc;
  color: #1f4d82;
}

.address-default-badge {
  flex: 0 0 auto;
  padding: 2px 8px;
  border: 1px solid #9ed3b2;
  border-radius: 999px;
  background: #eaf8ef;
  color: #25663f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.address-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #e5ebf2;
}

.address-modal-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid #cad5e2;
  border-radius: 999px;
  background: #fff;
  color: #223145;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.address-modal-action:hover {
  background: #f7fafc;
  color: #223145;
}

.address-modal-action.primary {
  border-color: #2c76c4;
  background: #2c76c4;
  color: #fff;
}

.address-modal-action.primary:hover {
  background: #256bb4;
  color: #fff;
}

@media (max-width: 575.98px) {
  .address-modal-grid {
    grid-template-columns: 1fr;
  }
}


.checkout-cart-box .table {
  margin-bottom: 10px !important;
}

.checkout-cart-table-wrap {
  max-height: none;
  overflow: visible;
}

.checkout-cart-box .table > :not(caption) > * > * {
  font-size: 13px;
}

.payment-inline-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.payment-option-grid {
  display: grid;
  width: 100%;
  gap: 8px;
}

.payment-option-grid--payments {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payment-option-grid--delivery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payment-chip-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.payment-chip {
  border: 1px solid #9fb0c3;
  border-radius: 8px;
  background: #eef3f7;
  color: #17212c;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  padding: 6px 9px;
  cursor: pointer;
  user-select: none;
  width: 100%;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.payment-chip-input:checked + .payment-chip {
  background: #d6e8de;
  border-color: #2f8a57;
  color: #0f3d25;
}

.payment-chip__label {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.payment-chip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: #263b50;
}

.payment-chip-input:checked + .payment-chip .payment-chip__icon {
  color: #0f5f36;
}

.chip-btn {
  border: 1px solid #c8d2de;
  border-radius: 8px;
  background: #f9fbfd;
  color: #1f2937;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  padding: 6px 9px;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.chip-btn:hover {
  background: #eef3f8;
  border-color: #aebccc;
}

.chip-btn:active {
  transform: translateY(1px);
}

.chip-btn-primary {
  background: #2d7ef7;
  border-color: #1f63c8;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  min-height: 40px;
}

.chip-btn-primary:hover {
  background: #256fe0;
  border-color: #1d57ad;
  color: #fff;
}

.chip-btn-green {
  background: #ecf8ef;
  border-color: #8bc9a0;
  color: #1f6b39;
}

.chip-btn-green:hover {
  background: #e0f2e5;
  border-color: #73b88a;
}

.chip-btn-neutral {
  background: #f9fbfd;
  border-color: #c8d2de;
  color: #1f2937;
}

#cartClose {
  background: #fff3f6;
  border-color: #f2c4d0;
  color: #a33452;
}

#cartClose:hover {
  background: #ffe9ef;
  border-color: #e8a9bb;
  color: #8e2745;
}

.checkout-estimated-box {
  background: #edf8f0;
  border-color: #badcbe;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.checkout-estimated-box:hover {
  border-color: #96cfa3;
  background: #e6f5ea;
}

.checkout-estimated-box:focus-visible {
  outline: 2px solid #8ec69c;
  outline-offset: 1px;
}

.estimated-delivery-row {
  padding: 2px;
}

.estimated-delivery-icon {
  width: 20px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #1f8b4d;
  flex-shrink: 0;
}

.estimated-delivery-mode {
  font-size: .875rem;
  line-height: 1.25rem;
  color: #1f8b4d;
  font-weight: 600;
}

.estimated-delivery-value {
  margin-top: 2px;
  font-size: .875rem;
  line-height: 1.25rem;
  font-weight: 400;
  color: #6c757d;
}

.estimated-delivery-time {
  display: inline-block;
  margin-top: 1px;
  color: #17212c;
  font-weight: 700;
}

.estimated-delivery-hint {
  margin-top: 2px;
  font-size: 12px;
  color: #6c757d;
  font-style: italic;
}

.payment-summary-list {
  display: grid;
  gap: 8px;
}

.payment-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.payment-summary-row > span {
  color: #4a5563;
}

.payment-summary-row > strong {
  color: #17212c;
}

.payment-summary-action {
  appearance: none;
  border: 0;
  background: transparent;
  color: #6a7380;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  padding: 2px 0;
  text-align: right;
  max-width: 58%;
  cursor: pointer;
}

.payment-summary-action:hover,
.payment-summary-action:focus-visible {
  color: #0b864b;
  text-decoration: underline;
  outline: none;
}

.payment-summary-action-subtext {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  color: #6a7380;
  font-weight: 400;
}

.payment-summary-row--total {
  border-top: 1px dashed #d8e0ea;
  padding-top: 8px;
}

.payment-summary-row--total > span,
.payment-summary-row--total > strong {
  font-size: 14px;
  font-weight: 800;
  color: #0f2f57;
}

.estimated-delivery-chevron {
  color: #7d8794;
  font-size: 20px;
  padding-top: 2px;
}

.delivery-schedule-modal {
  border-radius: 14px;
}

.delivery-schedule-shell {
  display: grid;
  gap: 10px;
}

.delivery-schedule-banner {
  background: #fff5ce;
  border-color: #f0d67a;
}

.delivery-schedule-card {
  background: #fff;
}

.delivery-schedule-note {
  font-size: 12px;
  color: #6c757d;
  font-style: italic;
  text-align: center;
  padding: 0 2px;
}

.chip-btn-qty,
.chip-btn-remove {
  min-width: 28px;
  min-height: 28px;
  padding: 5px 8px;
}

.chip-btn-qty-value {
  min-width: 28px;
  min-height: 28px;
  border: 1px solid #d4dde8;
  border-radius: 8px;
  background: #f6f8fb;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
}

.chip-btn-remove {
  background: #fff3f2;
  border-color: #efc3bd;
  color: #b6382f;
}

.chip-btn-remove:hover {
  background: #ffe9e7;
  border-color: #e7aaa2;
}

@media (max-width: 600px) {
  .payment-chip,
  .chip-btn {
    font-size: 11px;
    padding: 5px 8px;
  }

  .payment-option-grid--delivery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .payment-chip {
    min-height: 78px;
    gap: 4px;
  }

  .payment-chip__label {
    font-size: 10px;
  }

  .payment-chip__icon {
    font-size: 20px;
  }

  .chip-btn-qty,
  .chip-btn-remove,
  .chip-btn-qty-value {
    min-width: 26px;
    min-height: 26px;
    padding: 4px 7px;
  }
}

/* Open state */
.cart-drawer.is-open { display: block; }
.cart-drawer.is-open .cart-drawer__panel {
  transform: translate3d(0, 0, 0);
  box-shadow:
    -24px 0 48px rgba(0,0,0,.18),
    -2px  0  12px rgba(0,0,0,.12);
}
.cart-drawer.is-open .cart-drawer__backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* Optional: tiny overshoot “spring” (adds a touch of life) */
.cart-drawer.is-open[data-animate="spring"] .cart-drawer__panel {
  animation: drawer-spring 520ms cubic-bezier(.2,.8,.2,1) both;
}
@keyframes drawer-spring {
  0%   { transform: translate3d(100%, 0, 0); }
  70%  { transform: translate3d(-8px,  0, 0); }
  100% { transform: translate3d(0,     0, 0); }
}

/* Respect user motion settings */
@media (prefers-reduced-motion: reduce) {
  .cart-drawer__panel,
  .cart-drawer__backdrop {
    transition: none !important;
    animation: none !important;
  }
}

/* (keep your existing header/footer styles) */

/* Wiggle the floating bag when an item is added */
@keyframes cart-wiggle {
  0%{transform:rotate(0)} 25%{transform:rotate(-12deg)} 50%{transform:rotate(12deg)}
  75%{transform:rotate(-8deg)} 100%{transform:rotate(0)}
}
#cartTrigger.wiggle { animation: cart-wiggle 450ms ease; }



#modalImg {
    max-height: 80vh !important;
}



/* How-it-works popover */
.hiw-popover {
  position: relative;
  max-width: 600px;
  margin: .5rem auto 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: .5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: .75rem 1rem;
}

/* Smoothen collapse transitions a bit */
.hiw-popover.collapsing {
  transition: height .2s ease;
}

/* Arrow */
.hiw-popover__arrow {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 16px;
  height: 16px;
  background: #fff;
  border-left: 1px solid rgba(0,0,0,.12);
  border-top: 1px solid rgba(0,0,0,.12);
  transform: translateX(-50%) rotate(45deg);
}

.hiw-popover__header {
  border-bottom: 1px solid rgba(0,0,0,.06);
  padding-bottom: .25rem;
  margin-bottom: .5rem;
}
.hiw-popover__body {
  font-size: .95rem;
  line-height: 1.5;
}
.hiw-popover__footer {
  border-top: 1px solid rgba(0,0,0,.06);
  padding-top: .5rem;
}

/* Dark mode friendly */
@media (prefers-color-scheme: dark) {
  .hiw-popover {
    background: #1f1f1f;
    color: #eee;
    border-color: rgba(255,255,255,.12);
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
  }
  .hiw-popover__arrow {
    background: #1f1f1f;
    border-left-color: rgba(255,255,255,.12);
    border-top-color: rgba(255,255,255,.12);
  }
  .hiw-popover__header,
  .hiw-popover__footer {
    border-color: rgba(255,255,255,.08);
  }
}



#checkoutToast {
  position: fixed;
  bottom: 2rem;
  right: 1rem;
  z-index: 1080;
}
