/* --- StudEco Premium Marketplace UI --- */
.marketplace-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}
.marketplace-header .title-block h2 {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}
.marketplace-header .title-block p {
    font-size: 16px;
    color: #64748b;
    margin: 0;
}
.marketplace-header .controls {
    display: flex;
    gap: 12px;
    align-items: center;
}
.marketplace-header .controls select, .marketplace-header .controls button {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    color: #334155;
    outline: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}
.marketplace-header .controls select:hover, .marketplace-header .controls button:hover {
    border-color: #0ea5e9;
    color: #0ea5e9;
}

/* Premium Card Layout */
.premium-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    padding: 20px;
    display: flex;
    gap: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

/* Left: Image */
.premium-card .card-img-wrapper {
    flex: 0 0 160px;
    height: 160px;
    border-radius: 16px;
    background: #f8fafc;
    overflow: hidden;
    position: relative;
}
.premium-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.premium-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}
.premium-card .favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    z-index: 2;
    transition: color 0.2s;
}
.premium-card .favorite-btn:hover {
    color: #ef4444;
}

/* Middle: Info */
.premium-card .card-info {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.premium-card .card-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.3;
}
.premium-card .card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.premium-card .card-title a:hover {
    color: #0ea5e9;
}
.premium-card .card-desc {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.premium-card .badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.premium-card .badge {
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-blue { background: #e0f2fe; color: #0369a1; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* Right: Price & CTA */
.premium-card .card-action {
    flex: 0 1 180px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-left: 20px;
    border-left: 1px solid #f1f5f9;
    position: relative;
    z-index: 1;
}
.premium-card .card-action::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(14,165,233,0.1) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
    border-radius: 50%;
}
.premium-card .price-original {
    font-size: 13px;
    color: #94a3b8;
    text-decoration: line-through;
    margin-bottom: 2px;
}
.premium-card .price-current {
    font-size: 26px;
    font-weight: 800;
    color: #0ea5e9;
    margin-bottom: 16px;
    line-height: 1;
}
.premium-card .cta-btn {
    background: #0ea5e9;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    width: 100%;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.premium-card .cta-btn i {
    margin-right: 6px;
}
.premium-card .cta-btn:hover {
    background: #0284c7;
    transform: translateY(-2px);
    color: #fff;
}

/* Sold State */
.premium-card.is-sold {
    background: #fafafa;
}
.premium-card.is-sold .card-img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.4);
    z-index: 1;
}
.badge-sold {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 8px;
    z-index: 10;
    box-shadow: 2px 2px 10px rgba(220, 38, 38, 0.1);
    display: flex;
    align-items: center;
    gap: 4px;
}
.premium-card .cta-btn.disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}
.premium-card .cta-btn.disabled:hover {
    transform: none;
    background: #e2e8f0;
}

/* Responsive */
@media (max-width: 991px) {
    .premium-card {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    .premium-card .card-img-wrapper {
        flex: none;
        width: 100%;
        height: 200px;
    }
    .premium-card .card-action {
        flex: none;
        min-width: 0;
        border-left: none;
        border-top: 1px solid #f1f5f9;
        padding-left: 0;
        padding-top: 20px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }
    .premium-card .card-action::before {
        display: none;
    }
    .premium-card .price-current {
        margin-bottom: 0;
        white-space: nowrap;
    }
    .premium-card .cta-btn {
        width: auto;
        flex-shrink: 1;
        padding: 10px 14px;
    }
}
