/* Shopping Cart Styles for Kogan Store */

/* Cart Icon & Badge */
.cart-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #F5F6F8;
    color: #374151;
    font-size: 18px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.cart-icon-btn:hover {
    background: #e85d04;
    color: #fff;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #EF4444;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    min-width: 20px;
}

/* Cart Toast */
.cart-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #fff;
    border: 1px solid #22c55e;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.15);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
    font-size: 14px;
    color: #111827;
    max-width: 320px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Cart Drawer Overlay */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(6px);
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

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

/* Cart Drawer */
.cart-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

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

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

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

.close-cart-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #F9FAFB;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.close-cart-btn:hover {
    background: #F3F4F6;
    color: #374151;
}

/* Cart Content */
.cart-content {
    flex: 1;
    padding: 0 24px;
    overflow-y: auto;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: #9CA3AF;
}

.empty-cart i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #D1D5DB;
}

.empty-cart h3 {
    font-size: 18px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
}

.empty-cart p {
    font-size: 14px;
    margin-bottom: 24px;
}

.continue-shopping-btn {
    background: #e85d04;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.continue-shopping-btn:hover {
    background: #d04f00;
}

/* Cart Item */
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #F3F4F6;
}

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

.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    flex-shrink: 0;
}

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

.cart-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-seller {
    font-size: 12px;
    color: #9CA3AF;
    margin: 0 0 6px 0;
}

.cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: #e85d04;
    margin: 0;
}

/* Cart Controls */
.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    width: 28px;
    height: 28px;
    background: #F9FAFB;
    border: none;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #F3F4F6;
    color: #e85d04;
}

.qty-display {
    background: #fff;
    min-width: 32px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #111827;
    border-left: 1px solid #E5E7EB;
    border-right: 1px solid #E5E7EB;
}

.remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #FEF2F2;
    color: #DC2626;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.remove-btn:hover {
    background: #FEE2E2;
    color: #B91C1C;
}

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

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 16px;
    color: #374151;
}

.cart-total-row strong {
    font-weight: 800;
    color: #111827;
}

.checkout-btn {
    width: 100%;
    background: #e85d04;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.03em;
}

.checkout-btn:hover:not(:disabled) {
    background: #d04f00;
    transform: translateY(-1px);
}

.checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Add to Cart Button */
.add-to-cart-btn {
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.03em;
    margin-bottom: 12px;
    width: 100%;
}

.add-to-cart-btn:hover:not(:disabled) {
    background: #16a34a;
    transform: translateY(-1px);
}

.add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Buy Now Button (secondary) */
.buy-now-btn {
    background: #e85d04;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.03em;
    width: 100%;
}

.buy-now-btn:hover:not(:disabled) {
    background: #d04f00;
    transform: translateY(-1px);
}

.buy-now-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-drawer {
        max-width: 100%;
    }
    
    .cart-header {
        padding: 16px 20px;
    }
    
    .cart-content {
        padding: 0 20px;
    }
    
    .cart-footer {
        padding: 16px 20px;
    }
    
    .cart-item {
        padding: 12px 0;
    }
    
    .cart-item-img {
        width: 50px;
        height: 50px;
    }
}