/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -500px;
    width: 500px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 40px 30px;
    border-radius: 0 0 0 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
}

.cart-sidebar.active {
    right: 0;
}

.cart-sidebar h3 {
    font-family: 'Satoshi-Regular', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 15px;
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: none;
}

.cart-overlay.active {
    display: block;
}

/* Cart Item */
.cart-item {
    display: flex;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    transition: all 0.2s ease;
}

.cart-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 20px;
    border: 1px solid var(--primary-color);
}

.cart-item-details {
    flex-grow: 1;
    max-width: 200px;
}

.cart-item-details h6 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-details p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 0;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #fff;
    border-radius: 8px;
    padding: 5px;
    border: 1px solid #ddd;
}

.quantity-btn {
    background: none;
    border: none;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 5px;
}

.quantity-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.quantity-input {
    width: 70px;
    text-align: center;
    border: none;
    font-size: 1rem;
    background-color: transparent;
    color: var(--secondary-color);
}

.quantity-input:focus {
    outline: none;
}

.remove-item {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 4.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item:hover {
    color: #a12834;
    transform: scale(1.1);
}
.remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2rem; /* Reduced from 4.8rem to a reasonable size */
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}

.remove-btn:hover {
    color: #a12834;
    background-color: rgba(220, 53, 69, 0.1); /* Subtle background on hover */
    transform: scale(1.1);
}

.remove-btn i {
    line-height: 1; /* Ensure the icon is vertically centered */
}

/* Cart Total */
#cartTotal {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin-top: 25px;
    border: 1px solid #e5e5e5;
}

#cartTotal h5 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

/* Empty Cart Message */
#emptyCart {
    text-align: center;
    font-size: 1.1rem;
    color: #777;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
}

/* Cart Button */
.cart-btn2 {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--primary-color) 0%, #b89b6b 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cart-btn2:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: linear-gradient(90deg, var(--secondary-color) 0%, #2a2522 100%);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--secondary-color);
    color: #ffffff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    border: 2px solid #ffffff;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 400px;
        padding: 25px;
    }

    .cart-item img {
        width: 60px;
        height: 60px;
        margin-right: 15px;
    }

    .cart-item-details h6 {
        font-size: 1rem;
    }

    .cart-item-details p {
        font-size: 0.9rem;
    }

    .cart-item-actions {
        gap: 15px;
    }

    .quantity-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .quantity-input {
        width: 60px;
        font-size: 0.9rem;
    }

    .remove-item {
        font-size: 1.5rem;
        padding: 6px;
    }
}

@media (max-width: 576px) {
    .cart-sidebar {
        width: 320px;
        padding: 20px;
    }

    .cart-item {
        padding: 15px;
    }

    .cart-item img {
        width: 50px;
        height: 50px;
        margin-right: 10px;
    }

    .cart-item-details h6 {
        font-size: 0.9rem;
    }

    .cart-item-details p {
        font-size: 0.8rem;
    }

    .cart-item-actions {
        gap: 10px;
    }

    .quantity-btn {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
    }

    .quantity-input {
        width: 50px;
        font-size: 0.8rem;
    }

    .remove-item {
        font-size: 1.3rem;
        padding: 5px;
    }
}