/* ============================================================
   LE TACOS - CART SIDEBAR CSS
   ============================================================ */

/* ---- Cart Overlay (backdrop) ---- */
.lt-cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9997;
    backdrop-filter: blur(2px);
    animation: overlayFadeIn 0.25s ease;
}

.lt-cart-overlay.open { display: block; }

/* ---- Cart Sidebar ---- */
.lt-cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background: white;
    z-index: 9998;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    transition: right var(--transition-slow);
}

.lt-cart-sidebar.open { right: 0; }

/* ---- Cart Header ---- */
.lt-cart-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: white;
}

.lt-cart-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lt-cart-header-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.lt-cart-count-badge {
    background: var(--lt-green-dark);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.lt-cart-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.lt-cart-close:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

/* ---- Cart Service Type Banner ---- */
.lt-cart-service-banner {
    padding: 10px 24px;
    background: rgba(13,92,63,0.05);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.83rem;
    color: var(--lt-green-dark);
    font-weight: 600;
    flex-shrink: 0;
}

/* ---- Cart Items ---- */
.lt-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-medium) transparent;
}

.lt-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 16px;
    color: var(--text-muted);
    text-align: center;
    padding: 40px 20px;
}

.lt-cart-empty-icon {
    font-size: 3.5rem;
    opacity: 0.3;
}

.lt-cart-empty-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.lt-cart-empty-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Cart Item Row */
.lt-cart-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
    animation: itemSlideIn 0.25s ease;
}

.lt-cart-item:last-child { border-bottom: none; }

.lt-cart-item-header-row {
    transition: all 0.2s ease;
    padding: 8px;
    margin: -8px;
    border-radius: 12px;
}

.lt-cart-item-header-row:hover {
    background: rgba(13, 92, 63, 0.05);
}

.lt-cart-item-header-row:hover .lt-cart-item-name {
    color: var(--lt-green-dark);
}

.lt-cart-item-header-row:hover .bi-pencil-square {
    transform: scale(1.1);
}

.bi-pencil-square {
    transition: transform 0.2s ease;
}

@keyframes itemSlideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.lt-cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-light);
    flex-shrink: 0;
}

.lt-cart-item-body { flex: 1; min-width: 0; }

.lt-cart-item-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lt-cart-item-details {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 4px;
    display: block;
}

.lt-cart-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px dashed rgba(0,0,0,0.05);
}

.lt-cart-item-price {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--lt-green-dark);
}

.lt-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lt-cart-qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 1px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.lt-cart-qty-btn:hover {
    background: var(--lt-green-dark);
    border-color: var(--lt-green-dark);
    color: white;
}

.lt-cart-item-remove {
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 4px;
    transition: color var(--transition-fast);
}

.lt-cart-item-remove:hover { color: var(--lt-red); }

/* ---- Cart Footer ---- */
.lt-cart-footer {
    border-top: 1px solid var(--border-light);
    padding: 20px 24px;
    flex-shrink: 0;
    background: white;
}

.lt-cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.lt-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-top: 10px;
    border-top: 2px dashed var(--border-light);
}

.lt-cart-total-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.lt-cart-total-amount {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--lt-green-dark);
}

/* Checkout Button */
.lt-checkout-btn {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, var(--lt-green-dark), var(--lt-green-light));
    color: white;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-green);
    position: relative;
    overflow: hidden;
}

.lt-checkout-btn:hover {
    background: linear-gradient(135deg, var(--lt-green-light), var(--lt-green-dark));
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(13,92,63,0.35);
}

.lt-checkout-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.2s;
}

.lt-checkout-btn:active::before { background: rgba(255,255,255,0.1); }

/* Loading state */
.lt-checkout-btn.loading {
    pointer-events: none;
}

.lt-cart-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* ---- Order Button Animation ---- */
.btn-next {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    color: white;
    border-radius: 14px;
    padding: 16px;
    font-weight: 800;
    cursor: pointer;
}

.lt-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lt-courier-anim-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.lt-courier-icon-moving {
    font-size: 1.5rem;
    color: #ffd700;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

/* Animating State */
.btn-next.animating .lt-btn-content {
    opacity: 0;
    transform: translateY(10px);
}

.btn-next.animating .lt-courier-anim-wrap {
    opacity: 1;
}

.btn-next.animating .lt-courier-icon-moving {
    animation: courierSlideRight 1.5s ease-in-out forwards;
}

@keyframes courierSlideRight {
    0% { left: -30px; }
    100% { left: calc(100% + 30px); }
}

/* Success State */
.btn-next.success-state {
    background: #22C55E !important;
}

/* Details State */
.btn-next.details-state {
    background: #ea580c !important;
    border: 2px solid white;
}
