/* assets/css/frontend.css — Affiliate Product Cards */

.afs-products-wrap {
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.afs-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 1.2rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.afs-heading-icon { font-size: 1.2rem; }

/* ── Grid ─────────────────────────────────────────────── */

.afs-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

/* ── Card ─────────────────────────────────────────────── */

.afs-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .2s, box-shadow .2s;
}

.afs-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    text-decoration: none;
}

/* ── Image ────────────────────────────────────────────── */

.afs-img-wrap {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f1f3f5;
}

.afs-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.afs-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #adb5bd;
}

.afs-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #e63946;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
}

/* ── Body ─────────────────────────────────────────────── */

.afs-card-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 4px;
}

.afs-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Stars */
.afs-stars { font-size: 13px; display: flex; align-items: center; gap: 2px; }
.afs-star--full  { color: #f4a261; }
.afs-star--half  { color: #f4a261; opacity: .6; }
.afs-star--empty { color: #dee2e6; }
.afs-rating-num  { font-size: 11px; color: #868e96; margin-left: 2px; }

.afs-sold {
    font-size: 11px;
    color: #868e96;
    margin: 0;
}

.afs-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f1f3f5;
}

.afs-price {
    font-size: 15px;
    font-weight: 700;
    color: #e63946;
}

.afs-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #ee4d2d;
    padding: 4px 10px;
    border-radius: 99px;
    white-space: nowrap;
}

.afs-shopee-icon {
    flex-shrink: 0;
    fill: #fff;
}

/* ── Disclaimer ───────────────────────────────────────── */

.afs-disclaimer {
    font-size: 11px;
    color: #adb5bd;
    margin: 1rem 0 0;
    text-align: center;
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 480px) {
    .afs-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
