/**
 * Add to Cart Bag Button Styles
 * Shopping bag icon positioned in the bottom RIGHT corner of product cards
 */

.add-to-cart-bag-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 10;

    /* Button styling */
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    padding: 10px;
    cursor: pointer;

    /* Flexbox for centering icon */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Transitions */
    transition: all 0.3s ease;

    /* Shadow for visibility */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.add-to-cart-bag-btn:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.add-to-cart-bag-btn:active {
    transform: scale(0.95);
}

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

/* Icon styling */
.add-to-cart-bag-btn svg {
    width: 24px;
    height: 24px;
    display: block;
    color: #000;
    transition: color 0.3s ease;
}

.add-to-cart-bag-btn:hover svg {
    color: #333;
}

/* Loading state */
.add-to-cart-bag-btn.loading {
    pointer-events: none;
}

.add-to-cart-bag-btn.loading svg {
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* Added state (success) */
.add-to-cart-bag-btn.added {
    background: #4caf50;
}

.add-to-cart-bag-btn.added svg {
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .add-to-cart-bag-btn {
        width: 42px;
        height: 42px;
        padding: 8px;
        bottom: 10px;
        right: 10px;
    }

    .add-to-cart-bag-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .add-to-cart-bag-btn {
        width: 38px;
        height: 38px;
        padding: 7px;
        bottom: 8px;
        right: 8px;
    }

    .add-to-cart-bag-btn svg {
        width: 18px;
        height: 18px;
    }
}
