.cart-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: white;
    border: 1px solid var(--dark-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.cart-button:hover {
    transform: scale(1.05);
}

/* Add cart button animations */
.cart-button-animate {
    animation: pulse 0.5s ease-in-out;
}

.cart-button-add {
    animation: bounce 0.5s ease-in-out;
}

.cart-button-remove {
    animation: shake 0.5s ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    20%, 60% {
        transform: translateX(-5px);
    }
    40%, 80% {
        transform: translateX(5px);
    }
}

.cart-button svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 2;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #E8D4C0;
    color: #27272A;
    font-size: 12px;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Add cart count animations */
.cart-count.has-items {
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.cart-panel {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.cart-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 1001;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #E5E5E5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-title {
    font-size: 18px;
    font-weight: 500;
    color: #27272A;
    margin: 0;
}

.cart-close {
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-close svg {
    width: 20px;
    height: 20px;
    stroke: #27272A;
    stroke-width: 2;
}

.cart-items {
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #E5E5E5;
    transition: all 0.3s ease;
}

/* Add cart item animations */
.cart-item.adding {
    animation: slideIn 0.5s ease-out;
}

.cart-item.removing {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(20px);
    }
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #27272A;
    margin-bottom: 5px;
}

.cart-item-meta {
    font-size: 12px;
    color: #71717A;
    margin-bottom: 8px;
}

.cart-item-price {
    font-size: 14px;
    font-weight: 500;
    color: #27272A;
}

.cart-item-remove {
    color: #71717A;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cart-item-remove:hover {
    color: #E11D48;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #E5E5E5;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.subtotal-label {
    font-size: 14px;
    color: #71717A;
}

.subtotal-amount {
    font-size: 16px;
    font-weight: 500;
    color: #27272A;
    transition: all 0.3s ease;
}

/* Subtotal update animation */
.subtotal-amount.updating {
    animation: flash 0.5s ease;
}

@keyframes flash {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.cart-checkout {
    width: 100%;
    padding: 12px;
    background-color: #ffffff;
    color: #000000;
    border: 1px solid var(--dark-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cart-checkout:hover {
    background-color: #18181B;
    color: #ffffff;
}

.cart-empty {
    padding: 40px 20px;
    text-align: center;
    color: #71717A;
}

.cart-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    stroke: #ffffff;
    stroke-width: 1.5;
}

.cart-empty-text {
    font-size: 14px;
    margin-bottom: 20px;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Add notification styling */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #F3F4F6;
    color: #27272A;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.cart-notification.show {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    .cart-panel {
        width: 100%;
        /* height: 100%; */
        bottom: 0;
        right: 0;
        border-radius: 15px 15px 0 0;
    }

    .cart-button {
        bottom: 80px;
        right: 10px;
        width: 50px;
        height: 50px;
    }

    .cart-notification {
        width: calc(100% - 40px);
        right: 20px;
    }
}

/* Cart Item Quantity Controls */
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.quantity-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(39, 39, 42, 0.1);
    background-color: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background-color: #3D5E8C;
    color: white;
    border-color: #3D5E8C;
}

.quantity-value {
    font-size: 14px;
    min-width: 20px;
    text-align: center;
}

/* Empty cart message */
.cart-empty {
    text-align: center;
    padding: 30px 20px;
    color: #999;
    font-size: 16px;
}

/* Cart notification */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #3D5E8C;
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.cart-notification.show {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    .cart-notification {
        top: auto;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%) translateY(20px);
    }
    
    .cart-notification.show {
        transform: translateX(-50%) translateY(0);
    }
} 