/* ============================================================
   ORDER.CSS — Order Online page styles
   Extends menu.css with cart UI and add-to-cart elements
   ============================================================ */

/* Cart badge styles moved to style.css (loaded globally) */

/* ── Active "Order Online" button state ────────────────────── */
.order-active {
    background: #1d1d1b !important;
    color: #fff !important;
    border-color: #1d1d1b !important;
}

/* ── Add to Cart button on menu cards ──────────────────────── */
.item-add-wrapper {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}

.btn-add-to-cart {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid #1d1d1b;
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #1d1d1b;
    transition: background 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-add-to-cart:hover {
    background: #1d1d1b;
    color: #fff;
}

/* When item is in cart — hide the add button, show qty controls */
.item-add-wrapper.in-cart .btn-add-to-cart {
    display: none;
}

/* ── Quantity controls (replaces add button) ────────────────── */
.qty-controls {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 1.5px solid #f26522;
    background: #fff8f4;
}

.item-add-wrapper.in-cart .qty-controls {
    display: flex;
}

.qty-dec,
.qty-inc {
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f26522;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.qty-dec:hover,
.qty-inc:hover {
    background: #ffe8d6;
}

.qty-num {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #f26522;
    min-width: 28px;
    text-align: center;
    user-select: none;
}

/* Cart overlay, drawer, items — moved to style.css (global) */

/* ── Order confirmation toast ───────────────────────────────── */
.order-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1d1d1b;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 14px 28px;
    z-index: 1200;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
    pointer-events: none;
}

.order-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Cart responsive rules moved to style.css */

/* =============================================
   ORDER PAGE — ANIMATIONS & MICRO-INTERACTIONS
   ============================================= */

/* Add-to-cart button — slide-fill on hover */
.btn-add-to-cart {
    position: relative;
    overflow: hidden;
    z-index: 0;
}
.btn-add-to-cart::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #1d1d1b;
    transform: translateX(-101%);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}
.btn-add-to-cart:hover::before {
    transform: translateX(0);
}
.btn-add-to-cart:hover {
    color: #fff;
    background: transparent;
}

/* Add-to-cart — success flash state */
@keyframes cart-add-success {
    0%   { background: transparent; color: #1d1d1b; transform: scale(1); }
    20%  { transform: scale(0.96); }
    50%  { background: #00a651; color: #fff; transform: scale(1.02); }
    80%  { background: #1d1d1b; color: #fff; }
    100% { background: #1d1d1b; color: #fff; transform: scale(1); }
}
.btn-add-to-cart.is-adding {
    animation: cart-add-success 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    pointer-events: none;
}

/* Qty controls — in-cart state entrance */
@keyframes qty-appear {
    from { opacity: 0; transform: scaleX(0.85); }
    to   { opacity: 1; transform: scaleX(1); }
}
.item-add-wrapper.in-cart .qty-controls {
    animation: qty-appear 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    transform-origin: left;
}

/* Qty buttons — micro feedback */
.qty-dec,
.qty-inc {
    transition: background 0.2s ease, transform 0.15s ease;
}
.qty-dec:active,
.qty-inc:active {
    transform: scale(0.88);
}

/* Cart drawer enhancements moved to style.css */

/* Checkout button — shimmer sweep */
.checkout-btn {
    position: relative;
    overflow: hidden;
}
.checkout-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -80%;
    width: 55%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.18),
        transparent
    );
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}
.checkout-btn:hover::after {
    left: 130%;
}
.checkout-btn:active {
    transform: scale(0.985);
}

/* Empty cart icon — bounce */
@keyframes cart-empty-bounce {
    0%, 100% { transform: translateY(0); }
    30%       { transform: translateY(-10px); }
    60%       { transform: translateY(-4px); }
}
.cart-empty-icon {
    animation: cart-empty-bounce 2.2s ease-in-out infinite;
    animation-delay: 0.4s;
}

/* Toast — entrance polish */
.order-toast {
    border-radius: 2px;
    letter-spacing: 0.03em;
}
