/* bundlebuddy Pro v2.2 Styles - Final Refinement */

:root {
    --wb-primary: #4caf50;
    /* Darker standard green */
    --wb-primary-dark: #43a047;
    --wb-secondary: #333;
    --wb-accent: #e74c3c;
    --wb-bg: #f8f9fa;
    --wb-text: #2c3e50;
    --wb-text-light: #7f8c8d;
    --wb-border: #eee;
    --wb-shadow: none;
    --wb-radius: 12px;
}

.bundlebuddy-card {
    background: var(--wb-bg);
    border-radius: var(--wb-radius);
    padding: 30px;
    /* Increased padding */
    margin: 30px 0;
    border: 1px solid #e0e0e0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Header */
.bundlebuddy-card-header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.bundlebuddy-header-left {
    text-align: center;
    width: 100%;
}

.bundlebuddy-card-title {
    margin: 0;
    font-size: 1.3rem;
    color: var(--wb-secondary);
    font-weight: 600;
}

.bundlebuddy-card-description {
    font-size: 0.9rem;
    color: var(--wb-text-light);
}

.bundlebuddy-badge {
    position: absolute;
    right: 0;
    top: 0;
    background: var(--wb-accent);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.2);
}

/* Body - Product List */
.bundlebuddy-card-body {
    margin-bottom: 25px;
}

.bundlebuddy-products-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bundlebuddy-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    background: transparent;
    border-bottom: 1px solid #eee;
}

.bundlebuddy-product-item:last-child {
    border-bottom: none;
}

.bundlebuddy-product-left {
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.bundlebuddy-product-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #eee;
}

.bundlebuddy-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bundlebuddy-product-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--wb-secondary);
}

.bundlebuddy-product-right {
    display: flex;
    align-items: center;
    gap: 5px;
    text-align: right;
}

.bundlebuddy-product-price {
    font-weight: 500;
    color: var(--wb-text);
    font-size: 0.95rem;
}

.bundlebuddy-product-qty {
    font-weight: 600;
    color: #aaa;
    font-size: 0.9rem;
}

/* Footer */
.bundlebuddy-card-footer {
    border-top: 2px solid #333;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.bundlebuddy-price-summary {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.bundlebuddy-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.bundlebuddy-price-row {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.bundlebuddy-final-price {
    color: #000;
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.1;
}

.bundlebuddy-original-price {
    color: #999;
    font-size: 1rem;
    text-decoration: line-through;
    margin-top: 2px;
}

.bundlebuddy-save-tag {
    font-size: 0.95rem;
    color: var(--wb-primary-dark);
    font-weight: 600;
    margin-top: 5px;
}

/* Action Button */
.bundlebuddy-action {
    width: auto;
}

button.bundlebuddy-add-to-cart {
    width: auto;
    background-color: var(--wb-primary) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 30px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    text-transform: uppercase;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    display: inline-block;
}

button.bundlebuddy-add-to-cart:hover {
    background-color: var(--wb-primary-dark) !important;
}

button.bundlebuddy-add-to-cart.success-state {
    background-color: #28a745 !important;
}

button.bundlebuddy-add-to-cart.loading {
    opacity: 0.8;
    cursor: wait !important;
    position: relative;
}

button.bundlebuddy-add-to-cart.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    right: 10px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: bundlebuddy-spinner 0.6s linear infinite;
}

@keyframes bundlebuddy-spinner {
    to { transform: rotate(360deg); }
}

/* Messages */
.bundlebuddy-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    display: none;
    font-weight: 500;
    animation: bundlebuddy-slide-in 0.3s ease-out;
}

@keyframes bundlebuddy-slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bundlebuddy-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.bundlebuddy-message.success::before {
    content: '✓ ';
    font-weight: bold;
}

.bundlebuddy-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.bundlebuddy-message.error::before {
    content: '⚠ ';
    font-weight: bold;
}

/* Responsive */
@media (max-width: 500px) {
    .bundlebuddy-product-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .bundlebuddy-product-right {
        width: 100%;
        justify-content: space-between;
    }
}
