/* ==========================================================================
   Ultra WooCommerce Product Tabs — Styles
   ========================================================================== */

/* --- Centered Header (Intro Title + Description) --- */
.ultra-tabs-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.ultra-tabs-header-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: #222;
    margin: 0 0 12px;
}

.ultra-tabs-header-desc {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* --- Pill Navigation (Course Tags) --- */
.ultra-product-tabs-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 60px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.ultra-product-tabs-nav li {
    margin: 0;
    padding: 0;
}

.ultra-product-tabs-nav a {
    display: block;
    padding: 14px 32px;
    color: #fff;
    background-color: #7c3aed;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 50px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ultra-product-tabs-nav a:hover {
    background-color: #6d28d9;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}

/* --- Tag Sections Container --- */
.ultra-tag-sections {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

/* --- Individual Tag Section (sidebar + grid) --- */
.ultra-tag-section {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
    scroll-margin-top: 120px;
}

/* --- Sidebar (Title + Desc + Back to top) --- */
.ultra-tag-section-sidebar {
    position: sticky;
    top: 100px;
}

.ultra-tag-section-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: #222;
    margin: 0 0 12px;
}

.ultra-tag-section-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 20px;
}

/* --- Back to Top Button --- */
.ultra-btn-back-to-top {
    display: inline-block;
    padding: 12px 28px;
    background-color: #7c3aed;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.ultra-btn-back-to-top:hover {
    background-color: #6d28d9;
    color: #fff;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

/* --- Section Content (Product Grid Area) --- */
.ultra-tag-section-content {
    min-width: 0;
}

/* --- Product Grid --- */
.ultra-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* --- Custom Product Card --- */
.ultra-product-card {
    background: #faf5ff;
    border-radius: 20px;
    border: 1px solid #f0e8f8;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ultra-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(124, 58, 237, 0.12);
    border-color: #e0d4f5;
}

.ultra-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ultra-card-categories {
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.4;
}

.ultra-card-category {
    color: #E4398C;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline;
}

.ultra-card-title {
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.ultra-card-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ultra-card-title a:hover {
    color: #7c3aed;
}

.ultra-card-meta {
    font-size: 13px;
    color: #777;
    margin-bottom: 20px;
}

.ultra-card-meta strong {
    color: #333;
}

.ultra-card-excerpt {
    margin: 0 0 25px 0;
    flex-grow: 1;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.ultra-card-excerpt p:last-child {
    margin-bottom: 0;
}

.ultra-card-excerpt ul,
.ultra-card-excerpt ol {
    margin: 0 0 8px 0;
    padding-left: 20px;
}

.ultra-card-excerpt li {
    margin-bottom: 4px;
}

.ultra-card-excerpt strong,
.ultra-card-excerpt b {
    font-weight: 700;
    color: #333;
}

.ultra-card-excerpt em,
.ultra-card-excerpt i {
    font-style: italic;
}

.ultra-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    flex-grow: 1;
}

.ultra-card-features li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.ultra-card-features li::before {
    content: "\2022";
    color: #ccc;
    position: absolute;
    left: 0;
    top: 0;
    font-size: 18px;
    line-height: 1;
}

.ultra-card-action {
    text-align: center;
    margin-top: auto;
}

.ultra-card-action--dual {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.ultra-btn-apply {
    display: inline-block;
    background-color: #E4398C;
    color: #fff;
    padding: 12px 36px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.ultra-btn-apply:hover {
    background-color: #c9176e;
    color: #fff;
    box-shadow: 0 5px 15px rgba(229, 29, 126, 0.3);
}

.ultra-btn-add-to-cart {
    background-color: transparent;
    color: #E4398C;
    border: 2px solid #E4398C;
    padding: 10px 28px;
}

.ultra-btn-add-to-cart:hover {
    background-color: #E4398C;
    color: #fff;
    box-shadow: 0 5px 15px rgba(229, 29, 126, 0.2);
}

/* --- Intro Card (flat grid mode) --- */
.ultra-intro-card .ultra-card-inner {
    justify-content: center;
}

.ultra-intro-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px;
}

.ultra-intro-description {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* --- View All Button (flat grid mode) --- */
.ultra-btn-view-all {
    display: inline-block;
    background-color: transparent;
    color: #7c3aed;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #7c3aed;
    transition: all 0.3s ease;
}

.ultra-btn-view-all:hover {
    background-color: #7c3aed;
    color: #fff;
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.2);
}

/* --- Flat grid fallback (show_filter = no) --- */
.ultra-tab-pane {
    display: none;
    animation: fadeIn 0.5s;
}

.ultra-tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .ultra-tag-section {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ultra-tag-section-sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 8px 20px;
    }

    .ultra-tag-section-title {
        font-size: 24px;
        margin-bottom: 4px;
    }

    .ultra-tag-section-desc {
        margin-bottom: 8px;
        width: 100%;
    }

    .ultra-btn-back-to-top {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .ultra-product-tabs-nav {
        gap: 8px;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .ultra-product-tabs-nav a {
        padding: 10px 22px;
        font-size: 12px;
    }

    .ultra-tabs-header-title {
        font-size: 24px;
    }

    .ultra-tag-sections {
        gap: 50px;
    }

    .ultra-product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}


.ultra-product-card {
    position: relative;
}

.ultra-product-card--has-image {
    padding-top: 0;
    overflow: hidden;
}

.ultra-card-image {
    margin: -25px -25px 20px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.ultra-card-image__link {
    display: block;
    line-height: 0;
}

.ultra-card-image__img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.ultra-product-card--has-image .ultra-card-inner {
    position: relative;
    padding-top: 36px;
}

.ultra-product-card--has-image .ultra-card-price {
    top: 0;
    right: 0;
}

.ultra-card-price {
    position: absolute;
    top: 18px;
    right: 20px;
    color: #E4398C;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;

    .amount {
        line-height: 120%;
        padding: 4px 12px;
        border-radius: 8px;
        background-color: #fff;
        box-shadow: 0px 2px 12px #00000012;
        border: 1px solid #E4398C;
    }
}