/* Frontend Styles for Special Deals */

/* Deal Badges */
.sdwc-deal-badge {
    position: absolute;
    z-index: 10;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 3px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.sdwc-badge-top-left {
    top: 10px;
    left: 10px;
}

.sdwc-badge-top-right {
    top: 10px;
    right: 10px;
}

.sdwc-badge-bottom-left {
    bottom: 10px;
    left: 10px;
}

.sdwc-badge-bottom-right {
    bottom: 10px;
    right: 10px;
}

/* Ensure product wrapper has position relative */
.woocommerce ul.products li.product,
.woocommerce div.product div.images {
    position: relative;
}

/* Pricing Table */
.sdwc-pricing-table {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.sdwc-pricing-table h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.sdwc-pricing-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.sdwc-pricing-table thead th {
    background: #333;
    color: #fff;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.sdwc-pricing-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.sdwc-pricing-table tbody tr:last-child td {
    border-bottom: none;
}

.sdwc-pricing-table tbody tr:hover {
    background: #f5f5f5;
}

.sdwc-original-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 8px;
    font-size: 14px;
}

.sdwc-discounted-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 16px;
}

/* Quantity Info */
.sdwc-quantity-info {
    margin: 15px 0;
    padding: 12px 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    font-weight: 500;
}

/* Savings Message */
.sdwc-savings-message {
    margin: 15px 0;
    padding: 12px 15px;
    background: #d4edda;
    border: 1px solid #28a745;
    border-radius: 4px;
    color: #155724;
    font-size: 15px;
}

.sdwc-savings-message strong {
    color: #28a745;
    font-size: 16px;
}

/* Cart Savings */
.sdwc-cart-savings {
    background: #f0f9ff;
}

.sdwc-cart-savings th {
    color: #333;
    font-weight: 600;
}

.sdwc-savings-amount {
    color: #28a745;
    font-size: 18px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .sdwc-pricing-table {
        overflow-x: auto;
    }
    
    .sdwc-pricing-table table {
        font-size: 14px;
    }
    
    .sdwc-pricing-table thead th,
    .sdwc-pricing-table tbody td {
        padding: 8px;
    }
    
    .sdwc-deal-badge {
        padding: 6px 10px;
        font-size: 10px;
    }
}

/* Price Display Enhancements */
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    position: relative;
}

.woocommerce div.product p.price del,
.woocommerce div.product span.price del {
    opacity: 0.5;
}

/* Animation for badges */
@keyframes sdwcPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.sdwc-deal-badge {
    animation: sdwcPulse 2s infinite;
}

/* Hover effects */
.sdwc-pricing-table tbody tr {
    transition: background-color 0.2s ease;
}

/* Loading state */
.sdwc-loading {
    opacity: 0.6;
    pointer-events: none;
}
