/* FoodOrd Mobile Cart */

/* Mobile Cart visible only on screens 1024px and below */
:root {
  --background-color: #f7f7f7;
  --primary-color: #ea004b;
  --primary-hover: #c70040;
  --text-color: #323232;
  --text-hover: #313131;
  --secondary-text: #6b6b6b;
  --button-bg: #ea004b;
  --button-text-color: #ffffff;
  --button-on-hover: #c70040;
  --header-bg: #ffffff;
  --footer-bg: #ffffff;
  --footer-bottom-bg: #ffffff;
  --border-color: #f4f4f4;
  --foodord-mobile-cart-surface: #ffffff;
  --foodord-mobile-cart-surface-soft: #f3f4f6;
  --foodord-mobile-cart-surface-alt: #f7f7f7;
  --foodord-mobile-cart-border: #e5e7eb;
  --foodord-mobile-cart-border-soft: #f0f0f0;
  --foodord-mobile-cart-summary-border: #f4f4f4;
  --foodord-mobile-cart-text: var(--text-color);
  --foodord-mobile-cart-muted: var(--secondary-text);
  --foodord-mobile-cart-price: #0f172a;
  --foodord-mobile-cart-close-color: #323232;
  --foodord-mobile-cart-close-hover-bg: #f3f4f6;
  --foodord-mobile-cart-note-input-bg: #ffffff;
  --foodord-mobile-cart-note-input-border: #d1d5db;
  --foodord-mobile-cart-note-input-text: var(--text-color);
  --foodord-mobile-cart-note-display-bg: rgb(217 228 255 / 47%);
  --foodord-mobile-cart-note-label: #6b7280;
  --foodord-mobile-cart-note-text: #374151;
  --foodord-mobile-cart-note-feedback: #b91c1c;
  --foodord-mobile-cart-warning-bg: #fff7ed;
  --foodord-mobile-cart-warning-border: #fed7aa;
  --foodord-mobile-cart-warning-text: #9a3412;
  --foodord-mobile-cart-clear-bg: #ffffff;
  --foodord-mobile-cart-clear-border: #e5e7eb;
  --foodord-mobile-cart-clear-color: var(--text-color);
  --foodord-mobile-cart-clear-hover-bg: #fef2f2;
  --foodord-mobile-cart-clear-hover-border: #ef4444;
  --foodord-mobile-cart-clear-hover-color: var(--text-color);
  --foodord-mobile-cart-button-disabled-bg: #9ca3af;
  --foodord-mobile-cart-loading-count-bg: #9ca3af;
}

.foodord-mobile-cart,
.foodord-mobile-cart__modal {
  display: none;
}

.foodord-mobile-cart.foodord-mobile-cart--hidden {
  display: none;
}

@media (max-width: 1024px) {

  /* Mobile Cart Container - Fixed Footer */
  .foodord-mobile-cart {
    display: block;
    position: fixed;
    bottom: 10px;
    left: 16px;
    right: 16px;
    z-index: 9999;
  }

  body.foodord-search-overlay-open.has-foodord-mobile-cart:not(.foodord-modal-open):not(.mobile-cart-expanded) .foodord-mobile-cart:not(.foodord-mobile-cart--hidden) {
    z-index: 10001;
  }

  /* Mobile Cart when hidden */
  .foodord-mobile-cart.hidden {
    transform: translateY(100%);
  }

  /* Mobile Cart Header - Button Style */
  .foodord-mobile-cart__header {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--button-bg);
    color: #ffffff;
    cursor: pointer;
    user-select: none;
    border-radius: 10px;
    transition: background-color 0.2s ease;
  }

  .foodord-mobile-cart__header:hover {
    background: var(--button-on-hover);
  }

  .foodord-mobile-cart__header:active {
    background: var(--button-bg);
  }

  /* Cart Info - Left side */
  .foodord-mobile-cart__info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  /* Cart Count Badge */
  .foodord-mobile-cart__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    min-width: 24px;
  }

  /* Cart Title */
  .foodord-mobile-cart__title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
  }

  .foodord-mobile-cart__total .woocommerce-Price-amount {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
  }

  .foodord-mobile-cart__total .woocommerce-Price-currencySymbol,
  .foodord-mobile-cart__total .woocommerce-Price-amount .woocommerce-Price-currencySymbol {
    color: #ffffff;
  }

  .foodord-mobile-cart__total--loading {
    min-width: 44px;
    display: inline-flex;
    justify-content: flex-end;
  }

  .foodord-mobile-cart__total-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }

  .foodord-mobile-cart__total-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    animation: foodord-mobile-cart-dot-pulse 1s infinite ease-in-out;
  }

  .foodord-mobile-cart__total-dots span:nth-child(2) {
    animation-delay: 0.14s;
  }

  .foodord-mobile-cart__total-dots span:nth-child(3) {
    animation-delay: 0.28s;
  }

  @keyframes foodord-mobile-cart-dot-pulse {

    0%,
    80%,
    100% {
      opacity: 0.35;
      transform: scale(0.8);
    }

    40% {
      opacity: 1;
      transform: scale(1);
    }
  }

  @keyframes foodord-mobile-note-caret-blink {

    0%,
    45% {
      opacity: 1;
    }

    46%,
    100% {
      opacity: 0;
    }
  }

  /* Bottom Footer - Checkout Button Container */
  .foodord-mobile-cart__bottom-footer {
    padding: 12px 16px;
    display: none;
  }

  /* Show bottom footer only when cart is expanded */
  .foodord-mobile-cart.expanded .foodord-mobile-cart__bottom-footer {
    display: block;
  }

  /* Bottom Checkout Button - Same style as header */
  .foodord-mobile-cart__bottom-checkout-btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: var(--button-bg);
    color: #ffffff;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .foodord-mobile-cart__bottom-checkout-btn:hover {
    background: var(--button-on-hover);
  }

  .foodord-mobile-cart__bottom-checkout-btn:active {
    background: var(--button-bg);
  }

  .foodord-mobile-cart__bottom-checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--foodord-mobile-cart-button-disabled-bg);
  }

  /* Full Screen Modal - Separate from cart button */
  .foodord-mobile-cart__modal {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: calc(var(--foodord-vh, 1vh) * 100);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
  }

  .foodord-mobile-cart__modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
  }

  /* Show modal footer when active */
  .foodord-mobile-cart__modal.active .foodord-mobile-cart__footer {
    display: block;
  }

  /* Modal Overlay */
  .foodord-mobile-cart__modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
  }

  /* Modal Content - Full screen white area */
  .foodord-mobile-cart__modal-content {
    width: 100%;
    height: 100%;
    background: var(--foodord-mobile-cart-surface);
    color: var(--foodord-mobile-cart-text);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }

  /* Modal Header */
  .foodord-mobile-cart__modal-header {
    padding: 16px;
    border-bottom: 1px solid var(--foodord-mobile-cart-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--foodord-mobile-cart-surface);
  }

  .foodord-mobile-cart__modal-title {
    margin: 0;
    font-size: 16px;
    color: var(--foodord-mobile-cart-text);
  }

  .foodord-mobile-cart__close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--foodord-mobile-cart-close-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
  }

  .foodord-mobile-cart__close-btn:hover {
    background: var(--foodord-mobile-cart-close-hover-bg);
  }

  /* Modal Body */
  .foodord-mobile-cart__modal-body {
    flex: 1 0 auto;
    overflow: visible;
    background: var(--foodord-mobile-cart-surface);
    color: var(--foodord-mobile-cart-text);
    padding: 16px;
  }

  .foodord-mobile-cart__footer-upsells {
    flex-shrink: 0;
    background: var(--foodord-mobile-cart-surface);
    padding: 0 16px;
  }

  /* Modal Footer */
  .foodord-mobile-cart__modal .foodord-mobile-cart__footer {
    position: sticky;
    bottom: 0;
    z-index: 1300;
    padding: 10px 16px 16px;
    border-top: 1px solid var(--foodord-mobile-cart-border);
    background: var(--foodord-mobile-cart-surface);
    flex-shrink: 0;
    display: block;
    /* Always show in modal */
  }

  .foodord-mobile-cart__modal .foodord-mobile-cart__actions {
    display: flex;
    gap: 12px;
  }

  /* Checkout Button in Modal - Same style as header */
  .foodord-mobile-cart__modal .foodord-mobile-cart__checkout-btn {
    width: 100%;
    padding: 20px 16px;
    border: none;
    background: var(--button-bg);
    color: #ffffff;
    border-radius: 10px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .foodord-mobile-cart__modal .foodord-mobile-cart__checkout-btn:hover {
    background: var(--button-on-hover);
  }

  .foodord-mobile-cart__modal .foodord-mobile-cart__checkout-btn:active {
    background: var(--button-bg);
  }

  .foodord-mobile-cart__modal .foodord-mobile-cart__checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--foodord-mobile-cart-button-disabled-bg);
  }

  /* Cart Items Container */
  .foodord-mobile-cart__items {
    padding: 0;
  }

  .foodord-mobile-cart__upsells {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
  }

  .foodord-mobile-cart__upsells .foodord-modal-upsells--card {
    padding: 6px 0 0;
    border-top-width: 4px;
  }

  .foodord-mobile-cart__upsells .foodord-modal-upsells--card .foodord-modal-upsells__item {
    flex-basis: 124px;
  }

  .foodord-mobile-cart__upsells .foodord-modal-upsells--card .foodord-modal-upsells__grid {
    gap: 8px;
  }

  .foodord-mobile-cart__upsells .foodord-modal-upsells--card .foodord-modal-upsells__image-wrap {
    aspect-ratio: 16 / 9;
  }

  .foodord-mobile-cart__upsells .foodord-modal-upsells--card .foodord-modal-upsells__content {
    gap: 6px;
    padding: 8px;
  }

  .foodord-mobile-cart__upsells .foodord-modal-upsells--card .foodord-modal-upsells__item-title,
  .foodord-mobile-cart__upsells .foodord-modal-upsells--card .foodord-modal-upsells__price {
    font-size: 13px;
    line-height: 1.3;
  }

  /* Individual Cart Item */
  .foodord-mobile-cart__item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--foodord-mobile-cart-border-soft);
    background: var(--foodord-mobile-cart-surface);
    color: var(--foodord-mobile-cart-text);
    transition: all 0.3s ease;
    cursor: pointer;
  }

  .foodord-mobile-cart__item:last-child {
    border-bottom: none;
  }

  /* Product Details */
  .foodord-mobile-cart__item-details {
    flex: 1;
    min-width: 0;
  }

  .foodord-mobile-cart__item-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 4px 0;
    color: var(--foodord-mobile-cart-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: underline;
  }

  .foodord-mobile-cart__item-price {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: var(--foodord-mobile-cart-price);
    line-height: 1.2;
    text-align: right;
    white-space: nowrap;
  }

  .foodord-mobile-cart__note-toggle {
    font-size: 12px;
    font-weight: 400;
    appearance: none;
    text-decoration: underline;
    border: none;
    background: transparent;
    padding: 0;
    color: var(--text-color);
    cursor: pointer;
  }

  .foodord-mobile-cart__note {
    flex: 0 0 100%;
    width: 100%;
  }

  .foodord-mobile-cart__note:not(.is-editing):not(.has-note) {
    display: none;
  }

  .foodord-mobile-cart__note-toggle:hover {
    text-decoration: underline;
  }

  .foodord-mobile-cart__note-form {
    position: relative;
    margin-top: 6px;
    padding: 10px 0 12px 0;
    width: 100%;
    box-sizing: border-box;
  }

  .foodord-mobile-cart__note.is-editing:not(.has-note) .foodord-mobile-cart__note-form:not(:focus-within)::after {
    content: "";
    position: absolute;
    top: 34px;
    left: 9px;
    width: 1px;
    height: 17px;
    background: var(--foodord-mobile-cart-note-input-text);
    pointer-events: none;
    animation: foodord-mobile-note-caret-blink 1s steps(1, end) infinite;
  }

  .foodord-mobile-cart__note-counter {
    margin: 0 0 4px 0;
    color: var(--foodord-mobile-cart-muted);
    font-size: 12px;
    line-height: 1;
    text-align: right;
  }

  .foodord-mobile-cart__note-input {
    width: 100%;
    min-height: 72px;
    resize: none;
    border: 1px solid var(--foodord-mobile-cart-note-input-border);
    border-radius: 6px;
    padding: 6px 8px;
    background: var(--foodord-mobile-cart-note-input-bg);
    color: var(--foodord-mobile-cart-note-input-text);
    font-family: inherit;
    box-sizing: border-box;
  }

  .foodord-mobile-cart__note-input:focus {
    outline: none;
    border-color: var(--foodord-mobile-cart-note-input-border);
    box-shadow: none;
  }

  .foodord-mobile-cart__note-actions {
    margin-top: 6px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
  }

  .foodord-mobile-cart__note-btn {
    appearance: none;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
  }

  .foodord-mobile-cart__note-btn--cancel {
    color: var(--foodord-mobile-cart-muted);
  }

  .foodord-mobile-cart__note-btn--add {
    color: var(--foodord-mobile-cart-text);
  }

  .foodord-mobile-cart__note-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }

  .foodord-mobile-cart__note-display {
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--foodord-mobile-cart-note-display-bg);
  }

  .foodord-mobile-cart__note-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--foodord-mobile-cart-note-label);
    margin-bottom: 4px;
  }

  .foodord-mobile-cart__note-text {
    margin: 0;
    font-size: 0.85rem;
    color: var(--foodord-mobile-cart-note-text);
    word-break: break-word;
  }

  .foodord-mobile-cart__note-feedback {
    margin-top: 6px;
    font-size: 0.72rem;
    color: var(--foodord-mobile-cart-note-feedback);
  }

  .foodord-mobile-cart__note[data-note-saving="1"] .foodord-mobile-cart__note-btn {
    opacity: 0.65;
    cursor: wait;
  }

  /* Product Toppings */
  .foodord-mobile-cart__item-toppings {
    font-size: 14px;
    font-weight: 400;
    margin: 2px 0 0 0;
    color: var(--foodord-mobile-cart-muted);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Quantity */
  .foodord-mobile-cart__item-quantity {
    position: relative;
    flex-shrink: 0;
    min-width: 0;
    text-align: inherit;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: default;
    user-select: none;
    transition: none;
  }

  .foodord-mobile-cart__item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    align-self: flex-start;
    flex-shrink: 0;
    gap: 12px;
    margin-left: auto;
  }

  .foodord-mobile-cart__item-quantity:hover {
    background: transparent;
    border-color: transparent;
  }

  /* Empty Cart State */
  .foodord-mobile-cart__empty {
    padding: 24px 16px;
    text-align: center;
  }

  .foodord-mobile-cart__empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
  }

  .foodord-mobile-cart__empty-text {
    margin: 0 0 4px 0;
    color: var(--foodord-mobile-cart-text);
  }

  .foodord-mobile-cart__empty-subtext {
    margin: 0;
    color: var(--foodord-mobile-cart-muted);
  }

  /* Mobile Cart Footer - Action Buttons */
  .foodord-mobile-cart__footer {
    padding: 12px 16px;
    background: var(--foodord-mobile-cart-surface);
    border-top: 1px solid var(--foodord-mobile-cart-border-soft);
    display: none;
    /* Only visible in expanded state */
  }

  /* Summary Section - Subtotal and Delivery Fee */
  .foodord-mobile-cart__summary {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--foodord-mobile-cart-summary-border);
  }

  .foodord-mobile-cart__fees {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--foodord-mobile-cart-summary-border);
  }

  .foodord-mobile-cart__fee {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
    color: var(--foodord-mobile-cart-price);
  }

  .foodord-mobile-cart__fee-label {
    color: var(--foodord-mobile-cart-muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex: 1;
    margin-right: 12px;
  }

  .foodord-mobile-cart__fee-amount {
    font-size: 15px;
    font-weight: 700;
    color: var(--foodord-mobile-cart-price);
    text-align: right;
    letter-spacing: -0.01em;
  }

  /* Minimum order notice */
  .foodord-mobile-cart__notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    margin: 8px 0 0 0;
    border-radius: 6px;
  }

  .foodord-mobile-cart__notice--warning {
    background: var(--foodord-mobile-cart-warning-bg);
    border: 1px solid var(--foodord-mobile-cart-warning-border);
    font-size: 14px;
    color: var(--foodord-mobile-cart-warning-text);
  }

  .foodord-mobile-cart__notice svg {
    flex-shrink: 0;
    margin-top: 1px;
  }

  .foodord-mobile-cart__subtotal,
  .foodord-mobile-cart__delivery-fee {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    font-size: 14px;
    color: var(--foodord-mobile-cart-text);
  }

  .foodord-mobile-cart__subtotal-info,
  .foodord-mobile-cart__delivery-info {
    display: flex;
    align-items: center;
  }

  .foodord-mobile-cart__subtotal-label,
  .foodord-mobile-cart__delivery-label {
    color: var(--foodord-mobile-cart-muted);
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .foodord-mobile-cart__delivery-amount,
  .foodord-mobile-cart__subtotal-amount {
    font-weight: 700;
    font-size: 15px;
    color: var(--foodord-mobile-cart-price);
    letter-spacing: -0.01em;
  }

  .foodord-mobile-cart__subtotal-amount {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 64px;
    position: relative;
  }

  .foodord-mobile-cart__subtotal-amount--loading {
    color: transparent;
  }

  .foodord-mobile-cart__subtotal-amount--loading .woocommerce-Price-amount,
  .foodord-mobile-cart__subtotal-amount--loading .woocommerce-Price-currencySymbol {
    color: transparent;
  }

  .foodord-mobile-cart__subtotal-amount--loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 64px;
    height: 16px;
    transform: translateY(-50%);
    border-radius: 999px;
    background: linear-gradient(
      90deg,
      var(--foodord-skeleton-base, #eeeeee) 0%,
      var(--foodord-skeleton-highlight, #f5f5f5) 40%,
      var(--foodord-skeleton-base, #eeeeee) 80%
    );
    background-size: 600px 100%;
    animation: foodord-mobile-subtotal-skeleton-shimmer 1.4s ease-in-out infinite;
  }

  @keyframes foodord-mobile-subtotal-skeleton-shimmer {
    0% {
      background-position: -600px 0;
    }

    100% {
      background-position: 600px 0;
    }
  }

  .foodord-mobile-cart.expanded .foodord-mobile-cart__footer {
    display: block;
  }

  .foodord-mobile-cart__actions {
    display: flex;
    gap: 8px;
  }

  /* Clear Cart Button */
  .foodord-mobile-cart__clear-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--foodord-mobile-cart-clear-border);
    background: var(--foodord-mobile-cart-clear-bg);
    color: var(--foodord-mobile-cart-clear-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .foodord-mobile-cart__clear-btn:hover {
    background: var(--foodord-mobile-cart-clear-hover-bg);
    border-color: var(--foodord-mobile-cart-clear-hover-border);
    color: var(--foodord-mobile-cart-clear-hover-color);
  }

  .foodord-mobile-cart__clear-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
  }

  /* Checkout Button - Same style as header */
  .foodord-mobile-cart__checkout-btn {
    flex: 2;
    padding: 20px 16px;
    border: none;
    background: var(--button-bg);
    color: #ffffff;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .foodord-mobile-cart__checkout-btn:hover {
    background: var(--button-on-hover);
  }

  .foodord-mobile-cart__checkout-btn:active {
    background: var(--button-bg);
  }

  .foodord-mobile-cart__checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--foodord-mobile-cart-button-disabled-bg);
  }

  .foodord-mobile-cart__checkout-btn.is-loading {
    opacity: 0.75;
    pointer-events: none;
    position: relative;
  }

  .foodord-mobile-cart__checkout-btn.is-loading .foodord-mobile-cart__info,
  .foodord-mobile-cart__checkout-btn.is-loading .foodord-mobile-cart__total {
    opacity: 0;
  }

  .foodord-mobile-cart__checkout-btn.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    margin-left: -9px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: foodord-mobile-cart-checkout-spin 0.8s linear infinite;
  }

  @keyframes foodord-mobile-cart-checkout-spin {
    to {
      transform: rotate(360deg);
    }
  }

  /* Body padding bottom when mobile cart is visible */
  body.has-foodord-mobile-cart {
    padding-bottom: 60px;
    /* Space for header height only */
  }

  body.has-foodord-mobile-cart.mobile-cart-expanded {
    overflow: hidden;
    /* Disable body scroll in expanded state */
  }

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

    body.has-foodord-mobile-cart {
      padding-bottom: 0;
    }
  }

  /* Loading state */
  .foodord-mobile-cart.loading .foodord-mobile-cart__header {
    opacity: 0.7;
    pointer-events: none;
  }

  .foodord-mobile-cart.loading .foodord-mobile-cart__count {
    background: var(--foodord-mobile-cart-loading-count-bg);
  }



  /* Responsive adjustments for very small screens */
  @media (max-width: 480px) {

    .foodord-mobile-cart__count {
      width: 28px;
      height: 28px;
    }

    .foodord-mobile-cart__item {
      padding: 10px 12px;
      gap: 10px;
    }

  }

  /* Hide desktop sidebar when mobile cart is active */
  .has-foodord-mobile-cart .foodord-layout__sidebar,
  .has-foodord-mobile-cart .foodord-sidebar {
    display: none;
  }

  .has-foodord-mobile-cart .foodord-layout__content,
  .has-foodord-mobile-cart .site-main {
    width: 100%;
    max-width: 100%;
  }
}
