/* WooCommerce Promotion Manager - Frontend Styles */

.promotion-badge {
    position: absolute;
    top: 15px;
    left: 0;
    background: #ff5722;
    color: white;
    padding: 8px 15px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 100;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

.promotion-badge.single-badge {
    font-size: 14px;
    padding: 10px 20px;
}

.promotion-badge.loop-badge {
    position: relative;
    top: 0;
    display: inline-block;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 11px;
    padding: 5px 10px;
}


/* Badge Colors based on promotion type */

.promotion-badge[data-type="buy_2_get_1"] {
    background: linear-gradient(135deg, #ff4081, #e91e63);
}

.promotion-badge[data-type="second_product_1k"] {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
}

.promotion-badge[data-type="buy_a_get_b"] {
    background: linear-gradient(135deg, #2196f3, #0d47a1);
}

.promotion-badge[data-type="free"] {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}


/* Product Loop Item Styles */

.product.type-product {
    position: relative;
}

.loop-product-promotion {
    margin-bottom: 10px;
}


/* Promotion Details on Single Product Page */

.promotion-details {
    background: #f8f9fa;
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
}

.promotion-details h3 {
    color: #2e7d32;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
    font-size: 18px;
}

.promotion-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.promotion-item {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #4caf50;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.promotion-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.promotion-item strong {
    color: #2e7d32;
}

.promotion-item small {
    color: #666;
    font-size: 12px;
    display: block;
    margin-top: 5px;
    font-style: italic;
}


/* Cart and Checkout Promotion Messages */

.promotion-messages {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.promotion-messages h3 {
    color: #2e7d32;
    margin-top: 0;
    font-size: 16px;
}

.promotion-alert {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
}

.promotion-alert.alert-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    color: #0d47a1;
}

.promotion-alert.alert-success {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.promotion-alert.alert-warning {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    color: #e65100;
}


/* Promotion Calculation */

.promotion-calculation {
    background: #f8f9fa;
    border: 2px solid #2196f3;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.promotion-calculation h4 {
    color: #0d47a1;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}

.calculation-description {
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #2196f3;
}

.calculation-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.calculation-example {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.calculation-example h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
}

.calculation-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}

.calculation-list li {
    padding: 5px 0;
    font-size: 13px;
    color: #555;
}

.calculation-total {
    margin: 0;
    padding-top: 10px;
    border-top: 1px dashed #e0e0e0;
    color: #2196f3;
    font-size: 14px;
}

.calculation-note {
    color: #666;
    font-size: 12px;
    margin: 10px 0 0 0;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}


/* Animation for badge */

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}


/* Responsive Design */

@media (max-width: 768px) {
    .promotion-badge {
        font-size: 10px;
        padding: 6px 12px;
    }
    .promotion-badge.single-badge {
        font-size: 12px;
        padding: 8px 15px;
    }
    .promotion-details {
        padding: 15px;
    }
    .promotion-item {
        padding: 10px;
    }
    .calculation-examples {
        grid-template-columns: 1fr;
    }
}