.ap-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 10px;
}

/* Tabs lọc theo sàn */
.ap-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
}
.ap-tab {
    border: 1px solid #ddd;
    background: #fff;
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    transition: all .15s ease;
}
.ap-tab:hover { border-color: #ee4d2d; color: #ee4d2d; }
.ap-tab.active { background: #ee4d2d; border-color: #ee4d2d; color: #fff; }

/* Grid sản phẩm */
.ap-grid {
    display: grid;
    grid-template-columns: repeat(var(--ap-columns, 4), 1fr);
    gap: 16px;
}
@media (max-width: 768px) {
    .ap-grid { --ap-columns: 3 !important; }
}
@media (max-width: 480px) {
    .ap-grid { --ap-columns: 2 !important; }
}
.ap-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    transition: transform .15s ease, box-shadow .15s ease;
}
.ap-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.ap-card a { text-decoration: none; color: inherit; display: block; }

.ap-thumb { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #f5f5f5; }
.ap-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ap-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}
.ap-badge-shopee { background: #ee4d2d; }
.ap-badge-tiki { background: #1a94ff; }
.ap-badge-tiktok-shop { background: #000; }

.ap-info { padding: 10px 12px 14px; }
.ap-title {
    font-size: 13px;
    line-height: 1.4;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}
.ap-price {
    font-size: 15px;
    font-weight: 700;
    color: #ee4d2d;
    margin: 0 0 8px;
}
.ap-price-old {
    font-size: 12px;
    font-weight: 400;
    color: #999;
    text-decoration: line-through;
    margin-left: 6px;
}
.ap-buy-btn {
    display: block;
    text-align: center;
    background: #ee4d2d;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 0;
    border-radius: 6px;
}

/* Ẩn card không thuộc filter đang chọn */
.ap-card.ap-hidden { display: none; }

