/* Modern Font Import - Inter only */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Font Awesome Icons - Using CDN */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* Font Awesome icon base */
.fa-icon {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 18px;
    vertical-align: middle;
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 1;
    text-align: center;
    transition: all 0.2s ease;
}

/* Modern Orange Button Design - LARGER FOR MAIN PRODUCT PAGES */
.vmu-buy-now-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #FF8C00 0%, #FF6B00 100%);
    border-radius: 14px;
    color: #ffffff !important;
    padding: 16px 32px !important;
    margin: 16px auto;
    text-decoration: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px !important;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: none; /* Removed transition */
    line-height: 1;
    overflow: visible;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    text-align: center;
    min-width: 140px;
    min-height: 54px;
    box-sizing: border-box;
}

/* See Product Button Styles */
.vmu-see-product-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 14px;
    color: #ffffff !important;
    padding: 16px 32px !important;
    margin: 16px auto;
    text-decoration: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px !important;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: none; /* Removed transition */
    line-height: 1.4;
    overflow: visible;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    text-align: center;
    min-width: 140px;
    min-height: 54px;
    box-sizing: border-box;
}

/* Disabled state for buttons with no URL */
.vmu-buy-now-btn.vmu-no-url {
    background: linear-gradient(135deg, #cccccc 0%, #999999 100%) !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
    pointer-events: auto !important; /* Allow clicks to show the message */
}

.vmu-buy-now-btn.vmu-no-url .vmu-btn-text::after {
    content: ' (Temporarily Unavailable)';
    font-size: 12px;
    font-weight: 400;
    opacity: 0.9;
    margin-left: 4px;
}

/* See Product button disabled state */
.vmu-see-product-btn.vmu-no-url {
    background: linear-gradient(135deg, #cccccc 0%, #999999 100%) !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
    pointer-events: auto !important; /* Allow clicks to show the message */
}

.vmu-btn-icon {
    font-size: 18px;
    margin-right: 3px;
    transition: none; /* Removed transition */
    display: inline-flex;
    align-items: center;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    color: #ffffff;
    width: 20px;
    height: 20px;
    justify-content: center;
}

.vmu-btn-text {
    font-weight: 700;
    letter-spacing: -0.01em;
    font-size: 17px;
    color: #ffffff;
    display: inline-block;
    min-width: 70px;
}

/* Category Listing Page Styles - CENTERED BUTTON */
.vmu-buy-now-btn.vmu-category-page {
    color: #ffffff !important;
    margin: 14px auto !important;
    display: block !important;
    width: fit-content;
    max-width: 100%;
    text-align: center;
    position: relative;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* See Product Button Category Page - CENTERED */
.vmu-see-product-btn.vmu-category-page {
    color: #ffffff !important;
    margin: 14px auto !important;
    display: block !important;
    width: fit-content;
    max-width: 100%;
    text-align: center;
    position: relative;
    margin-left: auto !important;
    margin-right: auto !important;
}

.vmu-buy-now-btn.vmu-category-page .vmu-btn-icon,
.vmu-buy-now-btn.vmu-category-page .vmu-btn-text {
    color: #ffffff !important;
}

.vmu-see-product-btn.vmu-category-page .vmu-btn-icon,
.vmu-see-product-btn.vmu-category-page .vmu-btn-text {
    color: #ffffff !important;
}

.vmu-buy-now-btn.vmu-category-page .vmu-btn-icon {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    font-size: 16px !important;
    margin-right: 6px !important;
    width: 18px;
    height: 18px;
}

.vmu-see-product-btn.vmu-category-page .vmu-btn-icon {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    font-size: 16px !important;
    margin-right: 6px !important;
    width: 18px;
    height: 18px;
}

.vmu-buy-now-btn.vmu-category-page .vmu-btn-text {
    font-size: 15px !important;
    font-weight: 700 !important;
    min-width: 60px;
}

.vmu-see-product-btn.vmu-category-page .vmu-btn-text {
    font-size: 15px !important;
    font-weight: 700 !important;
    min-width: 60px;
}

/* Ensure white text in all states for category pages */
.vmu-buy-now-btn.vmu-category-page:hover,
.vmu-buy-now-btn.vmu-category-page:active,
.vmu-buy-now-btn.vmu-category-page:focus {
    color: #ffffff !important;
}

.vmu-see-product-btn.vmu-category-page:hover,
.vmu-see-product-btn.vmu-category-page:active,
.vmu-see-product-btn.vmu-category-page:focus {
    color: #ffffff !important;
}

.vmu-buy-now-btn.vmu-category-page:hover .vmu-btn-icon,
.vmu-buy-now-btn.vmu-category-page:hover .vmu-btn-text,
.vmu-buy-now-btn.vmu-category-page:active .vmu-btn-icon,
.vmu-buy-now-btn.vmu-category-page:active .vmu-btn-text {
    color: #ffffff !important;
}

.vmu-see-product-btn.vmu-category-page:hover .vmu-btn-icon,
.vmu-see-product-btn.vmu-category-page:hover .vmu-btn-text,
.vmu-see-product-btn.vmu-category-page:active .vmu-btn-icon,
.vmu-see-product-btn.vmu-category-page:active .vmu-btn-text {
    color: #ffffff !important;
}

/* Button Hover Effects - Removed for category pages */
.vmu-buy-now-btn:hover {
    background: linear-gradient(135deg, #FF6B00 0%, #FF8C00 100%);
    color: #ffffff;
    text-decoration: none;
    /* Removed transform and box-shadow changes */
}

.vmu-see-product-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
    color: #ffffff;
    text-decoration: none;
    /* Removed transform and box-shadow changes */
}

/* Removed icon animations */
.vmu-buy-now-btn:hover .vmu-btn-icon {
    /* Removed transform animation */
}

.vmu-see-product-btn:hover .vmu-btn-icon {
    /* Removed transform animation */
}

/* Button Active State - Removed animations */
.vmu-buy-now-btn:active {
    /* Removed transform and box-shadow changes */
}

.vmu-see-product-btn:active {
    /* Removed transform and box-shadow changes */
}

/* Glow Effect on Hover - Removed */
.vmu-buy-now-btn::before,
.vmu-see-product-btn::before {
    display: none; /* Hide glow effect */
}

/* Ripple Effect - Removed */
.vmu-buy-now-btn::after,
.vmu-see-product-btn::after {
    display: none; /* Hide ripple effect */
}

/* Tooltip - KEPT INTACT */
.vmu-buy-now-btn .tooltip,
.vmu-see-product-btn .tooltip {
    visibility: hidden;
    width: 240px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ffffff;
    text-align: center;
    border-radius: 10px;
    padding: 14px 16px;
    position: absolute;
    z-index: 1000;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.9);
    opacity: 0;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

/* Category page tooltip - keep original size */
.vmu-buy-now-btn.vmu-category-page .tooltip,
.vmu-see-product-btn.vmu-category-page .tooltip {
    color: #ffffff !important;
    font-size: 13px !important;
    padding: 12px 14px !important;
    width: 220px;
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.9);
}

.vmu-buy-now-btn:hover .tooltip,
.vmu-see-product-btn:hover .tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-8px) scale(1);
    transition-delay: 0.1s;
}

.vmu-buy-now-btn .tooltip::after,
.vmu-see-product-btn .tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #2c3e50 transparent transparent transparent;
}

/* Proper spacing between buttons */
.vmu-buy-now-btn + .vmu-see-product-btn {
    margin-top: 8px !important;
}

/* When See Product button appears after login form */
.vmu-login-form-container + .vmu-see-product-btn {
    margin-top: 20px !important;
}

/* Flexbox fallback for older browsers */
.vmu-buy-now-btn {
    display: inline-block !important;
    text-align: center;
}

.vmu-see-product-btn {
    display: inline-block !important;
    text-align: center;
}

.vmu-buy-now-btn .vmu-btn-icon,
.vmu-buy-now-btn .vmu-btn-text {
    display: inline-block;
    vertical-align: middle;
}

.vmu-see-product-btn .vmu-btn-icon,
.vmu-see-product-btn .vmu-btn-text {
    display: inline-block;
    vertical-align: middle;
}

/* Font loading optimization to prevent layout shift */
.vmu-buy-now-btn {
    font-display: swap;
}

.vmu-see-product-btn {
    font-display: swap;
}

/* VirtueMart Button Control CSS - Applied via JavaScript based on plugin settings */
.vmu-disable-addtocart-product .addtocart-bar {
    display: none !important;
}

.vmu-disable-addtocart-category .addtocart-bar {
    display: none !important;
}

.vmu-disable-details-product div.vm-details-button {
    display: none !important;
}

.vmu-disable-details-category div.vm-details-button {
    display: none !important;
}

tr td.custom-divider {
    border: none;
    height: 2px;
    background-color: #000;
    width: 100%;
    margin: 10px auto;
}

/* Icon animations on hover */
.vmu-buy-now-btn:hover .vmu-btn-icon {
    transform: translateX(2px) scale(1.1);
}

.vmu-see-product-btn:hover .vmu-btn-icon {
    transform: translateX(2px) scale(1.1);
}

/* Loading Animation */
.vmu-buy-now-btn.loading .vmu-btn-icon,
.vmu-see-product-btn.loading .vmu-btn-icon {
    animation: vmuSpin 1s linear infinite;
}

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

/* Focus states */
.vmu-buy-now-btn:focus-visible,
.vmu-see-product-btn:focus-visible {
    outline: 3px solid rgba(255, 140, 0, 0.5);
    outline-offset: 2px;
}

.vmu-see-product-btn:focus-visible {
    outline-color: rgba(76, 175, 80, 0.5);
}

/* Pulse Animation on Focus */
/* Universal Pulse Animation */
@keyframes vmuPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(120, 120, 120, 0.6); /* Warm Gray */
    }
    70% {
        box-shadow: 0 0 0 10px rgba(120, 120, 120, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(120, 120, 120, 0);
    }
}

.vmu-buy-now-btn:focus,
.vmu-see-product-btn:focus {
    animation: vmuPulse 1.5s infinite;
}

/* Button Hover Effects */
.vmu-see-product-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
    transform: translateY(-2px) scale(1.02);
}

.vmu-buy-now-btn:hover {
    background: linear-gradient(135deg, #FF6B00 0%, #FF8C00 100%);
    transform: translateY(-2px) scale(1.02);
}

/* Button Size Classes are now defined in buttons.css to avoid duplication */
/* Including the new "tiny" size */
/* All size definitions have been moved to buttons.css to prevent conflicts */

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Icon adjustments for mobile */
    .vmu-btn-icon {
        font-size: 16px;
        margin-right: 6px;
        width: 18px;
        height: 18px;
    }
    
    .vmu-btn-text {
        font-size: 15px;
        min-width: 60px;
    }
    
    .vmu-see-product-btn.vmu-category-page:hover {
        transform: translateX(-50%); /* Removed translateY */
    }
    
    .vmu-see-product-btn.vmu-category-page:active {
        transform: translateX(-50%); /* Removed translateY */
    }
    
    .vmu-buy-now-btn.vmu-category-page .vmu-btn-icon {
        font-size: 15px !important;
        margin-right: 5px !important;
        width: 16px;
        height: 16px;
    }
    
    .vmu-see-product-btn.vmu-category-page .vmu-btn-icon {
        font-size: 15px !important;
        margin-right: 5px !important;
        width: 16px;
        height: 16px;
    }
    
    .vmu-buy-now-btn.vmu-category-page .vmu-btn-text {
        font-size: 14px !important;
        min-width: 55px;
    }
    
    .vmu-see-product-btn.vmu-category-page .vmu-btn-text {
        font-size: 14px !important;
        min-width: 55px;
    }
    
    /* Additional mobile optimizations for See Product button */
    @media (max-width: 360px) {
        .vmu-see-product-btn.vmu-category-page .vmu-btn-icon {
            font-size: 13px !important;
            width: 14px;
            height: 14px;
        }
        
        .vmu-see-product-btn.vmu-category-page .vmu-btn-text {
            font-size: 14px !important;
            min-width: 45px;
        }
    }
}

@media (max-width: 480px) {
    /* Icon adjustments for small mobile */
    .vmu-btn-icon {
        font-size: 15px;
        margin-right: 5px;
        width: 17px;
        height: 17px;
    }
    
    .vmu-btn-text {
        font-size: 14px;
        min-width: 55px;
    }
    
    .vmu-see-product-btn.vmu-category-page:hover {
        transform: translateX(-50%); /* Removed translateY */
    }
    
    .vmu-see-product-btn.vmu-category-page:active {
        transform: translateX(-50%); /* Removed translateY */
    }
    
    .vmu-buy-now-btn.vmu-category-page .vmu-btn-icon {
        font-size: 14px !important;
        margin-right: 4px !important;
        width: 15px;
        height: 15px;
    }
    
    .vmu-see-product-btn.vmu-category-page .vmu-btn-icon {
        font-size: 14px !important;
        margin-right: 4px !important;
        width: 15px;
        height: 15px;
    }
    
    .vmu-buy-now-btn.vmu-category-page .vmu-btn-text {
        font-size: 13px !important;
        min-width: 50px;
    }
    
    .vmu-see-product-btn.vmu-category-page .vmu-btn-text {
        font-size: 13px !important;
        min-width: 50px;
    }
    
    /* Login form small mobile */
    .vmu-login-form {
        padding: 20px;
    }
    
    .modern-input input {
        padding: 12px 16px 12px 42px;
        font-size: 14px;
    }
    
    .modern-input i {
        font-size: 15px;
        left: 14px;
    }
    
    .modern-input label {
        font-size: 14px;
        left: 42px;
    }
    
    .vmu-login-btn {
        padding: 14px 18px !important;
        font-size: 14px !important;
        min-height: 46px;
    }
    
    .vmu-auth-links {
        font-size: 13px;
    }
    
    .register-link {
        font-size: 14px;
    }
}

/* Animation for button hover - Removed pulse animation */
@keyframes vmuButtonPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 5px 18px rgba(255, 140, 0, 0.35);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 22px rgba(255, 140, 0, 0.45);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 5px 18px rgba(255, 140, 0, 0.35);
    }
}

.vmu-buy-now-btn:focus,
.vmu-see-product-btn:focus {
    outline: none;
    /* Removed animation */
}

/* Loading state */
.vmu-buy-now-btn.loading .vmu-btn-icon,
.vmu-see-product-btn.loading .vmu-btn-icon {
    animation: vmuSpin 1s linear infinite;
}

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

/* Alternative orange styles */
.vmu-buy-now-btn.vmu-style-dark {
    background: linear-gradient(135deg, #E67E22 0%, #D35400 100%);
}

.vmu-buy-now-btn.vmu-style-dark:hover {
    background: linear-gradient(135deg, #D35400 0%, #E67E22 100%);
    /* Removed box-shadow change */
}

.vmu-buy-now-btn.vmu-style-light {
    background: linear-gradient(135deg, #FFA726 0%, #FF9800 100%);
}

.vmu-buy-now-btn.vmu-style-light:hover {
    background: linear-gradient(135deg, #FF9800 0%, #FFA726 100%);
    /* Removed box-shadow change */
}

/* Outline variant */
.vmu-buy-now-btn.vmu-style-outline {
    background: transparent;
    border: 3px solid #FF8C00;
    color: #FF8C00;
    box-shadow: none;
}

.vmu-buy-now-btn.vmu-style-outline.vmu-category-page,
.vmu-buy-now-btn.vmu-style-outline.vmu-category-page .vmu-btn-icon,
.vmu-buy-now-btn.vmu-style-outline.vmu-category-page .vmu-btn-text {
    color: #ffffff !important;
    border-color: #ffffff;
    border-width: 2px !important;
}

.vmu-buy-now-btn.vmu-style-outline:hover {
    background: #FF8C00;
    color: #ffffff;
}

/* Minimal variant */
.vmu-buy-now-btn.vmu-style-minimal {
    background: rgba(255, 140, 0, 0.1);
    color: #FF8C00;
    box-shadow: none;
}

.vmu-buy-now-btn.vmu-style-minimal.vmu-category-page,
.vmu-buy-now-btn.vmu-style-minimal.vmu-category-page .vmu-btn-icon,
.vmu-buy-now-btn.vmu-style-minimal.vmu-category-page .vmu-btn-text {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2);
}

.vmu-buy-now-btn.vmu-style-minimal:hover {
    background: rgba(255, 140, 0, 0.2);
    /* Removed transform and box-shadow */
}

/* Focus states for accessibility */
.vmu-buy-now-btn:focus-visible,
.vmu-see-product-btn:focus-visible {
    outline: 3px solid #FF8C00;
    outline-offset: 2px;
}

.vmu-see-product-btn:focus-visible {
    outline-color: #4CAF50;
}

.vmu-buy-now-btn.vmu-category-page:focus-visible,
.vmu-see-product-btn.vmu-category-page:focus-visible {
    outline: 2px solid #ffffff !important;
    outline-offset: 2px;
}

/* Login form focus states */
.modern-input input:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.vmu-login-btn:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Hide tooltip on touch devices */
@media (pointer: coarse) {
    .vmu-buy-now-btn .tooltip,
    .vmu-see-product-btn .tooltip {
        display: none !important;
    }
}
