/* Modern Custom WooCommerce Cart with Shopping Bag Icon */

* {
    box-sizing: border-box;
}

.custom-cart-wrapper {
    position: relative;
   
}

/* Cart Icon - Shopping Bag Style */
.custom-cart-icon {
    position: relative;
    width: 56px;
    height: 56px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
}

.custom-cart-icon i {
    font-size: 24px;
    color: white;
    transition: transform 0.3s ease;
}


.custom-cart-icon:hover i {
    transform: scale(1.1);
}

.custom-cart-icon:active {
    transform: scale(0.95);
}

.cart-count-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #ff4757 0%, #e63946 100%);
    color: white;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    padding: 0 7px;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.5);
    border: 2px solid #1a1a1a;
    
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Modern Cart Modal */
.custom-cart-modal {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    z-index: 100000;
}

.custom-cart-modal.active {
    right: 0;
}

/* Cart Header */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 20px;
    border-bottom: 2px solid #f0f0f0;
    background: #fafafa;
}

.cart-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #1a1a1a;
}

.cart-count-circle {
    background: linear-gradient(135deg, #ff4757 0%, #e63946 100%);
    color: white;
    min-width: 32px;
    height: 32px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    padding: 0 8px;
    
}

.cart-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cart-close:hover {
    background: #f0f0f0;
    color: #1a1a1a;
    transform: rotate(90deg);
}

/* Cart Items Container */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: #fff;
}

.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Empty Cart */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cart-empty p {
    font-size: 16px;
    margin: 0;
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 12px;
    position: relative;
    background: #fafafa;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: #f5f5f5;
}

.cart-item:last-child {
    margin-bottom: 0;
}

.item-image {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cart-item:hover .item-image img {
    transform: scale(1.05);
}

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 30px;
}

.item-name {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
}

.item-name a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.item-name a:hover {
    color: #ff4757;
}

.item-quantity-price {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
}

.item-quantity-price .quantity {
    font-weight: 600;
}

.item-quantity-price .price {
    font-weight: 700;
    color: #1a1a1a;
}

/* Remove Button - Highly Visible */
.remove-item {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: #ff4757;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.remove-item:hover {
    background: #ff4757;
    border-color: #ff4757;
    color: white;
    transform: rotate(90deg) scale(1.15);
   
}

.remove-item:active {
    transform: rotate(90deg) scale(0.9);
}

.remove-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Cart Footer */
.cart-footer {
    border-top: 2px solid #f0f0f0;
    padding: 24px;
    background: #fafafa;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.subtotal-label {
    font-size: 16px;
    font-weight: 700;
    color: #666;
}

.subtotal-amount {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
}

/* Cart Buttons */
.cart-btn {
    display: block;
    width: 100%;
    padding: 16px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    border: 2px solid transparent;
}

.view-cart-btn {
    background: #1a1a1a;
    color: white;
     transition: all 0.3s ease;
}

.view-cart-btn:hover {
    background: #000;
   color:f39c12;
 
}

.checkout-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #1a1a1a;
    border:1px solid #f39c12;
     transition: all 0.3s ease;
   
}

.checkout-btn:hover {
    background: transparent;
   color: #f39c12;
}

.checkout-btn:active, .view-cart-btn:active {
    transform: translateY(0);
}

/* Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 99998;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 480px) {
   
    
    .custom-cart-icon {
        width: 50px;
        height: 50px;
    }
    
    .custom-cart-icon i {
        font-size: 22px;
    }
    
    .custom-cart-modal {
        width: 100%;
        right: -100%;
    }
    
    .cart-header {
        padding: 20px 16px;
    }
    
    .cart-items {
        padding: 16px;
    }
    
    .cart-footer {
        padding: 20px 16px;
    }
    
    .item-image {
        width: 70px;
        height: 70px;
    }
    
    .cart-item {
        padding: 12px;
    }
}

/* Loading State */
.cart-item.removing {
    opacity: 0.6;
    pointer-events: none;
}

.cart-item.removing .remove-item {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* Icon Animation on Add to Cart */
.custom-cart-icon.item-added {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1) translateY(0); }
    25% { transform: scale(1.1) translateY(-8px); }
    50% { transform: scale(0.95) translateY(0); }
    75% { transform: scale(1.05) translateY(-4px); }
}