/**
 * Food Cart System — unified cart, checkout & floating bar
 * Matches storefront cards (rounded-4, dark CTA buttons)
 */
:root {
    --fcs-radius: 1rem;
    --fcs-radius-lg: 1.25rem;
    --fcs-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    --fcs-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
    --fcs-border: rgba(0, 0, 0, 0.07);
    --fcs-btn-dark: #1a1a1a;
    --fcs-btn-dark-hover: #333;
    --fcs-surface: #ffffff;
    --fcs-muted: #6c757d;
    --fcs-cat-bg: rgba(248, 38, 71, 0.08);
    --fcs-cat-color: var(--bs-primary);
}

.dark {
    --fcs-border: rgba(255, 255, 255, 0.1);
    --fcs-surface: #1c1c1c;
    --fcs-btn-dark: #f5f5f5;
    --fcs-btn-dark-hover: #ddd;
}

/* Hide floating bar on cart/checkout pages */
.fcs-page .fcs-float-bar {
    display: none !important;
}

/* —— Buttons —— */
.fcs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    border-radius: 0.65rem;
    padding: 0.75rem 1.25rem;
    border: none;
    text-decoration: none !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    cursor: pointer;
}

.fcs-btn--dark {
    background: var(--fcs-btn-dark);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.dark .fcs-btn--dark {
    color: #1a1a1a !important;
}

.fcs-btn--dark:hover {
    background: var(--fcs-btn-dark-hover);
    transform: translateY(-1px);
    color: #fff !important;
}

.fcs-btn--outline {
    background: transparent;
    border: 1px solid var(--fcs-border);
    color: inherit !important;
}

.fcs-btn--primary {
    background: var(--bs-primary);
    color: #fff !important;
}

.fcs-btn--block {
    width: 100%;
}

/* —— Progress steps —— */
.fcs-steps {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin-top: 1.25rem;
}

.fcs-steps__item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--fcs-muted);
    text-decoration: none;
}

.fcs-steps__item.is-active {
    color: #111;
    font-weight: 700;
}

.dark .fcs-steps__item.is-active {
    color: #f5f5f5;
}

.fcs-steps__item.is-done {
    color: var(--bs-primary);
}

.fcs-steps__dot {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #eee;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
}

.fcs-steps__item.is-active .fcs-steps__dot,
.fcs-steps__item.is-done .fcs-steps__dot {
    background: var(--bs-primary);
    color: #fff;
}

.fcs-steps__sep {
    width: 1.25rem;
    height: 2px;
    background: #dee2e6;
    border-radius: 1px;
}

/* —— Page shell —— */
.fcs-page {
    padding: 2rem 0 5rem;
}

.fcs-page__head {
    margin-bottom: 1.75rem;
}

.fcs-page__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.fcs-page__sub {
    color: var(--fcs-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* —— Panels —— */
.fcs-panel {
    background: var(--fcs-surface);
    border-radius: var(--fcs-radius-lg);
    border: 1px solid var(--fcs-border);
    box-shadow: var(--fcs-shadow);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.fcs-panel__head {
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid var(--fcs-border);
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.fcs-panel__icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.65rem;
    background: var(--fcs-cat-bg);
    color: var(--fcs-cat-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fcs-panel__head h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.fcs-panel__body {
    padding: 1.35rem;
}

.fcs-panel .form-control {
    border-radius: 0.65rem;
    padding: 0.65rem 0.9rem;
}

.fcs-panel .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(248, 38, 71, 0.12);
}

/* —— Cart item (menu-card style) —— */
.fcs-cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--fcs-surface);
    border-radius: var(--fcs-radius-lg);
    border: 1px solid var(--fcs-border);
    box-shadow: var(--fcs-shadow);
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease;
}

.fcs-cart-item:hover {
    box-shadow: var(--fcs-shadow-lg);
}

.fcs-cart-item.is-updating {
    opacity: 0.55;
    pointer-events: none;
}

.fcs-cart-item__img {
    width: 6.5rem;
    height: 6.5rem;
    border-radius: var(--fcs-radius);
    overflow: hidden;
    flex-shrink: 0;
    background: #f3f3f3;
}

.fcs-cart-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fcs-cart-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.fcs-cart-item__top {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.fcs-cart-item__name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
}

.fcs-cart-item__badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 0.35rem;
    background: var(--fcs-cat-bg);
    color: var(--fcs-cat-color);
    margin-bottom: 0.35rem;
}

.fcs-cart-item__remove {
    width: 2.1rem;
    height: 2.1rem;
    border: none;
    border-radius: 50%;
    background: rgba(248, 38, 71, 0.08);
    color: var(--bs-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.fcs-cart-item__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.fcs-cart-item__type {
    width: 1rem;
    height: 1rem;
}

.fcs-cart-item__link {
    font-size: 0.8rem;
    color: var(--bs-primary);
    cursor: pointer;
}

.fcs-cart-item__unit {
    font-size: 0.85rem;
    color: var(--fcs-muted);
    margin: 0 0 0.5rem;
}

.fcs-cart-item__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
    flex-wrap: wrap;
}

.fcs-cart-item__total {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

/* Qty stepper (dark pill like menu) */
.fcs-qty {
    display: inline-flex;
    align-items: center;
    background: #f4f4f4;
    border-radius: 999px;
    padding: 0.15rem;
    border: 1px solid var(--fcs-border);
}

.dark .fcs-qty {
    background: #2a2a2a;
}

.fcs-qty__btn {
    width: 2.1rem;
    height: 2.1rem;
    border: none;
    border-radius: 50%;
    background: var(--fcs-btn-dark);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.dark .fcs-qty__btn {
    color: #1a1a1a;
}

.fcs-qty__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.fcs-qty__btn:hover:not(:disabled) {
    background: var(--fcs-btn-dark-hover);
}

.fcs-qty__val {
    width: 2.5rem;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0;
}

/* —— Summary sidebar —— */
.fcs-summary {
    position: sticky;
    top: 6rem;
    background: var(--fcs-surface);
    border-radius: var(--fcs-radius-lg);
    border: 1px solid var(--fcs-border);
    box-shadow: var(--fcs-shadow-lg);
    overflow: hidden;
}

.fcs-summary__head,
.fcs-summary > .fcs-panel__head {
    padding: 1.2rem 1.35rem;
    border-bottom: 1px solid var(--fcs-border);
}

.fcs-summary__head h2,
.fcs-summary > .fcs-panel__head h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.fcs-summary__body {
    padding: 1.25rem 1.35rem;
}

.fcs-summary__row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.fcs-summary__row--total {
    margin-top: 0.75rem;
    padding-top: 0.85rem;
    border-top: 2px dashed var(--fcs-border);
    font-size: 1.1rem;
    font-weight: 700;
}

.fcs-summary__grand {
    color: var(--bs-primary);
    font-size: 1.35rem;
    font-weight: 800;
}

.fcs-summary__note {
    font-size: 0.78rem;
    color: var(--fcs-muted);
    margin: 0.75rem 0 0;
    line-height: 1.45;
}

.fcs-summary__foot {
    padding: 0 1.35rem 1.35rem;
}

/* —— Checkout order lines —— */
.fcs-order-line {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--fcs-border);
}

.fcs-order-line:last-child {
    border-bottom: none;
}

.fcs-order-line__img {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.6rem;
    overflow: hidden;
    flex-shrink: 0;
}

.fcs-order-line__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fcs-order-line__info {
    flex: 1;
    min-width: 0;
}

.fcs-order-line__name {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.15rem;
}

.fcs-order-line__qty {
    font-size: 0.78rem;
    color: var(--fcs-muted);
}

.fcs-order-line__price {
    font-weight: 700;
    white-space: nowrap;
}

.fcs-totals {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 2px dashed var(--fcs-border);
}

/* Payment */
.fcs-payment .form-check-input {
    position: absolute;
    opacity: 0;
}

.fcs-payment .payment-gateway {
    border-radius: var(--fcs-radius) !important;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.fcs-payment .form-check-input:checked ~ .payment-gateway {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 3px rgba(248, 38, 71, 0.12);
}

.fcs-payment-option {
    margin-bottom: 0.65rem;
}

/* History */
.fcs-history-item {
    display: block;
    padding: 0.9rem 1rem;
    border-radius: var(--fcs-radius);
    border: 1px solid var(--fcs-border);
    margin-bottom: 0.5rem;
    text-decoration: none !important;
    transition: border-color 0.15s, background 0.15s;
}

.fcs-history-item:hover {
    border-color: var(--bs-primary);
    background: var(--fcs-cat-bg);
}

.fcs-history-item__badge {
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: var(--fcs-cat-bg);
    color: var(--fcs-cat-color);
    font-weight: 600;
}

.fcs-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    background: #f8f9fa;
    border-radius: var(--fcs-radius);
    font-size: 0.8rem;
    color: var(--fcs-muted);
}

.dark .fcs-trust {
    background: #252525;
}

.fcs-trust i {
    color: var(--bs-primary);
}

/* Empty cart */
.fcs-empty {
    text-align: center;
    max-width: 26rem;
    margin: 3rem auto;
    padding: 2.5rem 1.5rem;
    background: var(--fcs-surface);
    border-radius: var(--fcs-radius-lg);
    box-shadow: var(--fcs-shadow);
}

.fcs-empty__icon {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: var(--fcs-cat-bg);
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* Mobile sticky checkout bar (cart page) */
.fcs-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: var(--fcs-surface);
    border-top: 1px solid var(--fcs-border);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
    padding: 0.85rem 1rem;
}

.fcs-mobile-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1320px;
    margin: 0 auto;
}

.fcs-mobile-bar__label {
    font-size: 0.75rem;
    color: var(--fcs-muted);
    margin: 0;
}

.fcs-mobile-bar__total {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
    color: var(--bs-primary);
}

@media (max-width: 991.98px) {
    .fcs-page--cart.has-items .fcs-mobile-bar {
        display: block;
    }

    .fcs-page--cart.has-items {
        padding-bottom: 6rem;
    }

    .fcs-summary {
        position: static;
    }
}

/* —— Floating bottom bar (site-wide) —— */
.fcs-float-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1055;
    pointer-events: none;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.fcs-float-bar.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.fcs-float-bar__inner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    background: var(--fcs-surface);
    border-top: 1px solid var(--fcs-border);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.12);
}

.fcs-float-bar__cart {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--fcs-cat-bg);
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none !important;
    position: relative;
    flex-shrink: 0;
}

.fcs-float-bar__count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--bs-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.2rem;
    text-align: center;
}

.fcs-float-bar__meta {
    flex: 1;
    min-width: 0;
}

.fcs-float-bar__items {
    display: block;
    font-size: 0.78rem;
    color: var(--fcs-muted);
}

.fcs-float-bar__total {
    font-size: 1.05rem;
    font-weight: 800;
    color: #111;
}

.dark .fcs-float-bar__total {
    color: #f5f5f5;
}

.fcs-float-bar__cta {
    flex-shrink: 0;
    padding: 0.65rem 1.35rem;
    border-radius: 0.65rem;
    white-space: nowrap;
}

.fcs-float-bar.is-bounce .fcs-float-bar__cart {
    animation: fcs-bounce 0.6s ease;
}

@keyframes fcs-bounce {
    0%,
    100% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.15);
    }
}

@media (min-width: 576px) {
    .fcs-float-bar {
        bottom: 1.25rem;
        left: auto;
        right: 1.25rem;
        width: auto;
        max-width: 22rem;
        border-radius: var(--fcs-radius-lg);
    }

    .fcs-float-bar__inner {
        border-radius: var(--fcs-radius-lg);
        border: 1px solid var(--fcs-border);
        box-shadow: var(--fcs-shadow-lg);
    }

    [dir="rtl"] .fcs-float-bar {
        right: auto;
        left: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    body:not(.fcs-page) {
        padding-bottom: 4.5rem;
    }
}

/* —— Product add-to-cart popup —— */
#modalitemdetails .modal-dialog {
    max-width: 34rem;
}

#modalitemdetails .modal-content {
    border: 0;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

#modalitemdetails .modal-header {
    padding: 1.15rem 1.25rem 0.9rem;
    border: 0;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 195, 68, 0.16), transparent 32%),
        #fff;
}

.dark #modalitemdetails .modal-header,
.dark #modalitemdetails .modal-content {
    background: #1d1d1d;
}

#modalitemdetails .modal-title {
    font-size: 1.05rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.02em;
}

#modalitemdetails .subtotal_,
#modalitemdetails [class*="subtotal_"] {
    font-size: 1rem !important;
    font-weight: 900 !important;
}

#modalitemdetails .modal-header .text-danger {
    color: var(--bs-primary) !important;
    font-weight: 700;
}

#modalitemdetails .modal-header .bg-gray {
    border-radius: 0.85rem !important;
    background: #f7f7f7 !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.dark #modalitemdetails .modal-header .bg-gray {
    background: #282828 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

#modalitemdetails .modal-body {
    padding: 0 1.25rem 0.25rem !important;
}

#modalitemdetails .item-addons-list {
    margin-top: 0.85rem !important;
    padding: 0.9rem !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.04);
}

.dark #modalitemdetails .item-addons-list {
    background: #222;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

#modalitemdetails .form-check,
#modalitemdetails .item-addons-list > div {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

#modalitemdetails .form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

#modalitemdetails .modal-footer {
    padding: 0 1.25rem 1.05rem;
    background: #fff;
}

.dark #modalitemdetails .modal-footer {
    background: #1d1d1d;
}

.fcs-addon-modal__actionbar {
    border: 0 !important;
    padding-top: 0.9rem !important;
}

.fcs-addon-modal__qty {
    height: 2.9rem;
    border: 0 !important;
    border-radius: 999px !important;
    background: #f5f5f5;
}

.dark .fcs-addon-modal__qty {
    background: #2b2b2b;
}

.fcs-addon-modal__qty button {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50% !important;
    background: #1a1a1a !important;
    color: #fff !important;
}

.fcs-addon-modal__qty input {
    font-weight: 900 !important;
}

.fcs-addon-modal__cart {
    height: 2.9rem;
    border: 0 !important;
    border-radius: 999px !important;
    background: #1a1a1a !important;
    color: #fff !important;
    font-weight: 900 !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.fcs-addon-modal__cart:hover {
    background: var(--bs-primary) !important;
    color: #fff !important;
}

.fcs-addon-modal__actions {
    min-width: 0;
}

.fcs-addon-modal__call {
    height: 2.9rem;
    min-width: 2.9rem;
    padding: 0 1rem;
    border: 0;
    border-radius: 999px;
    background: #25d366;
    color: #fff !important;
    font-weight: 800;
    font-size: 0.85rem;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.28);
    transition: transform 0.15s ease, background 0.18s ease;
}

.fcs-addon-modal__call:hover {
    background: #1ebe57 !important;
    color: #fff !important;
    transform: translateY(-1px);
}

@media (max-width: 575.98px) {
    .fcs-addon-modal__call {
        min-width: 2.9rem;
        padding: 0;
    }

    .fcs-addon-modal__call span {
        display: none !important;
    }
}
