/* ===================================================
   AQ-STYLE COURSE GRID (Minimal Premium)
==================================================== */

.products-grid.aqskill-style {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px,1fr));
    gap: 2rem;
    align-items: stretch;
}

/* CARD BASE */
.aq-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform .3s ease, box-shadow .3s ease;
}

.aq-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

/* ========================================
   FADE IN ON SCROLL
======================================== */

.aq-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s ease, transform .6s ease;
}

.aq-card.visible {
    opacity: 1;
    transform: translateY(0);
}



/* IMAGE */
/* Center Play Button */
/* =====================================
   CARD IMAGE (FIXED RATIO)
===================================== */

.aq-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;   /* Always same height */
    overflow: hidden;
    background: #f3f4f6;
}


/* IMAGE ZOOM EFFECT */
.aq-card-image img {
    transition: transform .6s ease;
}

.aq-card:hover .aq-card-image img {
    transform: scale(1.05);
}


.aq-card-image:hover::after {
    opacity: 1;
}


/* CARD BODY */
.aq-card-body {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.aq-footer {
    margin-top: auto;  /* Push footer down */
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* META */
.aq-meta {
    display:flex;
    justify-content:space-between;
    font-size:.75rem;
    text-transform:uppercase;
    color:#6b7280;
}

.aq-badge {
    background:#22c55e;
    color:#fff;
    padding:.3rem .7rem;
    border-radius:999px;
    font-size:.7rem;
    font-weight:600;
}

.aq-category {
    color:#111827;
}

/* TITLE */
.aq-title {
    font-size:1.15rem;
    font-weight:700;
    color:#111827;
    margin-top:.4rem;
}

.aq-subtitle {
    font-size:.95rem;
    color:#4b5563;
    margin-bottom:.6rem;
}

/* PROOF */
.aq-proof {
    font-size:.85rem;
    color:#374151;
    display:flex;
    gap:1rem;
}

/* FOOTER */
.aq-footer {
    margin-top:auto;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.aq-price {
    font-size:1.1rem;
    font-weight:700;
    color:#111827;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-direction: column;
    line-height: 1.2;
}


.original-price {
    font-size: .8rem;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 500;
}

.current-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: #111827;
}

.free-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: #16a34a;
}


.aq-btn {
    position: relative;
    overflow: hidden;
    background: #111827;
    color: #fff;
    padding: .6rem 1.4rem;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 600;
    transition: all .3s ease;
}

.aq-btn:hover {
    background: #facc15;
    color: #111;
}

/* SHIMMER */
.aq-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.6) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-25deg);
}

.aq-btn:hover::before {
    animation: shimmer 0.8s ease forwards;
}

@keyframes shimmer {
    100% {
        left: 125%;
    }
}



/* RESPONSIVE */
@media(max-width:640px){
    .aq-card-body {
        padding:1.2rem;
    }
}


/* ========================================
   SKELETON LOADING
======================================== */
.skeleton-card {
    height: 350px;
    border-radius: 12px;
    background: linear-gradient(
        90deg,
        #f3f4f6 25%,
        #e5e7eb 37%,
        #f3f4f6 63%
    );
    background-size: 400% 100%;
    animation: skeleton 1.4s ease infinite;
}

@keyframes skeleton {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}


/* ========================================
   EMPTY STATE
======================================== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1rem;
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: .8rem;
    color: #111827;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}


/* ========================================
   PAGINATION
======================================== */
.pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .6rem;
}

.page-number,
.page-btn {
    padding: .6rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    color: #111827;
    background: #f3f4f6;
    transition: .2s ease;
}

.page-number:hover,
.page-btn:hover {
    background: #e5e7eb;
}

.page-number.active {
    background: #111827;
    color: #fff;
}

/* =========================================
   CATEGORY PILLS (MATCH SCREENSHOT)
========================================= */

.category-filters-lg {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.category-filters-lg .filter-pill {
    padding: .6rem 1.4rem;
    border-radius: 999px;
    border: 1.5px solid #eab308;
    background: #ffffff;
    color: #374151;
    font-weight: 600;
    transition: all .25s ease;
}

.category-filters-lg .filter-pill:hover {
    background: #fef3c7;
}

.category-filters-lg .filter-pill.active {
    background: #eab308;
    color: #111;
}

/*========================================
VIDEO MODEL
========================================*/

.video-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.video-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.75);
}

.video-box {
    position: relative;
    width: 70%;
    max-width: 900px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    animation: fadeScale .3s ease;
}

@keyframes fadeScale {
    from { opacity:0; transform: scale(.9); }
    to { opacity:1; transform: scale(1); }
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 2;
}


/*===========================
Above Pagination
===========================*/

.results-info {
    margin-top: 2rem;
    text-align: center;
    color: #6b7280;
    font-size: .9rem;
}

.products-grid {
    transition: opacity .3s ease;
}

.products-grid.loading {
    opacity: 0.2;
    pointer-events: none;
}


/*===========================
    TITLE CLAMP
===========================*/

/* TITLE CLAMP */
.aq-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.aq-subtitle {
    font-size: .9rem;
    color: #4b5563;

    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===============================
   IMAGE OVERLAY ELEMENTS
=============================== */


/* Play Icon */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    color: #111;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: .3s ease;
}

.aq-card-image:hover .play-icon {
    opacity: 1;
}

/* Badge - Top Left */
.image-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    background: #22c55e;
    color: #fff;
    padding: .3rem .8rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}
/* Rating - Top Right */
.image-rating {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: .3rem .8rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}

/* ===============================
   MOBILE REFINEMENT 
=============================== */

/* MOBILE REFINEMENT */
@media (max-width: 768px) {

    .products-grid.aqskill-style {
        gap: 1.4rem;
    }

    .aq-card-body {
        padding: 1.2rem;
    }

    .aq-title {
        font-size: 1rem;
    }

    .aq-btn {
        padding: .5rem 1.1rem;
        font-size: .85rem;
    }

    .results-info {
        font-size: .85rem;
        margin-top: 1.5rem;
    }
}

/* ===============================
   QUICK VIEW BUTTON 
=============================== */
/* QUICK VIEW BUTTON */
.quick-view-btn {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    color: #fff;
    padding: .4rem 1rem;
    font-size: .8rem;
    border-radius: 999px;
    opacity: 0;
    transition: .3s ease;
}

.aq-card-image:hover .quick-view-btn {
    opacity: 1;
}

/* ===============================
   INSTRUCTORS BADGE
=============================== */

.instructor-badge {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .6rem;
}

.instructor-badge img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* ===============================
  Discount Ribbon
=============================== */
/* DISCOUNT BADGE — BOTTOM RIGHT */
.discount-ribbon {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 5;
    background: #ef4444;
    color: #fff;
    padding: .45rem .85rem;
    font-size: .75rem;
    font-weight: 700;
    border-radius: 8px;
}

/* FREE BADGE (Overrides discount visually) */
.free-ribbon {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 4;
    background: #16a34a;
    color: white;
    padding: .4rem .9rem;
    font-size: .75rem;
    font-weight: 700;
    border-radius: 8px;
}

.image-rating {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2; /* lower than ribbon */
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: .3rem .8rem;
    border-radius: 999px;
    font-size: .75rem;
}


/* ===============================
  WishList
=============================== */
.wishlist-icon {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(255,255,255,.95);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .3s ease;
}

.wishlist-icon:hover {
    background: #facc15;
}


/* ===============================
    FREE COURSES
=============================== */
.free-text {
    color: #16a34a;
    font-weight: 700;
    font-size: 1rem;
}

.original-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: .85rem;
    margin-right: .5rem;
}

/* ===============================
    BESTSELLER BADGE
=============================== */

.bestseller-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #f59e0b;
    color: #111;
    font-size: .75rem;
    font-weight: 700;
    padding: .3rem .8rem;
    border-radius: 999px;
    z-index: 4;
}

/* ===============================
Auto Mark “New” if Created < 7 Days
=============================== */
.new-badge {
    position: absolute;
    top: 50px;
    left: 12px;
    background: #162456;
    color: white;
    font-size: .75rem;
    font-weight: 600;
    padding: .3rem .8rem;
    border-radius: 999px;
    z-index: 4;
}

/* ===============================
PAGINATION LOADER
=============================== */
.pagination-loader {
    text-align: center;
    margin: 2rem 0;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #111;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: auto;
}

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

/* ===============================
Add Infinite Scroll
=============================== */
#infiniteScrollTrigger {
    height: 1px;
}

.products-grid.loading {
    opacity: 0.6;
    transition: opacity .3s ease;
}

/* ===============================
   TRENDING HEAT INDICATOR
=============================== */

.heat-indicator {
    position: absolute;
    bottom: 12px;
    left: 12px;
    font-size: 14px;
    letter-spacing: 2px;
    background: rgba(255,255,255,0.9);
    padding: 4px 8px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    animation: heatPulse 2s infinite ease-in-out;
}

@keyframes heatPulse {
    0% { transform: scale(1); opacity: .8; }
    50% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: .8; }
}
