/* Clip horizontal overflow at the body level so 100vw sections
   extend edge-to-edge without a horizontal scrollbar.             */
body.post-type-archive-wpsell_course,
body.tax-wpsell_course_category {
    overflow-x: clip;
}

/* Force archive wrapper to fill Astra's flex-row .ast-container */
.wpsell-courses-archive {
    width: 100%;
}

/* Archive Header — full-viewport gold hero */
.wpsell-archive-header {
    background: linear-gradient(135deg, var(--wpsell-gold) 0%, #b89840 100%);
    color: #fff;
    padding: 60px 0 50px;
    margin-bottom: 0;
    width: 100vw;
    position: relative;
    left: calc(-50vw + 50%);
    box-sizing: border-box;
}

.wpsell-archive-header .wpsell-breadcrumbs {
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.wpsell-archive-header .wpsell-breadcrumbs a {
    color: #fff;
    text-decoration: none;
}

.wpsell-archive-header .wpsell-breadcrumbs span {
    margin: 0 5px;
}

.wpsell-archive-title {
    font-size: 42px;
    margin: 0 0 15px 0;
    color: #fff;
}

.wpsell-archive-description {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 20px;
}

.wpsell-archive-meta {
    font-size: 15px;
    opacity: 0.85;
    margin-bottom: 4px;
}

/* Filters — also full-viewport width */
.wpsell-filters-section {
    background: #f8f8f8;
    padding: 24px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid #e5e5e5;
    width: 100vw;
    position: relative;
    left: calc(-50vw + 50%);
    box-sizing: border-box;
}

.wpsell-filters-form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.wpsell-filter-group {
    flex: 1 1 0%;
    min-width: 180px;
}

.wpsell-filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--wpsell-800);
}

.wpsell-filter-group select {
    width: 100%;
    min-width: 0;
    padding: 10px 15px;
    border: 1px solid var(--wpsell-300);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23737373' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    text-overflow: ellipsis;
}

.wpsell-filter-group select:hover {
    border-color: var(--wpsell-400);
}

.wpsell-filter-group select:focus {
    border-color: var(--wpsell-gold);
    box-shadow: 0 0 0 3px rgba(200, 169, 81, 0.15);
    outline: none;
}

.wpsell-filter-submit {
    padding: 10px 30px;
    background: var(--wpsell-gold);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.wpsell-filter-submit:hover {
    background: var(--wpsell-gold-hover, #B8973E);
}

.wpsell-filter-reset {
    padding: 10px 20px;
    color: var(--wpsell-500);
    text-decoration: none;
    border: 1px solid var(--wpsell-300);
    border-radius: 8px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.wpsell-filter-reset:hover {
    background: #fff5f5;
    border-color: #e57373;
    color: #c62828;
}

/* Courses Grid */
.wpsell-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.wpsell-course-card {
    background: #fff;
    border-radius: var(--wpsell-radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.wpsell-course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.wpsell-course-thumbnail {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--wpsell-100);
}

.wpsell-course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.wpsell-course-card:hover .wpsell-course-thumbnail img {
    transform: scale(1.05);
}

.wpsell-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.wpsell-badge-free {
    background: #28a745;
    color: #fff;
}

.wpsell-badge-sale {
    background: #dc3545;
    color: #fff;
}

.wpsell-course-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wpsell-course-category {
    margin-bottom: 12px;
}

.wpsell-course-category a {
    display: inline-block;
    padding: 4px 12px;
    background: #e7f0ff;
    color: var(--wpsell-gold);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--wpsell-radius-sm);
    transition: background 0.3s;
}

.wpsell-course-category a:hover {
    background: #d0e1ff;
}

.wpsell-course-title {
    font-size: 20px;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.wpsell-course-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s;
}

.wpsell-course-title a:hover {
    color: var(--wpsell-gold);
}

.wpsell-course-excerpt {
    font-size: 14px;
    color: var(--wpsell-500);
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.wpsell-course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--wpsell-200);
    font-size: 13px;
    color: var(--wpsell-500);
}

.wpsell-course-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.wpsell-course-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.wpsell-course-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.wpsell-course-rating .rating-stars {
    color: #ffc107;
}

.wpsell-course-rating .rating-text {
    color: var(--wpsell-500);
}

.wpsell-course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.wpsell-course-price {
    font-size: 18px;
    font-weight: 700;
}

.wpsell-course-price .price-free {
    color: #28a745;
}

.wpsell-course-price .price-regular {
    color: var(--wpsell-400);
    text-decoration: line-through;
    font-size: 14px;
    margin-right: 8px;
}

.wpsell-course-price .price-sale {
    color: #dc3545;
}

.wpsell-course-price .price-current {
    color: var(--wpsell-800);
}

.wpsell-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.wpsell-btn-primary {
    background: var(--wpsell-gold);
    color: #fff;
}

.wpsell-btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* Pagination */
.wpsell-pagination {
    margin: 50px 0;
}

.wpsell-pagination .page-numbers {
    display: inline-flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.wpsell-pagination .page-numbers li {
    display: inline-block;
}

.wpsell-pagination a,
.wpsell-pagination span {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid var(--wpsell-300);
    border-radius: 6px;
    text-decoration: none;
    color: var(--wpsell-800);
    transition: all 0.3s;
}

.wpsell-pagination a:hover {
    background: var(--wpsell-gold);
    color: #fff;
    border-color: var(--wpsell-gold);
}

.wpsell-pagination .current {
    background: var(--wpsell-gold);
    color: #fff;
    border-color: var(--wpsell-gold);
}

/* No Results */
.wpsell-no-results {
    text-align: center;
    padding: 80px 20px;
}

.wpsell-no-results .no-results-icon {
    font-size: 64px;
    color: var(--wpsell-300);
    margin-bottom: 20px;
}

.wpsell-no-results .no-results-icon .dashicons {
    width: 64px;
    height: 64px;
    font-size: 64px;
}

.wpsell-no-results h2 {
    font-size: 28px;
    color: var(--wpsell-800);
    margin-bottom: 15px;
}

.wpsell-no-results p {
    font-size: 16px;
    color: var(--wpsell-500);
    margin-bottom: 30px;
}

/* Container */
.wpsell-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .wpsell-archive-title {
        font-size: 32px;
    }
    
    .wpsell-filters-form {
        flex-direction: column;
        flex-wrap: wrap;
        padding-right: 0;
    }

    .wpsell-filter-reset {
        position: static;
    }
    
    .wpsell-filter-group {
        width: 100%;
    }
    
    .wpsell-courses-grid {
        grid-template-columns: 1fr;
    }
    
    .wpsell-course-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .wpsell-btn {
        text-align: center;
    }
}
/* Category Header */
.wpsell-category-header {
    color: #fff;
    padding: 60px 0;
    margin-bottom: 40px;
}

.wpsell-breadcrumbs {
    font-size: 14px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.wpsell-breadcrumbs a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s;
}

.wpsell-breadcrumbs a:hover {
    opacity: 0.8;
}

.wpsell-breadcrumbs span {
    margin: 0 8px;
}

.category-header-content {
    display: flex;
    gap: 30px;
    align-items: center;
}

.category-icon {
    flex: 0 0 100px;
}

.category-icon i {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
}

.category-info {
    flex: 1;
}

.category-title {
    font-size: 42px;
    margin: 0 0 15px 0;
    color: #fff;
}

.category-description {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 20px;
}

.category-meta {
    display: flex;
    gap: 20px;
    font-size: 16px;
}

.category-meta .dashicons {
    vertical-align: middle;
    margin-right: 5px;
}

/* Subcategories */
.wpsell-subcategories-section {
    background: var(--wpsell-50);
    padding: 50px 0;
    margin-bottom: 40px;
}

.subcategories-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: #1a1a1a;
}

.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.subcategory-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.subcategory-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.subcategory-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--wpsell-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    flex-shrink: 0;
}

.subcategory-info h3 {
    font-size: 16px;
    margin: 0 0 5px 0;
    color: #1a1a1a;
}

.subcategory-count {
    font-size: 13px;
    color: var(--wpsell-500);
}

/* Filters Section - Reuse from archive template */
.wpsell-filters-section {
    background: #f8f8f8;
    padding: 24px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid #e5e5e5;
    width: 100vw;
    position: relative;
    left: calc(-50vw + 50%);
    box-sizing: border-box;
}

.wpsell-filters-form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: nowrap;
    position: relative;
    padding-right: 140px;
}

.wpsell-filter-group {
    flex: 1 1 0%;
    min-width: 0;
}

.wpsell-filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--wpsell-800);
}

.wpsell-filter-group select {
    width: 100%;
    min-width: 0;
    padding: 10px 15px;
    border: 1px solid var(--wpsell-300);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23737373' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    text-overflow: ellipsis;
}

.wpsell-filter-group select:hover {
    border-color: var(--wpsell-400);
}

.wpsell-filter-group select:focus {
    border-color: var(--wpsell-gold);
    box-shadow: 0 0 0 3px rgba(200, 169, 81, 0.15);
    outline: none;
}

.wpsell-filter-submit {
    padding: 10px 30px;
    background: var(--wpsell-gold);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.wpsell-filter-submit:hover {
    background: var(--wpsell-gold-hover, #B8973E);
}

.wpsell-filter-reset {
    position: absolute;
    right: 0;
    bottom: 0;
    padding: 10px 20px;
    color: var(--wpsell-500);
    text-decoration: none;
    border: 1px solid var(--wpsell-300);
    border-radius: 8px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.wpsell-filter-reset:hover {
    background: #fff5f5;
    border-color: #e57373;
    color: #c62828;
}

/* Courses Grid - Reuse from archive template */
.wpsell-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.wpsell-course-card {
    background: #fff;
    border-radius: var(--wpsell-radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.wpsell-course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.wpsell-course-thumbnail {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--wpsell-100);
}

.wpsell-course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.wpsell-course-card:hover .wpsell-course-thumbnail img {
    transform: scale(1.05);
}

.wpsell-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.wpsell-badge-free {
    background: #28a745;
    color: #fff;
}

.wpsell-badge-sale {
    background: #dc3545;
    color: #fff;
}

.wpsell-course-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wpsell-course-title {
    font-size: 20px;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.wpsell-course-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s;
}

.wpsell-course-title a:hover {
    color: var(--wpsell-gold);
}

.wpsell-course-excerpt {
    font-size: 14px;
    color: var(--wpsell-500);
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.wpsell-course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--wpsell-200);
    font-size: 13px;
    color: var(--wpsell-500);
}

.wpsell-course-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.wpsell-course-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.wpsell-course-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.wpsell-course-rating .rating-stars {
    color: #ffc107;
}

.wpsell-course-rating .rating-text {
    color: var(--wpsell-500);
}

.wpsell-course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.wpsell-course-price {
    font-size: 18px;
    font-weight: 700;
}

.wpsell-course-price .price-free {
    color: #28a745;
}

.wpsell-course-price .price-regular {
    color: var(--wpsell-400);
    text-decoration: line-through;
    font-size: 14px;
    margin-right: 8px;
}

.wpsell-course-price .price-sale {
    color: #dc3545;
}

.wpsell-course-price .price-current {
    color: var(--wpsell-800);
}

.wpsell-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.wpsell-btn-primary {
    background: var(--wpsell-gold);
    color: #fff;
}

.wpsell-btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* Pagination */
.wpsell-pagination {
    margin: 50px 0;
}

.wpsell-pagination .page-numbers {
    display: inline-flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.wpsell-pagination .page-numbers li {
    display: inline-block;
}

.wpsell-pagination a,
.wpsell-pagination span {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid var(--wpsell-300);
    border-radius: 6px;
    text-decoration: none;
    color: var(--wpsell-800);
    transition: all 0.3s;
}

.wpsell-pagination a:hover {
    background: var(--wpsell-gold);
    color: #fff;
    border-color: var(--wpsell-gold);
}

.wpsell-pagination .current {
    background: var(--wpsell-gold);
    color: #fff;
    border-color: var(--wpsell-gold);
}

/* No Results */
.wpsell-no-results {
    text-align: center;
    padding: 80px 20px;
}

.wpsell-no-results .no-results-icon {
    font-size: 64px;
    color: var(--wpsell-300);
    margin-bottom: 20px;
}

.wpsell-no-results .no-results-icon .dashicons {
    width: 64px;
    height: 64px;
    font-size: 64px;
}

.wpsell-no-results h2 {
    font-size: 28px;
    color: var(--wpsell-800);
    margin-bottom: 15px;
}

.wpsell-no-results p {
    font-size: 16px;
    color: var(--wpsell-500);
    margin-bottom: 30px;
}

/* Container */
.wpsell-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .category-title {
        font-size: 32px;
    }
    
    .category-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .subcategories-grid {
        grid-template-columns: 1fr;
    }
    
    .wpsell-filters-form {
        flex-direction: column;
        flex-wrap: wrap;
        padding-right: 0;
    }

    .wpsell-filter-reset {
        position: static;
    }
    
    .wpsell-filter-group {
        width: 100%;
    }
    
    .wpsell-courses-grid {
        grid-template-columns: 1fr;
    }
    
    .wpsell-course-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .wpsell-btn {
        text-align: center;
    }
}

/* ── Course Search Bar ──────────────────────────────────────────────── */
.wpsell-course-search {
    margin-top: 24px;
    max-width: 560px;
}

.wpsell-search-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--wpsell-radius-lg, 12px);
    overflow: hidden;
    transition: background var(--wpsell-transition, 150ms ease),
                border-color var(--wpsell-transition, 150ms ease);
}

.wpsell-search-input-wrap:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.wpsell-search-icon {
    padding: 0 0 0 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.wpsell-search-field {
    flex: 1;
    padding: 14px 12px;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
}

.wpsell-search-field::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.wpsell-search-submit {
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background var(--wpsell-transition, 150ms ease);
}

.wpsell-search-submit:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* ── Skeleton Loading ───────────────────────────────────────────────── */
@keyframes wpsellShimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.wpsell-skeleton {
    background: linear-gradient(
        90deg,
        var(--wpsell-100, #f5f5f5) 25%,
        var(--wpsell-200, #e5e5e5) 50%,
        var(--wpsell-100, #f5f5f5) 75%
    );
    background-size: 200% 100%;
    animation: wpsellShimmer 1.5s infinite ease-in-out;
    border-radius: var(--wpsell-radius-sm, 4px);
}

.wpsell-skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    border-radius: var(--wpsell-radius-sm, 4px);
}

.wpsell-skeleton-text.short { width: 60%; }
.wpsell-skeleton-text.medium { width: 80%; }
.wpsell-skeleton-title { height: 22px; width: 70%; margin-bottom: 12px; }
.wpsell-skeleton-image { height: 200px; border-radius: var(--wpsell-radius, 8px) var(--wpsell-radius, 8px) 0 0; }
.wpsell-skeleton-btn { height: 40px; width: 120px; border-radius: var(--wpsell-radius, 8px); }

/* ── Course Card Stagger Animation ──────────────────────────────────── */
@keyframes wpsellFadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

.wpsell-courses-grid .wpsell-course-card {
    animation: wpsellFadeInUp 0.4s ease both;
}

.wpsell-courses-grid .wpsell-course-card:nth-child(1) { animation-delay: 0s; }
.wpsell-courses-grid .wpsell-course-card:nth-child(2) { animation-delay: 0.05s; }
.wpsell-courses-grid .wpsell-course-card:nth-child(3) { animation-delay: 0.1s; }
.wpsell-courses-grid .wpsell-course-card:nth-child(4) { animation-delay: 0.15s; }
.wpsell-courses-grid .wpsell-course-card:nth-child(5) { animation-delay: 0.2s; }
.wpsell-courses-grid .wpsell-course-card:nth-child(6) { animation-delay: 0.25s; }
.wpsell-courses-grid .wpsell-course-card:nth-child(7) { animation-delay: 0.3s; }
.wpsell-courses-grid .wpsell-course-card:nth-child(8) { animation-delay: 0.35s; }
.wpsell-courses-grid .wpsell-course-card:nth-child(9) { animation-delay: 0.4s; }

/* ── Responsive: Search ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .wpsell-course-search {
        max-width: 100%;
    }

    .wpsell-search-submit {
        padding: 14px 16px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wpsell-courses-grid .wpsell-course-card {
        animation: none;
    }

    .wpsell-skeleton {
        animation: none;
    }
}

/* ── AJAX Loading ──────────────────────────────────────────────────── */
#wpsell-courses-results {
    transition: opacity 0.25s ease;
    min-height: 200px;
    position: relative;
}

#wpsell-courses-results.wpsell-loading {
    opacity: 0.35;
    pointer-events: none;
}

#wpsell-courses-results.wpsell-loading::after {
    content: '';
    position: absolute;
    top: 80px;
    left: 50%;
    width: 36px;
    height: 36px;
    margin-left: -18px;
    border: 3px solid var(--wpsell-200, #e5e5e5);
    border-top-color: var(--wpsell-gold, #C8A951);
    border-radius: 50%;
    animation: wpsellSpin 0.6s linear infinite;
    z-index: 10;
}

.wpsell-ajax-spinner {
    text-align: center;
    padding: 60px 0;
    color: var(--wpsell-500);
    font-size: 16px;
}

.wpsell-ajax-spinner::before {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 3px solid var(--wpsell-200);
    border-top-color: var(--wpsell-gold);
    border-radius: 50%;
    animation: wpsellSpin 0.7s linear infinite;
}

@keyframes wpsellSpin {
    to { transform: rotate(360deg); }
}

.wpsell-filters-form .wpsell-ajax-filter {
    transition: border-color 0.2s;
}

.wpsell-filters-form .wpsell-ajax-filter:focus {
    border-color: var(--wpsell-gold);
    outline: none;
}
