/* Product Page Progress Bar Styles - Thin & Elegant */
#cbm-product-progress-bar {
    width: 100%;
    display: block;
    margin: 12px 0;
}

.free-shipping-progress-product {
    width: 100%;
    font-family: inherit;
}

.progress-product-wrapper {
    width: 100%;
}

.progress-product-text-message {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    display: block;
    width: 100%;
    position: relative;
    clear: both;
}

/* Original cart progress bar text styling (don't change) */
.progress-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    z-index: 10;
    line-height: 1;
}

/* RTL Support for product page only */
html[dir="rtl"] .progress-product-text-message,
body[dir="rtl"] .progress-product-text-message,
.rtl .progress-product-text-message {
    text-align: right;
}

.progress-product-bar {
    width: 100%;
    height: 3px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-product-fill {
    height: 100%;
    background: #4caf50;
    transition: width 0.4s ease;
    border-radius: 2px;
}

/* Qualified state */
.free-shipping-progress-product.qualified {
    background: #e8f5e9;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.free-shipping-progress-product.qualified .progress-product-text,
.free-shipping-progress-product.qualified .progress-label {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #4caf50;
    font-weight: 500;
    font-size: 14px;
}

.free-shipping-progress-product.qualified .icon-check {
    margin-right: 6px;
    font-size: 16px;
}

/* Porto theme specific adjustments */
.product-info-main .free-shipping-progress-product {
    order: -1; /* Place before other elements */
}

/* Porto add to cart area */
.box-tocart .free-shipping-progress-product {
    margin-bottom: 15px;
}

/* Ensure progress bar appears above fieldset in Porto */
.product-add-form .free-shipping-progress-product {
    margin-bottom: 20px;
}

/* Mobile styles */
@media (max-width: 767px) {
    .free-shipping-progress-product {
        margin-bottom: 10px;
        margin-top: 0;
    }
    
    /* When inside actions div on mobile */
    .actions #cbm-product-progress-bar,
    .actions .free-shipping-progress-product {
        margin-bottom: 10px;
        margin-top: 0;
        width: 100%;
        display: block;
    }
    
    .progress-product-bar {
        height: 4px;
        margin-bottom: 6px;
    }
    
    .progress-bar-text {
        font-size: 11px;
    }
    
    /* For sticky add to cart on mobile - Porto theme */
    .product-info-main-sticky .free-shipping-progress-product,
    .sticky-product .free-shipping-progress-product,
    .sticky-product-enabled .free-shipping-progress-product {
        position: fixed;
        bottom: 60px; /* Adjust based on sticky button height */
        left: 0;
        right: 0;
        margin: 0;
        padding: 8px 15px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
        z-index: 99;
    }
    
    /* Porto sticky product bar specific */
    .sticky-product-box ~ .free-shipping-progress-product,
    .page-layout-1column .sticky-product-box ~ .free-shipping-progress-product {
        bottom: 70px; /* Porto's sticky bar is usually 70px */
    }
    
    .sticky-product .progress-product-bar {
        height: 3px;
        margin-bottom: 4px;
    }
    
    .free-shipping-progress-product.qualified {
        padding: 6px 12px;
    }
}

/* Ultra mobile (small phones) */
@media (max-width: 480px) {
    .progress-product-text {
        font-size: 10px;
    }
    
    .progress-amount {
        font-size: 11px;
    }
    
    .progress-label {
        display: none; /* Hide label on very small screens */
    }
    
    .free-shipping-progress-product.qualified .progress-label {
        display: inline; /* Show for qualified state */
    }
}