/* ===== Cart Float Button ===== */
.cart-float {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 998;
    transition: transform 0.2s, background 0.2s;
    border: none;
}

.cart-float:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.cart-float .cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    border: 2px solid white;
}

.cart-float.empty {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
}

/* ===== Add to Cart Button on Menu Cards ===== */
.menu-card-actions {
    padding: 0 20px 16px;
    display: flex;
    gap: 8px;
}

.btn-add-cart {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.btn-add-cart:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-add-cart:active {
    transform: scale(0.97);
}

.btn-add-cart.added {
    background: #16a34a;
}

/* ===== Cart Drawer ===== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    z-index: 1101;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 30px rgba(0,0,0,0.15);
}

.cart-drawer.open {
    transform: translateX(0);
}

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.cart-drawer-header h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--neutral-900);
    margin: 0;
}

.cart-drawer-header .cart-count {
    font-size: 0.85rem;
    color: var(--neutral-500);
    font-weight: 400;
}

.cart-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-600);
    transition: background 0.2s;
}

.cart-close:hover {
    background: #e5e7eb;
}

/* Cart Items */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
    color: var(--neutral-400);
}

.cart-empty i {
    font-size: 3rem;
}

.cart-empty p {
    font-size: 1rem;
}

.cart-empty a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
    align-items: flex-start;
}

.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

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

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

.cart-item-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-info .cart-item-notes {
    font-size: 0.75rem;
    color: var(--neutral-400);
    margin: 2px 0;
    font-style: italic;
}

.cart-item-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.cart-qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-700);
    transition: background 0.15s;
}

.cart-qty-btn:hover {
    background: #f3f4f6;
}

.cart-item-qty {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-remove {
    margin-left: auto;
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.cart-item-remove:hover {
    opacity: 1;
}

/* Cart ingredient display */
.cart-item-ing {
    font-size: 0.73rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 2px 0;
}
.cart-item-size {
    font-size: 0.7rem;
    background: #f3f4f6;
    color: #6b7280;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 600;
    margin-left: 4px;
}
.cart-item-extras-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 4px 10px;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.cart-item-extras-btn:hover {
    background: #dcfce7;
}

/* Cart item notes input */
.cart-item-notes-input {
    width: 100%;
    margin-top: 6px;
    padding: 5px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.73rem;
    font-family: inherit;
    color: #6b7280;
    outline: none;
}
.cart-item-notes-input:focus {
    border-color: #16a34a;
}

/* Cart Footer */
.cart-footer {
    border-top: 1px solid #e5e7eb;
    padding: 20px 24px;
    flex-shrink: 0;
    background: #fafafa;
}

.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--neutral-600);
}

.cart-summary-row.total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neutral-900);
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.btn-checkout {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, transform 0.15s;
}

.btn-checkout:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-checkout:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

/* ===== Toast Notification ===== */
.toast {
    position: fixed;
    bottom: 170px;
    right: 24px;
    background: var(--neutral-900);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 1200;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    background: #ef4444;
}

/* ===== Store Closed Banner ===== */
.store-closed-banner {
    display: none;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 20px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
}

.store-closed-banner.visible {
    display: block;
}

/* ===== Item Notes Input ===== */
.cart-item-notes-input {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.75rem;
    color: var(--neutral-600);
    margin-top: 4px;
    font-family: var(--font-body);
    outline: none;
}

.cart-item-notes-input:focus {
    border-color: var(--primary);
}

@media (max-width: 480px) {
    .cart-drawer {
        max-width: 100%;
    }
}
