/* CBeforeUBuy Custom Styles */

/* :root variables removed - using assets/css/variables.css */

body.page-template-cbeforeubuy-page-template {
    background-color: #ffffff;
    /* White background like other pages */
    font-family: var(--cb-font-main);
    color: var(--cb-text-main);
}

/* Ensure breadcrumb area has white background (no gradient) */
body.page-template-cbeforeubuy-page-template .cb-breadcrumbs-wrapper {
    background: #ffffff !important;
}

/* Hero section should have its gradient, but start below breadcrumbs */
body.page-template-cbeforeubuy-page-template .cb-common-hero {
    margin-top: 0;
}

.cbu-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Hero styles handled by .cb-common-hero */

/* Tabs Navigation */
.cbu-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.cbu-tab-btn {
    background: var(--cb-bg-card);
    border: 1px solid var(--cb-border-light);
    padding: 14px 32px;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--cb-font-main);
    font-weight: var(--cb-font-weight-semibold);
    font-size: 1rem;
    color: var(--cb-text-cloud);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.cbu-tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cbu-tab-btn:hover::before {
    left: 100%;
}

.cbu-tab-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.cbu-tab-btn:hover svg {
    transform: scale(1.1) rotate(5deg);
}

.cbu-tab-btn:hover {
    border-color: var(--cb-color-primary);
    color: var(--cb-color-primary);
    background: var(--cb-bg-primary-faint);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.cbu-tab-btn.active {
    background: var(--cb-gradient-primary);
    color: var(--cb-text-inverse);
    border-color: var(--cb-color-primary);
    box-shadow: var(--cb-shadow-glow-primary);
    transform: translateY(-2px);
}

.cbu-tab-btn.active svg {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Tabs Content */
.cbu-tab-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.cbu-tab-content.active {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 35px;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Styling */
.cbu-card {
    background: var(--cb-bg-card);
    border-radius: var(--cb-radius-md);
    padding: 40px 32px 32px;
    box-shadow: var(--cb-shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--cb-border-light);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Shimmer effect on hover */
.cbu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(99, 102, 241, 0.05),
            transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.cbu-card:hover::before {
    left: 100%;
}

.cbu-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Premium Badge - Modern Pill Style */
.cbu-card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--cb-gradient-primary);
    color: white;
    padding: 6px 14px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 100px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    z-index: 2;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

/* Icon wrapper with gradient accent */
.cbu-card-icon-wrapper {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--cb-bg-subtle) 0%, rgba(99, 102, 241, 0.08) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 26px;
    color: var(--cb-color-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.cbu-card-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: var(--cb-gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cbu-card:hover .cbu-card-icon-wrapper {
    transform: scale(1.1) rotate(-5deg);
}

.cbu-card:hover .cbu-card-icon-wrapper::after {
    opacity: 1;
}

.cbu-card-icon-wrapper svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
    position: relative;
    z-index: 1;
    transition: fill 0.3s ease;
}

.cbu-card:hover .cbu-card-icon-wrapper svg {
    fill: white;
}

.cbu-card-title {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 14px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.cbu-card-title a {
    color: var(--cb-text-main);
    text-decoration: none;
    transition: all 0.3s ease;
    background-image: linear-gradient(to right,
            var(--cb-color-primary) 0%,
            var(--cb-color-primary) 100%);
    background-size: 0 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
}

.cbu-card-title a:hover {
    color: var(--cb-color-primary);
    background-size: 100% 2px;
}

.cbu-card-desc {
    color: var(--cb-text-cloud);
    font-size: 0.975rem;
    margin-bottom: 30px;
    line-height: 1.65;
    flex-grow: 1;
}

.cbu-card-meta {
    border-top: 1px solid var(--cb-border-light);
    padding-top: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.cbu-price-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--cb-text-muted);
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
    letter-spacing: 0.6px;
}

.cbu-price-value {
    font-weight: 800;
    color: var(--cb-color-primary-dark);
    font-size: 1.15rem;
    display: block;
}

.cbu-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cb-text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--cb-bg-subtle);
    padding: 10px 18px;
    border-radius: 50px;
    white-space: nowrap;
}

.cbu-card-link:hover {
    color: var(--cb-text-inverse);
    background: var(--cb-text-main);
    padding-right: 24px;
    transform: translateX(4px);
}

.cbu-card-link svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cbu-card-link:hover svg {
    transform: translateX(6px);
}

/* Empty State / Not Found */
.cbu-not-found {
    text-align: center;
    grid-column: 1 / -1;
    padding: 100px 40px;
    background: linear-gradient(135deg, var(--cb-bg-card) 0%, rgba(99, 102, 241, 0.02) 100%);
    border-radius: var(--cb-radius-md);
    border: 1px solid var(--cb-border-light);
    box-shadow: var(--cb-shadow-sm);
}

.cbu-not-found h3 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 18px;
    color: var(--cb-text-main);
    letter-spacing: -0.02em;
}

.cbu-not-found p {
    color: var(--cb-text-cloud);
    font-size: 1.15rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.cbu-btn {
    display: inline-block;
    background: var(--cb-gradient-primary);
    color: var(--cb-text-inverse);
    padding: 16px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 35px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
    position: relative;
    overflow: hidden;
}

.cbu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cbu-btn:hover::before {
    left: 100%;
}

.cbu-btn:hover {
    transform: translateY(-4px);
    box-shadow:
        0 8px 20px rgba(99, 102, 241, 0.35),
        var(--cb-shadow-glow-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .cbu-wrapper {
        padding: 40px 20px;
    }

    .cbu-tabs-nav {
        gap: 10px;
        margin-bottom: 35px;
    }

    .cbu-tab-btn {
        padding: 11px 22px;
        font-size: 0.9rem;
    }

    .cbu-tab-btn svg {
        width: 18px;
        height: 18px;
    }

    .cbu-tab-content.active {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .cbu-card {
        padding: 35px 28px 28px;
    }

    .cbu-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .cbu-card-link {
        width: 100%;
        justify-content: center;
    }

    .cbu-not-found {
        padding: 70px 30px;
    }

    .cbu-not-found h3 {
        font-size: 1.8rem;
    }

    .cbu-not-found p {
        font-size: 1rem;
    }
}

/* Tablet responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .cbu-tab-content.active {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}