/* Cart Floating Button */
.cart-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.cart-floating-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.5);
}

.cart-floating-btn svg {
    transition: transform 0.3s ease;
}

.cart-floating-btn:hover svg {
    transform: rotate(-10deg);
}

#cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: bold;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transform: translate(25%, -25%);
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

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

/* Cart Panel */
.cart-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    max-width: 90vw;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 100000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: right 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.cart-panel.open {
    right: 0;
}

.cart-header {
    padding: 24px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.cart-close-btn {
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.cart-close-btn:hover {
    color: #111827;
    transform: rotate(90deg);
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Scrollbar styles for cart */
.cart-body::-webkit-scrollbar {
    width: 6px;
}
.cart-body::-webkit-scrollbar-track {
    background: transparent;
}
.cart-body::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 20px;
}

.cart-empty {
    text-align: center;
    color: #6b7280;
    margin-top: 50px;
    font-size: 16px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    animation: slideIn 0.3s ease-out;
}

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

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
}

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

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-details h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
}

.cart-item-price {
    font-size: 14px;
    color: #2563eb;
    font-weight: 600;
}

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

.cart-qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

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

.cart-qty {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    min-width: 16px;
    text-align: center;
}

.cart-remove-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
    border-radius: 6px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
}

.cart-remove-btn:hover {
    background: #fef2f2;
}

.cart-footer {
    padding: 24px;
    background: #f9fafb;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 24px;
}

.cart-checkout-section h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #374151;
}

.cart-checkout-section form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-checkout-section input {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.cart-checkout-section input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.cart-checkout-btn {
    margin-top: 8px;
    padding: 14px;
    background: linear-gradient(135deg, #111827, #374151);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-checkout-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.cart-checkout-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
