.aff-product {
    border: 1px solid #e0e0e0;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
}

.aff-product:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.aff-product strong {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.aff-product .aff-content {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.aff-product .aff-image img {
    width: 150px;
    height:auto;
    object-fit: contain;
    border-radius: 4px;
    background: #f9f9f9;
}

.aff-product .aff-info {
    flex: 1;
    min-width: 200px;
    position: relative;
    top: -20px;
}

.aff-product .aff-info h4 {
    margin: 0 0 5px;
    font-size: 16px;
    color: #222;
}

.aff-product .aff-info p {
    margin: 0 0 10px;
}

.aff-product .aff-info .price {
    color: #e60000;
    font-size: 16px;
    font-weight: bold;
}

.aff-product .aff-info .list-price {
    text-decoration: line-through;
    color: #888;
    font-size: 14px;
}

.aff-product .aff-info .discount {
    color: green;
    font-weight: bold;
    font-size: 14px;
}

.aff-product .aff-info .buy-button {
    display: inline-block;
    background: #ff4d00;
    color: #fff;
    padding: 0px 15px !important;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s;
}

.aff-product .aff-info .buy-button:hover {
    background: #e64400;
}

.aff-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.aff-price-details {
    display: flex;
    flex-direction: column;
}

.aff-price-details .price {
    color: #e60000;
    font-size: 16px;
    font-weight: bold;
}

.aff-price-details .list-price {
    text-decoration: line-through;
    color: #888;
    font-size: 14px;
}

.aff-price-details .discount {
    color: green;
    font-weight: bold;
    font-size: 14px;
}

.buy-button {
    background: #ff4d00;
    color: #fff;
    padding: 7px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.buy-button:hover {
    background: #e64400;
}

.tile-api-title{
    font-size: 20px !important;
    font-family: Tahoma;
    margin: 0px;
    margin-bottom: 10px;
    line-height: 30px !important;;
    font-weight: bold;
    word-wrap: break-word;     /* Tự động xuống dòng khi từ quá dài */
    overflow-wrap: break-word; /* Tương tự, hỗ trợ thêm trình duyệt mới */
    white-space: normal;       /* Đảm bảo văn bản được xuống dòng */
}
@media screen and (max-width: 600px) {
    .aff-price-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .tile-api-title{
        font-size: 14px !important;
        line-height: 18px !important;
    }
    .buy-button {
        margin-top: 8px;
    }
    .aff-product .aff-info {
        position: relative;
        top: 0px;
    }
}

@media screen and (max-width: 600px) {
    .aff-product .aff-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .aff-product .aff-image img {
        width: 100%;
        height: auto;
        max-width: 150px;
    }
    .aff-price-details {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    .aff-product .aff-info h4 {
        font-size: 13px;
        line-height: 18px;
    }

    .aff-product .aff-info .buy-button {
        margin-top: 10px;
    }
}
