/* Prime Bundles Frontend Styles - Modern Bundle & Save Design */

:root {
    --pb-primary-color: #0073aa;
    --pb-text-color: #333333;
    --pb-bg-color: #f7f7f7;
    --pb-border-radius: 12px;
    --pb-transition: all 0.3s ease;
}

/* Main Container */
.prime-bundles-container {
    margin: 25px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Bundle Offer Card */
.prime-bundle-offer {
    background: #f9f5f0; /* Base light beige color */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255, 255, 255, 0.8) 2%, transparent 2.5%),
        radial-gradient(circle at 85% 30%, rgba(255, 255, 255, 0.6) 1.5%, transparent 2%);
    background-size: 400px 400px, 300px 300px;
    background-position: 0 0, 200px 150px;
    border: 1px solid #e8dfd5; /* Subtle beige border */
    border-radius: var(--pb-border-radius);
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: gentleShift 20s ease-in-out infinite alternate;
}

/* Subtle animation for the background gradient */
@keyframes gentleShift {
    0% {
        background-position: 0px 0px, 200px 150px;
    }
    100% {
        background-position: 20px 20px, 220px 170px;
    }
}

/* Bundle Title */
.bundle-title {
    margin: 0;
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    border-bottom: 2px solid #ffffff;
    position: relative;
}

.bundle-title::before,
.bundle-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4a9eff, transparent);
}

.bundle-title::before {
    left: 24px;
}

.bundle-title::after {
    right: 24px;
}

/* Bundle Tiers */
.bundle-tiers {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 16px;
    background: #f9f5f0; /* Added to match prime bundle offer */
}

/* Individual Bundle Tier - Radio Button Style */
.bundle-tier {
    background: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 10px;
    padding: 20px;
    padding-right: 140px; /* Extra padding for badge */
    cursor: pointer;
    transition: var(--pb-transition);
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.bundle-tier:last-child {
    margin-bottom: 0;
}

.bundle-tier:hover {
    border-color: #4a9eff;
    background: #f8fbff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.15);
}

.bundle-tier.selected {
    border-color: #4a9eff;
    border-width: 2px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    box-shadow: 0 4px 16px rgba(74, 158, 255, 0.2);
}

/* Radio Button */
.bundle-tier::before {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    flex-shrink: 0;
    transition: var(--pb-transition);
    background: #ffffff;
}

.bundle-tier:hover::before {
    border-color: #4a9eff;
}

.bundle-tier.selected::before {
    border-color: #4a9eff;
    border-width: 7px;
    background: #ffffff;
}

/* Tier Content Wrapper */
.tier-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Tier Info */
.tier-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.tier-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tier-quantity {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.tier-discount {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* Badge Styles */
.tier-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tier-badge.most-popular {
    background: #e3f2fd;
    color: #1976d2;
}

.tier-badge.best-value {
    background: #fff3e0;
    color: #e65100;
}

.tier-badge.save {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Tier Price Section */
.tier-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding-right: 100px; /* Add space for badge */
    position: relative;
}

.discounted-price {
    font-size: 18px;
    font-weight: 700;
    color: #4a9eff;
}

.original-price {
    font-size: 15px;
    color: #999;
    text-decoration: line-through;
    font-weight: 500;
}

.savings {
    display: none; /* Hidden in this design */
}

/* Popular Badge */
.bundle-tier.popular::after {
    content: 'Most Popular';
    position: absolute;
    top: 2px;
    right: 2px;
    background: #4a9eff;
    color: #fff;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(74, 158, 255, 0.3);
    z-index: 10;
}

/* Best Value Badge */
.bundle-tier.best-value::after {
    content: 'Best Value';
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ffa726;
    color: #fff;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(255, 167, 38, 0.3);
    z-index: 10;
}

/* Homepage Bundles */
.prime-bundles-homepage {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.homepage-bundle {
    background: #fff;
    border: 2px solid #ffffff;
    border-radius: var(--pb-border-radius);
    padding: 25px;
    transition: var(--pb-transition);
}

.homepage-bundle:hover {
    border-color: #4a9eff;
    box-shadow: 0 8px 25px rgba(74, 158, 255, 0.15);
    transform: translateY(-5px);
}

.homepage-bundle h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.homepage-bundle p {
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prime-bundle-offer {
    animation: fadeInUp 0.5s ease;
}

/* Tier Check Animation */
.tier-check {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: 18px;
    color: #4a9eff;
    animation: checkPop 0.4s ease;
}

@keyframes checkPop {
    0% {
        transform: translateY(-50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translateY(-50%) scale(1.2);
    }
    100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .bundle-tiers {
        padding: 12px;
    }
    
    .bundle-tier {
        padding: 16px;
        padding-right: 16px; /* Reset extra padding on mobile */
        padding-top: 40px; /* Add top padding for badge */
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .bundle-tier::before {
        width: 20px;
        height: 20px;
    }
    
    .bundle-tier.selected::before {
        border-width: 6px;
    }
    
    .tier-content {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .tier-price {
        width: 100%;
        padding-right: 0; /* Reset padding on mobile */
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .discounted-price {
        font-size: 20px;
    }
    
    .original-price {
        font-size: 14px;
    }
    
    .bundle-title {
        font-size: 14px;
        padding: 16px 20px;
    }
    
    .bundle-title::before,
    .bundle-title::after {
        width: 40px;
    }
    
    .prime-bundles-homepage {
        grid-template-columns: 1fr;
    }
    
    /* Badge positioning on mobile */
    .bundle-tier.popular::after,
    .bundle-tier.best-value::after {
        top: 8px;
        right: 8px;
        font-size: 10px;
        padding: 4px 10px;
    }
}

/* Small Mobile */
@media screen and (max-width: 480px) {
    .bundle-tier {
        padding: 12px;
    }
    
    .tier-quantity {
        font-size: 16px;
    }
    
    .tier-discount {
        font-size: 12px;
    }
    
    .discounted-price {
        font-size: 18px;
    }
}

/* Loading State */
.bundle-tier.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Pulse Animation for Add to Cart */
.bundle-tier.adding-to-cart {
    animation: pulse 0.6s ease;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Accessibility */
.bundle-tier:focus {
    outline: 3px solid #4a9eff;
    outline-offset: 2px;
}

.bundle-tier:focus:not(:focus-visible) {
    outline: none;
}

/* Print Styles */
@media print {
    .prime-bundles-container {
        display: none;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .bundle-tier,
    .prime-bundle-offer,
    .homepage-bundle {
        animation: none;
        transition: none;
    }
    
    .bundle-tier:hover {
        transform: none;
    }
}