/**
 * DZLife E-Commerce - Wishlist & Cart Button Theme
 * Colors: DZLife Blue (#2D3493), Pink (#F74B81), Light Blue (#E8EBFF)
 * Replaces default green theme with brand colors
 */

/* =============================================
 * WISHLIST BUTTON STYLING
 * ============================================= */

/* Active wishlist state - Pink filled */
.add-to-wishlist-btn.active-wishlist,
.add-to-wishlist-btn[data-in-wishlist="true"] {
    color: #F74B81 !important;
    border-color: rgba(247, 75, 129, 0.3) !important;
}

.add-to-wishlist-btn.active-wishlist i,
.add-to-wishlist-btn[data-in-wishlist="true"] i {
    font-weight: 900 !important; /* Bold/filled appearance */
    color: #F74B81 !important;
}

/* Wishlist hover state */
.add-to-wishlist-btn:hover {
    background-color: #FFE5F0 !important;
    border-color: #F74B81 !important;
    color: #F74B81 !important;
}

.add-to-wishlist-btn:hover i {
    color: #F74B81 !important;
}

/* Prevent blur on icons */
.add-to-wishlist-btn i {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================================
 * CART BUTTON STYLING - Light Blue Theme
 * ============================================= */

/* Override cart button to brand blue */
.add-to-cart-btn,
.product-cart-wrap .product-action-1 .add-to-cart-btn,
button.add-to-cart-btn {
    background: #2D3493 !important;
    border: 2px solid #2D3493 !important;
    color: #fff !important;
    box-shadow: none !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
}

.add-to-cart-btn i,
.product-cart-wrap .product-action-1 .add-to-cart-btn i {
    color: #fff !important;
}

/* Hover: darker blue */
.add-to-cart-btn:hover,
.product-cart-wrap .product-action-1 .add-to-cart-btn:hover {
    background: #232a75 !important;
    color: #fff !important;
    border-color: #232a75 !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12) !important;
}

.add-to-cart-btn:hover i,
.product-cart-wrap .product-action-1 .add-to-cart-btn:hover i {
    color: #fff !important;
}

/* Active state: slight scale down to indicate press */
.add-to-cart-btn:active,
.product-cart-wrap .product-action-1 .add-to-cart-btn:active {
    transform: scale(0.98);
}

/* =============================================
 * ACTION BUTTON GROUP STYLING
 * ============================================= */

/* General action button hover improvements */
.product-action-1 button:after, 
.product-action-1 a.action-btn:after {
    box-shadow: 0 2px 6px rgba(45, 52, 147, 0.1) !important;
}

/* Reduce blur intensity on button shadows */
.product-action-1 button,
.product-action-1 a.action-btn {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

.product-action-1 button:hover,
.product-action-1 a.action-btn:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12) !important;
}

/* =============================================
 * MOBILE RESPONSIVENESS
 * ============================================= */

@media (max-width: 768px) {
    /* Ensure cart button uses black theme on mobile */
    .product-cart-wrap .product-action-1 .add-to-cart-btn {
        background: #000 !important;
        border-color: #000 !important;
        height: 44px !important;
        min-height: 44px !important;
        padding: 0 16px !important;
        font-size: 12px !important;
    }
    
    .product-cart-wrap .product-action-1 .add-to-cart-btn i {
        color: #fff !important;
    }
    
    /* Mobile active state */
    .product-cart-wrap .product-action-1 .add-to-cart-btn:active {
        transform: scale(0.98);
        border-color: #000 !important;
    }
    
    .product-cart-wrap .product-action-1 .add-to-cart-btn:active i {
        color: #fff !important;
    }
    
    /* Wishlist mobile active state */
    .product-cart-wrap .product-action-1 .add-to-wishlist-btn:active {
        background: rgba(247, 75, 129, 0.2) !important;
        border-color: rgba(247, 75, 129, 0.4) !important;
    }
    
    .product-cart-wrap .product-action-1 .add-to-wishlist-btn:active i {
        color: #F74B81 !important;
    }
}

/* =============================================
 * SPINNER STATE (Loading)
 * ============================================= */

/* Spinner color when loading */
.add-to-wishlist-btn .fi-rs-spinner,
.add-to-cart-btn .fi-rs-spinner {
    color: #2D3493 !important;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
